Clients

Clients represent companies, groups, organizations or other contact containers. All contacts must belong to a client. Clients are also the main containers for Projects and Invoices.

Get All Clients

GET /clients
{
  "page_count": 7
  "page_size": 10
  "total_count": 61
  "clients": [
    {
      "number": "101"
      "name": "ACME Corp"
      "city": "New York"
      "address": "123 Main St."
      "zip": "12345"
      "country": "US"
      "id": 2123
      "invoice_extra_fields": null
      "website": "http://www.example.com"
      "address_2": "Suite 101"
      "description": "A sample API Client"
      "state": "NY"
    },
    ...
  ]
}

Client Status Values:
1: Active
2: Archived

GET /clients?page=2

On a bulk GET Ronin will return 10 client results at once. To paginate through more results, you can use the page parameter.

GET /clients?updated_since=2017-01-01

You can also filter by update time for clients, just to get the lastest changes.

GET /clients?sort=date

You can get the most recently created clients by date, rather than the default sort which is based on client name.

Get A Client

GET /clients/:id
{
  "number": "101"
  "name"": "ACME Corp"
  "city": "New York"
  "address": "123 Main St."
  "zip": "12345"
  "country": "US"
  "id": 2123
  "invoice_extra_fields": null
  "website": "http://www.example.com"
  "address_2": "Suite 101"
  "description": "A sample API Client"
  "state": "NY"
}

Create A New Client

POST /clients
{
  "client": {
    "name": "ACME Corp"
  }
}

Required Fields: name (HTTP 422 on failure)
Unique Fields: number (HTTP 422 on failure)
Other Requirements: must meet plan limits (HTTP 426 on failure)

Update A Client

PUT /clients/:id

You may provide a partial list of fields to update

{
  "client": {
    "number": "102"
  }
}

Unique Fields: number (HTTP 422 on failure)

Delete A Client

DELETE /clients/:id

Deleting a client will result in the deletion of all associated Projects, Invoices, Estimates, and Contacts. Deletions are permanent and not reversible.