Hi,
I'm getting a 406 response 'Unknown request format' from my Create Contact API request made in Integromat.
Here's the request info:
Post request to https://app.onepagecrm.com/api/v3/contacts
JSON request content:
{
"first_name": "Unknown",
"last_name": "Unknown",
"company_name": "Test Co",
"phones": [
{
"type": "other",
"value": "07000000000"
}
],
"emails": [
{
"type": "other",
"value": "test@lollipoplocal.co.uk"
}
],
"address_list": [
{
"address": "Lat: 5345 Long: 34534",
"city": "Unknown",
"state": "Unknown",
"zip_code": "Unknown",
"country_code": "uk",
"type": "other"
}
],
"status_id": "prospect",
"background": "New MailChimp Subscriber",
"owner_id": "5f46b2761096786786789196bd3" // FYI - I've edited this so it's not the actual ID
}
I expect it's probably because I'm not including all fields
I was wondering which fields were required from the API documentation? It just says that the request body is required.
developer.onepagecrm.com/api/#/Contacts/post_contacts
*** UPDATE
I'd done a number of things incorreclty.
- My post URL should have been:
https://app.onepagecrm.com/api/v3/contacts**.json**
This solved the Unknown Request Format error
- I didn't realise that the status ID needed to be the status's ID... Not the string representing the status.
e.g. 2354dbgfqgw4534 tyvqgrf and NOT "prospect"
I think the documentation needs to be updated so that it does not give an example of "prospect":
Contact/properties/status_id string($bson-id)
example: prospect
ID of the status of the contact
Hi @Rob!
Thanks for your feedback. I created a pull request for this issue in our docs and once it is approved and goes live I will update you on this improvement
P.S. Sorry for this late response, we appreciate that you spotted this flaw in our docs
Hi @Rob!
Thanks again for pointing out to the bug in the docs, now it's fixed
Thank you,
Vlad