curl --location --request POST 'https://api.goshippo.com/transactions' \
--header 'Authorization: ShippoToken {{token}}' \
--header 'Content-Type: application/json' \
--header 'SHIPPO-API-VERSION: 2018-02-08' \
--data-raw '{
"rate": "a5c9d1bec93149f5bedc3a9374b50970",
"async": false,
"label_file_type": "PDF"
}'{
"commercial_invoice_url": "<string>",
"created_by": {
"first_name": "Shwan",
"last_name": "Ippotle",
"username": "shippotle@shippo.com"
},
"eta": "<string>",
"label_file_type": "PDF_4x6",
"label_url": "https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA",
"messages": [
{
"source": "UPS",
"code": "carrier_timeout",
"text": "UPS API did not respond. Please try again in a few minutes."
}
],
"metadata": "<string>",
"object_created": "2023-11-07T05:31:56Z",
"object_id": "915d94940ea54c3a80cbfa328722f5a1",
"object_owner": "shippotle@shippo.com",
"object_state": "VALID",
"object_updated": "2023-11-07T05:31:56Z",
"parcel": "e94c7fdfdc7b495dbb390a28d929d90a",
"qr_code_url": "https://shippo-delivery.s3.amazonaws.com/96_qr_code.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA",
"rate": {
"amount": "5.5",
"amount_local": "5.5",
"currency": "USD",
"currency_local": "USD",
"object_id": "adcfdddf8ec64b84ad22772bce3ea37a",
"provider": "USPS",
"carrier_account": "078870331023437cb917f5187429b093",
"servicelevel_name": "Priority Mail",
"servicelevel_token": "fedex_ground"
},
"status": "SUCCESS",
"test": true,
"tracking_number": "9499907123456123456781",
"tracking_status": "DELIVERED",
"tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781"
}curl --location --request POST 'https://api.goshippo.com/transactions' \
--header 'Authorization: ShippoToken {{token}}' \
--header 'Content-Type: application/json' \
--header 'SHIPPO-API-VERSION: 2018-02-08' \
--data-raw '{
"rate": "a5c9d1bec93149f5bedc3a9374b50970",
"async": false,
"label_file_type": "PDF"
}'{
"commercial_invoice_url": "<string>",
"created_by": {
"first_name": "Shwan",
"last_name": "Ippotle",
"username": "shippotle@shippo.com"
},
"eta": "<string>",
"label_file_type": "PDF_4x6",
"label_url": "https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA",
"messages": [
{
"source": "UPS",
"code": "carrier_timeout",
"text": "UPS API did not respond. Please try again in a few minutes."
}
],
"metadata": "<string>",
"object_created": "2023-11-07T05:31:56Z",
"object_id": "915d94940ea54c3a80cbfa328722f5a1",
"object_owner": "shippotle@shippo.com",
"object_state": "VALID",
"object_updated": "2023-11-07T05:31:56Z",
"parcel": "e94c7fdfdc7b495dbb390a28d929d90a",
"qr_code_url": "https://shippo-delivery.s3.amazonaws.com/96_qr_code.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA",
"rate": {
"amount": "5.5",
"amount_local": "5.5",
"currency": "USD",
"currency_local": "USD",
"object_id": "adcfdddf8ec64b84ad22772bce3ea37a",
"provider": "USPS",
"carrier_account": "078870331023437cb917f5187429b093",
"servicelevel_name": "Priority Mail",
"servicelevel_token": "fedex_ground"
},
"status": "SUCCESS",
"test": true,
"tracking_number": "9499907123456123456781",
"tracking_status": "DELIVERED",
"tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781"
}API key authentication using the ShippoToken scheme. Format: Authorization: ShippoToken <API_TOKEN> Example: Authorization: ShippoToken shippo_live_abc123
Optional string used to pick a non-default API version to use. See our API version guide.
"2018-02-08"
Examples.
"ec9f0d3adc9441449c85d315f0997fd5"
false
Print format of the label. If empty, will use the default format set from the Shippo dashboard.
PNG, PNG_2.3x7.5, PDF, PDF_2.3x7.5, PDF_4x6, PDF_4x8, PDF_A4, PDF_A5, PDF_A6, ZPLII "PDF_4x6"
"Order ID #12345"
"adcfdddf8ec64b84ad22772bce3ea37a"
Created transaction
A URL pointing to the commercial invoice as a 8.5x11 inch PDF file. A value will only be returned if the Transactions has been processed successfully and if the shipment is international.
An object with details about the user who created the Transaction (purchased the label). A value will be returned only for Transactions that can be associated with a specific user, e.g. when a logged-in user purchases a label via the Shippo Web application; but not for Transactions purchased e.g. via the API using a ShippoToken, which is associated with the account but not any specific user.
Show child attributes
The estimated time of arrival according to the carrier.
Print format of the label. If empty, will use the default format set from the Shippo dashboard.
PNG, PNG_2.3x7.5, PDF, PDF_2.3x7.5, PDF_4x6, PDF_4x8, PDF_A4, PDF_A5, PDF_A6, ZPLII "PDF_4x6"
A URL pointing directly to the label in the format you've set in your settings. A value will only be returned if the Transactions has been processed successfully.
"https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA"
Show child attributes
A string of up to 100 characters that can be filled with any additional information you want to attach to the object.
Date and time of Transaction creation.
Unique identifier of the given Transaction object.
"915d94940ea54c3a80cbfa328722f5a1"
Username of the user who created the Transaction object.
"shippotle@shippo.com"
Indicates the validity of the enclosing object
VALID, INVALID Date and time of last Transaction update.
Object ID of the Parcel object that is being shipped.
"e94c7fdfdc7b495dbb390a28d929d90a"
A URL pointing directly to the QR code in PNG format. A value will only be returned if requested using qr_code_requested flag and the carrier provides such an option.
"https://shippo-delivery.s3.amazonaws.com/96_qr_code.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA"
ID of the Rate object for which a Label has to be obtained.
If you purchase a label by calling the transaction endpoint without a rate (instalabel),
this field will be a simplified Rate object in the Transaction model returned from the POST request.
Note, only rates less than 7 days old can be purchased to ensure up-to-date pricing.
Show child attributes
Indicates the status of the Transaction.
WAITING, QUEUED, SUCCESS, ERROR, REFUNDED, REFUNDPENDING, REFUNDREJECTED "SUCCESS"
Indicates whether the object has been created in test mode.
The carrier-specific tracking number that can be used to track the Shipment. A value will only be returned if the Rate is for a trackable Shipment and if the Transactions has been processed successfully.
"9499907123456123456781"
Indicates the high level status of the shipment.
UNKNOWN, PRE_TRANSIT, TRANSIT, DELIVERED, RETURNED, FAILURE "DELIVERED"
A link to track this item on the carrier-provided tracking website. A value will only be returned if tracking is available and the carrier provides such a service.
"https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781"
Was this page helpful?