API3
frankebailey at April 23rd, 2018 09:43 — #1
I'm issuing an API call to try to update a contact, and I get a 'Resource not found' errror.
The endpoint I'm PUTting to is:
https://app.onepagecrm.com/api/v3/contacts/{id}.json?partial=1
The json I'm sending is
{"first_name":"NotADummy"}
I'm not at all sure what I'm doing wrong, can someone please help me?
Thanks in advance!
pawelsmolinski at April 23rd, 2018 10:05 — #2
Hi, could you check your code if you are sending ID properly as part of URL? I have made quick check of our systems and I've found a number of PUT requests where ID part is missing and it's causing 404 errors.
frankebailey at April 23rd, 2018 14:16 — #3
Hi, yes the full url is
https://app.onepagecrm.com/api/v3/contacts/5addb2d31787fa16e558eefa.json?partial=1
(I hope that ID isn't sensitive info). My code was omitting the ID at one point but I altered it when I realised.
So I'm maybe doing something else wrong, any thoughts?
frankebailey at April 24th, 2018 09:43 — #4
Hi again Pawel,
Is it possible the json-encoded data I'm PUTting is missing a root element maybe? I have not seen a full example of a PUT request against the V3 API so my code is just guesswork pretty much...
pawelsmolinski at April 24th, 2018 10:26 — #5
From what I see in server logs is that you are making POST request into this URL instead of PUT and therefore you are getting 404 error.
frankebailey at April 24th, 2018 11:12 — #6
Thanks Pawel,
I think I got myself consuded and then tried POSTing instead, so I had working code at one point in time, but talked myself out of it.
Much obliged to you for your help!
Powered by Discourse, best viewed with JavaScript enabled