Skip to content

Instantly share code, notes, and snippets.

@do-i
Created December 2, 2019 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save do-i/64e04a2dfb43b2ee54f9278a7fbecb9a to your computer and use it in GitHub Desktop.
Save do-i/64e04a2dfb43b2ee54f9278a7fbecb9a to your computer and use it in GitHub Desktop.
Sample Shipping Label via EasyPost
{
"id": "shp_8826015bc67f46e49074653f9a60ec93",
"mode": "test",
"reference": null,
"is_return": false,
"to_address": {
"id": "adr_cf465ed0ebf84ff68ca78629cfb6440b",
"mode": "test",
"name": "Sawyer Bateman",
"company": null,
"street1": "1A Larkspur Cres",
"street2": "",
"zip": "T8N2M4",
"city": "St. Albert",
"state": "AB",
"country": "CA",
"phone": "7804832746",
"email": null,
"message": null,
"carrier_facility": null,
"federal_tax_id": null,
"residential": null,
"verifications": {},
"created_at": "Dec 2, 2019, 3:38:28 PM",
"updated_at": "Dec 2, 2019, 3:38:28 PM",
"fees": null
},
"buyer_address": {
"id": "adr_cf465ed0ebf84ff68ca78629cfb6440b",
"mode": "test",
"name": "Sawyer Bateman",
"company": null,
"street1": "1A Larkspur Cres",
"street2": "",
"zip": "T8N2M4",
"city": "St. Albert",
"state": "AB",
"country": "CA",
"phone": "7804832746",
"email": null,
"message": null,
"carrier_facility": null,
"federal_tax_id": null,
"residential": null,
"verifications": {},
"created_at": "Dec 2, 2019, 3:38:28 PM",
"updated_at": "Dec 2, 2019, 3:38:28 PM",
"fees": null
},
"from_address": {
"id": "adr_a530299eedda4d8fa30310351b9f5caa",
"mode": "test",
"name": "Simpler Postage Inc",
"company": null,
"street1": "388 Townsend St",
"street2": "Apt 20",
"zip": "94107",
"city": "San Francisco",
"state": "CA",
"country": "US",
"phone": "4154567890",
"email": null,
"message": null,
"carrier_facility": null,
"federal_tax_id": null,
"residential": null,
"verifications": {},
"created_at": "Dec 2, 2019, 3:38:28 PM",
"updated_at": "Dec 2, 2019, 3:38:28 PM",
"fees": null
},
"return_address": {
"id": "adr_a530299eedda4d8fa30310351b9f5caa",
"mode": "test",
"name": "Simpler Postage Inc",
"company": null,
"street1": "388 Townsend St",
"street2": "Apt 20",
"zip": "94107",
"city": "San Francisco",
"state": "CA",
"country": "US",
"phone": "4154567890",
"email": null,
"message": null,
"carrier_facility": null,
"federal_tax_id": null,
"residential": null,
"verifications": {},
"created_at": "Dec 2, 2019, 3:38:28 PM",
"updated_at": "Dec 2, 2019, 3:38:28 PM",
"fees": null
},
"parcel": {
"id": "prcl_8d582896a6e449d0b3c4c95fe27a1fc2",
"predefined_package": null,
"weight": 22.9,
"length": 19.8,
"width": 8.0,
"height": 12.1,
"created_at": "Dec 2, 2019, 3:38:28 PM",
"updated_at": "Dec 2, 2019, 3:38:28 PM",
"fees": null
},
"customs_info": {
"id": "cstinfo_76e66da3bfde4ef0a764221a100bbd16",
"contents_type": "gift",
"contents_explanation": null,
"customs_certify": true,
"customs_signer": "Dr. Pepper",
"non_delivery_option": "return",
"restriction_type": "none",
"restriction_comments": null,
"customs_items": [
{
"id": "cstitem_603baf95dae142679f48795b8b3ff6bb",
"description": "EasyPost Stickers",
"hs_tariff_number": "654321",
"origin_country": "US",
"quantity": 11,
"value": 8.98,
"weight": 3.2,
"created_at": "Dec 2, 2019, 3:38:28 PM",
"updated_at": "Dec 2, 2019, 3:38:28 PM",
"fees": null
},
{
"id": "cstitem_d285e52531d34e6284f78c668799c7f7",
"description": "EasyPost T-shirts",
"hs_tariff_number": "123456",
"origin_country": "US",
"quantity": 2,
"value": 23.56,
"weight": 18.8,
"created_at": "Dec 2, 2019, 3:38:28 PM",
"updated_at": "Dec 2, 2019, 3:38:28 PM",
"fees": null
}
],
"created_at": "Dec 2, 2019, 3:38:28 PM",
"updated_at": "Dec 2, 2019, 3:38:28 PM",
"fees": null
},
"selected_rate": {
"id": "rate_1af1f30f3c754ccb840cc785d6625d26",
"carrier": "USPS",
"service": "PriorityMailInternational",
"service_code": "usps.prioritymailinternational",
"rate": 35.2,
"currency": "USD",
"list_rate": 35.2,
"list_currency": "USD",
"retail_rate": 37.05,
"retail_currency": "USD",
"delivery_days": null,
"delivery_date": null,
"delivery_date_guaranteed": false,
"est_delivery_days": null,
"shipment_id": "shp_8826015bc67f46e49074653f9a60ec93",
"carrier_account_id": "ca_d53bb980001c41a39246ab246fc33794",
"created_at": null,
"updated_at": null,
"fees": null
},
"rates": [
{
"id": "rate_a042912df2614334a5460c840f55693d",
"carrier": "USPS",
"service": "ExpressMailInternational",
"service_code": "usps.expressmailinternational",
"rate": 50.78,
"currency": "USD",
"list_rate": 50.78,
"list_currency": "USD",
"retail_rate": 53.2,
"retail_currency": "USD",
"delivery_days": null,
"delivery_date": null,
"delivery_date_guaranteed": false,
"est_delivery_days": null,
"shipment_id": "shp_8826015bc67f46e49074653f9a60ec93",
"carrier_account_id": "ca_d53bb980001c41a39246ab246fc33794",
"created_at": null,
"updated_at": null,
"fees": null
},
{
"id": "rate_1af1f30f3c754ccb840cc785d6625d26",
"carrier": "USPS",
"service": "PriorityMailInternational",
"service_code": "usps.prioritymailinternational",
"rate": 35.2,
"currency": "USD",
"list_rate": 35.2,
"list_currency": "USD",
"retail_rate": 37.05,
"retail_currency": "USD",
"delivery_days": null,
"delivery_date": null,
"delivery_date_guaranteed": false,
"est_delivery_days": null,
"shipment_id": "shp_8826015bc67f46e49074653f9a60ec93",
"carrier_account_id": "ca_d53bb980001c41a39246ab246fc33794",
"created_at": null,
"updated_at": null,
"fees": null
}
],
"postage_label": {
"id": "pl_aaa7e5e96a214f8892efd6a80c1f413f",
"date_advance": 0,
"integrated_form": "none",
"label_resolution": 300,
"label_size": "6x4",
"label_type": "default",
"label_url": "https://easypost-files.s3-us-west-2.amazonaws.com/files/postage_label/20191202/ea1edc51c776484aac2f5870cc06e7d8.png",
"label_file_type": "image/png",
"label_pdf_size": null,
"label_pdf_type": null,
"label_pdf_url": null,
"label_pdf_file_type": null,
"label_epl2_size": null,
"label_epl2_type": null,
"label_epl2_url": null,
"label_epl2_file_type": null,
"label_zpl_size": null,
"label_zpl_type": null,
"label_zpl_url": null,
"label_zpl_file_type": null,
"created_at": "Dec 2, 2019, 3:38:29 PM",
"updated_at": "Dec 2, 2019, 3:38:30 PM",
"fees": null
},
"scan_form": null,
"order_id": null,
"forms": [
{
"id": "form_58c198e2921149709a4583cb2be7bb96",
"mode": "test",
"form_type": "commercial_invoice",
"form_url": "https://easypost-files.s3-us-west-2.amazonaws.com/files/form/20191202/34a7bee3f10d42268d286bce2ea865b0.pdf",
"submitted_electronically": true
}
],
"tracker": {
"id": "trk_1e72b5cc96b24a7e8ab6f2a2a2968ab1",
"mode": "test",
"tracking_code": "CM218170028US",
"status": "unknown",
"shipment_id": "shp_8826015bc67f46e49074653f9a60ec93",
"carrier": "USPS",
"tracking_details": [],
"weight": 0.0,
"est_delivery_date": null,
"signed_by": null,
"carrier_detail": null,
"public_url": "https://track.easypost.com/djE6dHJrXzFlNzJiNWNjOTZiMjRhN2U4YWI2ZjJhMmEyOTY4YWIx",
"status_detail": "unknown",
"created_at": "Dec 2, 2019, 3:38:30 PM",
"updated_at": "Dec 2, 2019, 3:38:30 PM",
"fees": []
},
"insurance": null,
"tracking_code": "CM218170028US",
"status": "unknown",
"refund_status": null,
"batch_id": null,
"batch_status": null,
"batch_message": null,
"usps_zone": null,
"options": {
"currency": "USD",
"payment": {
"type": "SENDER"
},
"label_date": null,
"date_advance": 0.0
},
"messages": [],
"created_at": "Dec 2, 2019, 3:38:28 PM",
"updated_at": "Dec 2, 2019, 3:38:30 PM",
"fees": [
{
"amount": 0.01,
"charged": true,
"refunded": false
},
{
"amount": 35.2,
"charged": true,
"refunded": false
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment