LogoLogo
System status
Commerce API references
Commerce API references
  • Commerce API references
  • Warnings and error codes
    • Errors
    • Error codes
      • HTTP response status codes
      • Error format for Shopper APIs
      • Error codes for Shopper APIs
        • 400 Bad Request
        • 401 Unauthorized
        • 403 Forbidden
        • 404 Not Found
        • 405 Method Not Allowed
        • 409 Conflict
        • 412 Precondition Failed
        • 413 Payload Too Large
        • 500 Internal Server Error
      • Error format for Admin APIs
        • Async error objects
        • Sync error objects
        • Deployment objects
        • Warning objects
      • Error codes for Admin APIs
        • Error patterns
        • Supported image types
        • Asynchronous response error codes
        • Deployment error codes
        • Synchronous response error codes
  • Commerce API reference guide
    • API structure
      • API keys
      • Supported OAuth and Commerce API formats
      • Mini cart widget
      • Custom attributes
      • Fields used as keys
      • Fields and expand query parameters
      • Caching responses
      • CORS support
      • JSONP support
      • Transport
      • Service profiles
      • Supported protocols and formats
      • Elements
      • Rate limiting
      • Locale and currency
      • Exchange rate
      • Product identifier
      • Product external reference identifier (ERID)
      • Customer external reference identifier ERID
      • Cancel request process
      • Failover and redundancy
      • Troubleshooting API calls
    • Shopper APIs reference
      • Carts
        • Offers
          • Offer types
          • POP offers
          • Applied offers
          • Eligible offers
      • Orders
      • Returns
      • Links
    • Admin APIs reference
      • Subscriptions
      • Sites
      • Products
      • Live changes
      • Authorized shipping and billing countries
      • Merchandising
      • Disclosures
    • Glossary
Powered by GitBook
On this page
  1. Warnings and error codes
  2. Error codes

Error format for Shopper APIs

Understand the error code format for the Shopper APIs.

PreviousHTTP response status codesNextError codes for Shopper APIs

Last updated 5 months ago

Understanding how error responses are structured is crucial for diagnosing and resolving issues that may arise in the development and integration process of working with the Shopper APIs. The API distinguishes itself by providing detailed error messages following a structured format. This format includes essential information such as the type of error, an optional system info parameter, and a clear problem description. Below is an overview of the error response format used by the Shopper APIs, designed to assist developers in quickly identifying and addressing issues.

The Shopper APIs use the following format for errors:

"errors": {
  "error": [
    {
      "relation": "https://api.digitalriver.com/v1/shoppers/SubmitCartResource",
      "code": "{error-code}",
      "subcode": "{error-subcode}",
      "description": "{error-description}"
    }
  ]
}

How to handle errors

When you encounter an error response from the Shopper APIs, follow these steps to handle and resolve the issues effectively:

  1. Identify the error: Review the code and subcode in the error response. These fields classify the error, helping you understand its nature and potential cause.

  2. Understand the error: Read the description field to clearly understand what went wrong. This description provides insight into the issue and can suggest immediate fixes.

  3. Consult documentation: See the section relevant to the error encountered. It can provide additional context or solutions.

  4. Implement fixes: Based on the information gathered, make the necessary adjustments to your request or handling logic. It might entail fixing payloads, adjusting headers, or handling expected errors more gracefully in your application.

  5. Log and monitor: Always log errors and monitor their frequency. Persistent errors could indicate deeper issues with integration or with the API itself. Monitoring can help identify patterns or recurring issues.

  6. Contact support: If you encounter an API error that keeps occurring, you should create a case in the . You can contact your CSM for more help or escalate the issue if necessary. In addition, if we log the error on our system, we may have monitoring set up to automatically create a case when a particular error occurs multiple times within a specific timeframe to help us investigate and address the issue promptly.

By systematically following these steps, you can minimize the impact of errors on your application and improve the overall stability and reliability of your integration with the Shopper APIs.

Error codes for Shopper APIs
Solution Center