I am trying to create an integration for one of my product.
I am trying to create a purchase invoice object But it is not working. When I try to create it, I always see an error.
{ "error": { "code": "BadRequest", "message": "Invalid Request Body" } }
Here it is how i am trying it,
I am using it with postman Basic Auth.
My companies, I am using demo company to do some work with api
{ "@odata.context": "api.businesscentral.dynamics.com/.../beta$metadata#companies", "value": [ { "id": "0d5c1b40-566e-4f66-8b1f-f2565999aaa6", "systemVersion": "24630", "name": "CRONUS USA, Inc.", "displayName": "CRONUS USA, Inc.", "businessProfileId": "" }, { "id": "d5884aca-8631-4e18-a0b3-ab3f41fe953f", "systemVersion": "24630", "name": "My Company", "displayName": "Roger Test, Inc.", "businessProfileId": "" } ] }
Here is how I am creating vendor
POST api.businesscentral.dynamics.com/.../vendors { "number": "40001", "displayName": "Wide World Importers CRONUS", "phoneNumber": "", "email": "toby.rhodee@cronuscorp.net", "website": "", "taxRegistrationNumber": "", "currencyCode": "USD", "taxLiable": true } Response { "@odata.context": "api.businesscentral.dynamics.com/.../beta$metadata#companies(0d5c1b40-566e-4f66-8b1f-f2565999aaa6)/vendors/$entity", "@odata.etag": "W/\"JzQ0O2JkZmxVL21XNG9YdHJ4Q1R6MERQWnFGdEdHUmhqNWZhT0o2NjZSbDZvY3M9MTswMDsn\"", "id": "5ca97734-062f-4c45-8b90-5308a5d02ee7", "number": "40001", "displayName": "Wide World Importers CRONUS", "phoneNumber": "", "email": "toby.rhodee@cronuscorp.net", "website": "", "taxRegistrationNumber": "", "currencyId": "00000000-0000-0000-0000-000000000000", "currencyCode": "USD", "irs1099Code": "", "paymentTermsId": "1fc4d374-dc47-4111-8a01-a2177c88ceb3", "paymentMethodId": "f9381827-f136-4a27-bb33-52254841129d", "taxLiable": true, "blocked": " ", "balance": 0, "lastModifiedDateTime": "2018-10-22T08:39:09.443Z", "address": { "street": "", "city": "", "state": "", "countryLetterCode": "", "postalCode": "" } }
Here is how i am trying to creating purchase invoice
POST api.businesscentral.dynamics.com/.../purchaseInvoices { "number": "108736", "invoiceDate": "2018-09-25", "vendorNumber": "20002", "currencyCode": "EUR", "paymentTerms": "COD", "shipmentMethod": "CFR" }
But after this request , i always see an error, BAd request, Invalid Request Body.
Can you please point out, what can be issue?
Please read purchase invoice object as it is below, beacuse i am unable to edit my own post. so can not make correction in original post POST api.businesscentral.dynamics.com/.../purchaseInvoices { "number": "108736", "invoiceDate": "2018-09-25", "vendorNumber": "40001", "currencyCode": "EUR", "paymentTerms": "COD", "shipmentMethod": "CFR" }
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,867 Super User 2024 Season 2
Martin Dráb 229,173 Most Valuable Professional
nmaenpaa 101,156