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...
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

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 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans