Skip to main content

Clients

Information pertaining to retrieving, created, editing, and deleting clients.

Link to documentation

Supported currencies

List all clients

Returns a list of your clients. The clients are returned sorted by creation date, with the most recently created clients appearing first.

The response contains an object with a clients property that contains an array of up to per_page clients. Each entry in the array is a separate client object. If no more clients are available, the resulting array will be empty. Several additional pagination properties are included in the response to simplify paginating your clients.

Link to documentation

hrvst clients list
OptionDescriptionRequired
--is_activePass true to only return active clients and false to return inactive clients.false
--updated_sinceOnly return clients that have been updated since the given date and time.false
--pageThe page number to use in pagination. Use all to retrieve all pages.false
--per_pageThe number of records to return per page. Can range between 1 and 100.false
--fieldsComma separated list of fields to display in the output.false
--outputThe output format: json, tablefalse

Retrieve a specific client

Retrieves the client with the given ID. Returns a client object and a 200 OK response code if a valid identifier was provided.

Link to documentation

hrvst clients get
OptionDescriptionRequired
--client_idThe ID of the client you're retrieving.true
--fieldsComma separated list of fields to display in the output.false
--outputThe output format: json, tablefalse

Create a client

Creates a new client object. Returns a client object and a 201 Created response code if the call succeeded.

Link to documentation

List of supported currencies

hrvst clients create
OptionDescriptionRequired
--nameA textual description of the client.true
--is_activeWhether the client is active, or archived. Defaults to true.false
--addressA textual representation of the client’s physical address. May include new line characters.false
--currencyThe currency used by the client. If not provided, the company’s currency will be used. See a list of supported currencies: https://help.getharvest.com/api-v2/introduction/overview/supported-currencies/false
--fieldsComma separated list of fields to display in the output.false
--outputThe output format: json, tablefalse

Update a client

Updates the specific client by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Returns a client object and a 200 OK response code if the call succeeded.

Link to documentation

List of supported currencies

hrvst clients update
OptionDescriptionRequired
--client_idThe ID of the client you're updating.true
--nameA textual description of the client.false
--is_activeWhether the client is active, or archived. Defaults to true.false
--addressA textual representation of the client’s physical address. May include new line characters.false
--currencyThe currency used by the client. If not provided, the company’s currency will be used. See a list of supported currencies: https://help.getharvest.com/api-v2/introduction/overview/supported-currencies/false
--fieldsComma separated list of fields to display in the output.false
--outputThe output format: json, tablefalse

Delete a client

Delete a client. Deleting a client is only possible if it has no projects, invoices, or estimates associated with it. Returns a 200 OK response code if the call succeeded.

Link to documentation

hrvst clients delete
OptionDescriptionRequired
--client_idThe ID of the client you're deleting.true
--fieldsComma separated list of fields to display in the output.false
--outputThe output format: json, tablefalse