Zum Inhalt

Create inboundSalesOrder

Create an inbound sales order object in Business Central.

HTTP request

Replace the URL prefix for Business Central depending on environment following the guideline.

POST {businesscentralPrefix}/companies({id})/inboundSalesOrdersWebCon/?$expand=inboundSalesOrderLinesWebCon

Request headers

Header Value
Authorization Bearer {token}. Required.
Content-Type application/json

Request body

In the request body, supply a JSON representation of InboundSalesOrder object.

Response

If successful, this method returns 201 Created response code and a inboundSalesOrder object in the response body.

Example

Request

Here is an example of a request.

POST https://{businesscentralPrefix}/companies({id})/inboundSalesOrdersWebCon/?$expand=inboundSalesOrderLinesWebCon
Content-type: application/json
{
    "externalDocumentNumber": "webshop0001",
    "documentDate": "2023-08-28",
    "orderDate": "2023-08-28",
    "postingDate": "2023-08-28",
    "sellToCustomerTemplateCode": "DEBITOR UNTERNEHMEN",
    "customerName": "TSO-DATA GmbH",
    "customerFirstName": "Dirk",
    "customerSurName": "Frommeyer",
    "sellToAddressLine1": "Preußenweg 10",
    "sellToCity": "Osnabrück",
    "sellToPostCode": "49076",
    "currencyCode": "EUR",
    "pricesIncludeTax": true,
    "paymentMethodCode": "Bank",
    "shippingAgentCode": "DHL",
    "shippingAgentServiceCode": "Standard",
    "responsibilityCenter": "Hamburg",
    "email": "info@tso.de",
    "phoneNumber": "+4954113950",
    "campaignNumber": "KP1004",
    "salesperson": "BK",
    "vatRegistrationNumber": "DE 117 647 926",
    "inboundSalesOrderLinesWebCon": [
        {
            "lineType": "Item",
            "description": "ANTWERP Konferenztisch",
            "description2": "groß",
            "unitPrice": 651.10,
            "discountAmount": 11.10,
            "itemnumber": "1920-S",
            "quantity": 1,
            "unitOfMeasureCode": "Stück",
            "locationCode": "blau"
        }
    ]
}

Response

Here is an example of the response.

Note

The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
    "id": "ba2ecb90-ba45-ee11-a0d4-fb19db2bac79",
    "number": "INB00099",
    "externalDocumentNumber": "WEBSHOP0001",
    "documentDate": "2023-08-28",
    "orderDate": "2023-08-28",
    "postingDate": "2023-08-28",
    "customerId": "00000000-0000-0000-0000-000000000000",
    "customerNumber": "",
    "contactId": "00000000-0000-0000-0000-000000000000",
    "contactNumber": "",
    "sellToCustomerTemplateId": "ff6b1563-dcd8-ed11-a7cd-000d3a392f9f",
    "sellToCustomerTemplateCode": "DEBITOR UNTERNEHMEN",
    "billToCustomerTemplateId": "00000000-0000-0000-0000-000000000000",
    "billToCustomerTemplateCode": "",
    "customerName": "TSO-DATA GmbH",
    "customerName2": "",
    "customerFirstName": "Dirk",
    "customerSurName": "Frommeyer",
    "billToName": "",
    "billToName2": "",
    "billToFirstName": "",
    "billToSurName": "",
    "billToCustomerId": "00000000-0000-0000-0000-000000000000",
    "billToCustomerNumber": "",
    "billToContactId": "00000000-0000-0000-0000-000000000000",
    "billToContactNumber": "",
    "shipToName": "",
    "shipToName2": "",
    "shipToFirstName": "",
    "shipToSurName": "",
    "shipToContact": "",
    "sellToAddressLine1": "Preußenweg 10",
    "sellToAddressLine2": "",
    "sellToCity": "Osnabrück",
    "sellToCountry": "",
    "sellToState": "",
    "sellToPostCode": "49076",
    "billToAddressLine1": "",
    "billToAddressLine2": "",
    "billToCity": "",
    "billToCountry": "",
    "billToState": "",
    "billToPostCode": "",
    "shipToAddressLine1": "",
    "shipToAddressLine2": "",
    "shipToCity": "",
    "shipToCountry": "",
    "shipToState": "",
    "shipToPostCode": "",
    "shipToPostNumber": "",
    "shipToParcelStationNumber": "",
    "shipToPostOfficeNumber": "",
    "currencyId": "00000000-0000-0000-0000-000000000000",
    "currencyCode": "EUR",
    "pricesIncludeTax": true,
    "paymentTermsId": "00000000-0000-0000-0000-000000000000",
    "paymentMethodId": "0705383f-dcd8-ed11-a7cd-000d3a392f9f",
    "paymentMethodCode": "BANK",
    "shipmentMethodId": "00000000-0000-0000-0000-000000000000",
    "shipmentMethodCode": "",
    "shippingAgentId": "af562a39-dcd8-ed11-a7cd-000d3a392f9f",
    "shippingAgentCode": "DHL",
    "shippingAgentServiceId": "ec48086f-dcd8-ed11-a7cd-000d3a392f9f",
    "shippingAgentServiceCode": "STANDARD",
    "campaignId": "26721563-dcd8-ed11-a7cd-000d3a392f9f",
    "campaignNumber": "KP1004",
    "responsibilityCenterId": "6348086f-dcd8-ed11-a7cd-000d3a392f9f",
    "responsibilityCenter": "HAMBURG",
    "salesperson": "BK",
    "lastModifiedDateTime": "2023-08-28T15:50:10.057Z",
    "phoneNumber": "+4954113950",
    "email": "info@tso.de",
    "vatRegistrationNumber": "DE 117 647 926",
    "billToVATRegistrationNumber": "",
    "paymentTransactionId": "",
    "paymentTransactionCode": "",
    "paymentTransactionAmount": 0,
    "inboundSalesOrderLinesWebCon": [
        {
            "@odata.etag": "W/\"JzE5OzI3MTI0NDcwMzYzMDY2NDgzNDIxOzAwOyc=\"",
            "id": "bb2ecb90-ba45-ee11-a0d4-fb19db2bac79",
            "documentId": "ba2ecb90-ba45-ee11-a0d4-fb19db2bac79",
            "sequence": 10000,
            "itemId": "c8463045-dcd8-ed11-a7cd-000d3a392f9f",
            "itemNumber": "1920-S",
            "accountId": "00000000-0000-0000-0000-000000000000",
            "resourceId": "00000000-0000-0000-0000-000000000000",
            "lineType": "Item",
            "description": "ANTWERP Konferenztisch",
            "description2": "groß",
            "unitOfMeasureId": "ec562a39-dcd8-ed11-a7cd-000d3a392f9f",
            "unitOfMeasureCode": "STÜCK",
            "quantity": 1,
            "unitPrice": 651.1,
            "discountAmount": 11.1,
            "discountPercent": 0,
            "taxPercent": 0,
            "netAmount": 0,
            "netAmountIncludingTax": 0,
            "itemVariantId": "00000000-0000-0000-0000-000000000000",
            "itemVariantCode": "",
            "locationCode": "BLAU",
            "locationId": "12572a39-dcd8-ed11-a7cd-000d3a392f9f"
        }
    ]
}

See also

Tips for working with the APIs
inboundSalesOrder
Get inboundSalesOrder
Delete inboundSalesOrder
Update inboundSalesOrder