Order Reference API
If the merchant is going to be using TradeGlobal's Shipping portal or ShipOrder API to generate shipping labels, and the package will not be manifested using the TG/Web order number, the merchant will need to be able to provide the order level reference that is generated from the merchant's warehouse or order management systems. Order references can be passed at the order level or sku level. If the reference is an order reference (All SKUS will be shipping under the same reference), the SKU field can be left null. If the reference is a SKU level reference (multiple shipments for the given order), populate the SKU field with SKU associated for the given reference.
Request
OrderReference 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/MerchantServices/api/OrderReference | Json |
Input Elements (Y=Yes, N=No, C=Conditional, N/A=Not Applicable)
POST /TGCInternalServices/Merchant/api/WarehouseBox
HOST: services.tradeglobal.com
Content-Type: application/json
{ "OrderReferences" : [ { "MerchantCode" : "TGCSANDBOX", "OrderNumber" : "5013355", "OrderReferenceNumber" : "ReferenceTest001111", "SKU" : null }, { "MerchantCode" : "TGCSANDBOX", "OrderNumber" : "5013355", "OrderReferenceNumber" : "ReferenceTest002111", "SKU" : "846733012138" } ] }
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 Status
element indicating if the box was inserted, not processed, or failed. If a order reference does not validate or fails to process, the process will continue to process the rest of the order references in the request.
Output Elements (Y=Yes, N=No, C=Conditional, N/A=Not Applicable)
200 OK
Content-Type: application/json
{ "CreateDate": "2019-02-26T11:49:32.7483132-05:00", "OrderReferences": [ { "Status": "SUCCESS", "ErrorMessage": null, "MerchantCode": "TARTECOSMETICS", "OrderNum": "5013355", "RefNumber": "ReferenceTest001111", "SKU": null }, { "Status": "SUCCESS", "ErrorMessage": null, "MerchantCode": "TARTECOSMETICS", "OrderNum": "5013355", "RefNumber": "ReferenceTest002111", "SKU": "846733012138" } ] }