Get all clients
GET https://YOURACCOUNT.harvestapp.com/clients
Examples
HTTP Response: 200 OK
Example request in
Postman
<?xml version="1.0" encoding="UTF-8"?>
<clients type= "array" >
<client>
<id type= "integer" > 8361719</id>
<name> Harvest327</name>
<active type= "boolean" > true</active>
<currency> United States Dollar - USD</currency>
<updated-at type= "dateTime" > 2019-04-15T16:25:50Z</updated-at>
<created-at type= "dateTime" > 2019-04-15T16:25:50Z</created-at>
<statement-key> cf64fef5b21f88d26cb2c3bd4b139a38</statement-key>
<default-invoice-timeframe nil= "true" />
<address> null</address>
<currency-symbol> $</currency-symbol>
<details> null</details>
<last-invoice-kind nil= "true" />
</client>
</clients>
[
{
"client" : {
"id" : 8361719 ,
"name" : "Harvest327" ,
"active" : true ,
"currency" : "United States Dollar - USD" ,
"updated_at" : "2019-04-15T16:25:50Z" ,
"created_at" : "2019-04-15T16:25:50Z" ,
"statement_key" : "cf64fef5b21f88d26cb2c3bd4b139a38" ,
"default_invoice_timeframe" : null ,
"address" : null ,
"currency_symbol" : "$" ,
"details" : null ,
"last_invoice_kind" : null
}
}
]
Get a single client
GET https://YOURACCOUNT.harvestapp.com/clients/{CLIENTID}
Examples
HTTP Response: 200 OK
Example request in
Postman
<?xml version="1.0" encoding="UTF-8"?>
<client>
<id type= "integer" > 8483698</id>
<name> My Client</name>
<active type= "boolean" > true</active>
<currency> United States Dollar - USD</currency>
<updated-at type= "dateTime" > 2019-04-15T16:25:50Z</updated-at>
<created-at type= "dateTime" > 2019-04-15T16:25:50Z</created-at>
<statement-key> cf64fef5b21f88d26cb2c3bd4b139a38</statement-key>
<default-invoice-timeframe nil= "true" />
<address> 123 A St. \r\nSomewhere, NY 12345</address>
<currency-symbol> $</currency-symbol>
<details> 123 A St. \r\nSomewhere, NY 12345</details>
<last-invoice-kind nil= "true" />
</client>
{
"client" : {
"id" : 8483698 ,
"name" : "My Client" ,
"active" : true ,
"currency" : "United States Dollar - USD" ,
"updated_at" : "2019-04-15T16:25:50Z" ,
"created_at" : "2019-04-15T16:25:50Z" ,
"statement_key" : "cf64fef5b21f88d26cb2c3bd4b139a38" ,
"default_invoice_timeframe" : null ,
"address" : "123 A St. \r\n Somewhere, NY 12345" ,
"currency_symbol" : "$" ,
"details" : "123 A St. \r\n Somewhere, NY 12345" ,
"last_invoice_kind" : null
}
}
Create a new client
POST https://YOURACCOUNT.harvestapp.com/clients
To create a new client, you’ll need to POST
the following. Only Name
is required.
Parameter
Description
Name
New client name.
Currency
The currency you’d like to use for the client.
Currency-Symbol
The symbol that correlates to the selected currency.
Active
Determines if the client is active, or archived. Options: true
, false
.
Details
Additional details, normally used for address information.
Once created successfully, we’ll return HTTP Response: 201 Created
, along with Location /clients/{NEWCLIENTID}
Examples
<client>
<name> Company LLC</name>
<currency> United States Dollar - USD</currency>
<currency-symbol> $</currency-symbol>
<active type= "boolean" > true</active>
<details> 123 Main St.
Third Floor
New York, NY 10011
USA
212-555-1212
212-555-1213 (fax)</details>
</client>
{
"client" : {
"name" : "Your Client" ,
"active" : true ,
"currency" : "United States Dollar - USD" ,
"currency_symbol" : "$" ,
"details" : "123 Main St \r\n Anytown, NY 12345"
}
}
Update a client
PUT https://YOURACCOUNT.harvestapp.com/clients/{CLIENTID}
You may update client attributes using this call. Once updated successfully, we’ll return HTTP Response: 200 OK
, along with Location /clients/{CLIENTID}
Activate or deactivate an existing client
POST https://YOURACCOUNT.harvestapp.com/clients/{CLIENTID}/toggle
You may toggle an existing client to active, or archived using this call. Once updated successfully, we’ll return HTTP Response: 200 OK
, along with Location /clients/{CLIENTID}
If the client has active projects, Harvest will return HTTP Response: 400 Bad Request, with a Hint header.
Delete a client
DELETE https://YOURACCOUNT.harvestapp.com/clients/{CLIENTID}
If client does not have associated projects or invoices it will be deleted and we'll return HTTP Response: 200 OK. Otherwise, the client is not deleted and you'll get a HTTP Response: 400 Bad Request.