Add/Update Site Group


If a business has multiple sites or locations, you can organize them by putting them all in a single Site Group.


Point de terminaison

The following endpoint can be used to add or update site groups. You must replace the {base_url} variable.

POST
{base_url}/api/v4/siteGroup/addUpdate

Demande
Champ
Type
Description
externalId
String
The unique site group id from the source system/database. If we detect a record with the same `external_id`, it will be updated, otherwise it will be added.
name
String
Le nom du groupe de site.
agency
Agency
Une référence au dossier de l'agence.
siteEnterprise
Une référence au dossier de l'entreprise du site.
deleted
Boolean
Ce drapeau représente si l'enregistrement est supprimé et n'est plus disponible pour être utilisé.
Réponse
Champ
Type
Description
success
Boolean
Whether the record was added or updated successfully.
action
String
Informs whether the record was added or updated. Will only be returned if `success` is `true`.
One of `added`, `updated`
_id
String
The auto generated id assigned to the record.
errors
String [ ]
A list of errors. Will only be returned if `success` is `false`.
Sample Response (Successful)
			
{
  "success": true,
  "action": "added",
  "_id": "60f720d248f143332af022e0"
}


		
Sample Response (Failed)
			
{
  "success": false,
  "errors": [
    "invalid field2",
    "missing field_name"
  ]
}