Example — Purchase Label
Json’s example is listed below.
Example 1:
{"ClientRequestId": "Test001","ShipDate": "2018-04-25","From":{"Name":"test","Company":"","Street":"XXXXXXXXXXXX","Street2":"","State":"FL","City":"FORT LAUDERDALE","ZipCode":"33308","CountryCode":"US","PhoneNumber":"1234567890","Email":"jinrong@web2ship.com"},"To": {"Name": "Test","Company": "Teapplix Inc","Street": "XXXXXXXX","Street2": "","State": "MA","City": "New Bedford","ZipCode": "02745","Country": "United States","CountryCode": "US","PhoneNumber": "6548044990","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”
}
The result is:
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": "1234569780","Email": "91731-1117"},"To": {"Name": "Joel Harris","Company": "","Street": "xxxxxxxx","Street2": "","State": "NY","City": "Westbrookville","ZipCode": "12785","Country": "United States","CountryCode": "US","PhoneNumber": "1234567890","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"}
