Referencia del puente Java
Este enlace antiguo sin versión describe los tres endpoints del puente Java con clave API. No es la API JWT de V1 ni la nueva API de recursos V2. Selecciona la versión de tu integración.
API para desarrolladoresComprar una etiqueta
Esta referencia está disponible en inglés y chino simplificado. A continuación se muestra el contenido en inglés.
/v1/shipping/buyPermisos: labels.buy
Campos de solicitud
shippingAccountId, rateId | The shipping account and rate identifiers returned by the selected rate. |
|---|---|
rateRequest | The shipment request used to obtain the rate, including addresses and packages. |
clientReferenceId | Your stable reference for this purchase. Reuse it when retrying the same purchase; use a different reference for a new purchase. |
Respuesta
Returns shipmentId, trackingNumber, shippingCost, insuranceCost, currency and available labelBase64 / labelMimeType. In this legacy response, shipmentId is the provider's identifier and shippingCost / insuranceCost are provider costs, not a receipt for the amount charged to your wallet. Multi-package results can include packages and forms. A replay of an already successful purchase returns that purchase without label bytes; retain the original label response.
Responses use { code, message, data }. Check both the HTTP status and response code; provider errors are not successful purchases.
Notas importantes
This operation purchases a real label and can charge the account. Keep the same clientReferenceId after a timeout; do not start another purchase with a new reference while the first result is uncertain. If you cannot recover the label, contact support before purchasing again. A label response alone does not confirm wallet settlement.