Returns the recently created companies.
Resource URL
/companies/recent
Parameters
Table of allowed paramaters.
_page | unsigned int | The page of the list to display. For example, 5 will display the fifth page. Each page contains 10 resources. |
---|---|---|
_limit | unsigned int | The maximum number of resources to return. Default is 10 and maximum is 50. |
_offset | unsigned int | The position in the list of resources to return from. For example, if you had 20 resources and requested an offset of 10. Resources 10 to 19 would be returned. Offset cannot be used in conjunction with _page . |
_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; 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 |
Fields that can be object indicate the field can be requested as a resource. For example.
GET /companies/recent.json?_fields=contact
would return the contacts id. Where as,
GET /companies/recent.json?_fields=contact()
would return the contact's object, including any optional fields or objects within the parenthesis.
Sample Response
GET /companies/recent.json?_fields=contact(),standing&_limit=2
{ "response" : [ { "name" : "ADTOA", "contact" : { "email" : "rpepper@ihug.com.au", "firstname" : "Ronald", "id" : "1", "mobile" : "0425 239 666", "surname" : "Pepper IHUG" }, "standing" : "active", "id" : "1" }, { "name" : "Balgownie Veterinary Hospital", "contact" : { "email" : "mark@balgownievet.com.au", "firstname" : "Mark", "id" : "2", "mobile" : "", "surname" : "Allison" }, "standing" : "active", "id" : "2" } ], "meta" : { "more_info" : "/public_api/docs/status/ok", "status" : "ok", "message" : "Everything executed as expected." } }