The following code can be used to send the Inventory data to brand scope using authentication.
var requestObj = {
url: https://integration-test-erp.brandscope.com/api/v2/ats/send_ats.json,
headers: {
'cache-control': 'no-cache',
'authorization': 'Token ' + {token},
'content-type': 'application/json'
},
body: JSON.stringify({
ats: payload
})
};
var response = http.post(requestObj);
sample payload:
[{"Type":"ATS","SourceSystem":"NetSuite","Brand":"HO Sports","Integration_ID":"3948","Barcode":"54065750004","ProductName":"22700054","WarehouseCode":"HSM","Quantity":{"At Once":"0"}},{"Type":"ATS","SourceSystem":"NetSuite","Brand":"Liquid Force","Integration_ID":"4076","Barcode":"13576525952","ProductName":"2235000","WarehouseCode":"LFM","Quantity":{"At Once":"0"}},]