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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Dynamics Business Central API GET vendorPayments - issue specifying Batch Id

(0) ShareShare
ReportReport
Posted on by 20

GET vendorPayments - Business Central | Microsoft Docs

I have an issue where call GET /vendorPayments but is asking for a batch


{
"error": {
"code": "Application_DialogException",
"message": "You must specify a journal batch ID or a journal ID to get a journal line. CorrelationId: e61e84e9-ab4f-4cdc-9ce6-3373ba9f651b."
}
}

IF I call get \vendorPaymentJournals - I can see an Id for the batch - if I put the Id in the vendorPayments(ID) I get an error

{
"error": {
"code": "BadRequest_ResourceNotFound",
"message": "Resource not found for the segment 'vendorPayments'. CorrelationId: 5f2d67bb-3573-40eb-96d6-ae7a12c7680d."
}
}

Were you able to get past this step to at least get an empty values[] back?

I have the same question (0)
  • dboyceman Profile Picture
    20 on at

    More Info

    I was able to Post a Vendor Payment w/ the following request and get back a response for the new payment

    Request:

    {

       "journalId": "journalId from Get vendorPaymentJournals",

       "journalDisplayName": "journal Name from Get vendorPaymentJournals",

       "vendorId": "vendor GUID from get vendor API",

       "vendorNumber": "vendor Number accessible in Dynamics UI or vendor API",

       "postingDate": "2022-05-25",

       "documentNumber": "testing documentNo",

       "amount": 1.00,

       "description": "testing description",

       "comment": "testing comment"

    }

    Response:

    {

       "@odata.context": "api.businesscentral.dynamics.com/.../$metadata

       "@odata.etag": "W/\"xyz......\"",

       "id": "New Payment GUID",

       "journalId": "journalId from Get vendorPaymentJournals",

       "journalDisplayName": "journal Name from Get vendorPaymentJournals",

       "vendorId": "vendor GUID from get vendor API",

       "vendorNumber": "vendor Number accessible in Dynamics UI or vendor API",

       "lineNumber": 50000,

       "postingDate": "2022-05-25",

       "documentNumber": "TESTING DOCUMENTNO",

       "externalDocumentNumber": "",

       "amount": 1,

       "appliesToInvoiceId": "00000000-0000-0000-0000-000000000000",

       "appliesToInvoiceNumber": "",

       "description": "testing description",

       "comment": "testing comment",

       "lastModifiedDateTime": "2022-05-25T17:55:48.337Z"

    }

    If I use the "New Payment GUID" that is returned in the response in a GET API vendorPayments(New Payment GUID) then I get the same response as above - which is expected.

    If I use the "journalId from Get vendorPaymentJournals" in a GET API vendorPayments(journalId from Get vendorPaymentJournals) then I get the error

    {

    "error": {

    "code": "BadRequest_ResourceNotFound",

    "message": "Resource not found for the segment 'vendorPayments'. CorrelationId: 5f2d67bb-3573-40eb-96d6-ae7a12c7680d."

    }

    }

    if you call vendorPayments by itself you get an error saying you need to specify a journal Batch Id or Payment Id

    {

       "error": {

           "code": "Application_DialogException",

           "message": "You must specify a journal batch ID or a journal ID to get a journal line.  CorrelationId:  0f751013-422a-4773-9f99-22e751f00816."

       }

    }

    So based on that is seems you should be able to specify a journal batch ID but that doesn't seem to be the case.

    Help Docs on vendorPayment

    docs.microsoft.com/.../dynamics_vendorpayment_get

  • CLOUDEAGLE Profile Picture
    12 on at
    Have you figured out id required here ? @deboyceman

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,687 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,041 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 974 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans