Example

Json举例如下.

Example 1:

{
"ClientRequestId": "Test001",
"ShipDate": "2018-04-25",
"From":{
"Name":"test",
"Company":"",
"Street":"XXXXXXXXXXXXXX",
"Street2":"",
"State":"FL",
"City":"FORT LAUDERDALE",
"ZipCode":"33308",
"CountryCode":"US",
"PhoneNumber":"01234569870",
"Email":"fake@wship.com"
},
"To": {
"Name": "Test",
"Company": "Teapplix Inc",
"Street": "XXXXXXXXXXXXXXX",
"Street2": "",
"State": "MA",
"City": "New Bedford",
"ZipCode": "02745",
"Country": "United States",
"CountryCode": "US",
"PhoneNumber": "1236459870",
"Email": "test@test.com"
},
"Packages": [
{
"Weight": {
"Value": 1,
"Unit": "OZ"
},
"Dimensions": {
"Length": 5,
"Width": 7,
"Depth": 6,
"Unit": "IN"
},
"Reference": "Test001",

"Method": "USPS_FIRST_PACKAGE"
}
],
"ImageFormat": {
"Layout": "4x6",
"Type": "PDF",
"LabelReturn": "URL"
},
"IsReturn": false,
"Provider": "TEAPPLIX"
}

返回结果:

200 OK

{
"ClientRequestId": "Test001",
"TrackingInfo": [
{
"TrackingNumber": "93020205160000000XXXXX",
"CarrierName": "USPS"
}
],
"LabelData": [
{
"Type": "URL",
"Content": "https://api.teapplix.com/api2/DownloadLabel/XXX/Test001/pdf"
}
],
"Success": true,
"Code": 0,
"Message": "Label was purchased.",
"Provider": "TEAPPLIX"
}

Example 2:

{
"ClientRequestId": "1658540348020",
"ShipDate": "2019-08-10",
"From": {
"Name": "Rocky Lei",
"Company": "",
"Street": "xxxxxxxxxxxx",
"Street2": "",
"State": "CA",
"City": "El Monte",
"ZipCode": "91731-1117",
"Country": "United States",
"CountryCode": "US",
"PhoneNumber": "12365478963",
"Email": "91731-1117"
},
"To": {
"Name": "Joel Harris",
"Company": "",
"Street": "XXXXXXXXXXXXXXXXX",
"Street2": "",
"State": "NY",
"City": "Westbrookville",
"ZipCode": "12785",
"Country": "United States",
"CountryCode": "US",
"PhoneNumber": "00000001235",
"Email": "daytonharris63@gmail.com"
},
"Packages": [{
"Weight": {
"Value": 0.31,
"Unit": "KG"
},
"IdenticalPackageCount": 1,
"Reference": "48228_Rosegold*1;",
"Method": "USPS_FIRST_PACKAGE"
}],
"CustomsDeclaration": {
"Items": [{
"Name": "48228_Rosegold",
"Sku": "",
"Description": "phone case",
"Quantity": 1,
"Amount": "5.00",
"Currency": "USD",
"OriginCountry": "USD",
"TariffCode": ""
}]
},
"ImageFormat": {
"Layout": "4x6",
"Type": "PDF",
"LabelReturn": "URL"
},
"IsReturn": false,
"Provider": "TEAPPLIX"
}

Example 3:

{
"ClientRequestId": "WD0000419072600021",
"ShipDate": "2019-07-26",
"From": {
"Name": "EMMA-WE CHI",
"Company": "Wecro",
"Street": "XXXXXXXX",
"Street2": "",
"State": "CA",
"City": "city of industry",
"ZipCode": "91745",
"CountryCode": "US",
"PhoneNumber": "6263308084",
"Email": ""
},
"To": {
"Name": "Daiwei Liu",
"Company": "",
"Street": "XXXXX",
"Street2": "",
"State": "CA",
"City": "city of industry",
"ZipCode": "91746",
"Country": "United States",
"CountryCode": "US",
"PhoneNumber": "99992304806",
"Email": ""
},
"Packages": [{
"Weight": {
"Value": "0.200",
"Unit": "KG"
},
"Dimensions": {
"Length": "1.000",
"Width": "1.000",
"Depth": "1.000",
"Unit": "CM"
},
"Reference": "ZZYC429-2XL13*1*1;",
"Method": "USPS_FIRST_PACKAGE",
"InsuranceValue": "30"
}],
"Options": {"InsuranceType": "teapplix"},
"CustomsDeclaration": {
"Items": [{
"Name": "clothing",
"Sku": "ZZYC429-2XL13*1",
"Description": "clothing",
"Quantity": "1",
"Amount": 30,
"Currency": "USD",
"OriginCountry": "US",
"TariffCode": "3926400000"
}],
"ReasonForExport": ""
},
"ImageFormat": {
"Layout": "4x6",
"Type": "PDF",
"LabelReturn": "URL"
},
"IsReturn": false,
"Provider": "TEAPPLIX"
}