Error Handling

Handle validation errors, authentication failures, duplicate orders, insufficient funds, and timeouts safely.

 

The API uses standard HTTP response codes to indicate request outcomes. Your integration should handle both request validation issues and operational scenarios such as retries and asynchronous completion.

400 Bad Request

The request is invalid or missing required fields. Review the response body and correct the request before retrying.

401 Unauthorized

The request is missing a valid Bearer token or the token has expired.

409 Conflict

This typically indicates a duplicate order request using a previously submitted PONumber.

422 Unprocessable Entity

This typically indicates insufficient available funds to complete the order.

504 Timeout

If an order request times out, retry using the same PONumber so the request can be handled safely without creating duplicates.

Warning: Do not generate a new PONumber when retrying an uncertain order submission. Reuse the original PO number.

Operational best practices

  • Log request and response details where appropriate
  • Use exponential backoff for polling or retry logic
  • Cache product data instead of requesting it repeatedly
  • Use webhooks when possible for asynchronous completion

What’s next