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 :
Finance | Project Operations, Human Resources, ...
Answered

OData REST API Patch issue

(1) ShareShare
ReportReport
Posted on by 25
Hi,
 
I'm having an issue patching a customers address through Odata in D365 F&O.
 
All of the below is done through Postman. All with system administrator rights.
 
I have created an address for a customer using the PartyLocationPostalAddressesSalesTaxGroupV2 entity with no issue.
 
I get a 200 status code from D365 and everything looks correct.
 
Later, when I try to patch the same address I do as follows:
 
1) Use the sam entity to GET the LocationId, ValidFrom and PartyNumber from the address
2) Make the patch call with the changes in the body. Values are dummy data, but format and datatypes are the same. Values all come from the previous GET call
- URL PATCH: <dynamicsUrl>/data/PartyLocationPostalAddressesSalesTaxGroupV2(PartyNumber='1234',LocationId='000005001',ValidFrom=2024-03-20T12:00:00Z)?cross-company=true
- body: {/Street/: /New Street 1/}
 
And I then get this from D365:
{
    /Message/: /No HTTP resource was found that matches the request URI '<dynamicsUrl>/data/PartyLocationPostalAddressesSalesTaxGroupV2(PartyNumber='1234',LocationId='000005001',ValidFrom=2024-03-20T12:00:00Z)?cross-company=true'. No route data was found for this request./
}
 
What am I doing wrong here?
 
 
 
 
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,801 Super User 2026 Season 1 on at
    Hi,
     
    I hope this can help you.
     
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Suggested answer
    Waed Ayyad Profile Picture
    9,100 Super User 2026 Season 1 on at
    Hi,
     
    You don't add the Legal Entity to (PartyNumber='1234',LocationId='000005001',ValidFrom=2024-03-20T12:00:00Z), The Legal entity is part of the entity Key. Try it.


     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • TechLogic Profile Picture
    25 on at
    Adding the "LegalEntity" as part of the parameters does only change how the error response is formatted. Now it looks like this:
     
    To my understanding the PartyLocationPostalAddressesSalesTaxGroupV2 is a global entity. I see that there is a LegalEntity field but it is not used. When I got to the "excel workbook designer" inside of D365F&O I do not see the LegalEntity as part of the key.
  • Verified answer
    TechLogic Profile Picture
    25 on at
    The solution has been found
     
    It's required to use "PartyLocationPostalAddressesV2" when patching records in the "PartyLocationPostalAddressesSalesTaxGroupV2" entity.
     
    So with this call:
     
    - URL POST: <dynamicsUrl>/data/PartyLocationPostalAddressesSalesTaxGroupV2
    - body: {<address fields>}
    the address is created.
     
    But when I want to patch the same address I need to do this 
    - URL PATCH: <dynamicsUrl>/data/PartyLocationPostalAddressesV2(PartyNumber='1234',LocationId='000005001',ValidFrom=2024-03-20T12:00:00Z)?cross-company=true
    - body: {/Street/: /New Street 1/}
     
    I haven't seen this documented any where so the solution were found by bright heads brute forcing a lot of different calls.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 689

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 258 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans