Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated page to reflect deprecation of contact object

...

Table of allowed parameters.

_fieldspartial stringAllows 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.

idunsigned int
 

namestring
 

websitestring
 

standingstring
 

statusunsigned int or object
 

phonestring
 

faxstring
 

date_createdunsigned int
 

date_modifiedunsigned int
 contact

commentsstring
 

contactunsigned 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.

affiliationunsigned 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
languagebash
GET /companies/10.json?_fields=contactaffiliation

would return the contacts affiliation's id. Where as,

Code Block
languagebash
GET /companies/10.json?_fields=contactaffiliation()

would return the contactaffiliation's object, including any optional fields or objects within the parenthesis.

...

Code Block
languagebash
GET /companies/1.json?_fields=affiliation(contact()),standing
Code Block
languagejavascript
{
   "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 "okBurgers",
      "messageid" : "Everything executed as expected."1"
   }
}