FieldEx Developer
developer notes

Create Sales Order

The SalesOrderCreate API allows you to create new Sales Orders. The request body includes customer information, status, and other relevant information.

Method API Endpoint
POST {{endpoint}}/api/ext/sales-orders

Headers

Key Value
Content-Type application/json
Authorization Bearer {{token}}

Example Request

{
    "salesOrder": {
        "customer": {
            "id": 3,
            "email": null,
            "externalId": null
        },
        "orderCurrency": "MYR",
        "salesOrderChannel": {
            "code": null,
            "name": null
        },
        "salesOrderType": {
            "code": "fdf"
        },
        "orderOwner": {
            "login": null
        },
        "billingContact": {
            "externalId": null
        },
        "shippingContact": {
            "externalId": null
        },
        "country": {
            "name": null
        },
        "status": "DRAFT",
        "salesOrderExternalId": null,
        "orderName": "salesorder1",
        "orderStartDate": "2023-10-06",
        "orderEndDate": "2023-10-31",
        "orderAmount": 0
    },
    "productVMSList": []
}

Example Response

// 400 Response Code 

{
    "type": "http://www.jhipster.tech/problem/problem-with-message",
    "title": "Sales order channel not found with null",
    "status": 400
}