Thanks Maryna, I can see where this would slit the data. But when i try to POST im getting a 500 error back from the API and this is what the they had to say about it -
"Due to a recent behavioral change in our API, a number of API responses that were incorrectly returning a HTTP 401 error are now returning a HTTP 500 error.
This issue may impact stores with a high volume of simultaneous API requests. These stores may receive a 500 error as part of the defenses we have in place to prevent a single store adversely impacting other stores.
Our recommendation is to spread API requests across the full 1 hour rolling window using the rate limit information returned to you in API responses, and minimize the number of simultaneous API requests per store."
Now the array i posted was only Three data.. But I'm not sure is that's the issue here. Because this is the layout of my Request Payload being sent:
precode
'requestMapping': [{
'PATH': ['Auth_user'],
'TYPE': 'STRING',
'ID': 'local_storage',
'ATTR': 'bc_USER'
}, {
'PATH': ['Auth_url'],
'TYPE': 'STRING',
'ID': 'local_storage',
'ATTR': 'bc_API_URL'
}, {
'PATH': ['Auth_Token'],
'TYPE': 'STRING',
'ID': 'local_storage',
'ATTR': 'bc_TOKEN'
}, {
'PATH': ['name'],
'TYPE': 'STRING',
'ID': 'dbListProdName_val_227',
'ATTR': '@',
'TRANSFORMATION': function(value) {
var arr = [];
$('[name="dbListProdName_val_227"]').not('[tmpl=true]').each(function() {
arr.push($(this).text());
});
return arr;
}
}, {
'PATH': ['type'],
'TYPE': 'STRING',
'ATTR': 'physical'
}, {
'PATH': ['price'],
'TYPE': 'STRING',
'ID': 'DBListItem_MSRP_val_231',
'ATTR': '@',
'TRANSFORMATION': function(value) {
var arr = [];
$('[name="DBListItem_MSRP_val_231"]').not('[tmpl=true]').each(function() {
arr.push($(this).text());
});
return arr;
}
}, {
'PATH': ['is_visible'],
'TYPE': 'STRING',
'ATTR': 'true'
}, {
'PATH': ['weight'],
'TYPE': 'STRING',
'ID': 'DBListItem_QtyInStock_val_233',
'ATTR': '@',
'TRANSFORMATION': function(value) {
var arr = [];
$('[name="DBListItem_QtyInStock_val_233"]').not('[_tmpl=true]').each(function() {
arr.push($(this).text());
});
return arr;
}
}, {
'PATH': ['availability'],
'TYPE': 'STRING',
'ATTR': 'available'
}, {
'PATH': ['categories', '.'],
'TYPE': 'STRING',
'ID': 'BCCategory_Select',
'ATTR': 'value'
}, {
'PATH': ['appery-proxy-url'],
'HEADER': true,
'ATTR': 'https://{Auth_user}:{Auth_Token}@{Auth_url}products.json'
}, {
'PATH': ['appery-transformation'],
'HEADER': true,
'ATTR': 'checkTunnel'
}, {
'PATH': ['appery-key'],
'HEADER': true,
'ATTR': '1392381800170'
}, {
'PATH': ['appery-rest'],
'HEADER': true,
'ATTR': 'f25a8d87-0a7f-4eed-b110-12952dc47bda'
}]
/code/pre
I don't think this is the way it should be setup, am i wrong?
Do you think there is a way to POST 3 different request(or as many as the array holds). to the API? for example: After using method above to split the values into array, can we send one value at a time until it loop through the array of value?