Create/Update Properties
This endpoint creates or updates multiple units.
A group must be provided for updating or creating the units.
You can provide either a group id through the group_id
parameter or a group external reference through the group_external_ref
attribute.
Do not provide both, as this will result in the request failing.
If no group id or group external reference is provided, the operation will fail.
This endpoint firstly attempts to match the provided units data with existing units via the unit’s identifier body parameter, in order to update an existing entry.
If a unit is not found via the identifier or the identifier parameter is not set, the endpoint attempts to match an existing unit via the address.
Header
The authentication token for your request
Body
The id of the group you want to create or update the units for.
The external reference of the group you want to create or update the units for.
A list of units to be updated or created
Response
The list of units created or updated by the operation along with the most up to date attributes for each unit.
Also indicates whether each of the units was succesfully updated or created and a reason for failure, if the update or creat for the unit failed.
Errors
Listed below are common errors that may be returned by the endpoint, along with their corresponding status code.
Status Code - 400
{
"error": {
"type": "missing_authorization",
"message": "Your request does not include an 'Authorization' header with a bearer token for your account."
}
}
Status Code - 401
{
"error": {
"type": "expired_token",
"message": "The bearer token you have provided in the 'Authorization' header has expired. Please obtain a new one."
}
}
Status Code - 401
{
"error": {
"type": "invalid_authorization",
"message": "The bearer token you have provided in the 'Authorization' header is invalid."
}
}
Status Code - 400
Returned if no group id or external reference is passed in the body.
{
"error": {
"type": "no_group",
"message": "You must either provide a group id or group external reference in the request body."
}
}
Status Code - 400
Returned if both a group id and group_external_ref are provided
{
"error": {
"type": "both_group_identifiers_provided",
"message": "You have provided both a group id and group external reference for the create/update units operation. Please only provide one of the two."
}
}
Status Code - 401
Returned if the authenticated API user does not have access to the requested group.
{
"error": {
"type": "no_access_to_group",
"message": "You do not have access to the group you have provided."
}
}
Status Code - 404
Returned if no group for the provided group ID is found
{
"error": {
"type": "group_not_found",
"message": "We could not find a group with the ID you have provided."
}
}