Herbby
Herbby API documentation.
Endpoint
In order to use any part of Herbby’s API, please use this URL :
https://api.herbby-app.com
Authentication
For security reasons to use this API, you do have to be identified for each request. To be identified, you have to provide two parameters in the Headers :
x-api-key: your-x-api-key
X-AUTH-TOKEN: your-x-auth-token
You can find this values in your Herbby account at this URL :
https://my.herbby-app.com/fr/app/company/api-key
You can also get this two tokens by use the /me endpoint.
Resource Group ¶
Me ¶
Use this end point to get your auth tokens.
Get auth tokensGET/me
Example URI
GET /me
Headers
Content-Type: application/json
Authorization: Basic xxxxxxxxxxx
200
Headers
Content-Type: application/json
Body
{
"xAuthToken": "xxxxx",
"xApiKey": "xxxxxxxx",
"id": 1234,
"email": "xxx@xxxx.com",
"first_name": "John",
"last_name": "Doe"
}
Accounts ¶
Accounts ¶
“Accounts” are the all companies inserted in the Herbby CRM section. (Clients, propects, partners, etc.)
List accountsGET/accounts
Example URI
GET /accounts
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Create a new AccountPOST/accounts
You can create a new account by using this action.
Example URI
POST /accounts
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Body
{
"name": "Hello, world!",
"description": "Hello, world!",
"street": "Hello, world!",
"zipcode": "Hello, world!",
"city": "Hello, world!",
"state": "Hello, world!",
"country": "Hello, world!",
"type": 1,
"siret": "Hello, world!",
"naf": "Hello, world!"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Account name"
},
"description": {
"type": "string",
"description": "Description"
},
"street": {
"type": "string",
"description": "Street address"
},
"zipcode": {
"type": "string",
"description": "Postal code"
},
"city": {
"type": "string",
"description": "City"
},
"state": {
"type": "string",
"description": "State"
},
"country": {
"type": "string",
"description": "ISO code of the country FR, ES, etc."
},
"type": {
"type": "number",
"description": "account type id [ 1=Client, 2=Prospect, 3=Fournisseur, 4=Revendeur, 5=Partenaire]"
},
"siret": {
"type": "string",
"description": "Siret number"
},
"naf": {
"type": "string",
"description": "Naf code"
}
},
"required": [
"name"
]
}
201
Headers
Content-Type: application/json
Retrieve a specific accountGET/accounts/
Retrive a specific account by ID
Example URI
GET /accounts/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Delete a specific accountDELETE/accounts/{id}
Delete a specific account by ID
Example URI
- id
string
(required)Id of the account
DELETE /accounts/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Update an AccountPUT/accounts/{id}
You can update an account by using this action.
Example URI
- id
string
(required)Id of the account
PUT /accounts/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Body
{
"name": "Hello, world!",
"description": "Hello, world!",
"street": "Hello, world!",
"zipcode": "Hello, world!",
"city": "Hello, world!",
"state": "Hello, world!",
"country": "Hello, world!",
"type": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Account name"
},
"description": {
"type": "string",
"description": "Description"
},
"street": {
"type": "string",
"description": "Street address"
},
"zipcode": {
"type": "string",
"description": "Postal code"
},
"city": {
"type": "string",
"description": "City"
},
"state": {
"type": "string",
"description": "State"
},
"country": {
"type": "string",
"description": "ISO code of the country FR, ES, etc."
},
"type": {
"type": "number",
"description": "account type id [ 1=Client, 2=Prospect, 3=Fournisseur, 4=Revendeur, 5=Partenaire]"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Contacts ¶
Contacts ¶
Contacts are all the people who are attached to your CRM accounts
List contactsGET/contacts
Example URI
GET /contacts
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Create a new ContactPOST/contacts
You can create a new contact by using this action.
Example URI
POST /contacts
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Body
{
"accountId": 1,
"civility": "Hello, world!",
"firstName": "Hello, world!",
"lastName": "Hello, world!",
"emails": "Hello, world!",
"phones": "Hello, world!",
"job": "Hello, world!"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"accountId": {
"type": "number",
"description": "Account Id"
},
"civility": {
"type": "string",
"description": "Civility 0 = Monsieur, 1 = Madame"
},
"firstName": {
"type": "string",
"description": "First name"
},
"lastName": {
"type": "string",
"description": "Last name"
},
"emails": {
"type": "string",
"description": "Emails delimited by |"
},
"phones": {
"type": "string",
"description": "Phones delimited by |"
},
"job": {
"type": "string",
"description": "Job"
}
},
"required": [
"accountId",
"civility",
"firstName",
"lastName"
]
}
201
Headers
Content-Type: application/json
Retrieve specific contactGET/contacts/{id}
Retrieve a specific contact by ID
Example URI
- id
string
(required)Id of the contact
GET /contacts/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Delete specific contactDELETE/contacts/{id}
Delete a specific contact by ID
Example URI
- id
string
(required)Id of the contact
DELETE /contacts/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Update a contactPUT/contacts/{id}
You can update a contact by using this action.
Example URI
- id
string
(required)Id of the contact
PUT /contacts/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Body
{
"civility": "Hello, world!",
"firstName": "Hello, world!",
"lastName": "Hello, world!",
"emails": "Hello, world!",
"phones": "Hello, world!",
"job": "Hello, world!"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"civility": {
"type": "string",
"description": "Civility 0 = Monsieur, 1 = Madame"
},
"firstName": {
"type": "string",
"description": "First name"
},
"lastName": {
"type": "string",
"description": "Last name"
},
"emails": {
"type": "string",
"description": "Emails delimited by |"
},
"phones": {
"type": "string",
"description": "Phones delimited by |"
},
"job": {
"type": "string",
"description": "Job"
}
},
"required": [
"civility",
"firstName",
"lastName"
]
}
200
Headers
Content-Type: application/json
Invoices ¶
Invoices ¶
List invoicesGET/invoices
To list your invoices in Herbby. If you want filter your invoices by status, you can use this paramter with theirs values :
-
draft
-
waiting
-
paid
-
partiel_paid
-
valid
You can also use multiple values in filters :
- status=paid,partiel_paid
Example URI
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Create a new InvoicePOST/invoices
You can create a new invoice by using this action.
To create a new invoice from API. You do have to use two specific actions :
-
First step : Create the invoice with a status defined on “draft” (this action)
-
Second step : Confirm the invoice by turning on the status on “valid” (PUT /invoices/valid/{id})
Example URI
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Body
{
"object": "",
"accountId": "",
"dueDate": "",
"lines": {},
"taxId": "",
"unitPrice": 0,
"qty": 0,
"description": 0
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "Invoice Object"
},
"accountId": {
"type": "string",
"description": "account Id"
},
"projectId": {
"type": "string",
"description": "project Id"
},
"dueDate": {
"type": "string",
"description": "Invoice due date"
},
"lines": {
"type": "object",
"properties": {},
"description": "Invoice lines"
},
"taxId": {
"type": "string",
"description": "Tax Id for line"
},
"unitPrice": {
"type": "number",
"description": "Line unit price without tax"
},
"qty": {
"type": "number",
"description": "Quantity for line"
},
"description": {
"type": "number",
"description": "Descripwtion for line"
}
},
"required": [
"object",
"accountId",
"dueDate",
"lines",
"taxId",
"unitPrice",
"qty",
"description"
]
}
201
Headers
Content-Type: application/json
Valid specific invoicePUT/invoices/valid/{id}
To valid an invoice by ID. After having created a new invoice, the status is defined on draft. To change this status, you must call this action to validate the invoice.
Caution
Financial laws : After having validated an invoice, it is not possible to delete it or update it without creating a credit note related to this invoice.
Example URI
- id
string
(required)Id of the invoice
PUT /invoices/valid/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Retrieve specific invoiceGET/invoices/{id}
Retrieve an invoice by ID
Example URI
- id
string
(required)Id of the invoice
GET /invoices/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Delete specific invoiceDELETE/invoices/{id}
Delete a specific invoice. Only “draft” nvoices can be deleted. If the invoice concerned with is not a draftn, you will get a 403 response. If this invoiceId does not exist, you will get a 404 response
Example URI
- id
string
(required)Id of the invoice
DELETE /invoices/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Quotations ¶
Quotations ¶
List quotationsGET/quotations
To list your quotations in Herbby. If you want to filter your quotations by status, you can use this paramter with theirs values :
-
to invoice
-
refused
-
new
-
invoiced
-
accepted
You can also use multiple values in this filter :
status=accepted,invoiced
Example URI
GET /quotations
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Create a new QuotationPOST/quotations
You can create a new quotation by using this action.
Example URI
POST /quotations
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Body
{
"object": "",
"accountId": "",
"dueDate": "",
"lines": {},
"taxId": "",
"unitPrice": 0,
"qty": 0,
"description": 0
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "Invoice Object"
},
"accountId": {
"type": "string",
"description": "account Id"
},
"projectId": {
"type": "string",
"description": "project Id"
},
"dueDate": {
"type": "string",
"description": "Invoice due date"
},
"lines": {
"type": "object",
"properties": {},
"description": "Invoice lines"
},
"taxId": {
"type": "string",
"description": "Tax Id for line"
},
"unitPrice": {
"type": "number",
"description": "Line unit price without tax"
},
"qty": {
"type": "number",
"description": "Quantity for line"
},
"description": {
"type": "number",
"description": "Description for line"
}
},
"required": [
"object",
"accountId",
"dueDate",
"lines",
"taxId",
"unitPrice",
"qty",
"description"
]
}
201
Headers
Content-Type: application/json
Retrieve specific quotationGET/quotations/{id}
Retrieve an quotation by ID
Example URI
- id
string
(required)Id of the quotation
GET /quotations/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Delete specific QuotationDELETE/quotations/{id}
Delete a specific quotation.
Example URI
- id
string
(required)Id of the quotation
DELETE /quotations/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Time Sessions ¶
Time Sessions ¶
List time sessionsGET/time-sessions
To list your time sessions in Herbby.
Example URI
GET /time-sessions
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Create a time sessionPOST/time-sessions
You can create a new time session by using this action.
Example URI
POST /time-sessions
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Body
{
"description": "Hello, world!",
"date": "Hello, world!",
"project": 1,
"seconds": "Hello, world!",
"service": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "Description"
},
"date": {
"type": "string",
"description": "Date"
},
"project": {
"type": "number",
"description": "project Id"
},
"seconds": {
"type": "string",
"description": "Time Session seconds"
},
"service": {
"type": "number",
"description": "service Id"
}
},
"required": [
"description",
"date",
"project",
"seconds"
]
}
200
Headers
Content-Type: application/json
Retrieve specific time sessionGET/time-sessions/{id}
Retrieve a time session by ID
Example URI
- id
string
(required)Id of the time session
GET /time-sessions/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Delete a specific time sessionDELETE/time-sessions/{id}
Delete a specific time session.
Example URI
- id
string
(required)Id of the time session
DELETE /time-sessions/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Update a time sessionPUT/time-sessions/{id}
You may update a time session using this action.
Example URI
- id
string
(required)Id of the time session
PUT /contacts/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Body
{
"description": "Hello, world!",
"date": "Hello, world!",
"project": 1,
"seconds": "Hello, world!",
"service": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "Description"
},
"date": {
"type": "string",
"description": "Date"
},
"project": {
"type": "number",
"description": "project Id"
},
"seconds": {
"type": "string",
"description": "Time Session seconds"
},
"service": {
"type": "number",
"description": "service Id"
}
},
"required": [
"description",
"date",
"project",
"seconds"
]
}
200
Headers
Content-Type: application/json
Tasks ¶
Tasks ¶
Create a new TaskPOST/tasks
Example URI
POST /tasks
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Body
{
"type": "Hello, world!",
"startDate": "Hello, world!",
"endDate": "Hello, world!",
"title": "Hello, world!",
"description": "Hello, world!",
"projectId": 1,
"accountId": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Task's type (rdv or task)"
},
"startDate": {
"type": "string",
"description": "Start DateTime"
},
"endDate": {
"type": "string",
"description": "End DateTime"
},
"title": {
"type": "string",
"description": "Title"
},
"description": {
"type": "string",
"description": "Description"
},
"projectId": {
"type": "number",
"description": "Project Id"
},
"accountId": {
"type": "number",
"description": "Account Id"
}
},
"required": [
"type",
"startDate",
"endDate",
"title"
]
}
200
Headers
Content-Type: application/json
Folders ¶
Folders ¶
List foldersGET/folders
To list your folders (in documents) in Herbby.
Example URI
GET /folders
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Create a new folderPOST/folders
Example URI
POST /folders/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Body
{
"nam": "Hello, world!"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"nam": {
"type": "string",
"description": "Folder name"
}
},
"required": [
"nam"
]
}
200
Headers
Content-Type: application/json
Update a folderPUT/folders/{id}
You can update an existing folder by using this action.
Example URI
- id
string
(required)Id of the folder
PUT /folders/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Body
{
"name": "Hello, world!"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Folder name"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Delete specific folderDELETE/folders/{id}
Delete a specific folder.
Example URI
- id
string
(required)Id of the folder
DELETE /folders/{id}
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Documents ¶
Document ¶
List documentsGET/documents
To list your documents. You can filter to get only documents from a specific folder by adding the parameter folderId
Example URI
GET /documents
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
200
Headers
Content-Type: application/json
Todo ¶
Custom-Field ¶
Documentation coming soon (Nov 2019)
Message ¶
Documentation coming soon (Nov 2019)
Tickets ¶
Documentation coming soon (Nov 2019)
Taxes ¶
Documentation coming soon (Nov 2019)