Erreurs

HIOBuy utilise deux formes d’erreur : erreurs de protocole (non-2xx avec error) et échecs métier (HTTP 200 avec success: false sur certaines routes commande).

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 details.fields: [{ field, code, message }]
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

Référence des codes d’erreur

Catalogue canonique : data/errors.catalog.json. Résumé :

CodeHTTPCategoryWhen
SUBSCRIPTION_EXPIRED403AUTH_ERRORAbonnement expiré ; les packs de requêtes produit ne donnent pas de droits d’achat ou de logistique.
PAID_SUBSCRIPTION_REQUIRED403AUTH_ERRORLes API Taobao nécessitent un abonnement payant actif ; l’essai inclut uniquement 1688 et Weidian. Les achats réels exigent un abonnement payant admissible actif et un accès de production approuvé.
WAREHOUSE_ACCOUNT_NOT_READY409AUTH_ERRORLe compte ou la liaison entrepôt n’est pas prêt ; vérifiez l’activation.
WAREHOUSE_BINDING_MISMATCH409AUTH_ERRORLa liaison entrepôt ne peut pas être vérifiée ; contactez HIOBuy.
WAREHOUSE_SERVICE_UNAVAILABLE503INTERNAL_ERRORService temporairement indisponible ; ne répétez pas un paiement au résultat incertain.
SERVICE_UNAVAILABLE503INTERNAL_ERRORService temporairement indisponible ; ne répétez pas un paiement au résultat incertain.
PLAN_CHANNEL_DISABLED429RATE_LIMIT_ERRORLe forfait de l’application n’active pas ce canal.
INVALID_API_KEY401AUTH_ERRORJeton Bearer invalide ou manquant
UNAUTHORIZED401AUTH_ERRORClé API manquante/invalide
CHANNEL_NOT_AUTHORIZED401AUTH_ERRORCanal non autorisé pour cette app
FORBIDDEN403AUTH_ERRORClé valide mais non autorisée
INSUFFICIENT_SCOPE403AUTH_ERRORScope requis manquant pour la route
CHANNEL_NOT_ENABLED403AUTH_ERRORCanal non activé pour cette app
CHANNEL_AUTH_REQUIRED403AUTH_ERRORAutorisation canal non terminée
CHANNEL_AUTH_EXPIRED403AUTH_ERRORLes identifiants du canal géré sont indisponibles ou expirés ; consultez le centre et contactez HIOBuy. La réautorisation personnelle concerne uniquement les anciennes intégrations admissibles.
CHANNEL_AUTH_REVOKED403AUTH_ERRORAutorisation canal révoquée
FULFILLMENT_MODE_NOT_SUPPORTED403AUTH_ERROR/v1/fulfillment/* sur app self-fulfillment
FULFILLMENT_ACCESS_REQUIRED403AUTH_ERROR(Réservé) accès fulfillment non accordé
FULFILLMENT_ACCESS_SUSPENDED403AUTH_ERROR(Réservé) accès fulfillment suspendu
WAREHOUSE_AUTH_REQUIRED403AUTH_ERRORFulfillment entrepôt sans autorisation entrepôt
WAREHOUSE_AUTH_EXPIRED403AUTH_ERRORAutorisation entrepôt expirée
WAREHOUSE_AUTH_INVALID403AUTH_ERRORWarehouse rejected developer authentication
VALIDATION_ERROR400VALIDATION_ERRORChamps body manquants/invalides, devise non supportée
UNSUPPORTED_CHANNEL400VALIDATION_ERRORValeur channel inconnue
UNSUPPORTED_FIELD400VALIDATION_ERRORChamp non autorisé sur cette route
NOT_FOUND404VALIDATION_ERRORRoute ou ressource inexistante
CHANNEL_CAPABILITY_NOT_SUPPORTED400CHANNEL_ERROROpération indisponible sur ce canal
CHANNEL_UPSTREAM_ERROR502CHANNEL_ERRORMarketplace a rejeté l’appel (masqué)
WAREHOUSE_UPSTREAM_ERROR502CHANNEL_ERRORUpstream entrepôt/fulfillment en échec (masqué)
INTERNAL_ERROR500INTERNAL_ERRORÉchec Gateway inattendu — réessayer avec backoff
RATE_LIMIT_EXCEEDED429RATE_LIMIT_ERRORLimite de débit / minute
QUOTA_EXCEEDED429RATE_LIMIT_ERRORQuota quotidien partagé du forfait épuisé
PLATFORM_QUOTA_EXCEEDED429RATE_LIMIT_ERRORCapacité mensuelle plateforme
PAYMENT_DECLINED402VALIDATION_ERRORPaiement refusé
PAYMENT_INSUFFICIENT_FUNDS402VALIDATION_ERRORFonds insuffisants
ORDER_ALREADY_PAID409VALIDATION_ERRORCommande déjà payée
ORDER_CANCELLED409VALIDATION_ERRORCommande déjà annulée
PRODUCT_UNAVAILABLE422VALIDATION_ERRORProduit indisponible / retiré
IDEMPOTENCY_CONFLICT409VALIDATION_ERRORexternal_shipment_id ou clé d’idempotence en double
EXTERNAL_ORDER_ID_ALREADY_EXISTS409VALIDATION_ERRORexternal_order_id déjà utilisé dans l’app
PARCEL_NOT_FOUND404VALIDATION_ERRORParcel invalide ou pas encore inbound
INVALID_SHIPPING_CHANNEL400VALIDATION_ERRORshipping_channel_code invalide
INSUFFICIENT_BALANCE402VALIDATION_ERRORSolde portefeuille fulfillment trop bas
SHIPMENT_ALREADY_PAID409VALIDATION_ERRORInternational shipment already paid
SHIPMENT_NOT_FOUND404VALIDATION_ERRORShipment missing or not owned
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
SHIPMENT_CREATE_EXCEPTION400VALIDATION_ERRORCreate refused (missing item attributes, parcel not inbound, etc. — 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
INBOUND_TRACKING_ALREADY_SHIPPED409VALIDATION_ERRORTracking déjà lié à un colis expédié
INBOUND_TRACKING_ALREADY_EXISTS409VALIDATION_ERRORTracking déjà enregistré
INBOUND_VALIDATION_FAILED422VALIDATION_ERRORErreurs de champs inbound dans details.fields
INBOUND_NOT_FOUND404VALIDATION_ERRORInbound manquant ou non possédé
PACKAGE_NOT_FOUND404VALIDATION_ERRORColis manquant ou non possédé
INBOUND_NOT_EDITABLE409VALIDATION_ERRORInbound non modifiable dans cet état
INBOUND_ALREADY_RECEIVED409VALIDATION_ERRORDéjà réceptionné en entrepôt
INBOUND_PACKAGE_MISMATCH409VALIDATION_ERRORImpossible de lier à l’inbound/colis
INVALID_TRACKING_NUMBER422VALIDATION_ERRORFormat de tracking invalide
PACKAGE_COUNT_INVALID422VALIDATION_ERRORpackage_count invalide
TOTAL_VALUE_INVALID422VALIDATION_ERRORtotal_value invalide
UNSUPPORTED_CURRENCY422VALIDATION_ERRORDevise non supportée (inbound : CNY/USD/KRW)
UNCLAIMED_PACKAGE_NOT_FOUND404VALIDATION_ERRORColis non réclamé manquant
TRACKING_NUMBER_MISMATCH422VALIDATION_ERRORÉchec de correspondance exacte au claim
PACKAGE_ALREADY_CLAIMED409VALIDATION_ERRORColis déjà réclamé
PACKAGE_NOT_CLAIMABLE409VALIDATION_ERRORNon réclamable dans cet état
CLAIM_ATTEMPTS_EXCEEDED429RATE_LIMIT_ERRORTrop d’échecs de claim sur un ucp_*
RETURN_NOT_FOUND404VALIDATION_ERRORRetour manquant ou non possédé
RETURN_NOT_CONFIRMABLE409VALIDATION_ERRORRetour non confirmable
RETURN_NOT_CANCELLABLE409VALIDATION_ERRORRetour non annulable
RETURN_ALREADY_RETURNED409VALIDATION_ERRORDéjà retourné
RETURN_ALREADY_CANCELLED409VALIDATION_ERRORDéjà annulé / invalidé
RETURN_FEE_NOT_READY409VALIDATION_ERRORFrais de retour non calculés
RETURN_FEE_CHANGED409VALIDATION_ERRORMontant confirmé ≠ fee.total
PACKAGE_NOT_RETURNABLE409VALIDATION_ERRORStatut colis bloque le retour
INVALID_RETURN_REASON422VALIDATION_ERRORCode motif de retour inconnu
INVALID_RETURN_ADDRESS422VALIDATION_ERRORAdresse seller_return invalide
RETURN_VALIDATION_FAILED422VALIDATION_ERRORÉchec validation champs retour
VALUE_ADDED_SERVICE_NOT_FOUND422VALIDATION_ERRORservice_code VAS inconnu
VALUE_ADDED_SERVICE_UNAVAILABLE422VALIDATION_ERRORVAS existant mais indisponible
VALUE_ADDED_SERVICE_INVALID_STAGE422VALIDATION_ERRORVAS non autorisé à cette étape
VALUE_ADDED_SERVICE_QUANTITY_INVALID422VALIDATION_ERRORQuantité VAS invalide
SERVICE_REQUEST_NOT_FOUND404VALIDATION_ERRORDemande de service manquante
RESOURCE_NOT_FOUND404VALIDATION_ERRORRessource liée manquante
RESOURCE_NOT_ELIGIBLE_FOR_SERVICE409VALIDATION_ERRORColis/envoi non éligible
SERVICE_FEE_NOT_READY409VALIDATION_ERRORFrais de service non prêts
SERVICE_FEE_CHANGED409VALIDATION_ERRORMontant confirmé ≠ frais de service
SERVICE_REQUEST_VALIDATION_FAILED422VALIDATION_ERRORÉchec validation demande de service
TRANSACTION_NOT_FOUND404VALIDATION_ERRORTransaction manquante ou non possédée
INVOICE_NOT_FOUND404VALIDATION_ERRORFacture manquante ou non possédée
TRANSACTION_NOT_INVOICEABLE409VALIDATION_ERRORTransaction non facturable
TRANSACTION_ALREADY_INVOICED409VALIDATION_ERRORTransaction déjà facturée
TRANSACTION_INVOICE_PENDING409VALIDATION_ERRORFacture déjà en attente
INVOICE_NOT_DOWNLOADABLE409VALIDATION_ERRORFacture pas encore émise
INVOICE_VALIDATION_FAILED422VALIDATION_ERRORÉchec validation demande de facture
INVOICE_CURRENCY_MISMATCH422VALIDATION_ERRORDevise de facture incohérente
INVALID_INVOICE_TITLE422VALIDATION_ERRORTitre de facture invalide
INVALID_TAX_NUMBER422VALIDATION_ERRORNuméro fiscal invalide
INVALID_BILLING_ADDRESS422VALIDATION_ERRORbilling_address missing or invalid
TICKET_NOT_FOUND404VALIDATION_ERRORTicket manquant ou hors Application
TICKET_NOT_REPLYABLE409VALIDATION_ERRORTicket non répondable (ex. fermé)
TICKET_ALREADY_CLOSED409VALIDATION_ERRORTicket déjà fermé
INVALID_TICKET_CATEGORY422VALIDATION_ERRORCatégorie de ticket invalide
INVALID_TICKET_PRIORITY422VALIDATION_ERRORPriorité de ticket invalide
INVALID_RELATED_RESOURCE422VALIDATION_ERRORType related_resource invalide
TICKET_VALIDATION_FAILED422VALIDATION_ERRORÉchec validation champs ticket
RELATED_RESOURCE_NOT_FOUND404VALIDATION_ERRORRessource métier liée manquante
MESSAGE_REQUIRED422VALIDATION_ERRORCorps du message requis
MESSAGE_TOO_LONG422VALIDATION_ERRORMessage > 10000 caractères

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

Pour les réponses standard Taobao de /v1/products/detail et /v1/products/parse, une réponse HTTP amont réussie avec un code externe 0, "0" ou absent et un biz_error_code exact ITEM_NOT_FOUND ou ITEM_NOT_SUPPORTED devient 404 NOT_FOUND. Le message d’indisponibilité et details.biz_error_code sont conservés. Vérifiez le lien ou choisissez un autre produit. Les erreurs de transport, délais dépassés et autres erreurs métier gardent leur traitement actuel, dont 502 CHANNEL_UPSTREAM_ERROR ; le texte seul ne déclenche pas 404. Le format détail Taobao response_format: "upstream" reste inchangé.

  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.

Vérification du périmètre vendeur de l’achat

HTTPCodeMesure corrective
400MULTIPLE_CHANNELS_NOT_ALLOWEDSéparez par canal et alignez le raccourci, le corps et les lignes.
400MULTIPLE_SELLERS_NOT_ALLOWEDSéparez les articles selon une identité vendeur fiable.
400SELLER_ID_UNAVAILABLEObtenez une preuve fiable d’appartenance ; ne la déduisez pas d’un nom.

Une commande d’achat doit contenir des articles du même canal et du même vendeur. Séparez les autres articles en commandes distinctes par canal et vendeur.

Le mode self vérifie avant la création officielle. L’entrepôt, achats manuels compris, vérifie avant la création, l’achat ou le débit du portefeuille. Voir la création de commande.

Get Support

Need integration help? Contact Developer Support at support@hiobuy.com · Response within 1–2 business days

Email support