Status and Error Codes

Common Response Statuses

  • 200 OK

    • "The operation was executed successfully."
    • "Returns a calculated Order Total."
    • "The Reward Points were successfully deducted from the Customer's Reward Point ledger."
  • 201 Created

    • "The operation was executed successfully."
    • "Signifies that the Customer was created successfully."
    • "Returns the payment method ID for the new payment method that was created."
  • 204 No Content

    • "RMA received."
  • 400 Bad Request

    • "Returns one of an array of different error possibilities. Please refer to the error description in the x-directscale-message header for greater detail."
  • 404 Not Found

    • "A Customer with the given Customer ID was not found."
  • 500 Internal Server Error

    "Something went wrong... Here are some possible reasons for this error:

    • Is the model being sent to the API incorrect?
    • Did you forget a required field?
    • Is the API marked as deprecated, and the date has expired?

    If the answer is "No" to all of these questions, DirectScale could be experiencing technical difficulties. Please contact your DirectScale representative if the issue persists."

Additonal Errors

When errors occur (typically, 400 Bad Request), you’ll find them in the header with this name: X-DirectScale-Message.

X-DirectScale-RequestId: ecf80f16-3556-4c0e-a063-4d67f0f50bf1
X-DirectScale-Message: Item with Id 34 not found for Currency usd, Language en, PriceGroup 2, Store 2.

Although these errors can detail what went wrong, you'll often get an "Object Reference" error. When that happens, it’s most likely due to incoming message formatting. Sometimes it’s an issue in configuration or a bug.