API3
apps_n_analysis at August 28th, 2014 10:04 — #21
Ahh. OK
I need to create that custom fields first. Can you please help me how to create sinlgle or multiple custom fields? I tried it but getting the following error.
"error_message":"A validation error has occurred","errors":{"name":"The name field is required to create a custom field."}
I am using the following URL.
https://app.onepagecrm.com/api/v3/custom_fields.json
with POST method. To create a single Custom field, I POST the following JSON.
{"custom_field":{"name":"username","type":"single_line_text"}}
and to create multiple custom fields, I POST the following JSON.
{"custom_fields":[{"custom_field":{"name":"username","type":"single_line_text"}},{"custom_field":{"name":"service_interested","type":"single_line_text"}},{"custom_field":{"name":"message","type":"single_line_text"}}]}
But none of the above two is working. Please help me to correct the JSON so that I am able to create some custom fields.
ruairi at August 28th, 2014 10:20 — #22
Have you tried sending just
POST https://app.onepagecrm.com/api/v3/custom_fields.json
{"name":"username","type":"single_line_text"}
then in another request
POST https://app.onepagecrm.com/api/v3/custom_fields.json
{"name":"service_interested","type":"single_line_text"}
then in another request
POST https://app.onepagecrm.com/api/v3/custom_fields.json
{"name":"message","type":"single_line_text"}
apps_n_analysis at August 28th, 2014 10:49 — #23
Yes,
I just tried
POST https://app.onepagecrm.com/api/v3/custom_fields.json
{"name":"username","type":"single_line_text"}
still getting the following error.
"error_message":"A validation error has occurred","errors":{"name":"The name field is required to create a custom field."}
PLEASE HELP.... Are you able to create a custom field with this? I am not..... Really.
ruairi at August 28th, 2014 15:40 — #24
The error that you are now getting is exactly analogous to the error that you obtained when you made a POST to the contacts endpoint. This suggests, as I said earlier, that there is a bug in your code. The bug, based on the results that you have posted here, would seem to be that you are not adding any parameters to the body of the POST that you are sending to our server.
I can't give you anymore help than that though, you will have to look through your own code to find the bug.
pete_onepagecrm at September 1st, 2014 05:55 — #25
Hi Alex,
Have you had any luck finding the issue?
← previous page
Powered by Discourse, best viewed with JavaScript enabled