Transforming a Sales Order into Item Fulfillment via REST Web Services
I’m trying to learn how to do things with REST web services and I’ve hit a roadblock. I’m trying to transform a Sales Order into an Item Fulfillment, but Netsuite’s documentation is lacking on what information needs to be supplied to do so. Does anyone have experience with this?
I’m try to do so by reaching out to this endpoint:
POST {{REST_SERVICES}}/record/v1/salesOrder/{{SO_ID}}/!transform/itemfulfillment BODY: { "item": { "items": [ { "item": { "id": "{{ITEM_ID}}" }, "amount": 1 } ] } }
Additional Notes:
- Inventory statuses are OFF
- Bins are OFF
Go through Working with Sublists. Your items sublist does not contain a keyed field, so its being interpreted as trying to add an item to a fulfillment.
Thanks. This is helpful. Do you know of a way to tell what field Netsuite is expecting to key on? I’m having no luck with trial and error. I’ve reviewed the OpenAPI details for Sales Orders and Item Fulfillments and I see that Sales Orders have a field called lineuniquekey
yet I’m not able to find any way of passing this value to the Item Fulfillment in the way that it accepts. I’ve also tried using the orderLine
field as a key, and it feels like I get closer when I use it, but it only feels that way because it results in an Unexpected Error response rather than an ‘Invalid sublist operation’ response.
Should be the orderLine for fulfillments