Have questions? Leave your message here or Schedule a quick call with our manager now

Error Handling · API2Cart

Unified Error Handling Across eCommerce APIs

70+ platforms, one error format. API2Cart normalizes platform-specific errors into consistent return codes with clear messages.

Error Handling

Error handling across multiple platforms means juggling a different error format for every single one.

API2Cart provides one unified error system. Every response includes a consistent return_code and return_message. Write your error handling once.

How it works

How Error Handling Works in API2Cart

  • return_code: numeric code in every response (0 = success, >0 = error)
  • return_message: human-readable description of the error
  • Error categories: authentication, validation, not found, rate limit, server
  • Every request carries a unique request_id for troubleshooting
Unified Error Handling Across eCommerce APIs flow diagram
Response envelope

Example request

// Success
{ "return_code": 0, "result": { ... } }

// Error (unified across all platforms)
{ "return_code": 112, "return_message": "Product not found" }

Use Cases for Error Handling

01

Robust Integration

One error handler for every platform — less code, fewer bugs.

02

User-Facing Messages

Consistent error messages regardless of the backend platform.

03

Monitoring & Alerting

Unified error codes power dashboards, alerts, and SLA tracking.

04

Debugging

request_id plus the original platform error for fast root-cause analysis.

Supported Platforms
Shopify · WooCommerce · Magento 2 · BigCommerce · PrestaShop · OpenCart · Wix · Squarespace · Ecwid · Lightspeed · + 65 more

Frequently asked questions

The things people ask before using Error Handling.

What does a typical error response look like?

{"return_code": 112, "return_message": "Product not found"}

Can I see the original platform error?

Yes — available in the extended response details.

Which errors are transient?

Rate limit and server errors (5xx) usually are; auth/validation errors are permanent.

How do I integrate this with my monitoring?

Use return_code for classification, request_id for correlation.

One error format. 70+ platforms. Write your error handling once.

For the full list of return codes and their meanings, see the Response Status Codes reference.

What does a typical error response look like?

A response with "return_code": 112 and "return_message": "Product not found".

Can I see the original platform error?

Yes — available in the extended response details.

Which errors are transient?

Rate limit and server errors (5xx) usually are; auth/validation errors are permanent.

How do I integrate this with my monitoring?

Use return_code for classification, request_id for correlation.