...
Code Block |
---|
language | bash |
---|
linenumbers | true |
---|
|
DELETE /companies/10.xml
GET /companies/10.xml?_method=delete
POST /companies/10.xml?_method=delete |
JSON Content Types
We also accept JSON requests. This can greatly simplify the client side implementation as it offers filters and fields that translate well to programatic structures. For example, if you would like to get all contacts with either email "pepper@test.com" or "salt@test.com" and return their mobile and linked statuses color, id and title, you would use
Code Block |
---|
language | bash |
---|
linenumbers | true |
---|
|
curl https://<deployment>.api.accelo.com/api/v0/contacts -H "Content-Type: application/json" -d'{
"_bearer_token": "_iaePUx3W4AUsZ7p.u4aUSrfgWF6esiy",
"_filters": { "email": ["pepper@test.com", "salt@test.com"] },
"_fields": ["status.title", "status.id", "status.color", "mobile"],
"_method": "get"
}' |
which is similar to saying
Code Block |
---|
language | bash |
---|
linenumbers | true |
---|
|
/contacts?_filters=email(pepper@test.com,salt@test.com),_fields=status(title,id,color),mobile |
What's Next?
Now that you have dabbled in the basics of the API, it is time that you checkout OAuth 2.0 Authentication. This will introduce you to grants, bearer tokens and application specific application authorization flows.
...