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
| Property | Type | Description | Required/Optional |
|---|---|---|---|
| accessToken | String | Access 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
| Property | Type | Description |
|---|---|---|
| code | String | Location code/identifier. |
| codeType | String | Code type for code. |
| active | Boolean | When true, creates/updates the location. When false, deactivates (deletes) the location if it exists. |
| name | String | Location display name. |
| internalName | String | Internal name. |
| phone | String | Location phone. |
| String | Location email. | |
| website | String | Location website. |
| address1 | String | Address line 1. |
| address2 | String | Address line 2. |
| city | String | City. |
| state | String | State/region. |
| zip | String | Postal code. |
| country | String | Country. |
| profiles | JSON Array | Optional source profiles associated to the location. |
| profiles[].sourceName | String | Source name (for example google). |
| profiles[].url | String | Source URL. |
| profiles[].id | String | Source identifier. |
| products | JSON Array | Optional list of products to associate. |
| labels | JSON Array | Optional list of labels to associate. |
| entityMappings | Object | Optional external-to-internal mapping values. |
| additionalAttributes | Object | Optional 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
| Property | Type | Description |
|---|---|---|
| status | String | Response status (SUCCESS or PARTIAL_SUCCESS). |
| message | String | Human-readable status message. |
| nonSyncableList | JSON Array | When status is PARTIAL_SUCCESS, contains the subset of request items that could not be processed (for example, sync is not enabled). |
| totalRequests | Integer | Count of request items received. |
| successfulRequests | Integer | Count of request items accepted for processing. |
| failedRequests | Integer | Count of request items that could not be processed. |
Errors
- 400 Bad Request
- Missing required accessToken header.
- Invalid JSON request body.