Post multiple catalog items with Vendor

Posts about the simPRO API. Help/support/how-to etc.
Forum rules
  • Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
  • No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
  • Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
  • Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
  • Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
  • Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
  • Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
  • Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Post Reply
Alantod17
Posts: 57
Joined: Thu Sep 26, 2019 12:50 am

Post multiple catalog items with Vendor

Post by Alantod17 » Mon Apr 29, 2024 6:25 am

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}]}]}"
}
]
Sindre
Posts: 493
Joined: Wed Apr 20, 2022 4:51 am
Location: Brisbane

Re: Post multiple catalog items with Vendor

Post by Sindre » Mon Apr 29, 2024 9:48 pm

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
Sindre
API Developer | Simpro Software Group
Post Reply