Resource URL
Returns a company object.
Code Block |
---|
|
GET /companies/:id |
Parameters
Table of allowed paramatersparameters.
_fields | partial string | Allows you to specify optional fields and linked objects to include in the response. |
---|
Handling the response
Below is a table of available response fields and objects that are returned within the response object of the returned object. The optional fields and objects can be requested in the _fields
paramater parameter; see included examples. Underlined values are default.
| | | |
|
status | unsigned int or object |
---|
| | |
|
date_modified | unsigned int |
---|
| | contact |
|
contact | unsigned int or object | Deprecated: Please use the affiliation object to ask for the linked contact. e.g, "_fields=affiliation(contact())". We deprecated because if you use the "contact()" query object in conjunction with "affiliation()" you will get request error. |
---|
affiliation | unsigned int or object |
---|
Returns the default affiliation object of the company. From here you can request the linked contact. |
Fields that can be object indicate the field can be requested as a resource. For example.
Code Block |
---|
|
GET /companies/10.json?_fields=contactaffiliation |
would return the contacts affiliation's id. Where as,
Code Block |
---|
|
GET /companies/10.json?_fields=contactaffiliation() |
would return the contactaffiliation's object, including any optional fields or objects within the parenthesis.
...
Code Block |
---|
|
GET /companies/1.json?_fields=affiliation(contact()),standing |
Code Block |
---|
|
{
"responsemeta":{
: { "namestatus" : "Balgownie Veterinary Hospitalok",
"message":"Everything executed as expected."contact",
: { "more_info":"https://affinitylive.jira.com/wiki/display/APIS/Status+Codes#ok"
},
"emailresponse":{
: "mark@balgownievet.com.au", "affiliation":{
"firstnamemobile":"0000 :000 "Mark000",
"idemail" : "2rpepper@sample.com.au",
"mobileid" : "1",
"contact":{
"surname" : "Allison" "firstname":"Ronald",
}, "standingsurname" : "activePepper",
"id" : "21"
},
"meta" : {},
"more_infostanding" : "/public_api/docs/status/ok"prospect",
"statusname" :"Ronalds Burgers"ok",
"messageid" : "Everything executed as expected."1"
}
} |