Response Body
For GET requests to the Order resource, the RepSpark API returns a JSON body containing one or more Order's data. For POST and PUT requests to resources, the API either returns a successful 200 HTTP status code or an error response body. Known errors generally include an error code, a quick description, and may include additional details to assist with troubleshooting.
Response Headers
X-RepSpark-ErrorCode
: Contains the custom RepSpark error response code.
X-RepSpark-TransactionTrackingNumber
: Helps RepSpark assist with troubleshooting.
X-RepSpark-TransactionBatchTrackingNumber
: Helps RepSpark assist with troubleshooting.
Response Codes
Extra details will appear in place of the notation.
RepSpark's API uses the following response codes:
Response Code | RepSpark Code | Message |
---|---|---|
200 OK | OK | Success |
301 Permanently Moved | PermanentlyMoved | Please change HTTP requests to HTTPS requests. |
400 Bad Request | MissingRequiredHeader | <HEADER_NAME> header was not specified. |
400 Bad Request | UnsupportedHeader | HTTP header <HEADER_NAME> specified in the request is not supported. |
400 Bad Request | UnsupportedQueryParameter | Query parameter <QUERY_PARAMETER> specified in the request URI is not supported. |
400 Bad Request | InvalidQueryParameter | Query parameter <QUERY_PARAMETER> specified in the request URI is not valid. |
400 Bad Request | InvalidHttpVerb | The HTTP verb specified was not recognized by the server. |
400 Bad Request | InvalidHeaderValue | The value provided for HTTP header <HEADER_NAME> was not valid. Verify the value including the format. |
400 Bad Request | UnsupportedContentType | The specified content type is not supported. |
400 Bad Request | DatabaseConnectionError | Unable to reach the database, please try later. |
400 Bad Request | InvalidInput | Request input <INPUT_STRING> is not valid. Alternate: A field input value in the JSON request body is not valid. <FIELD_DETAILS> |
400 Bad Request | DuplicateEntities | Uploaded data for <RESOURCE_NAME> entity contains duplicates. Duplicates are not allowed for this entity sync. See Details below for a list of duplicates in your data. |
400 Bad Request | NullOrMissingField | Uploaded data for <RESOURCE_NAME> entity contains null data for or is missing the required field: '<FIELD_NAME>'. |
400 Bad Request | InvalidInputLength | One or more of your string values exceeds maximum allowable length for the field. Please check value lengths and try again. |
400 Bad Request | NumericOverflowDuringTransform | One of your numeric field values exceeds allowable length. Please check numbers/decimal values or contact RepSpark for further assistance. |
401 Forbidden | MissingAuthenticationInfo | The authentication information was not provided. Verify the value of Authorization header. |
401 Forbidden | InvalidAuthenticationInfo | The authentication information was not provided in the correct format. Verify the value of Authorization header. |
401 Forbidden | AuthenticationFailed | Server failed to authenticate the request. Make sure the value of the Authorization header is formed correctly. |
404 Not Found | ResourceNotFound | The specified resource does not exist. |
404 Not Found | SchemaNotFound | The specified schema does not exist. |
404 Not Found | ProcessorNotFound | The specified processor does not exist. |
404 Not Found | TransactionNotFound | The specified transaction does not exist. |
405 Method Not Allowed | UnsupportedHttpVerb | The resource doesn’t support the specified HTTP verb. |
409 Conflict | TransactionAlreadyExists | Transaction with the same token already exists. |
409 Conflict | SyncAlreadyRunning | Cannot run <RESOURCE_NAME> sync. There is currently an unfinished sync running for the <RESOURCE_NAME> entity. Please try again later. |
500 Internal Server Error | InternalError | The server encountered an internal error. Please retry the request. |
500 Internal Server Error | OperationTimedOut | The operation could not be completed within the permitted time. |
500 Internal Server Error | UnexpectedErrorOnPreProcessing | Unexpected error occurred on pre-processing. |
500 Internal Server Error | UnexpectedErrorOnProcessing | Unexpected error occurred on processing. |
500 Internal Server Error | UnexpectedErrorOnPostProcessing | Unexpected error occurred on post-processing. |
503 Service Unavailable | ServerBusy | The server is currently unable to receive requests. Please retry your request. |
Duplicates
Submitting duplicate entity data usually returns an error response in the style of the example below:
{
"ErrorCode": "DuplicateEntities",
"ErrorMessage": "Uploaded data for Product entity contains duplicates. Duplicates are not allowed
for this entity sync. See Details below for a list of duplicates in your data.",
"Details":
{
"Duplicates":
[
{
"ProductNumber": "W7100TRA",
"ColorCode": "BLU",
"Count": 2
},
{
"ProductNumber": "BLS-RTL",
"ColorCode": "Englewood ",
"Count": 5
}
]
}
}
If the ErrorCode returned indicates Duplicate Entities, but the duplicate items are not specified in Details, then duplicates may be present in the array properties within items.