Warehouse Box API
To calculate what box(es) products in your shopping cart will ship in, it is necessary for TradeGlobal to have a complete and accurate listing of all boxes your warehouse will be using for international shipments. Please provide accurate information as it is vital in getting the most accurate freight quote.
Request
Authorization Required
To access this resources' endpoints you will need to provice your Access Token provided to you by TradeGlobal in the Authorization header.
Box requests are supported by the HTTP POST method. Create a POST request by adding the parameters in the HTTP request entity body using the application/json
media type. The request URL must conform to the following specifications:
Protocol | Host | Path | Format |
---|---|---|---|
https:// | services.tradeglobal.com | /TGCInternalServices/v2/MerchantServices/api/Box | json |
Input Elements (Y=Yes, N=No, C=Conditional, N/A=Not Applicable)
POST /TGCInternalServices/v2/MerchantServices/api/Box
HOST: services.tradeglobal.com
Content-Type: application/json
Authorization: Basic :access_token
{ "WarehouseBoxes" : [{ "MerchantCode" : "TGCSANDBOX", "BoxCode" : "TESTING_123", "UOMSize" : "IN", "Length" : 7, "Width" : 7, "Height" : 7, "UOMWeight" : "OZ", "BoxWeight" : 17, "RemoveBox" : false }] }
Response
If the request is valid and authorized, the server will process the request and return a response. Each box passed in the request will be returned with a Code
element indicating if the box was inserted, updated, not processed, or failed.
Output Elements (Y=Yes, N=No, C=Conditional, N/A=Not Applicable)
200 OK
Content-Type: application/json
{ "Code": "SUCCESS", "ErrorMessage": null, "TimeStamp": "2019-02-25T15:25:59.6956575-05:00", "WarehouseBoxes": [ { "Status": "INSERTED", "ErrorMessage": null, "MerchantCode": "TGCSANDBOX", "BoxCode": "TESTING_123", "UOMSize": "IN", "Length": 7, "Width": 7, "Height": 7, "UOMWeight": "OZ", "BoxWeight": 17, "RemoveBox": false } ] }
Request
Authorization Required
To access this resources' endpoints you will need to provice your Access Token provided to you by TradeGlobal in the Authorization header.
Protocol | Host | Path | Parameters |
---|---|---|---|
https:// | services.tradeglobal.com | /TGCInternalServices/v2/MerchantServices/api/Box | merchantCode |
Example Request
https://services.tradeglobal.com/TGCInternalServices/v2/MerchantServices/api/Box?merchantCode=TGCSandbox
Response
If the request is valid and authorized, the server will process the request and return a response. Each box passed in the request will be returned with a Code
element indicating if the box was inserted, updated, not processed, or failed.
Output Elements (Y=Yes, N=No, C=Conditional, N/A=Not Applicable)
200 OK
Content-Type: application/json
{ "Code": "SUCCESS", "ErrorMessage": null, "TimeStamp": "2019-02-25T14:53:08.7486575-05:00", "WarehouseBoxes": [ { "Status": null, "ErrorMessage": null, "MerchantCode": "TGCSANDBOX", "BoxCode": "TGC_6x6x6", "UOMSize": "IN", "Length": 6, "Width": 6, "Height": 6, "UOMWeight": "OZ", "BoxWeight": 32, "RemoveBox": false }, { "Status": null, "ErrorMessage": null, "MerchantCode": "TGCSANDBOX", "BoxCode": "TGC_12x10x10", "UOMSize": "IN", "Length": 12, "Width": 10, "Height": 10, "UOMWeight": "OZ", "BoxWeight": 32, "RemoveBox": false }, { "Status": null, "ErrorMessage": null, "MerchantCode": "TGCSANDBOX", "BoxCode": "TGC_10x8x6", "UOMSize": "IN", "Length": 10, "Width": 8, "Height": 6, "UOMWeight": "OZ", "BoxWeight": 32, "RemoveBox": false }, { "Status": null, "ErrorMessage": null, "MerchantCode": "TGCSANDBOX", "BoxCode": "TGC_7x7x7", "UOMSize": "IN", "Length": 7, "Width": 7, "Height": 7, "UOMWeight": "OZ", "BoxWeight": 32, "RemoveBox": false }, { "Status": null, "ErrorMessage": null, "MerchantCode": "TGCSANDBOX", "BoxCode": "TGC_16x12x8", "UOMSize": "IN", "Length": 16, "Width": 12, "Height": 8, "UOMWeight": "OZ", "BoxWeight": 32, "RemoveBox": false }, { "Status": null, "ErrorMessage": null, "MerchantCode": "TGCSANDBOX", "BoxCode": "TGC_12x10x6", "UOMSize": "IN", "Length": 12, "Width": 10, "Height": 6, "UOMWeight": "OZ", "BoxWeight": 32, "RemoveBox": false }, { "Status": null, "ErrorMessage": null, "MerchantCode": "TGCSANDBOX", "BoxCode": "TGC_12x10x8", "UOMSize": "IN", "Length": 12, "Width": 10, "Height": 8, "UOMWeight": "OZ", "BoxWeight": 32, "RemoveBox": false }, { "Status": null, "ErrorMessage": null, "MerchantCode": "TGCSANDBOX", "BoxCode": "TGC_16x16x12", "UOMSize": "IN", "Length": 16, "Width": 16, "Height": 12, "UOMWeight": "OZ", "BoxWeight": 32, "RemoveBox": false }, { "Status": null, "ErrorMessage": null, "MerchantCode": "TGCSANDBOX", "BoxCode": "TGC_16x16x16", "UOMSize": "IN", "Length": 16, "Width": 16, "Height": 16, "UOMWeight": "OZ", "BoxWeight": 32, "RemoveBox": false }, { "Status": null, "ErrorMessage": null, "MerchantCode": "TGCSANDBOX", "BoxCode": "Test_6x6x6", "UOMSize": "IN", "Length": 6, "Width": 6, "Height": 6, "UOMWeight": "OZ", "BoxWeight": 36, "RemoveBox": false }, { "Status": null, "ErrorMessage": null, "MerchantCode": "TGCSANDBOX", "BoxCode": "Test_12x10x6", "UOMSize": "IN", "Length": 12, "Width": 10, "Height": 6, "UOMWeight": "OZ", "BoxWeight": 36, "RemoveBox": false }, { "Status": null, "ErrorMessage": null, "MerchantCode": "TGCSANDBOX", "BoxCode": "Test_12x10x10", "UOMSize": "IN", "Length": 12, "Width": 10, "Height": 10, "UOMWeight": "OZ", "BoxWeight": 36, "RemoveBox": false }, { "Status": null, "ErrorMessage": null, "MerchantCode": "TGCSANDBOX", "BoxCode": "Test_16x16x16", "UOMSize": "IN", "Length": 16, "Width": 16, "Height": 16, "UOMWeight": "OZ", "BoxWeight": 36, "RemoveBox": false } ] }