URL parameters

Limit search and list results

The following parameters can be applied to list and search requests:

Parameter Description
limit Limits the number of results (At most 2000 entries will be returned if no limit is defined)
offset Defines the start entry (starting at 0)
order_by Defines the order of the results. Multiple sort parameters can be combined by using a comma separator.

Example

GET /contact?limit=5&offset=7&order_by=name_1_asc,nr_desc

The following parameters are used for this request:

  • Sort ascending by company name / last name and secondary sort descending by number. (order_by=name_1_asc,nr_desc)
  • Show results starting from the eight entry (offset=7)
  • Show max. 5 entries (limit=5)

Callbacks (JSON-P)

Every request accepts the GET parameter ?callback. Callbacks are often used to avoid “cross domain” problems. Please note that the content type of the response is always application/javascript.

Beispiel

GET /contact/1?callback=myfunction

Antwort

Content-Type: application/javascript
Content-Length: 467
myfunction({
    "id":1,
    "nr":"000001",
    "contact_type_id":1,
    "name_1":"Muster AG",
    "name_2":"",
    "salutation_id":1,
    "title_id":null,
    "birthday":null,
    "address":"Müllerstrasse 22",
    "postcode":"8004",
    "city":"Zürich",
    "country_id":1,
    "mail":"info@musterag.ch",
    "phone_fixed":"",
    "phone_mobile":"",
    "fax":"",
    "url":"",
    "skype_name":"",
    "language_id":null,
    "is_lead":false,
    "contact_group_ids":"1,2",
    "contact_branch_ids":null,
    "user_id":1,
    "owner_id":1,
    "updated_at":"2013-03-11 08:29:48"
})