This endpoint synchronises the listings in the given group with the provided listings.
POST
/
listing
/
sync
This endpoint allows you to update, create and delete listings for a group.
The endpoint will attempt to reconcile every listing in the request body with an existing one for the given group and update it with the provided details.
If a listing is not found, a new one will be created.
Listings for the provided group that are not included in the request body will be deleted.
If there are no listings passed in the request body, all listings for the provided porfolio will be deleted.
You must provide either a group id via the group_id parameter or a group external reference via the group_external_ref attribute.
If both are provided, the request will not be successful.
Please note that passing both the number_of_bathrooms and entries under the bathrooms attribute is not supported and will result in an error being fed back.
Listed below are common errors that may be returned by the endpoint, along with their corresponding status code.
Status Code - 400
Missing Authorization header
{"error":{"type":"missing_authorization","message":"Your request does not include an 'Authorization' header with a bearer token for your account."}}
Status Code - 401
Expired Authorization header bearer token value
{"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
Invalid Authorization header bearer token value
{"error":{"type":"invalid_authorization","message":"The bearer token you have provided in the 'Authorization' header is invalid."}}
Status Code - 400
Returned if both a group id and group_external_ref are provided
Both group id and external ref provided for the listing synchronise operation
{"error":{"type":"both_group_identifiers_provided","message":"You have provided both a group id and group external reference for the synchronise listings operation. Please only provide one of the two."}}
Status Code - 400
Returned if no group_id or group_external_ref is provided
No group provided for the listing synchronise operation
{"error":{"type":"no_group_provided","message":"You have not provided either a group id or a group external reference for the synchronise listings operation. Please provide one of the two."}}
Status Code - 400
Returned if both the number_of_bathrooms and the bathrooms attributes are populated
Both the number_of_bathrooms and the bathrooms attributes are populated
{"error":{"type":"both_bathroom_attributes_provided","message":"You have provided both a number_of_bathrooms and a bathrooms attribute. Please only provide one of the two."}}
Status Code - 401
Returned if the user does not have access to the provided group
Authenticated user does not have access to the requested group
{"error":{"type":"no_access_to_group","message":"You do not have access to the synchronise listings operation for the group you have provided in the request."}}
Status Code - 401
Returned if no external reference is provided for one of the listings
No external reference provided for a listing
{"error":{"type":"no_external_reference","message":"You have not provided an external reference for a listing. Please provide one."}}
Status Code - 401
Returned if any of the dates provided on a listing are in an incorrect format
Date on listing is in an incorrect format
{"error":{"type":"date_format_invalid","message":"You have provided a date in an invalid format. All dates must be provided in the YYYY-MM-DD format."}}
Status Code - 401
Returned if any of the listings are missing a unit_type field
Vacancy is missing unit_type
{"error":{"type":"missing_unit_type","message":"You are missing the required unit_type field for a listing. Please add the field to your listing."}}
Status Code - 401
Returned if any of the listings are missing the listing_url field
Listing is missing listing_url
{"error":{"type":"missing_listing_url","message":"You are missing the required listing_url field for a listing. Please add the field to your listing."}}
Status Code - 401
Returned if any of the listings have an invalid unit_type
Listing has invalid unit_type
{"error":{"type":"invalid_unit_type","message":"Invalid value for unit_type field on a listing. Please use either \"apartment\" or \"studio_apartment\"."}}
Status Code - 401
Returned if neither of the bathroom attributes are provided
Listing has neither of the bathroom attributes provided
{"error":{"type":"no_bathroom_attributes_provided","message":"You have provided neither the number_of_bathrooms or the bathrooms attribute. Please provide one of the two."}}
Status Code - 401
Returned if the bathroom attribute is not provided and the number of bathrooms is less than 1
Listing does not have a bathroom attribute and the number of bathrooms is less than 1
{"error":{"type":"invalid_number_of_bathrooms","message":"You have not provided a bathroom attribute and set the number_of_bathrooms to less than 1. Please provide the bathrooms attribute or set the number_of_bathrooms to a number greater than 0."}}