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)

Node Required Description Data Type Length Values
WarehouseBoxRequest Y Object containing an array of Box objects
WarehouseBoxes Y Array containing a collection of Box objects Object Array
Box Y Object
MerchantCode Y Code that uniquely identifies the merchant. Is provided and assigned by TradeGlobal Commerce. string 20
BoxCode Y Unique code chosen by merchant. string 50 Must be unique
UOMSize Y Size unit of measure string 10 Acceptable units... MM, CM, IN
Length Y Box Length decimal(18,4) Must be greater than zero
Width Y Box Width decimal(18,4) Must be greater than zero
Height Y Box Height decimal(18,4) Must be greater than zero
UOMWeight Y Weight unit of measure string 10 Accetable units... G, OZ, LBS, KG
BoxWeight Y Weight of the box decimal(18,4)
RemoveBox Y Indicates whether or not the box is to be removed. If set to true, the box with the given box code will be deleted. boolean true/false

Example Request - JSON Format
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)

Node Required Description Data Type Length Values
WarehouseBoxResponse Y Object containing an array of Box objects
WarehouseBoxes Y Array containing a collection of Box objects Object Array
Box Y Object
Code Y Code that indicates if the request, FAILED, INSERTED, UPDATED, or REMOVED string 20
ErrorMessage Y Element that provides the error message in the event the request fails. string 255
MerchantCode Y Code that uniquely identifies the merchant. Is provided and assigned by TradeGlobal Commerce. string 20
BoxCode Y Unique code chosen by merchant. string 50 Must be unique
UOMSize Y Size unit of measure string 10 Acceptable units... MM, CM, IN
Length Y Box Length decimal(18,4) Must be greater than zero
Width Y Box Width decimal(18,4) Must be greater than zero
Height Y Box Height decimal(18,4) Must be greater than zero
UOMWeight Y Weight unit of measure string 10 Accetable units... G, OZ, LBS, KG
BoxWeight Y Weight of the box decimal(18,4)
RemoveBox Y Indicates whether or not the box is to be removed. If set to true, the box with the given box code will be deleted. boolean true/false

Example Respone - JSON Format
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)

Node Required Description Data Type Length Values
WarehouseBoxResponse Y Object containing an array of Box objects
Code Y Code that indicates if the request was successful or failed string 20 SUCCESS, FAILED
ErrorMessage C Error message element that is returned if the request failed string 255
TimeStamp N Timestamp indicating when the request was submitted DateTime
WarehouseBoxes Y Array containing a collection of Box objects Object Array
Box Y Object
Code Y Code that indicates if the request, FAILED, INSERTED, UPDATED, or REMOVED string 20
ErrorMessage Y Element that provides the error message in the event the request fails. string 255
MerchantCode Y Code that uniquely identifies the merchant. Is provided and assigned by TradeGlobal Commerce. string 20
BoxCode Y Unique code chosen by merchant. string 50 Must be unique
UOMSize Y Size unit of measure string 10 Acceptable units... MM, CM, IN
Length Y Box Length decimal(18,4) Must be greater than zero
Width Y Box Width decimal(18,4) Must be greater than zero
Height Y Box Height decimal(18,4) Must be greater than zero
UOMWeight Y Weight unit of measure string 10 Accetable units... G, OZ, LBS, KG
BoxWeight Y Weight of the box decimal(18,4)
RemoveBox Y Indicates whether or not the box is to be removed. If set to true, the box with the given box code will be deleted. boolean true/false

Example Respone - JSON Format
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
        }
    ]
}


Try it Yourself