Skip to main content

Location

Introduction

This API supports the creation of location entities and allows submitting an array of entities with their properties. The same endpoint can also be used to update existing location entities.

Endpoint

POSThttps://api1.consumerism.pressganey.com/api/entity/sync/locations

Headers

PropertyTypeDescriptionRequired/Optional
accessTokenStringAccess token used to validate access to the entity_sync feature.Required

JSON Request

The request body is a JSON array of location objects.

Sample JSON Request

[
{
"code": "LOC123",
"codeType": "CLIENT",
"active": true,
"name": "Test Location",
"internalName": "Test Location - Internal",
"phone": "555-555-5555",
"email": "location@example.com",
"website": "https://example.com",
"address1": "123 Main St",
"address2": "Suite 100",
"city": "Boston",
"state": "MA",
"zip": "02108",
"country": "US",
"profiles": [
{
"sourceName": "google",
"url": "https://www.google.com/maps",
"id": "abc123"
}
],
"products": ["reputation"],
"labels": ["featured"],
"entityMappings": {
"externalId": "EXT-001"
},
"additionalAttributes": {
"timezone": "America/New_York"
}
}
]

JSON Request Tags

PropertyTypeDescription
codeStringLocation code/identifier.
codeTypeStringCode type for code.
activeBooleanWhen true, creates/updates the location. When false, deactivates (deletes) the location if it exists.
nameStringLocation display name.
internalNameStringInternal name.
phoneStringLocation phone.
emailStringLocation email.
websiteStringLocation website.
address1StringAddress line 1.
address2StringAddress line 2.
cityStringCity.
stateStringState/region.
zipStringPostal code.
countryStringCountry.
profilesJSON ArrayOptional source profiles associated to the location.
profiles[].sourceNameStringSource name (for example google).
profiles[].urlStringSource URL.
profiles[].idStringSource identifier.
productsJSON ArrayOptional list of products to associate.
labelsJSON ArrayOptional list of labels to associate.
entityMappingsObjectOptional external-to-internal mapping values.
additionalAttributesObjectOptional additional attributes (free-form JSON).

JSON Response

A JSON object containing the request processing summary.

Sample JSON Response

{
"status": "SUCCESS",
"message": "All location sync requests processed successfully",
"nonSyncableList": [],
"totalRequests": 1,
"successfulRequests": 1,
"failedRequests": 0
}

JSON Response Tags

PropertyTypeDescription
statusStringResponse status (SUCCESS or PARTIAL_SUCCESS).
messageStringHuman-readable status message.
nonSyncableListJSON ArrayWhen status is PARTIAL_SUCCESS, contains the subset of request items that could not be processed (for example, sync is not enabled).
totalRequestsIntegerCount of request items received.
successfulRequestsIntegerCount of request items accepted for processing.
failedRequestsIntegerCount of request items that could not be processed.

Errors

  • 400 Bad Request
    • Missing required accessToken header.
    • Invalid JSON request body.