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

Announcements

No record found.

News and Announcements icon
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,200 Super User 2026 Season 1 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,161 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,200 Super User 2026 Season 1 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,409 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,822 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,136 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 956 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans