uncategorized
apps_n_analysis at August 19th, 2014 16:08 — #1
Hi
We're new to OnePage and are looking to integrate the api in to a mobile app to create a new contact and add an action to that contact effectively as one transaction.
Could anyone advise what is the best way to go about this including any authorisation we need to pass.
Many Thanks
Alex
pete_onepagecrm at August 20th, 2014 10:38 — #2
Hi Alex, thanks for getting in touch.
What language are you planning to write the mobile app in, is it a HTML5 app or Android / iOS?
The signing process is detailed here - http://developer.onepagecrm.com/#signing
We have some code snippets to help you with that, depending on your language.
After that you'll need to make fairly simple POST
calls to the contacts.json
endpoint.
You can browse our API (GET
requests only ) with our API Browser, and this should give you a better idea of the data structure.
Let us know how you get on and be in touch if you have any questions.
pete_onepagecrm at August 20th, 2014 12:22 — #3
@ruairi do you have some iOS code samples you could dig out for Alex?
ruairi at August 20th, 2014 12:49 — #4
Hi.
Here is information on how to sign the requests.
http://developer.onepagecrm.com/#signing
There is a sample of how to do this with objective c in there too.
I built part of an iOS app before and the requests were carried out using the RESTKit library
I've put together a sample below but as I no longer has an iOS dev environment can't be sure if it works or not.
https://gist.github.com/ruairif/fecb63997d0dc0c8e60f
It currently takes 2 POST requests to create a contact with an action.
The first request is to /api/v3/contacts.json
The second is to /api/v3/contacts//actions.json
The contact id is obtained from the first POST.
Good luck with it and we hope you get on OK.
If you need any more help don't be afraid to ask.
flint at February 6th, 2015 17:37 — #5
Having trouble creating an action for a new contact; I'm getting "A validation error has occurred", so the error must be in my post. I'm writing in php, and posting to "actions.json?contact_id=$contactId"
$postData = array(
'text'=>'new action',
'status'=>'no_date',
'done'=>'false'
);
pete_onepagecrm at February 9th, 2015 10:09 — #6
Hi @flintFirstly, are you using the php sample code we've provided? It's the quickest way to get started.
https://github.com/OnePageCRM/php-sampleIf not, can you post a link to your code somewhere?
Thanks
Powered by Discourse, best viewed with JavaScript enabled