Errors
Errors
An API request may fail due to a request or server error.
Errors are returned using standard HTTP Status Codes. The available status codes are defined by RFC 7231 and registered status codes are listed in the IANA Status Code Registry.
An error will include a response body in JSON format.
Response Status Codes
Status-code element is a three-digit integer code giving the result of the attempt to understand and satisfy the request. HTTP has a set of standard status codes which fall into five categories:
- Informational (
1xx) - Success (
2xx) - Redirection (
3xx) - Client Errors (
4xx) - Server Errors (
5xx)
Informational (1xx)
Not currently supported.
Success (2xx)
The following 2xx status codes are supported:
| Code | Reason-phrase |
|---|---|
200 | OK |
201 | Created |
202 | Accepted |
204 | No Content |
Redirection (3xx)
Not currently supported.
Client Errors (4xx)
The following 4xx status codes are supported:
| Code | Reason-phrase |
|---|---|
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
405 | Method Not Allowed |
409 | Conflict |
412 | Precondition Failed |
413 | Payload Too Large |
415 | Unsupported Media Type |
Server Errors (5xx)
The following 5xx status codes are supported:
| Code | Reason-phrase |
|---|---|
500 | Internal Server Error |
503 | Service Unavailable |
Response Headers
| Name | Description |
|---|---|
| content-type | REQUIRED. MIME type of the content: application/json |
| apple-request-id | Unique ID |
HTTP/1.1 404 Not Found
apple-request-id: 0a8af52f-aa59-4cbd-96a6-bde380fc64ea
content-type: application/json
Response Body
| Name | Type | Description |
|---|---|---|
code | string | REQUIRED. May be prefixed with a resource type. Possible values |
message | string | Message describing the issue |
context | object | Refer to Context |
details | object | Refer to Details |
Context
| Name | Type | Description |
|---|---|---|
| key | string | A name-value map of a variable and its value necessary to construct the message. A null value indicates the referenced field was not included in the request body, as distinct from being present with a non-matching value.REQUIRED when message includes dynamic content |
Refer to FAQs for additional information about how a partner may use context
Details
| Name | Type | Description |
|---|---|---|
createdDate | dateTime | Date and time the error was recorded |
submitted | array | Field-value pairs representing the values submitted in the request. Refer to Details Item |
expected | array | Field-value pairs representing the values expected by the API. Refer to Details Item |
compared | array | Field-value pairs representing existing resource values compared against the request. Refer to Details Item |
Details Item
| Name | Type | Description |
|---|---|---|
field | string | Name of the field |
value | string | Value of the field |
Example Response Body
[
{
"code": "LOCATION__NOT_FOUND",
"message": "Resource not found for Apple-generated '{{id}}'",
"context": {
"id": "9467895078742654451"
}
}
]
HTTP Status Code and Response Body Code Combinations
View Combinations
400 Bad Request
Already Accepted
Code Description
Attempt to contest an Apple Override after it is already accepted.
Code may be returned for these resource types and by the following web service operations:
| Resource Type | Contest |
|---|---|
| Apple Override | ✓ |
Example Response Body
[
{
"code": "APPLE_OVERRIDE__ALREADY_ACCEPTED",
"message": "Change to resource with Apple-generated '{{id}}' already accepted",
"context": {
"id": "30eaaef3-688c-4e82-8547-7c64c1181ffa"
}
}
]
Closed
Code Description
Attempt to accept an Apple Override after it transitioned to CLOSED. An Apple Override closes when the location changes again before the user responds, superseding the override being accepted.
Code may be returned for these resource types and by the following web service operations:
| Resource Type | Accept |
|---|---|
| Apple Override | ✓ |
Example Response Body
[
{
"code": "APPLE_OVERRIDE__CLOSED",
"message": "Apple override with Apple-generated '{{id}}' is closed. If the location has changed, check notifications/feedback for a new override; otherwise no action is needed",
"context": {
"id": "30eaaef3-688c-4e82-8547-7c64c1181ffa"
}
}
]
Already Exists
Code Description
- Attempt to create a resource using a partner provided ID referenced in the body of the request that's associated with an existing resource. Partner provided ID in
messagemay be:
partnersAssetId(brand asset or location asset)partnersBrandIdpartnersLocationIdpartnersReviewId
partnersAssetId(brand asset or location asset)partnersBrandIdpartnersLocationId
- Attempt to create a resource using the resource named in the URL path that's associated with an existing resource.
- Attempt to create a resource using values which match an already existing resource. (For Location, refer to Is Matched)
Code may be returned for these resource types and by the following web service operations:
| Resource Type | Create |
|---|---|
| Aggregate Rating | ✓ |
| Brand | ✓ |
| Brand Asset | ✓ |
| Location | ✓ |
| Location Asset | ✓ |
| Review | ✓ |
| Resource Type | Create |
|---|---|
| Brand | ✓ |
| Brand Asset | ✓ |
| Location | ✓ |
| Location Asset | ✓ |
Example Response Body
[
{
"code": "BRAND__ALREADY_EXISTS",
"message": "Resource already exists with '{{partnersBrandId}}'",
"context": {
"partnersBrandId": "9467895078742653232"
}
}
]
Update In Progress
Code Description
Attempt to update a resource when a previous request is already pending completion.
| Resource Type | Update |
|---|---|
| Review | ✓ |
Example Response Body
[
{
"code": "REVIEW__UPDATE_IN_PROGRESS",
"message": "Update of resource is pending completion",
"context": {
"partnersReviewId": "7ef2d2b4-b6e3-11ed-afa1-0242ac120002"
}
}
]
Organization Type Not Permitted
Code Description
Attempt to call a web service operation that's not eligible for use by the organization type that's originating the request.
Code may be returned for these resource types and by the following web service operations:
| Resource Type | Create | Get | Update | Delete | Deactivate | Extend | Service Restricted To |
|---|---|---|---|---|---|---|---|
| Aggregate Rating | ✓ | ✓ | ✓ | ✓ | N/A | N/A | Non-delegated partner |
| Email ID | ✓ | ✓ | ✓ | ✓ | N/A | N/A | Location owner/delegated partner |
| Review | ✓ | ✓ | ✓ | ✓ | N/A | N/A | Non-delegated partner |
| Showcase | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Location owner/delegated partner |
| Showcase Creative | ✓ | ✓ | ✓ | ✓ | N/A | N/A | Location owner/delegated partner |
| Resource Type | Create | Get | Update | Delete | Deactivate | Extend | Service Restricted To |
|---|---|---|---|---|---|---|---|
| Caller ID | ✓ | ✓ | ✓ | ✓ | N/A | N/A | Location owner/delegated partner |
| Email ID | ✓ | ✓ | ✓ | ✓ | N/A | N/A | Location owner/delegated partner |
| Showcase | ✓ | ✓ | ✓ | ✓ |