Label
When you create a shipment, you will be returned a label Object which contains information such as trackingNumber and labelUrl.
Label Object
Attributes | Definitions |
---|---|
objectId | 32 digits UUID, the primary and only identifier for this label object. |
status | the status of the label. 1.recent,2.inTransit,3.delivered,4.voided,5.failure |
trackingNumber | a set of trackingNumber. If there are more than one packages (label) in a shipment, you will receive multiple tracking numbers for a shipment; the number of tracking number is equal to the number of packages. If there is one package (label) in a shipment, you will get only one tracking number. |
trackingUrl | track URL array,the number of trackingurl returned equals to the number of packages. If there is one package, one trackingurl will be returned. |
pdfUrl | the url used to attach and print all labels and invoices. We recommend using this to download labels. |
labelUrl | all url for labels. The same number of url will be received as the number of packages. |
invoiceUrl | commercial invoice url will be received for an international shipment |
rate | the estimated cost for a shipment |
billedAmount | the actual cost for a shipment (this field value will be updated when ezeeship invoices are uploaded). |
feeDetail | charge details (estimated cost is used before invoice is uploaded; this field value will be updated once the invoice is uploaded) |
authorizationCode | control number. This is needed when the sender address is outside of the United States. This field value will be updated within hours of the creation of label. |
createTime | time created. |
Create Label
When a label creation request is sent, carrier will start to process the information of the shipment and return actual and functional labels for packages.
For developers who are at the beginning of testing and developing stage, we recommend setting shipment.isTest to be “true” when using under testing environment. Labels created under testing environment will not be charged.
endpoint : https://ezeeship.com/api/ezeeship-openapi/label/create
Create Domestic Label sample
POST : https://ezeeship.com/api/ezeeship-openapi/label/create
{
"from": {
"personName": "Sender Name",
"company": "Sender Company",
"countryCode": "US",
"phone": "9999999999",
"stateCode": "CA",
"city": "San Francisco",
"addressLine1": "215 Clayton St.",
"addressLine2":"1092,IFC",
"zipCode": "94117"
},
"to": {
"personName": "Recipient Name",
"company": "Recipient Company",
"countryCode": "US",
"stateCode": "CA",
"phone": "9999999999",
"city": "Inglewood",
"addressLine1": "11222 S La Cienega BLVD",
"addressLine2":"1092,IFC",
"zipCode": "90304"
},
"carrierCode": "fedex",
"serviceCode": "fedex_2_day",
"isTest": false,
"parcels": [
{
"packageNum": 1,
"length": "5",
"width": "5",
"height": "5",
"distanceUnit": "in",
"weight": "4",
"massUnit": "lb",
"packageCode": "your_package",
"extra": {
"insurance": 399,
"isCod": true,
"codAmount": 399,
"paymentMethod": "any",
"dryIceWeight": 2
}
}
],
"extra": {
"isStd": false,
"reference": "gggggggggg",
"reference2": "ttttttttttttt"
}
}
Response :
{
"result": "OK",
"message": "",
"data": {
"objectId": "f03b5014e17d11e7aed3035406551f52",
"status": 1,
"trackingNumber": [
"788948913744"
],
"trackingUrl": [
"https://www.fedex.com/apps/fedextrack/?action=track&cntry_code=us&trackingnumber=788948913744"
],
"pdfUrl": "http://127.0.0.1:2224/label/printLabel?objectId=f03b5014e17d11e7aed3035406551f52",
"labelUrl": [
"http://127.0.0.1:2223/shipment/printLabel?objectId=f03b5014e17d11e7aed3035406551f52"
],
"invoiceUrl": [
null
],
"rate": 36.36,
"createTime": "2017-12-15 09:54:28",
"billedAmonut": 0,
"feeDetail": {
"DryIce": 5,
"Cod": 13,
"Insurance": 4,
"Fuel": 0.55,
"baseRate": 13.81
}
}
}
Create International Label sample
POST : https://ezeeship.com/api/ezeeship-openapi/label/create
{
"from": {
"personName": "Sender Name",
"company": "Sender Company",
"countryCode": "US",
"phone": "9999999999",
"stateCode": "CA",
"city": "San Francisco",
"addressLine1": "215 Clayton St.",
"addressLine2":"1092,IFC",
"zipCode": "94117"
},
"to": {
"personName": "Recipient Name",
"company": "Recipient Company",
"countryCode": "CN",
"stateCode": "BJ",
"phone": "9999999999",
"city": "Shanghai",
"addressLine1": "No.400 Cao Bao Road",
"addressLine2":"1092,IFC",
"zipCode": "200231"
},
"carrierCode": "fedex",
"serviceCode": "fedex_international_economy",
"isTest": false,
"parcels": [{
"packageNum": 1,
"length": "5",
"width": "5",
"height": "5",
"distanceUnit": "in",
"weight": "2",
"massUnit": "lb",
"packageCode": "your_package",
"extra": {
"insurance": 399
}
}],
"extra": {
"einNumber": "123411233",
"isStd": false,
"reference": "gggggggggg",
"reference2": "ttttttttttttt"
},
"customsDeclarations": {
"contentsType": "GIFT",
"eelPfc": "30.37(a)",
"items": [{
"quantityUnit": "EA",
"quantity": 3,
"weight": 0.5,
"massUnit": "lb",
"valueAmount": 399,
"originCountry": "CN",
"tariffNumber": "8525804000",
"description": "digital camera"
}]
}
}
Response :
{
"result": "OK",
"message": "",
"data": {
"objectId": "87a41b6efc3311e780428161a611e02e",
"status": 1,
"trackingNumber": [
"789394820764"
],
"trackingUrl": [
"https://www.fedex.com/apps/fedextrack/?action=track&cntry_code=us&trackingnumber=789394820764"
],
"pdfUrl": "https://rovaa.com/api/ezeeship/label/printLabel?objectId=87a41b6efc3311e780428161a611e02e",
"labelUrl": [
"https://rovaa.com/api/ezeeship-api/shipment/printLabel?objectId=87a41b6efc3311e780428161a611e02e"
],
"invoiceUrl": [
"https://rovaa.com/api/ezeeship-api/shipment/printInvoice?objectId=87a41b6efc3311e780428161a611e02e"
],
"rate": 72.49,
"createTime": "2018-01-18 09:39:50",
"billedAmonut": 0,
"feeDetail": {
"Insurance": 3,
"Fuel": 3.18,
"baseRate": 66.31
}
}
}
Get Label
Query a label object by objectId
endpoint : https://ezeeship.com/api/ezeeship-openapi/label/get/{objectId}
Get Label sample
GET : https://ezeeship.com/api/ezeeship-openapi/label/get/f03b5014e17d11e7aed3035406551f52
Response :
{
"objectId": "f03b5014e17d11e7aed3035406551f52",
"status": 1,
"trackingNumber": [
"788948913744"
],
"trackingUrl": [
"https://www.fedex.com/apps/fedextrack/?action=track&cntry_code=us&trackingnumber=788948913744"
],
"pdfUrl": "http://127.0.0.1:2224/label/printLabel?objectId=f03b5014e17d11e7aed3035406551f52",
"labelUrl": [
"http://127.0.0.1:2223/shipment/printLabel?objectId=f03b5014e17d11e7aed3035406551f52"
],
"invoiceUrl": [
null
],
"rate": 36.36,
"createTime": "2017-12-15 09:54:28",
"billedAmonut": 0,
"feeDetail": {
"DryIce": 5,
"Cod": 13,
"Insurance": 4,
"Fuel": 0.55,
"baseRate": 13.81
}
}
Cancel Label
Use the label’s Object as input parameter to cancel a label; once succeed. EzeeShip will refund the balance back to client’s account.
endpoint : https://ezeeship.com/api/ezeeship-openapi/label/cancel
Cancel Label sample
POST : https://ezeeship.com/api/ezeeship-openapi/label/cancel
{
"objectId": "f03b5014e17d11e7aed3035406551f52"
}
Response :
{
"result": "OK",
"message": ""
}
Tracking
TrackingStatus shows the most updated status of the shipment. trackingStatus.
status has following values: “UNKNOWN”, “DELIVERED”, “TRANSIT”, “FAILURE”, “RETURNED”.
trackingHistory represents the transit history of this shipment
endpoint : https://ezeeship.com/api/ezeeship-openapi/label/tracking
Tracking sample
POST : https://ezeeship.com/api/ezeeship-openapi/label/tracking
{
"trackingNumber": "788948913744"
}
Response :
{
"result": "OK",
"message": "",
"data": {
"trackingNumber": "9405516902153830825080",
"carrierCode": "usps",
"serviceCode": "usps_first",
"trackingStatus": {
"status": "DELIVERED",
"statusDetails": "Delivered, Front Door/Porch",
"country": "",
"state": "MD",
"city": "DAVIDSONVILLE",
"statusTime": "2017-12-02 07:29:00"
},
"trackingHistorys": [
{
"status": "DELIVERED",
"statusDetails": "Delivered, Front Door/Porch",
"country": "",
"state": "MD",
"city": "DAVIDSONVILLE",
"statusTime": "2017-12-02 07:29:00"
},
{
"status": "TRANSIT",
"statusDetails": "Arrived at Post Office",
"country": "",
"state": "MD",
"city": "DAVIDSONVILLE",
"statusTime": "2017-12-02 04:17:00"
},
{
"status": "TRANSIT",
"statusDetails": "Departed USPS Regional Facility",
"country": "",
"state": "",
"city": "LINTHICUM HEIGHTS MD DISTRIBUTION CENTER",
"statusTime": "2017-12-01 23:02:00"
},
{
"status": "TRANSIT",
"statusDetails": "Arrived at USPS Regional Destination Facility",
"country": "",
"state": "",
"city": "LINTHICUM HEIGHTS MD DISTRIBUTION CENTER",
"statusTime": "2017-12-01 14:40:00"
},
{
"status": "TRANSIT",
"statusDetails": "In Transit to Destination",
"country": "",
"state": "MD",
"city": "On its way to DAVIDSONVILLE",
"statusTime": "2017-12-01 09:41:00"
},
{
"status": "TRANSIT",
"statusDetails": "In Transit to Destination",
"country": "",
"state": "MD",
"city": "On its way to DAVIDSONVILLE",
"statusTime": "2017-11-30 09:41:00"
},
{
"status": "TRANSIT",
"statusDetails": "In Transit to Destination",
"country": "",
"state": "MD",
"city": "On its way to DAVIDSONVILLE",
"statusTime": "2017-11-29 09:41:00"
},
{
"status": "TRANSIT",
"statusDetails": "Arrived at USPS Regional Origin Facility",
"country": "",
"state": "",
"city": "PHILADELPHIA PA NETWORK DISTRIBUTION CENTER",
"statusTime": "2017-11-28 18:41:00"
},
{
"status": "TRANSIT",
"statusDetails": "In Transit to Destination",
"country": "",
"state": "MD",
"city": "On its way to DAVIDSONVILLE",
"statusTime": "2017-11-28 09:57:00"
},
{
"status": "TRANSIT",
"statusDetails": "Departed Post Office",
"country": "",
"state": "PA",
"city": "ALLENTOWN",
"statusTime": "2017-11-27 21:57:00"
},
{
"status": "TRANSIT",
"statusDetails": "USPS picked up item",
"country": "",
"state": "PA",
"city": "ALLENTOWN",
"statusTime": "2017-11-27 16:23:00"
},
{
"status": "TRANSIT",
"statusDetails": "Pre-Shipment Info Sent to USPS, USPS Awaiting Item",
"country": "",
"state": "",
"city": "",
"statusTime": "2017-11-26 00:00:00"
}
]
}
}