Page 1 of 1

Post multiple catalog items with Vendor

Posted: Mon Apr 29, 2024 6:25 am
by Alantod17
Hi

I am trying to create/update 30K stock in SimPro. one thing need to be added is the vendor for the stock. but I got following error. Could you let me know the best way to achieve what I would like to do pls. I can do 60K request but that will pass the rate limit or put lots of stress in your server I assume

{{BaseUrl}}/api/v1.0/companies/0/catalogs/multiple/

Param:

[
{
"BatchID": "1",
"Vendors": [
{
"Vendor": {
"ID": 187
},
"VendorPartNo": "692",
"Default": true,
"NettPrice": 0.0,
"Discount": 0.0
}
],
"Name": "PDL Dimmer Switch ",
"PartNo": "692",
"IsInventory": true,
"TradePrice": 91.0000,
"MinPackQty": 1.00,
"Group": 9986
},
{
"BatchID": "22",
"Vendors": [
{
"Vendor": {
"ID": 187
},
"VendorPartNo": "1020999",
"Default": true,
"NettPrice": 0.0,
"Discount": 0.0
}
],
"Name": "Schmersal EFR Spring Element for EDR Pushbutton ",
"PartNo": "1020999",
"IsInventory": true,
"TradePrice": 40.8200,
"MinPackQty": 1.00,
"Group": 9986
}
]

========Response===========


[
{
"status": 422,
"headers": {
"Batch-ID": 0
},
"body": "{\"errors\":[{\"path\":\"\\/Vendors\",\"message\":\"This API Column does not allow POST requests.\",\"value\":[{\"Vendor\":{\"ID\":187},\"VendorPartNo\":\"692\",\"Default\":true,\"NettPrice\":0,\"Discount\":0}]}]}"
},
{
"status": 422,
"headers": {
"Batch-ID": 1
},
"body": "{\"errors\":[{\"path\":\"\\/Vendors\",\"message\":\"This API Column does not allow POST requests.\",\"value\":[{\"Vendor\":{\"ID\":187},\"VendorPartNo\":\"1020999\",\"Default\":true,\"NettPrice\":0,\"Discount\":0}]}]}"
}
]

Re: Post multiple catalog items with Vendor

Posted: Mon Apr 29, 2024 9:48 pm
by Sindre
Hi Alantod17,
Unfortunately we don't support posting catalog items with the vendor information.

Your best approach would be to first use POST multiple to post all your catalog items, and then update each catalog item with the vendor afterwards using the vendors endpoint.

Code: Select all

/api/v1.0/companies/{companyID}/catalogs/{catalogID}/vendors/
I am aware that this would require a of requests so see if you can add a delay in your code to stay under the rate limit.

Regards