- style
GET /companies/:id
Resource URL
Returns a company object.
GET /companies/:idParameters
Table of allowed parameters.
_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 parameter; see included examples. Underlined values are default.
id | unsigned int | |
|---|---|---|
name | string | |
website | string | |
standing | string | |
status | unsigned int or object | |
phone | string | |
fax | string | |
date_created | unsigned int | |
date_modified | unsigned int | |
comments | string | |
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.
GET /companies/10.json?_fields=affiliationwould return the affiliation's id. Where as,
GET /companies/10.json?_fields=affiliation()would return the affiliation's object, including any optional fields or objects within the parenthesis.
Sample Response
GET /companies/1.json?_fields=affiliation(contact()),standing{
"meta":{
"status":"ok",
"message":"Everything executed as expected.",
"more_info":"https://affinitylive.jira.com/wiki/display/APIS/Status+Codes#ok"
},
"response":{
"affiliation":{
"mobile":"0000 000 000",
"email":"rpepper@sample.com.au",
"id":"1",
"contact":{
"firstname":"Ronald",
"surname":"Pepper",
"id":"1"
}
},
"standing":"prospect",
"name":"Ronalds Burgers",
"id":"1"
}
}