Use Case For Creating Invoices or Cash Sales from Your Sales Order

This use case shows you how to create an invoice or cash sale for all fulfilled lines on the sales order.

Create an Invoice

To create an invoice from a sales order, you need an approved sales order with the Custom Form field set to Standard sales order - Invoice and some fulfilled items.

            POST {{REST_SERVICES}}/record/v1/salesorder/{{SALES_ORDER_ID}}/!transform/invoice 

          

If you leave the request body empty, NetSuite creates an Invoice for all fulfilled items and quantities. However, if you plan to fulfill only part of the order, you need to be able to create a matching partial invoice. As shown in the example, you can create a partial invoice by specifying the quantity for each item line.

Invoice From a Sales Order

            {
    "item": {
        "items": [
            {
                "orderLine": 1,
                "quantity": 3
            },
            {
                "orderLine": 2,
                "quantity": 0
            }
        ]
    }
} 

          

Create a Cash Sale

To create a cash sale from a sales order, you need an approved sales order with the Custom Form field set to Standard Sales Order - Cash Sale and some fulfilled items.

            POST {{REST_SERVICES}}/record/v1/salesorder/{{SALES_ORDER_ID}}/!transform/cashsale 

          

If you leave the request body empty, NetSuite creates a cash sale for all fulfilled items and quantities. You can create a partial cash sale by specifying the quantity for each item line as shown in the following example.

Cash Sale From a Sales Order

            {
    "item": {
        "items": [
            {
                "orderLine": 1,
                "quantity": 0
            },
            {
                "orderLine": 2,
                "quantity": 4
            }
        ]
    }
} 

          

Related Topics

Sales Order Use Cases
Use Case For Creating Your Sales Order
Use Case For Applying a Promotion to Your Sales Order
Use Case For Retrieving Your Sales Order
Use Case For Updating Your Sales Order
Use Case For Approving Your Sales Order
Use Case For Fulfilling Your Sales Order
Use Case For Creating a Progress Sales Order
Use Case For Deleting a Sales Order

General Notices