Search code examples
apimicrosoft-dynamicsdynamics-business-central

Standard BC-API to post Sales Orders


Short Question: I have been looking for a Standard Business Central API to post a Sales Order, but I wasn't able to find anything.

Do you know if I just haven't found it or if there really isn't any API for that scenario.

I am using this APIs:

https://api.businesscentral.dynamics.com/v2.0/{{tenantid}}/{{environmentname}}/api/v2.0/companies({{companyid}})/{{element}}

There should be something like a bound action, but I can't really fit it in here.

Thanks for your replies


Solution

  • It is possible to post a Sales Order through the API.

    The method to do this is called a bound action.

    On the Sales Order API the bound action is called ShipAndInvoice.

    To call it you make a POST request against this endpoint:

    https://api.businesscentral.dynamics.com/v2.0/{{tenantId}}/{{environmentName}}/api/v2.0/companies({companyId})/salesOrders({id})/Microsoft.NAV.shipAndInvoice
    

    Note that the API endpoint is case sensitive.