- Compra directa de etiqueta
Obtener tarifa
Comprar etiqueta
Anular etiqueta
Compra directa de etiquet...
Compra una etiqueta de envío directamente, sin comparar varias opciones de transportistas. Este endpoint solo es aplicable cuando hay un único transportista configurado para cada tipo de transportista en la cuenta del usuario. Si existen varios transportistas del mismo tipo, utiliza la API de Obtener tarifa para recuperar las opciones y, a continuación, llama a la API de Comprar etiqueta para completar la compra.
Límite de tasa: 600 solicitudes por minuto.
Seguridad
ApiTokenAuth
Identificador único de esta solicitud de API. Se utiliza para el rastreo, la depuración y la resolución de problemas. Debe ser una cadena de hasta 64 caracteres.
Ejemplo:"req_20251024_abcd1234ef567890"
POST
curl -i -X POST \
'https://api.shipsaving.com/api/rates/buy-label?api_token=YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"request_id": "req_20251024_abcd1234ef567890",
"carrier": {
"carrier_token": "ca_36f49ebbe91d4006a6583e17ceeec500"
},
"from": {
"name": "full name",
"company": "company name",
"email": "xxx@gmail.com",
"phone": 1237771234,
"street": "xxx Grand Ave",
"street2": "Apt 5B",
"city": "Los Angeles",
"state": "CA",
"zip": 90018,
"country": "US"
},
"to": {
"name": "full name",
"company": "company name",
"email": "xxx@gmail.com",
"phone": 1237771234,
"street": "xxx Grand Ave",
"street2": "Apt 5B",
"city": "Los Angeles",
"state": "CA",
"zip": 90018,
"country": "US",
"residential": true
},
"shipments": [
{
"length": 6,
"width": 6,
"height": 6,
"weight": 1,
"packages": [
"usps_small_flat_rate_box"
],
"insurance_amount": 120,
"custom_print1": "custom print1",
"custom_print2": "custom print2",
"contents": [
{
"weight": 1,
"description": "T-shirt",
"quantity": 2,
"value": 29.99,
"hs_tariff_number": "610910",
"origin_country": "US"
}
]
}
],
"order": {
"warehouse_name": "WH",
"store_name": "string",
"order_number": "string",
"status": "awaiting",
"service_type": "usps_ground_advantage",
"signature": "NO_SIGNATURE",
"insurance_provider": "SHIPSURANCE",
"contents_type": "GIFT",
"non_delivery_option": "RETURN",
"eel_pfc_type": "ITN",
"eel_pfc_code": "X20250627012345",
"tax_ids": [
{
"tax_id_type": "TIN",
"tax_id_number": "string",
"tax_id_country": "US"
}
]
},
"options": {
"ship_date": "2024-02-07T10:55:56-08:00",
"require_saturday_delivery": false,
"require_hazmat": false,
"hazmat_code": "usps_hazmat_820",
"label_type": "png",
"require_qr_code": false
},
"recipient_tax_ids": [
{
"tax_id_type": "TIN",
"tax_id_number": "string"
}
]
}'Etiqueta comprada correctamente
Ejemplo:
[ "https://...../labels/2025-06-30/0231b055b64044e6b7e027874e915361_0.pdf" ]
Response
{ "packing_slip_number": 109169, "master_tracking_code": "", "prefix_tracking_code": "", "tracking_code": "1ZY50G652000880500", "label_size": "4x6", "label_type": "label", "length": 12, "width": 12, "height": 7, "weight": 14.99, "insurance": 0, "insurance_fee": 0, "signature": "NO_SIGNATURE", "custom_print1": "", "custom_print2": "", "delivery_days": "1", "service_fee": 0.05, "rate": 10.87, "rebate": 0, "from_name": "sender name", "from_company": "ShipSaving, LLC", "from_phone": "", "from_street": "769 Broadview Avenue", "from_street2": "", "from_city": "Toronto", "from_state": "ON", "from_zip": "M4K 2P7", "from_country": "CA", "to_name": "ShipSaving", "to_company": "UPS Plus", "to_phone": "", "to_street": "961 Broadview Avenue", "to_street2": "", "to_city": "Toronto", "to_state": "ON", "to_zip": "M4K 2P7", "to_country": "CA", "label_status": "completed", "shipment_id": 1245627, "warehouse_name": "WH", "store_name": "", "order_number": "", "provider": "shipsaving", "carrier": "UPS", "service": "UPS_GROUND", "package": "PACKAGE", "published_rate": 34.53, "label_url": [ "https://...../labels/2025-06-30/0231b055b64044e6b7e027874e915361_0.pdf" ], "commercial_invoice_url": null }