Errors
HIOBuy uses two error shapes: protocol errors (non-2xx HTTP with an error object) and business outcomes (HTTP 200 with success: false on some order routes).
Protocol errors (HTTP 4xx / 5xx)
{
"error": {
"code": "INBOUND_VALIDATION_FAILED",
"message": "Some inbound information is missing or invalid.",
"request_id": "req_abc123",
"category": "VALIDATION_ERROR",
"field": "tracking_number",
"details": {
"fields": [
{
"field": "items[0].name",
"code": "REQUIRED",
"message": "Product name is required."
}
]
}
}
}| Field | Description |
|---|---|
error.code | Machine-readable enum — use for branching logic |
error.message | Human-readable explanation (English) |
error.request_id | Same as x-request-id response header |
error.category | Coarse grouping: AUTH_ERROR, RATE_LIMIT_ERROR, VALIDATION_ERROR, CHANNEL_ERROR, INTERNAL_ERROR |
error.field | Optional primary field path related to this error |
error.details | Optional object; validation may include fields; 409 responses may include existing_resource, existing_resources, conflicting_tracking_numbers, idempotency_key, or retry_after_ms |
error.upstream | Optional vendor error summary on CHANNEL_UPSTREAM_ERROR (sanitized) |
Field-level details.fields[].code values: REQUIRED | INVALID_VALUE | INVALID_FORMAT | OUT_OF_RANGE.
HTTP status principles
| HTTP | When |
|---|---|
400 | Unparseable JSON / generic validation |
401 | Invalid API key |
403 | Authenticated but not allowed (including fulfillment mode gate) |
404 | Missing or inaccessible resource |
409 | State / uniqueness conflict |
422 | Parsed body fails business validation |
429 | Rate limit / quota |
500 / 502 / 503 | Internal or upstream failure |
Error code reference
The canonical machine-readable catalog is data/errors.catalog.json. Summary:
| Code | HTTP | Category | When |
|---|---|---|---|
SUBSCRIPTION_EXPIRED | 403 | AUTH_ERROR | Subscription expired; valid product traffic packs do not grant procurement or fulfillment rights. |
PAID_SUBSCRIPTION_REQUIRED | 403 | AUTH_ERROR | Taobao APIs require an active paid subscription; the trial includes 1688 and Weidian only. Production procurement requires an active eligible paid subscription and approved production access. |
WAREHOUSE_ACCOUNT_NOT_READY | 409 | AUTH_ERROR | Warehouse account or binding is not ready; check production activation. |
WAREHOUSE_BINDING_MISMATCH | 409 | AUTH_ERROR | Warehouse binding cannot be verified; contact HIOBuy support. |
WAREHOUSE_SERVICE_UNAVAILABLE | 503 | INTERNAL_ERROR | Service temporarily unavailable; do not repeat an uncertain payment. |
SERVICE_UNAVAILABLE | 503 | INTERNAL_ERROR | Service temporarily unavailable; do not repeat an uncertain payment. |
PLAN_CHANNEL_DISABLED | 429 | RATE_LIMIT_ERROR | The application plan does not enable this channel. |
INVALID_API_KEY | 401 | AUTH_ERROR | Invalid or missing Bearer token |
UNAUTHORIZED | 401 | AUTH_ERROR | Missing or invalid API key (alias of INVALID_API_KEY) |
CHANNEL_NOT_AUTHORIZED | 401 | AUTH_ERROR | Channel not authorized for this app |
FORBIDDEN | 403 | AUTH_ERROR | Key valid but not permitted (e.g. channel not enabled) |
INSUFFICIENT_SCOPE | 403 | AUTH_ERROR | API key missing required scope for this route |
CHANNEL_NOT_ENABLED | 403 | AUTH_ERROR | Channel not enabled for this app |
CHANNEL_AUTH_REQUIRED | 403 | AUTH_ERROR | Channel authorization not completed |
CHANNEL_AUTH_EXPIRED | 403 | AUTH_ERROR | Managed channel credentials are unavailable or expired; check the developer center and contact HIOBuy. Personal reauthorization applies only to eligible legacy integrations. |
CHANNEL_AUTH_REVOKED | 403 | AUTH_ERROR | Channel authorization revoked |
FULFILLMENT_MODE_NOT_SUPPORTED | 403 | AUTH_ERROR | /v1/fulfillment/* on self-fulfillment app (maps draft FULFILLMENT_NOT_ENABLED) |
FULFILLMENT_ACCESS_REQUIRED | 403 | AUTH_ERROR | Reserved — fulfillment access not granted |
FULFILLMENT_ACCESS_SUSPENDED | 403 | AUTH_ERROR | Reserved — fulfillment access suspended |
WAREHOUSE_AUTH_REQUIRED | 403 | AUTH_ERROR | Warehouse fulfillment without warehouse authorization |
WAREHOUSE_AUTH_EXPIRED | 403 | AUTH_ERROR | Warehouse authorization expired |
WAREHOUSE_AUTH_INVALID | 403 | AUTH_ERROR | Warehouse rejected developer authentication |
VALIDATION_ERROR | 400 | VALIDATION_ERROR | Missing/invalid body fields, unsupported currency |
INVALID_COUNTRY_CODE | 422 | VALIDATION_ERROR | Warehouse shipping catalog rejected the destination country code |
UNSUPPORTED_CHANNEL | 400 | VALIDATION_ERROR | Unknown channel value |
UNSUPPORTED_FIELD | 400 | VALIDATION_ERROR | Field not allowed on this route (e.g. currency on product) |
NOT_FOUND | 404 | VALIDATION_ERROR | Route or resource does not exist |
CHANNEL_CAPABILITY_NOT_SUPPORTED | 400 | CHANNEL_ERROR | Operation not available on this channel |
CHANNEL_UPSTREAM_ERROR | 502 | CHANNEL_ERROR | Marketplace rejected the call (sanitized) |
WAREHOUSE_UPSTREAM_ERROR | 502 | CHANNEL_ERROR | Warehouse / fulfillment upstream failed (sanitized) |
INTERNAL_ERROR | 500 | INTERNAL_ERROR | Unexpected Gateway failure — retry with backoff |
RATE_LIMIT_EXCEEDED | 429 | RATE_LIMIT_ERROR | Per-minute / burst rate limit |
QUOTA_EXCEEDED | 429 | RATE_LIMIT_ERROR | Shared daily plan quota exhausted |
PLATFORM_QUOTA_EXCEEDED | 429 | RATE_LIMIT_ERROR | Platform-wide channel capacity limit |
IP_BLOCKED | 403 | AUTH_ERROR | Client IP is on the access blocklist |
APP_BLOCKED | 403 | AUTH_ERROR | Application is on the access blocklist |
PAYMENT_DECLINED | 402 | VALIDATION_ERROR | Payment declined |
PAYMENT_INSUFFICIENT_FUNDS | 402 | VALIDATION_ERROR | Insufficient funds |
ORDER_ALREADY_PAID | 409 | VALIDATION_ERROR | Procurement order already paid |
SHIPMENT_ALREADY_PAID | 409 | VALIDATION_ERROR | International shipment already paid |
SHIPMENT_NOT_READY_FOR_PAYMENT | 409 | VALIDATION_ERROR | Shipment not ready for payment (packing / final weight not done — read message) |
SHIPMENT_NOT_FOUND | 404 | VALIDATION_ERROR | Shipment missing or not owned (intercept) |
SHIPMENT_NOT_INTERCEPTABLE | 409 | VALIDATION_ERROR | Current shipment state cannot request intercept |
SHIPMENT_INTERCEPTION_ALREADY_REQUESTED | 409 | VALIDATION_ERROR | Intercept already requested |
INVALID_INTERCEPTION_REASON | 422 | VALIDATION_ERROR | Intercept reason CODE is invalid |
INTERCEPTION_REMARK_REQUIRED | 422 | VALIDATION_ERROR | remark required when reason is OTHER |
ORDER_CANCELLED | 409 | VALIDATION_ERROR | Order already cancelled |
PRODUCT_UNAVAILABLE | 422 | VALIDATION_ERROR | Product unavailable / delisted |
IDEMPOTENCY_CONFLICT | 409 | VALIDATION_ERROR | Same Idempotency-Key reused with different normalized parameters |
IDEMPOTENCY_REQUEST_IN_PROGRESS | 409 | VALIDATION_ERROR | A request using the same idempotency key is still running; retry after details.retry_after_ms |
PAYMENT_RESULT_UNKNOWN | 409 | VALIDATION_ERROR | Earlier order-payment result is uncertain; query order status before further payment |
CANCEL_RESULT_UNKNOWN | 409 | VALIDATION_ERROR | Earlier order-cancellation result is uncertain; query order status before further action |
EXTERNAL_ORDER_ID_ALREADY_EXISTS | 409 | VALIDATION_ERROR | Duplicate inbound external_order_id or shipment external_shipment_id |
SHIPMENT_CREATE_EXCEPTION | 400 | VALIDATION_ERROR | Create refused (missing item attributes, parcel not inbound, etc. — read message) |
SHIPMENT_CREATE_FAILED | 400 | VALIDATION_ERROR | Shipment create failed (warehouse business refusal — read message) |
SHIPMENT_NOT_CANCELLABLE | 409 | VALIDATION_ERROR | Shipment cannot be cancelled in current status |
SHIPMENT_ALREADY_CANCELLED | 409 | VALIDATION_ERROR | Shipment already cancelled |
PACKAGE_ALREADY_CONSOLIDATED | 409 | VALIDATION_ERROR | Parcel already in another shipment |
PARCEL_NOT_FOUND | 404 | VALIDATION_ERROR | Invalid or not yet inbound parcel (SHIPMENT_PACKAGE_NOT_FOUND) |
INVALID_SHIPPING_CHANNEL | 400 | VALIDATION_ERROR | Bad shipping_channel_code |
INSUFFICIENT_BALANCE | 402 | VALIDATION_ERROR | Fulfillment wallet too low (shipment pay / return confirm / etc.) |
INBOUND_TRACKING_ALREADY_SHIPPED | 409 | VALIDATION_ERROR | Tracking already linked to a shipped package |
INBOUND_TRACKING_ALREADY_EXISTS | 409 | VALIDATION_ERROR | Tracking already registered |
INBOUND_VALIDATION_FAILED | 422 | VALIDATION_ERROR | Inbound field errors in details.fields |
INBOUND_NOT_FOUND | 404 | VALIDATION_ERROR | Inbound missing or not owned |
PACKAGE_NOT_FOUND | 404 | VALIDATION_ERROR | Package missing or not owned |
INBOUND_NOT_EDITABLE | 409 | VALIDATION_ERROR | Inbound not editable in current state |
INBOUND_ALREADY_RECEIVED | 409 | VALIDATION_ERROR | Already received at warehouse |
INBOUND_PACKAGE_MISMATCH | 409 | VALIDATION_ERROR | Cannot link resource to given inbound/package |
INVALID_TRACKING_NUMBER | 422 | VALIDATION_ERROR | Tracking number format invalid |
PACKAGE_COUNT_INVALID | 422 | VALIDATION_ERROR | Invalid package_count |
TOTAL_VALUE_INVALID | 422 | VALIDATION_ERROR | Invalid total_value |
UNSUPPORTED_CURRENCY | 422 | VALIDATION_ERROR | Unsupported currency (inbound: CNY/USD/KRW) |
UNCLAIMED_PACKAGE_NOT_FOUND | 404 | VALIDATION_ERROR | No unclaimed package for this tracking number |
PACKAGE_ALREADY_CLAIMED | 409 | VALIDATION_ERROR | Package already claimed |
PACKAGE_NOT_CLAIMABLE | 409 | VALIDATION_ERROR | Not claimable in current state |
RETURN_NOT_FOUND | 404 | VALIDATION_ERROR | Return missing or not owned |
RETURN_NOT_CONFIRMABLE | 409 | VALIDATION_ERROR | Return cannot be confirmed in current status |
RETURN_NOT_CANCELLABLE | 409 | VALIDATION_ERROR | Return cannot be cancelled in current status |
RETURN_ALREADY_RETURNED | 409 | VALIDATION_ERROR | Already returned |
RETURN_ALREADY_CANCELLED | 409 | VALIDATION_ERROR | Already cancelled / voided |
RETURN_FEE_NOT_READY | 409 | VALIDATION_ERROR | Return fee not calculated yet |
RETURN_FEE_CHANGED | 409 | VALIDATION_ERROR | Confirm amount ≠ current fee.total |
PACKAGE_NOT_RETURNABLE | 409 | VALIDATION_ERROR | Package status blocks return |
INVALID_RETURN_REASON | 422 | VALIDATION_ERROR | Unknown return reason code |
INVALID_RETURN_ADDRESS | 422 | VALIDATION_ERROR | Invalid seller_return address |
RETURN_VALIDATION_FAILED | 422 | VALIDATION_ERROR | Return field validation failed |
VALUE_ADDED_SERVICE_NOT_FOUND | 422 | VALIDATION_ERROR | Unknown VAS service_code |
VALUE_ADDED_SERVICE_UNAVAILABLE | 422 | VALIDATION_ERROR | VAS exists but currently unavailable |
VALUE_ADDED_SERVICE_INVALID_STAGE | 422 | VALIDATION_ERROR | VAS not allowed at this stage |
VALUE_ADDED_SERVICE_QUANTITY_INVALID | 422 | VALIDATION_ERROR | Invalid VAS quantity |
SERVICE_REQUEST_NOT_FOUND | 404 | VALIDATION_ERROR | Service request missing |
RESOURCE_NOT_FOUND | 404 | VALIDATION_ERROR | Related resource missing |
RESOURCE_NOT_ELIGIBLE_FOR_SERVICE | 409 | VALIDATION_ERROR | Package/shipment not eligible for service |
SERVICE_FEE_NOT_READY | 409 | VALIDATION_ERROR | Service fee not ready |
SERVICE_FEE_CHANGED | 409 | VALIDATION_ERROR | Confirm amount ≠ current service fee |
SERVICE_REQUEST_VALIDATION_FAILED | 422 | VALIDATION_ERROR | Service request field validation failed |
TRANSACTION_NOT_FOUND | 404 | VALIDATION_ERROR | Transaction missing or not owned |
INVOICE_NOT_FOUND | 404 | VALIDATION_ERROR | Invoice missing or not owned |
TRANSACTION_NOT_INVOICEABLE | 409 | VALIDATION_ERROR | Transaction cannot be invoiced |
TRANSACTION_ALREADY_INVOICED | 409 | VALIDATION_ERROR | Transaction already invoiced |
TRANSACTION_INVOICE_PENDING | 409 | VALIDATION_ERROR | Invoice already pending for transaction |
INVOICE_NOT_DOWNLOADABLE | 409 | VALIDATION_ERROR | Invoice not issued yet |
INVOICE_VALIDATION_FAILED | 422 | VALIDATION_ERROR | Invoice request validation failed |
INVOICE_CURRENCY_MISMATCH | 422 | VALIDATION_ERROR | Invoice currency mismatch |
INVALID_INVOICE_TITLE | 422 | VALIDATION_ERROR | Invalid invoice title |
INVALID_TAX_NUMBER | 422 | VALIDATION_ERROR | Invalid tax number |
INVALID_BILLING_ADDRESS | 422 | VALIDATION_ERROR | billing_address missing or invalid |
TICKET_NOT_FOUND | 404 | VALIDATION_ERROR | Ticket missing or not owned by Application |
TICKET_NOT_REPLYABLE | 409 | VALIDATION_ERROR | Ticket not replyable (e.g. closed) |
TICKET_ALREADY_CLOSED | 409 | VALIDATION_ERROR | Ticket already closed |
INVALID_TICKET_CATEGORY | 422 | VALIDATION_ERROR | Invalid ticket category |
INVALID_TICKET_PRIORITY | 422 | VALIDATION_ERROR | Invalid ticket priority |
INVALID_RELATED_RESOURCE | 422 | VALIDATION_ERROR | Invalid related_resource type |
TICKET_VALIDATION_FAILED | 422 | VALIDATION_ERROR | Ticket field validation failed |
RELATED_RESOURCE_NOT_FOUND | 404 | VALIDATION_ERROR | Related business resource missing or not owned |
MESSAGE_REQUIRED | 422 | VALIDATION_ERROR | Message body required |
MESSAGE_TOO_LONG | 422 | VALIDATION_ERROR | Message exceeds 10000 characters |
Business failures (HTTP 200)
Procurement preview/create/pay may return HTTP 200 with success: false when the marketplace refuses the operation but the Gateway request was valid.
{
"channel": "1688",
"success": false,
"code": "ORDER_CREATE_FAILED",
"message": "One or more lines could not be purchased.",
"failed_offers": [
{
"offer_id": "...",
"spec_id": "...",
"error_code": "STOCK_NOT_ENOUGH",
"error_message": "Insufficient stock"
}
],
"request_id": "req_..."
}- Check
successbefore treating the call as completed - Inspect
unavailable_lines(preview) orfailed_offers(create) - Partial success: 1688 may return
success: truewith non-emptyfailed_offers
Product upstream failures
For standard Taobao /v1/products/detail and /v1/products/parse, an upstream HTTP success with outer code equal to 0, "0", or absent, and exact biz_error_code of ITEM_NOT_FOUND or ITEM_NOT_SUPPORTED, returns 404 NOT_FOUND. The response preserves the upstream availability message and details.biz_error_code. Check the product link or choose another product. Transport failures, timeouts, and other business errors keep their existing handling, including 502 CHANNEL_UPSTREAM_ERROR; matching error text alone does not trigger 404. Taobao detail response_format: "upstream" is unchanged.
Recommended handling
- Log
request_idon every error path. - Retry
429and500with exponential backoff; do not retry400/401without fixing input. - On
502 CHANNEL_UPSTREAM_ERROR, surface vendor message to ops; optionally retry once for transient outages. - Order create: use
external_order_id/ Taobaoouter_purchase_idfor idempotency — see Procurement orders. - For supported mutations, reuse the same
Idempotency-Keyonly for an identical logical request. OnIDEMPOTENCY_REQUEST_IN_PROGRESS, wait forretry_after_ms; on a result-unknown error, query resource state instead of generating a new key. - On a duplicate fulfillment 409, inspect
details.existing_resourceanddetails.conflicting_tracking_numbers; these fields can let you safely resume with the existing package, shipment, or payment.
Purchase seller scope
| HTTP | Code | Recovery |
|---|---|---|
| 400 | MULTIPLE_CHANNELS_NOT_ALLOWED | Split items by channel; match shortcut/body/line channels. |
| 400 | MULTIPLE_SELLERS_NOT_ALLOWED | Split items by trusted seller identity. |
| 400 | SELLER_ID_UNAVAILABLE | Obtain trustworthy ownership evidence; do not infer from names. |
A purchase order must contain products from the same channel and seller. Please split the items into separate orders by channel and seller.
Self mode validates before official creation. Warehouse (including Manual Order) validates before order creation, procurement or wallet debit. See order creation.
Get Support
Need integration help? Contact Developer Support at support@hiobuy.com · Response within 1–2 business days