Product API
In order to provide shipping quotes, TGC requires all product data to be loaded into our system. The following information will guide you through loading and updating products to your account.
Request
Authorization Required
To access this resources' endpoints you will need to provice your Access Token provided to you by TGC in the Authorization header.
Product load 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/api/Products | Json |
Input Elements (Y=Yes, N=No, C=Conditional, N/A=Not Applicable)
POST /TGCInternalServices/v2/api/Products
HOST: services.tradeglobal.com
Content-Type: application/json
Authorization: Basic :access_token
{ "Products" : [ { "MerchantCode" : "TGCSANDBOX", "SKU" : "APITest001", "Length" : 30, "Width" : 45, "Height" : 60, "UOMSize" : "MM", "UOMWeight" : "G", "Weight" : 75, "HarmonizedTariffCode" : "650.34.2", "ciDesc1" : "Lipstick", "ciDesc2" : "Makeup", "ciDesc3" : "Cosmetics", "CountryOfOrigin" : "CA" } ] }
Response
If the request is valid and authorized, the server will process the request and return a response. Each product passed in the request will be returned with a Status
element indicating if the product was inserted, updated, not processed, or failed. If a product does not validate or fails to process, the process will continue to process the rest of the products in the request.
Output Elements (Y=Yes, N=No, C=Conditional, N/A=Not Applicable)
Node | Required | Description | Data Type | Length | Values |
---|---|---|---|---|---|
Code |
Y | Status of the request | String | SUCCESS, FAILED | |
ErrorMessage |
C | Message describing the error that was thrown if a FAILED code is returned | String | ||
TimeStamp |
Y | Time Stamp of when the response was generated | DateTime | ||
Products |
Y | Container array that holds one or more products | |||
Status |
Y | Result of the request | String | INSERTED, UPDATED, NOT_PROCESSED | |
ErrorMessage |
C | Message describing the error that was thrown for the given product | String | ||
MerchantCode |
Y | Unique identifier for merchant | string | 20 | |
SKU |
Y | Unique identifier for product | string | 100 | |
Name |
N | Name of the product | string | 100 | |
Description |
Y | Description of the product | string | 255 | |
Title |
N | Title of product | string | 150 | |
Keywords |
N | Keywords that describe the product | string | 255 | |
Specs |
N | Product specifications | string | 255 | |
Color |
N | Color of the product | string | 500 | |
CountryOfOrigin |
Y | Country where the product is made | string | 3 | 2 character or 3 character country code |
Brand |
N | Brand of the product | string | 150 | |
Material |
N | Material of the product | string | 255 | |
UOMSize |
Y | Unit of measure | string | 10 | IN, CM, MM |
Length |
Y | Length of the product | Decimal | (18,4) | |
Width |
Y | Width of the product | Decimal | (18,4) | |
Height |
Y | Height of the product | Decimal | (18,4) | |
UOMWeight |
Y | Unit of weight measure | string | 10 | LBS, KG, OZ, G |
Weight |
Y | Weight of the product | Decimal | (18,4) | |
HarmonizedTariffCode |
C | Code for customs clearance | String | 15 | |
ImageURL |
N | Image url of product on merchant site | String | 1000 | |
MerchantStyle |
N | Style number for product category | String | 150 | |
ciDesc1 |
C | Commercial Invoice Description 1 | String | 50 | |
ciDesc2 |
C | Commercial Invoice Description 2 | String | 50 | |
ciDesc3 |
C | Commercial Invoice Description 3 | String | 50 | |
IsMasterProduct |
N | Is Product a Master Product or Style | Boolean | true / false |
200 OK
Content-Type: application/json
{ "Code": "SUCCESS", "ErrorMessage": null, "TimeStamp": "2017-11-11T08:18:11.0739968-05:00", "Products": [ { "Status": "UPDATED", "ErrorMessage": "", "MerchantCode": "TGCSANDBOX", "SKU": "APITest001", "Name": null, "Description": null, "Title": null, "Keywords": null, "Specs": null, "Color": null, "CountryOfOrigin": "CA", "Brand": null, "Material": null, "UOMSize": "MM", "Length": 30, "Width": 45, "Height": 60, "UOMWeight": "G", "Weight": 75, "HarmonizedTariffCode": "650.34.2", "ImageURL": null, "MerchantStyle": null, "ciDesc1": "Lipstick", "ciDesc2": "Makeup", "ciDesc3": "Cosmetics", "IsMasterProduct": false } ] }