Add/Update Site Enterprise


If a business is a large enterprise that requires many site groups, you can create a Site Enterprise which can contain many Site Groups.


Punto Final

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

POST
{base_url}/api/v3/siteEnterprise/addUpdate

Solicitud
Campo
Tipo
Requerido
Descripción
external_id
String
The unique site enterprise 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
El nombre de la empresa del sitio.
agency
Agency
Una referencia al registro de la agencia.
active
Boolean
--
Esta bandera representa si el registro de la empresa del sitio está activo y disponible para ser utilizado o no.
Default = `true`
Respuesta
Campo
Tipo
Descripción
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"
  ]
}