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 CodeRepSpark CodeMessage
200 OKOKSuccess
301 Permanently MovedPermanentlyMovedPlease change HTTP requests to HTTPS requests.
400 Bad RequestMissingRequiredHeader<HEADER_NAME> header was not specified.
400 Bad RequestUnsupportedHeaderHTTP header <HEADER_NAME> specified in the request is not supported.
400 Bad RequestUnsupportedQueryParameterQuery parameter <QUERY_PARAMETER> specified in the request URI is not supported.
400 Bad RequestInvalidQueryParameterQuery parameter <QUERY_PARAMETER> specified in the request URI is not valid.
400 Bad RequestInvalidHttpVerbThe HTTP verb specified was not recognized by the server.
400 Bad RequestInvalidHeaderValueThe value provided for HTTP header <HEADER_NAME> was not valid. Verify the value including the format.
400 Bad RequestUnsupportedContentTypeThe specified content type is not supported.
400 Bad RequestDatabaseConnectionErrorUnable to reach the database, please try later.
400 Bad RequestInvalidInputRequest input <INPUT_STRING> is not valid. Alternate: A field input value in the JSON request body is not valid. <FIELD_DETAILS>
400 Bad RequestDuplicateEntitiesUploaded 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 RequestNullOrMissingFieldUploaded data for <RESOURCE_NAME> entity contains null data for or is missing the required field: '<FIELD_NAME>'.
400 Bad RequestInvalidInputLengthOne or more of your string values exceeds maximum allowable length for the field. Please check value lengths and try again.
400 Bad RequestNumericOverflowDuringTransformOne of your numeric field values exceeds allowable length. Please check numbers/decimal values or contact RepSpark for further assistance.
401 ForbiddenMissingAuthenticationInfoThe authentication information was not provided. Verify the value of Authorization header.
401 ForbiddenInvalidAuthenticationInfoThe authentication information was not provided in the correct format. Verify the value of Authorization header.
401 ForbiddenAuthenticationFailedServer failed to authenticate the request. Make sure the value of the Authorization header is formed correctly.
404 Not FoundResourceNotFoundThe specified resource does not exist.
404 Not FoundSchemaNotFoundThe specified schema does not exist.
404 Not FoundProcessorNotFoundThe specified processor does not exist.
404 Not FoundTransactionNotFoundThe specified transaction does not exist.
405 Method Not AllowedUnsupportedHttpVerbThe resource doesn’t support the specified HTTP verb.
409 ConflictTransactionAlreadyExistsTransaction with the same token already exists.
409 ConflictSyncAlreadyRunningCannot run <RESOURCE_NAME> sync. There is currently an unfinished sync running for the <RESOURCE_NAME> entity. Please try again later.
500 Internal Server ErrorInternalErrorThe server encountered an internal error. Please retry the request.
500 Internal Server ErrorOperationTimedOutThe operation could not be completed within the permitted time.
500 Internal Server ErrorUnexpectedErrorOnPreProcessingUnexpected error occurred on pre-processing.
500 Internal Server ErrorUnexpectedErrorOnProcessingUnexpected error occurred on processing.
500 Internal Server ErrorUnexpectedErrorOnPostProcessingUnexpected error occurred on post-processing.
503 Service UnavailableServerBusyThe 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.