Saltar al contenido

Buy Label

Solicitud

Purchase a shipping label using the rate_id returned by Get Rates.

Seguridad
BearerAuth or ApiTokenAuth
Consulta
rate_idstringrequerido

Rate identifier returned by the Get Rates endpoint.

Ejemplo:rate_id=rate_e50d02e2-047a-402c-aa32-22ad0926db00
curl -i -X GET \
  'https://ps-api.shipsaving.com/api/rates/buy?rate_id=rate_e50d02e2-047a-402c-aa32-22ad0926db00' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Respuestas

Label purchased successfully

Cuerpoapplication/json
Array [
shipment_idinteger

Internal shipment record ID.

Ejemplo:1245627
packing_slip_numberinteger

Packing slip number for the shipment.

Ejemplo:109169
master_tracking_codestring

Master tracking number for multi-piece shipments.

Ejemplo:""
prefix_tracking_codestring

Tracking number prefix (carrier-specific).

Ejemplo:""
tracking_codestring

Primary tracking number.

Ejemplo:"1ZY50G652000880500"
label_sizestring

Label dimensions.

Ejemplo:"4x6"
label_typestring

Label output format used.

Ejemplo:"png"
lengthnumber, (double)

Package length in inches.

Ejemplo:12
widthnumber, (double)

Package width in inches.

Ejemplo:12
heightnumber, (double)

Package height in inches.

Ejemplo:7
weightnumber, (double)

Package weight in pounds.

Ejemplo:14.99
insurancenumber, (double)

Declared insurance value.

Ejemplo:0
insurance_feeobject

Insurance fee with currency.

signaturestring

Signature confirmation level applied.

Ejemplo:"NO_SIGNATURE"
custom_print1string

First line of custom label text.

Ejemplo:""
custom_print2string

Second line of custom label text.

Ejemplo:""
delivery_daysinteger

Estimated transit time in business days.

Ejemplo:1
service_feenumber, (double)

ShipSaving service fee.

Ejemplo:0.05
ratenumber, (double)

Your discounted shipping rate.

Ejemplo:10.87
rebatenumber, (double)

Rebate amount credited back.

Ejemplo:0
from_namestring

Sender's name.

Ejemplo:"John Doe"
from_companystring

Sender's company.

Ejemplo:"ShipSaving, LLC"
from_phonestring

Sender's phone number.

Ejemplo:""
from_streetstring

Sender's street address.

Ejemplo:"1600 Amphitheatre Parkway"
from_street2string

Sender's secondary address line.

Ejemplo:""
from_citystring

Sender's city.

Ejemplo:"Mountain View"
from_statestring

Sender's state.

Ejemplo:"CA"
from_zipstring

Sender's ZIP code.

Ejemplo:"94043"
from_countrystring

Sender's country code.

Ejemplo:"US"
to_namestring

Recipient's name.

Ejemplo:"Jane Smith"
to_companystring

Recipient's company.

Ejemplo:""
to_phonestring

Recipient's phone number.

Ejemplo:""
to_streetstring

Recipient's street address.

Ejemplo:"350 Fifth Avenue"
to_street2string

Recipient's secondary address line.

Ejemplo:""
to_citystring

Recipient's city.

Ejemplo:"New York"
to_statestring

Recipient's state.

Ejemplo:"NY"
to_zipstring

Recipient's ZIP code.

Ejemplo:"10118"
to_countrystring

Recipient's country code.

Ejemplo:"US"
label_statusstring

Current label status.

Ejemplo:"completed"
warehouse_namestring

Warehouse name associated with the shipment.

Ejemplo:"WH"
store_namestring

Store name associated with the shipment.

Ejemplo:""
order_numberstring

Linked order number.

Ejemplo:""
providerstring

Account provider — shipsaving or user.

Ejemplo:"shipsaving"
carrierstring

Carrier name.

Ejemplo:"UPS"
servicestring

Service level used.

Ejemplo:"UPS_GROUND"
packagestring

Package type used.

Ejemplo:"PACKAGE"
published_ratenumber, (double)

Carrier's retail rate.

Ejemplo:34.53
label_urlArray of strings or null, (uri)

Label image URLs.

Ejemplo:
[ "https://example.com/labels/2025-06-30/label_0.png" ]
commercial_invoice_urlArray of strings or null, (uri)

Commercial invoice URLs for international shipments.

Ejemplo:null
]
Response
[ { "shipment_id": 1245627, "packing_slip_number": 109169, "master_tracking_code": "", "prefix_tracking_code": "", "tracking_code": "1ZY50G652000880500", "label_size": "4x6", "label_type": "png", "length": 12, "width": 12, "height": 7, "weight": 14.99, "insurance": 0, "insurance_fee": { … }, "signature": "NO_SIGNATURE", "custom_print1": "", "custom_print2": "", "delivery_days": 1, "service_fee": 0.05, "rate": 10.87, "rebate": 0, "from_name": "John Doe", "from_company": "ShipSaving, LLC", "from_phone": "", "from_street": "1600 Amphitheatre Parkway", "from_street2": "", "from_city": "Mountain View", "from_state": "CA", "from_zip": "94043", "from_country": "US", "to_name": "Jane Smith", "to_company": "", "to_phone": "", "to_street": "350 Fifth Avenue", "to_street2": "", "to_city": "New York", "to_state": "NY", "to_zip": "10118", "to_country": "US", "label_status": "completed", "warehouse_name": "WH", "store_name": "", "order_number": "", "provider": "shipsaving", "carrier": "UPS", "service": "UPS_GROUND", "package": "PACKAGE", "published_rate": 34.53, "label_url": [ … ], "commercial_invoice_url": null } ]