uncategorized
curiouspencil at December 31st, 2024 06:29 — #1
I’m encountering an issue while trying to update a custom field for a company using your API. Despite my efforts to debug, I keep running into a 400 error with the message:
"Required parameter name has not been found or it has an invalid format."
Here are the details:
HTTP Method: PATCH
Endpoint: https://app.onepagecrm.com/api/v3/companies/6761dd66348715b7bf6e1d3cRequest Body:
json
Copy code
{
"company_fields": {
"company_field": {
"id": "5aad9b039007ba28c9ebad56"
},
"value": "test"
}
}
Headers: Content-Type: application/json
I’ve double-checked that both the company ID and custom field ID are correct. However, the API still returns the same error. I’m not sure if there’s something wrong with the request format, a missing parameter, or something else I’ve overlooked.
Could you help clarify what might be causing this? If there’s a specific format or requirement for the request that I’ve missed, I’d appreciate any guidance.
Thanks so much for your help!
Best regards,
curiouspencil at December 31st, 2024 08:30 — #2
Just to update this - I can update the whole company info though your stated endpoints on API docs and use PUT, but I see no way to update just one field. Please let me know how to do this.
Many thanks
mahmoud at December 31st, 2024 11:32 — #3
Hi @Curiouspencil,
If you want to update just one field, you should use the PATCH method, just like in your request.
However, I noticed that your request is malformed. The company_fields
parameter must be an array. Here's the corrected body:
{
"company_fields": [
{
"company_field": {
"id": "5aad9b039007ba28c9ebad56"
},
"value": "test"
}
]
}
Please give this a try, and feel free to reach out if you have any further questions!
Regards,
Mahmoud
curiouspencil at December 31st, 2024 16:31 — #4
Hi Mahmoud, thank you for this, I have attempted this but still the same error happens
mahmoud at January 2nd, 2025 08:58 — #5
Hi @Curiouspencil,
Thanks for the update. I’d like to clarify that we do support partial updates in our API, but only when the partial=true
query parameter is included in the request.
Please make sure to include partial=true
in the query string as shown below:
PATCH https://app.onepagecrm.com/api/v3/companies/6761dd66348715b7bf6e1d3c?partial=true
Hope this helps!
Regards,
Mahmoud
curiouspencil at January 4th, 2025 05:39 — #6
Thank you so much thats done the job
Powered by Discourse, best viewed with JavaScript enabled