give an example of adding salesorder using rest ap...
# ask-stanley-ai
a
give an example of adding salesorder using rest api, inclue items, billing address, shipping address, curency etc
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems that creating a sales order with multiple line items, each with a different shipping address, is not directly possible using REST or SOAP web services. Instead, a SuiteScript-based solution, such as a RESTlet, is recommended. Here is a simplified example of how you might structure your JSON for a POST request to create a sales order with multiple line items:
Copy code
json
{
  "entity": {
    "id": "123"
  },
  "itemList": {
    "item": [
      {
        "item": {
          "internalId": "1"
        },
        "quantity": "2"
      },
      {
        "item": {
          "internalId": "2"
        },
        "quantity": "3"
      }
    ]
  },
  "billingAddress": {
    "country": "US",
    "state": "CA",
    "city": "San Francisco",
    "zip": "94111",
    "addr1": "123 Main St",
    "addr2": "Apt 4B"
  },
  "shippingAddress": {
    "country": "US",
    "state": "CA",
    "city": "San Francisco",
    "zip": "94111",
    "addr1": "123 Main St",
    "addr2": "Apt 4B"
  },
  "currency": {
    "internalId": "1"
  }
}
In this example, the
entity
field represents the customer,
itemList
contains the line items for the sales order,
billingAddress
and
shippingAddress
contain the billing and shipping details respectively, and
currency
represents the currency for the transaction. Please note that this is a simplified example and the actual implementation may require additional fields or different structure based on your specific requirements and NetSuite configuration. ****** 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.824987531
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.823425055
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.820769668
Please provide your feedback on this answer.