I'm trying to update a customer in Microsoft Dynamics 365 Business Central using the API. I'm using Postman to make the call to the API
However, when I try to do the update I get the following error: -
"error": {
"code": "BadRequest_ResourceNotFound",
"message": "Resource not found for the segment 'customer'. CorrelationId: b5593eb6-2074-41fe-9106-d7bbdba8b452."
}
It creates a customer fine. And if I create a customer using Dynamics web UI then I can update it okay via the API. The problem only occurs if I create and Customer via the API and then try to update it.
This is the json that I'm using to create the customer
{
"displayName": "Adatum Corporation",
"type": "Company",
"addressLine1": "192 Market Square",
"addressLine2": "",
"city": "Atlanta",
"state": "GA",
"country": "US",
"postalCode": "31772",
"phoneNumber": "",
"email": "robert.townes@contoso.com",
"website": "",
"taxLiable": true,
"blocked": " "
}
And this is the Json that I use to update
{
"displayName": "Some other name"
}
Looked at it for hours and I just can't figure out what I'm doing wrong. Anyone got any ideas?
This is the endpoint that i'm using:
https://api.businesscentral.dynamics.com/v2.0/{id}/Production/api/v2.0/companies({id})/customers({customerid})