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

Posting of Purchase order Invoice with the API

(0) ShareShare
ReportReport
Posted on by 15

I am trying to post Purchase invoice but getting co-relation error 

Can somebody help me

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    You have to use the below link

    api.businesscentral.dynamics.com/.../NAV.ReceiveAndInvoice

    Publish the page 30066 in web services first

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    To post a purchase order you should use the bound action available in the Purchase order API as documented here:

    learn.microsoft.com/.../dynamics_purchaseorder

  • Skyscend Profile Picture
    15 on at

    Thank you for sharing.

    Now I see below error.

    pastedimage1675565464245v1.png

    Here is request body

    {
    "id": "fd041e73-67a3-ed11-9a88-0022481d0e9a",
    "number": "106012",
    "orderDate": "2022-04-13",
    "postingDate": "2022-04-13",
    "vendorId": "77b117ef-e06c-ed11-81b5-6045bd8e591f",
    "vendorNumber": "20000",
    "vendorName": ""First Up Consultants",
    "payToName": "First Up Consultants",
    "payToVendorId": "77b117ef-e06c-ed11-81b5-6045bd8e591f",
    "payToVendorNumber": "20000",
    "shipToName": "CRONUS USA, Inc.",
    "shipToContact": "100 Day Drive",
    "buyFromAddressLine1": "",
    "buyFromAddressLine2": "",
    "buyFromCity": "Chicago",
    "buyFromCountry": "",
    "buyFromState": "",
    "buyFromPostCode": "",
    "payToAddressLine1": "",
    "payToAddressLine2": "",
    "payToCity": "",
    "payToCountry": "",
    "payToState": "",
    "payToPostCode": "",
    "shipToAddressLine1": "",
    "shipToAddressLine2": "",
    "shipToCity": "",
    "shipToCountry": "",
    "shipToState": "",
    "shipToPostCode": "",
    "currencyId": "00000000-0000-0000-0000-000000000000",
    "currencyCode": "USD",
    "pricesIncludeTax": "",
    "paymentTermsId": "86b017ef-e06c-ed11-81b5-6045bd8e591f",
    "shipmentMethodId": "",
    "purchaser": "",
    "requestedReceiptDate": "2022-04-14",
    "discountAmount": "",
    "discountAppliedBeforeTax": "",
    "totalAmountExcludingTax": "",
    "totalTaxAmount": "",
    "totalAmountIncludingTax": "",
    "fullyReceived": "",
    "status": "Open"
    }

  • Skyscend Profile Picture
    15 on at

    Could you please elaborate more on publish the page 30066 in web services

  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    Search for Web Services page and click new

    Select object type as Page and enter Object ID as30066 give it a name. in my case purchaseOrders

    Set Publish boolean to true

  • Suggested answer
    DAnny3211 Profile Picture
    11,397 on at

    Hi
    delete the ID attribute in the body request, it will be assigned automatically by the system

    this is ny example

    WITH ID in request BODY:

    pastedimage1676105980594v1.png

    WITHOUT ID IN REQUEST BODY:

    pastedimage1676106071604v2.png

    check my answer if it helped you, thanks

    DAniele

  • Skyscend Profile Picture
    15 on at

    Thank you, Daniele, for the response.

    I am trying to post invoice against the purchase order do you have working request body for posting of invoice against purchase order.

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,577

#2
YUN ZHU Profile Picture

YUN ZHU 888 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 778 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans