Rest API Post Request

Hi,
I have made some progress on my problem.
To create a saleOrder we can make a PUT request :

https://xxxxx.xx:8080/ws/rest/com.axelor.apps.sale.db.SaleOrder

with these paramters:

{

    "data": {

        "mainInvoicingAddressStr": "Rue test API",

        "statusSelect": 3,

        "firstName": "Smith",

        "company": {

                "id": 1

            },

        "creationDate": "YYY-MM-DD",

        "salemanUser": {

            "id": 2

        },

        "externalReference": "Test api 4 Postman",

        "stockLocation": {

            "id": 1

        },

        "clientPartner": {

            "id": 12

        },

        "currency": {

                "id": 46

        }

    }

}

Get the id of saleorder into response, and then, make a PUT request for line:

http://xxxxxx.xx:8080/ws/rest/com.axelor.apps.sale.db.SaleOrderLine

with parameters:

{

    "data": {

            "toInvoice": false,

            "typeSelect": 0,

            "isQtyRequested": false,

            "productName": "Test ligne API 4",

            "invoicingDate": null,

            "supplierPartner": null,

            "price": "99.9900000000",

            "inTaxTotal": "11998.80",

            "exTaxTotal": "9999.00",

            "inTaxPrice": "119.9880000000",

            "priceDiscounted": "99.9900000000",

            "taxLine": {

                "id": 35

               },

            "billOfMaterial": {

                "id": 4

            },

            "desiredDelivDate": null,

            "sequence": 0,

            "unit": {

                "id": 1

            },

            "qty": "100.00",

            "saleOrder": {

                "id": ID from previous saleorder

            },

            "companyCostPrice": "0.00",

            "product": {

                "id": 6

            },

            "saleSupplySelect": 3,

            "standardDelay": 1,

            "createdBy": {

                "id": 2

            }

        }

}

I think I have to add « companyExTaxTotal », « taxTotal » and « inTaxTotal » into request for saleorder

2 « J'aime »