Back to top

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 tokens
GET/me

Example URI

GET https://api.herbby-app.com/me
Request  GET /me
HideShow
Headers
Content-Type: application/json
Authorization: Basic xxxxxxxxxxx
Response  200
HideShow
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 accounts
GET/accounts

Example URI

GET https://api.herbby-app.com/accounts
Request  GET /accounts
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Create a new Account
POST/accounts

You can create a new account by using this action.

Example URI

POST https://api.herbby-app.com/accounts
Request  POST /accounts
HideShow
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"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json

Retrieve a specific account
GET/accounts/

Retrive a specific account by ID

Example URI

GET https://api.herbby-app.com/accounts/
Request  GET /accounts/{id}
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Delete a specific account
DELETE/accounts/{id}

Delete a specific account by ID

Example URI

DELETE https://api.herbby-app.com/accounts/id
URI Parameters
HideShow
id
string (required) 

Id of the account

Request  DELETE /accounts/{id}
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Update an Account
PUT/accounts/{id}

You can update an account by using this action.

Example URI

PUT https://api.herbby-app.com/accounts/id
URI Parameters
HideShow
id
string (required) 

Id of the account

Request  PUT /accounts/{id}
HideShow
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"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json

Contacts

Contacts

Contacts are all the people who are attached to your CRM accounts

List contacts
GET/contacts

Example URI

GET https://api.herbby-app.com/contacts
Request  GET /contacts
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Create a new Contact
POST/contacts

You can create a new contact by using this action.

Example URI

POST https://api.herbby-app.com/contacts
Request  POST /contacts
HideShow
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"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json

Retrieve specific contact
GET/contacts/{id}

Retrieve a specific contact by ID

Example URI

GET https://api.herbby-app.com/contacts/id
URI Parameters
HideShow
id
string (required) 

Id of the contact

Request  GET /contacts/{id}
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Delete specific contact
DELETE/contacts/{id}

Delete a specific contact by ID

Example URI

DELETE https://api.herbby-app.com/contacts/id
URI Parameters
HideShow
id
string (required) 

Id of the contact

Request  DELETE /contacts/{id}
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Update a contact
PUT/contacts/{id}

You can update a contact by using this action.

Example URI

PUT https://api.herbby-app.com/contacts/id
URI Parameters
HideShow
id
string (required) 

Id of the contact

Request  PUT /contacts/{id}
HideShow
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"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json

Invoices

Invoices

List invoices
GET/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

GET https://api.herbby-app.com/invoices
Request
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Create a new Invoice
POST/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

POST https://api.herbby-app.com/invoices
Request
HideShow
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"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json

Valid specific invoice
PUT/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

PUT https://api.herbby-app.com/invoices/valid/id
URI Parameters
HideShow
id
string (required) 

Id of the invoice

Request  PUT /invoices/valid/{id}
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Retrieve specific invoice
GET/invoices/{id}

Retrieve an invoice by ID

Example URI

GET https://api.herbby-app.com/invoices/id
URI Parameters
HideShow
id
string (required) 

Id of the invoice

Request  GET /invoices/{id}
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Delete specific invoice
DELETE/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

DELETE https://api.herbby-app.com/invoices/id
URI Parameters
HideShow
id
string (required) 

Id of the invoice

Request  DELETE /invoices/{id}
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Quotations

Quotations

List quotations
GET/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 https://api.herbby-app.com/quotations
Request  GET /quotations
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Create a new Quotation
POST/quotations

You can create a new quotation by using this action.

Example URI

POST https://api.herbby-app.com/quotations
Request  POST /quotations
HideShow
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"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json

Retrieve specific quotation
GET/quotations/{id}

Retrieve an quotation by ID

Example URI

GET https://api.herbby-app.com/quotations/id
URI Parameters
HideShow
id
string (required) 

Id of the quotation

Request  GET /quotations/{id}
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Delete specific Quotation
DELETE/quotations/{id}

Delete a specific quotation.

Example URI

DELETE https://api.herbby-app.com/quotations/id
URI Parameters
HideShow
id
string (required) 

Id of the quotation

Request  DELETE /quotations/{id}
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Time Sessions

Time Sessions

List time sessions
GET/time-sessions

To list your time sessions in Herbby.

Example URI

GET https://api.herbby-app.com/time-sessions
Request  GET /time-sessions
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Create a time session
POST/time-sessions

You can create a new time session by using this action.

Example URI

POST https://api.herbby-app.com/time-sessions
Request  POST /time-sessions
HideShow
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"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json

Retrieve specific time session
GET/time-sessions/{id}

Retrieve a time session by ID

Example URI

GET https://api.herbby-app.com/time-sessions/id
URI Parameters
HideShow
id
string (required) 

Id of the time session

Request  GET /time-sessions/{id}
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Delete a specific time session
DELETE/time-sessions/{id}

Delete a specific time session.

Example URI

DELETE https://api.herbby-app.com/time-sessions/id
URI Parameters
HideShow
id
string (required) 

Id of the time session

Request  DELETE /time-sessions/{id}
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Update a time session
PUT/time-sessions/{id}

You may update a time session using this action.

Example URI

PUT https://api.herbby-app.com/time-sessions/id
URI Parameters
HideShow
id
string (required) 

Id of the time session

Request  PUT /contacts/{id}
HideShow
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"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json

Projects

List projects
GET/projects

To list your time sessions in Herbby.

Example URI

GET https://api.herbby-app.com/projects
Request  GET /projects
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Tasks

Tasks

Create a new Task
POST/tasks

Example URI

POST https://api.herbby-app.com/tasks
Request  POST /tasks
HideShow
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"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json

Folders

Folders

List folders
GET/folders

To list your folders (in documents) in Herbby.

Example URI

GET https://api.herbby-app.com/folders
Request  GET /folders
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Create a new folder
POST/folders

Example URI

POST https://api.herbby-app.com/folders
Request  POST /folders/{id}
HideShow
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"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json

Update a folder
PUT/folders/{id}

You can update an existing folder by using this action.

Example URI

PUT https://api.herbby-app.com/folders/id
URI Parameters
HideShow
id
string (required) 

Id of the folder

Request  PUT /folders/{id}
HideShow
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"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json

Delete specific folder
DELETE/folders/{id}

Delete a specific folder.

Example URI

DELETE https://api.herbby-app.com/folders/id
URI Parameters
HideShow
id
string (required) 

Id of the folder

Request  DELETE /folders/{id}
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
Headers
Content-Type: application/json

Documents

Document

List documents
GET/documents

To list your documents. You can filter to get only documents from a specific folder by adding the parameter folderId

Example URI

GET https://api.herbby-app.com/documents
Request  GET /documents
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Response  200
HideShow
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)

Generated by aglio on 24 Sep 2020