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."
        }
      ]
    }
  }
}
FieldDescription
error.codeMachine-readable enum — use for branching logic
error.messageHuman-readable explanation (English)
error.request_idSame as x-request-id response header
error.categoryCoarse grouping: AUTH_ERROR, RATE_LIMIT_ERROR, VALIDATION_ERROR, CHANNEL_ERROR, INTERNAL_ERROR
error.fieldOptional primary field path related to this error
error.detailsOptional object; validation may include fields; 409 responses may include existing_resource, existing_resources, conflicting_tracking_numbers, idempotency_key, or retry_after_ms
error.upstreamOptional 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

HTTPWhen
400Unparseable JSON / generic validation
401Invalid API key
403Authenticated but not allowed (including fulfillment mode gate)
404Missing or inaccessible resource
409State / uniqueness conflict
422Parsed body fails business validation
429Rate limit / quota
500 / 502 / 503Internal or upstream failure

Error code reference

The canonical machine-readable catalog is data/errors.catalog.json. Summary:

CodeHTTPCategoryWhen
SUBSCRIPTION_EXPIRED403AUTH_ERRORSubscription expired; valid product traffic packs do not grant procurement or fulfillment rights.
PAID_SUBSCRIPTION_REQUIRED403AUTH_ERRORTaobao 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_READY409AUTH_ERRORWarehouse account or binding is not ready; check production activation.
WAREHOUSE_BINDING_MISMATCH409AUTH_ERRORWarehouse binding cannot be verified; contact HIOBuy support.
WAREHOUSE_SERVICE_UNAVAILABLE503INTERNAL_ERRORService temporarily unavailable; do not repeat an uncertain payment.
SERVICE_UNAVAILABLE503INTERNAL_ERRORService temporarily unavailable; do not repeat an uncertain payment.
PLAN_CHANNEL_DISABLED429RATE_LIMIT_ERRORThe application plan does not enable this channel.
INVALID_API_KEY401AUTH_ERRORInvalid or missing Bearer token
UNAUTHORIZED401AUTH_ERRORMissing or invalid API key (alias of INVALID_API_KEY)
CHANNEL_NOT_AUTHORIZED401AUTH_ERRORChannel not authorized for this app
FORBIDDEN403AUTH_ERRORKey valid but not permitted (e.g. channel not enabled)
INSUFFICIENT_SCOPE403AUTH_ERRORAPI key missing required scope for this route
CHANNEL_NOT_ENABLED403AUTH_ERRORChannel not enabled for this app
CHANNEL_AUTH_REQUIRED403AUTH_ERRORChannel authorization not completed
CHANNEL_AUTH_EXPIRED403AUTH_ERRORManaged channel credentials are unavailable or expired; check the developer center and contact HIOBuy. Personal reauthorization applies only to eligible legacy integrations.
CHANNEL_AUTH_REVOKED403AUTH_ERRORChannel authorization revoked
FULFILLMENT_MODE_NOT_SUPPORTED403AUTH_ERROR/v1/fulfillment/* on self-fulfillment app (maps draft FULFILLMENT_NOT_ENABLED)
FULFILLMENT_ACCESS_REQUIRED403AUTH_ERRORReserved — fulfillment access not granted
FULFILLMENT_ACCESS_SUSPENDED403AUTH_ERRORReserved — fulfillment access suspended
WAREHOUSE_AUTH_REQUIRED403AUTH_ERRORWarehouse fulfillment without warehouse authorization
WAREHOUSE_AUTH_EXPIRED403AUTH_ERRORWarehouse authorization expired
WAREHOUSE_AUTH_INVALID403AUTH_ERRORWarehouse rejected developer authentication
VALIDATION_ERROR400VALIDATION_ERRORMissing/invalid body fields, unsupported currency
INVALID_COUNTRY_CODE422VALIDATION_ERRORWarehouse shipping catalog rejected the destination country code
UNSUPPORTED_CHANNEL400VALIDATION_ERRORUnknown channel value
UNSUPPORTED_FIELD400VALIDATION_ERRORField not allowed on this route (e.g. currency on product)
NOT_FOUND404VALIDATION_ERRORRoute or resource does not exist
CHANNEL_CAPABILITY_NOT_SUPPORTED400CHANNEL_ERROROperation not available on this channel
CHANNEL_UPSTREAM_ERROR502CHANNEL_ERRORMarketplace rejected the call (sanitized)
WAREHOUSE_UPSTREAM_ERROR502CHANNEL_ERRORWarehouse / fulfillment upstream failed (sanitized)
INTERNAL_ERROR500INTERNAL_ERRORUnexpected Gateway failure — retry with backoff
RATE_LIMIT_EXCEEDED429RATE_LIMIT_ERRORPer-minute / burst rate limit
QUOTA_EXCEEDED429RATE_LIMIT_ERRORShared daily plan quota exhausted
PLATFORM_QUOTA_EXCEEDED429RATE_LIMIT_ERRORPlatform-wide channel capacity limit
IP_BLOCKED403AUTH_ERRORClient IP is on the access blocklist
APP_BLOCKED403AUTH_ERRORApplication is on the access blocklist
PAYMENT_DECLINED402VALIDATION_ERRORPayment declined
PAYMENT_INSUFFICIENT_FUNDS402VALIDATION_ERRORInsufficient funds
ORDER_ALREADY_PAID409VALIDATION_ERRORProcurement order already paid
SHIPMENT_ALREADY_PAID409VALIDATION_ERRORInternational shipment already paid
SHIPMENT_NOT_READY_FOR_PAYMENT409VALIDATION_ERRORShipment not ready for payment (packing / final weight not done — read message)
SHIPMENT_NOT_FOUND404VALIDATION_ERRORShipment missing or not owned (intercept)
SHIPMENT_NOT_INTERCEPTABLE409VALIDATION_ERRORCurrent shipment state cannot request intercept
SHIPMENT_INTERCEPTION_ALREADY_REQUESTED409VALIDATION_ERRORIntercept already requested
INVALID_INTERCEPTION_REASON422VALIDATION_ERRORIntercept reason CODE is invalid
INTERCEPTION_REMARK_REQUIRED422VALIDATION_ERRORremark required when reason is OTHER
ORDER_CANCELLED409VALIDATION_ERROROrder already cancelled
PRODUCT_UNAVAILABLE422VALIDATION_ERRORProduct unavailable / delisted
IDEMPOTENCY_CONFLICT409VALIDATION_ERRORSame Idempotency-Key reused with different normalized parameters
IDEMPOTENCY_REQUEST_IN_PROGRESS409VALIDATION_ERRORA request using the same idempotency key is still running; retry after details.retry_after_ms
PAYMENT_RESULT_UNKNOWN409VALIDATION_ERROREarlier order-payment result is uncertain; query order status before further payment
CANCEL_RESULT_UNKNOWN409VALIDATION_ERROREarlier order-cancellation result is uncertain; query order status before further action
EXTERNAL_ORDER_ID_ALREADY_EXISTS409VALIDATION_ERRORDuplicate inbound external_order_id or shipment external_shipment_id
SHIPMENT_CREATE_EXCEPTION400VALIDATION_ERRORCreate refused (missing item attributes, parcel not inbound, etc. — read message)
SHIPMENT_CREATE_FAILED400VALIDATION_ERRORShipment create failed (warehouse business refusal — read message)
SHIPMENT_NOT_CANCELLABLE409VALIDATION_ERRORShipment cannot be cancelled in current status
SHIPMENT_ALREADY_CANCELLED409VALIDATION_ERRORShipment already cancelled
PACKAGE_ALREADY_CONSOLIDATED409VALIDATION_ERRORParcel already in another shipment
PARCEL_NOT_FOUND404VALIDATION_ERRORInvalid or not yet inbound parcel (SHIPMENT_PACKAGE_NOT_FOUND)
INVALID_SHIPPING_CHANNEL400VALIDATION_ERRORBad shipping_channel_code
INSUFFICIENT_BALANCE402VALIDATION_ERRORFulfillment wallet too low (shipment pay / return confirm / etc.)
INBOUND_TRACKING_ALREADY_SHIPPED409VALIDATION_ERRORTracking already linked to a shipped package
INBOUND_TRACKING_ALREADY_EXISTS409VALIDATION_ERRORTracking already registered
INBOUND_VALIDATION_FAILED422VALIDATION_ERRORInbound field errors in details.fields
INBOUND_NOT_FOUND404VALIDATION_ERRORInbound missing or not owned
PACKAGE_NOT_FOUND404VALIDATION_ERRORPackage missing or not owned
INBOUND_NOT_EDITABLE409VALIDATION_ERRORInbound not editable in current state
INBOUND_ALREADY_RECEIVED409VALIDATION_ERRORAlready received at warehouse
INBOUND_PACKAGE_MISMATCH409VALIDATION_ERRORCannot link resource to given inbound/package
INVALID_TRACKING_NUMBER422VALIDATION_ERRORTracking number format invalid
PACKAGE_COUNT_INVALID422VALIDATION_ERRORInvalid package_count
TOTAL_VALUE_INVALID422VALIDATION_ERRORInvalid total_value
UNSUPPORTED_CURRENCY422VALIDATION_ERRORUnsupported currency (inbound: CNY/USD/KRW)
UNCLAIMED_PACKAGE_NOT_FOUND404VALIDATION_ERRORNo unclaimed package for this tracking number
PACKAGE_ALREADY_CLAIMED409VALIDATION_ERRORPackage already claimed
PACKAGE_NOT_CLAIMABLE409VALIDATION_ERRORNot claimable in current state
RETURN_NOT_FOUND404VALIDATION_ERRORReturn missing or not owned
RETURN_NOT_CONFIRMABLE409VALIDATION_ERRORReturn cannot be confirmed in current status
RETURN_NOT_CANCELLABLE409VALIDATION_ERRORReturn cannot be cancelled in current status
RETURN_ALREADY_RETURNED409VALIDATION_ERRORAlready returned
RETURN_ALREADY_CANCELLED409VALIDATION_ERRORAlready cancelled / voided
RETURN_FEE_NOT_READY409VALIDATION_ERRORReturn fee not calculated yet
RETURN_FEE_CHANGED409VALIDATION_ERRORConfirm amount ≠ current fee.total
PACKAGE_NOT_RETURNABLE409VALIDATION_ERRORPackage status blocks return
INVALID_RETURN_REASON422VALIDATION_ERRORUnknown return reason code
INVALID_RETURN_ADDRESS422VALIDATION_ERRORInvalid seller_return address
RETURN_VALIDATION_FAILED422VALIDATION_ERRORReturn field validation failed
VALUE_ADDED_SERVICE_NOT_FOUND422VALIDATION_ERRORUnknown VAS service_code
VALUE_ADDED_SERVICE_UNAVAILABLE422VALIDATION_ERRORVAS exists but currently unavailable
VALUE_ADDED_SERVICE_INVALID_STAGE422VALIDATION_ERRORVAS not allowed at this stage
VALUE_ADDED_SERVICE_QUANTITY_INVALID422VALIDATION_ERRORInvalid VAS quantity
SERVICE_REQUEST_NOT_FOUND404VALIDATION_ERRORService request missing
RESOURCE_NOT_FOUND404VALIDATION_ERRORRelated resource missing
RESOURCE_NOT_ELIGIBLE_FOR_SERVICE409VALIDATION_ERRORPackage/shipment not eligible for service
SERVICE_FEE_NOT_READY409VALIDATION_ERRORService fee not ready
SERVICE_FEE_CHANGED409VALIDATION_ERRORConfirm amount ≠ current service fee
SERVICE_REQUEST_VALIDATION_FAILED422VALIDATION_ERRORService request field validation failed
TRANSACTION_NOT_FOUND404VALIDATION_ERRORTransaction missing or not owned
INVOICE_NOT_FOUND404VALIDATION_ERRORInvoice missing or not owned
TRANSACTION_NOT_INVOICEABLE409VALIDATION_ERRORTransaction cannot be invoiced
TRANSACTION_ALREADY_INVOICED409VALIDATION_ERRORTransaction already invoiced
TRANSACTION_INVOICE_PENDING409VALIDATION_ERRORInvoice already pending for transaction
INVOICE_NOT_DOWNLOADABLE409VALIDATION_ERRORInvoice not issued yet
INVOICE_VALIDATION_FAILED422VALIDATION_ERRORInvoice request validation failed
INVOICE_CURRENCY_MISMATCH422VALIDATION_ERRORInvoice currency mismatch
INVALID_INVOICE_TITLE422VALIDATION_ERRORInvalid invoice title
INVALID_TAX_NUMBER422VALIDATION_ERRORInvalid tax number
INVALID_BILLING_ADDRESS422VALIDATION_ERRORbilling_address missing or invalid
TICKET_NOT_FOUND404VALIDATION_ERRORTicket missing or not owned by Application
TICKET_NOT_REPLYABLE409VALIDATION_ERRORTicket not replyable (e.g. closed)
TICKET_ALREADY_CLOSED409VALIDATION_ERRORTicket already closed
INVALID_TICKET_CATEGORY422VALIDATION_ERRORInvalid ticket category
INVALID_TICKET_PRIORITY422VALIDATION_ERRORInvalid ticket priority
INVALID_RELATED_RESOURCE422VALIDATION_ERRORInvalid related_resource type
TICKET_VALIDATION_FAILED422VALIDATION_ERRORTicket field validation failed
RELATED_RESOURCE_NOT_FOUND404VALIDATION_ERRORRelated business resource missing or not owned
MESSAGE_REQUIRED422VALIDATION_ERRORMessage body required
MESSAGE_TOO_LONG422VALIDATION_ERRORMessage 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 success before treating the call as completed
  • Inspect unavailable_lines (preview) or failed_offers (create)
  • Partial success: 1688 may return success: true with non-empty failed_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.

  1. Log request_id on every error path.
  2. Retry 429 and 500 with exponential backoff; do not retry 400 / 401 without fixing input.
  3. On 502 CHANNEL_UPSTREAM_ERROR, surface vendor message to ops; optionally retry once for transient outages.
  4. Order create: use external_order_id / Taobao outer_purchase_id for idempotency — see Procurement orders.
  5. For supported mutations, reuse the same Idempotency-Key only for an identical logical request. On IDEMPOTENCY_REQUEST_IN_PROGRESS, wait for retry_after_ms; on a result-unknown error, query resource state instead of generating a new key.
  6. On a duplicate fulfillment 409, inspect details.existing_resource and details.conflicting_tracking_numbers; these fields can let you safely resume with the existing package, shipment, or payment.

Purchase seller scope

HTTPCodeRecovery
400MULTIPLE_CHANNELS_NOT_ALLOWEDSplit items by channel; match shortcut/body/line channels.
400MULTIPLE_SELLERS_NOT_ALLOWEDSplit items by trusted seller identity.
400SELLER_ID_UNAVAILABLEObtain 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

Email support