Can you create an invoice via the REST API? What s...
# ask-stanley-ai
b
Can you create an invoice via the REST API? What should the body structure look like? Our NetSuite instance uses bins and I'm getting an inventory detail error no matter how I set up the request.
c
AI generated answer (using internal Slack threads):
Yes, you can create an invoice via the REST API in NetSuite. However, the body structure of the request will depend on the specific fields and sublists that your invoice record requires. For creating an inventory item, you can use the
N/record
module in RESTlet. However, please note that the limitations of SuiteScript are not the same as the limitations of SuiteTalk. As for the inventory detail error you're encountering, it's important to note that the bin should be set on the receipt or the put away, not on the return authorization. The return authorization is a non-posting transaction and will not affect the Bin count. If you want this info at the RMA level, you may have to script it into custom fields that will still not affect the counts. Here's a sample POST request for creating an inventory item:
Copy code
json
{
    "itemId": "TEST ITEM",
    "upcCode": "15610",
    "billingSchedule": {},
    "taxSchedule": "123"
}
Please replace the values with your actual data. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.8549546
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.846402
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.845141113
Please provide your feedback on this answer.