web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Create a Sales Invoice consuming Odata Service in Business Central

(0) ShareShare
ReportReport
Posted on by 70

Hello Everyone,

I am trying create a Sales Invoice using Postman. I have published two pages Page 43 Sales Invoice for the sales invoice header and Page 516 Sales Line for sales invoice lines.

I am able to successfully create the sales header using the POST method for the page as mentioned above.

But after that when I try to run a separate POST method for the above mentioned page to create the lines I get the error

Status 405 : Entity does not support insert.

Request suggestions, as I am not sure if I am using correct page for which I am consuming the service or where exactly I am going wrong for the sales invoice lines.

Also I would like to mention that I am able to create customers, vendors, Sales Invoice Headers etc.

Thanks

I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    133 on at

    Try this method: www.kauffmann.nl/.../

  • SelfStarter Profile Picture
    70 on at

    Hi Josh,

    The post suggested by you gave me a fair idea of how how to create a sales order. But where I am stuck is when I try to POST the below data from Postman for my on premise environment

    {

       "number": "INV/1006",

       "externalDocumentNumber": "CUST/ODR/0003",

       "invoiceDate": "2021-06-26",

       "postingDate": "2021-06-26",

       "dueDate": "2021-07-26",

       "customerNumber": "10000",

       "salesInvoiceLines": [

           {

               "sequence": 10000,

               "lineType": "Account",

               "lineObjectNumber": "6955",

               "quantity": 1

           },

           {

               "sequence": 20000,

               "lineType": "Account",

               "lineObjectNumber": "6610",

               "unitPrice": 65432,

               "quantity": 1

           }

       ]

    }

    I receive an error message as

    "The property 'salesInvoiceLines' does not exist on type 'NAV.SalesInvoicesAPI'. Make sure to only use property names that are defined by the type

    I have published the APIV2 - Sales Invoices page using it for the above POST method. I would like to mention I can create the sales invoice header using the api published, but I am stuck with the combination of header and line.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,664

#2
YUN ZHU Profile Picture

YUN ZHU 960 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 773 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans