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?

  • CLOUDEAGLE Profile Picture
    12 on at
    Dynamics Business Central API GET vendorPayments - issue specifying Batch Id
    Have you figured out id required here ? @deboyceman
  • dboyceman Profile Picture
    20 on at
    RE: Dynamics Business Central API GET vendorPayments - issue specifying Batch Id

    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

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans