
I'm currently facing an issue while trying to update or patch a customer's address using the D365 OData API. Specifically, when attempting to call for a single address entity, I encounter an error (404 Not Found) along with the message "No HTTP resource was found that matches the request URI 'https://usnconeboxax1aos.cloud.onebox.dynamics.com/data/CustomerPostalAddresses(dataAreaId='xxx',AddressLocationId='xxxxx')?cross-company=true'." The error further states that no route data was found for this request.
I tried with diffrent parramete like CustomerAccountNumber, CustomerLegalEntityId etc.
While performing a GET request using the following URL "https://usnconeboxax1aos.cloud.onebox.dynamics.com/data/CustomerPostalAddresses?cross-company=true&$top=5&$filter=CustomerAccountNumber eq 'XXXXX'," I successfully receive accurate results
@Zia_ur_Rehman I have the exact same issue (with another data entity: "ProductDocumentAttachments"). Did you find the cause/a solution ?
Ok I found the solution! My problem was that I put simple quotes around the date (which is part of the key) :
/data/ProductDocumentAttachments(ProductNumber='HF000053',DocumentAttachmentTypeCode='File',AttachmentDescription='xxxx',AttachedDateTime='2023-10-25T12:09:04Z') => HTTP 404 "No route data was found for this request"
----
Now with your entity "CustomerPostalAddresses", the key is actually 4 fields (you can see it in the "/data/$metadata" file) :