Intervals API Resource:
client
The base URL for this resource is located at
https://api.myintervals.com/client/
For accessing information about clients.
Collection
| Allowed HTTP Methods | |
|---|---|
| Method | Group Access |
| GET | Administrator, Manager, Resource, Executive |
| Allowed Filters | ||||
|---|---|---|---|---|
| Filter Name | Required? | Expects | Default | Description |
| localid | no | integer1 | Restricts the list based on a client's "localid," which is the number that appears associated with the client in the Intervals application. | |
| active | no | boolean | Limits the list to clients who are either active or inactive. | |
| search | no | string | Limits the list to clients who match the search string. Searches client name, description and localid. | |
| projectsonly | no | boolean | f | Limits the list to clients who have active projects only. |
| sortfield | no | string | Sort the list by any of the following fields: id, localid, name, datecreated | |
| sortdir | no | string | Sets the sort direction of the returned list. Must be either "ASC" or "DESC". | |
| offset | no | integer | Return clients starting from the nth client. | |
| limit | no | integer | 10 | Sets a limit to the amount of clients returned in the response. |
1 Indicates that multiple values are allowed, in CSV format (e.g. "3,5,11,19").
2 This field accepts HTML, but certain HTML elements may be stripped out.
Examples
To retrieve the entire list of this resource:
GET /client/
To filter the list based on certain parameters:
GET /client/?sortfield={value}
Note: You can string together multiple filters.
Member
| Allowed HTTP Methods | |
|---|---|
| Method | Group Access |
| GET | Administrator, Manager, Resource, Executive |
| DELETE | Administrator |
| POST | Administrator |
| PUT | Administrator |
| Settable Fields for PUT and POST Requests | ||||
|---|---|---|---|---|
| Field Name | Required? | Expects | Default | Description |
| name | yes | string (255) | The name of the client | |
| datecreated | yes | date | ||
| description | no | html | The client description/notes area. | |
| no | string (255) | The main client email address. This email can also be part of a person contact, that is a person profile who cannot login. | ||
| website | no | string (255) | Client website URL. | |
| phone | no | string (50) | Client phone number. | |
| fax | no | string (50) | Client fax number. | |
| address | no | string | The client address. | |
| active | yes | boolean | t | |
string (xxx) indicates a string with a maximum length of xxx characters.
Response Fields
The fields below are returned in GET responses. Boolean values are "t" / "f" strings. Numeric IDs and floats are returned as strings. Nullable fields may be JSON null.
| Response Fields | ||
|---|---|---|
| Field Name | Nullable | Description |
| id | no | Unique identifier for the client |
| name | no | Client name |
| datecreated | no | Date the client was created (YYYY-MM-DD) (Admin only) |
| description | yes | Client description/notes (may contain HTML) (Admin only) |
| yes | Primary client email address (Admin only) | |
| website | yes | Client website URL (Admin only) |
| phone | yes | Client phone number (Admin only) |
| fax | yes | Client fax number (Admin only) |
| address | yes | Client mailing address (Admin only) |
| active | no | Whether the client is active ("t") or inactive ("f") |
| localidunpadded | no | Numeric client local ID without leading-zero padding |
| localid | no | Human-readable local ID shown in the Client app UI (zero-padded) |
When retrieving a collection (GET /client/), the response envelope includes: personid (authenticated user's ID), status ("OK"), code (200), listcount (total matching records before limit/offset), and client (array of result objects). Defaults, no cap on limit, and how to paginate using listcount are described in the API Introduction (Pagination).
Examples
To retrieve one member resource:
GET /client/{id}/
Assuming no errors, the server will respond with 200 OK and the object requested.
To delete a particular member resource:
DELETE /client/{id}/
Assuming no errors, the server will respond with 200 OK.
To create a new member resource:
POST /client/
{ "name": value, "datecreated": value, "active": value }
Assuming no errors, the server will respond with 201 Created and the newly-created element. This will allow you to get the id of the item you just created and verify the field values. Note: Only required fields were listed here. The entire list of possible fields is above.
To update a member resource:
PUT /client/{id}/
{ "phone": value, "address": value }
Assuming no errors, the server will respond with 202 Accepted and the entire element. This will allow you to verify the field values.
Documentation
Resources
- client
- contactdescriptor
- contacttype
- document
- expense
- group
- invoice
- invoiceitem
- invoicenote
- invoiceterm
- me
- milestone
- milestonenote
- module
- payment
- paymenttype
- person
- personcontact
- project
- projectlabel
- projectmodule
- projectnote
- projectteam
- projectworktype
- quota
- request
- task
- tasklistfilter
- tasknote
- taskpriority
- taskstatus
- time
- timer
- worktype
API Support
Looking for help?
Contact our support team.
OpenAPI
OpenAPI JSON spec (public)
Start tracking time today
Connect Intervals to the tools and workflows your team already uses.
Try Intervals free