Question regarding the REST API and creating a tra...
# suitetalkapi
m
Question regarding the REST API and creating a transformation:
data: {
shipStatus: B,
item: {
items: [
{
orderLine: 1,
quantity: 1,
location: 10,
itemReceive: true,
inventoryDetail: {
inventoryAssignment: {
items: [
{
issueInventoryNumber: 10189,
quantity: 1,
binNumber: 2211,
},
],
},
quantity: 1,
},
},
],
},
},
I am sending the above data to the "/record/v1/salesOrder/{id}/!transform/itemFulfillment" REST API, however, I keep getting back this message: Error while accessing a resource. The total inventory detail quantity must be 1. Any ideas?
s
data.item should be data.items shouldn't it?
Nevermind, docs say that should be right
m
on a call with netsuite now. I will let you know
👍 1
b
Perhaps related to insufficient inventory (committed or available)? I haven't done transforms through REST but know that inventory issues can cause some odd errors when scripting.
s
I haven't done REST transforms (only SOAP, but in process of changing out) -- From the docs, it appears putting data in the body is optional -- if you're transforming the entire SO, you may not have to post anything?
I know in a SOAP transform I get everything I need to post back to the next step
v
@m.sobko I’m experiencing a simmilar issue with item receipts? Did you manage to figure it out?
m
alright. So when you do a transformation with the rest api on a sales order(probably any transformation) the inventory detail already exists on the sale order. That was what was giving me the error. In the api params, you have to us the replace parameter to explicitly overwrite the old inventory details.
hopefully some of that makes sense
s
Ah yes, that makes total sense
b
Thanks for following back up. Makes sense once you know what's happening.