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"
    },
    ...
  ]
}
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.

The format for this will change soon. Your code should also expect a hash with key clients that points to an array as shown. This will allow introduction of pagination information into the JSON result.

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.