Back to top

Herbby

Herbby API documentation.

Endpoint

To use any part of the Herbby API, you have to use this URL :

https://api.herbby-app.com

Authentication

To use this API, you must authenticate you on each request. To authenticate you, 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 companies on your CRM. (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 may create a new account 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 specific account
GET/accounts/

Retrive a given 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 specific account
DELETE/accounts/{id}

Delete a given 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 may update an account 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 attached at 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 may create a new contact 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
{
  "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  201
HideShow
Headers
Content-Type: application/json

Retrieve specific contact
GET/contacts/{id}

Retrive a given 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 given 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 may update a contact 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

List your invoices in Herbby. If you want filter your invoice by status, you can use this paramter with theirs values :

  • draft

  • waiting

  • paid

  • partiel_paid

  • valid

You can also use multiple values in this filter :

  • 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 may create a new invoice using this action.

To create an invoice from API. You must use two actions :

  • First step : Create the invoice with status as draft (this action)

  • Second step : Confirm the invoice with set the status to 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}

Valid an invoice by ID. After created a new invoice the status is draft. To change this status, you must call this action to validate invoice.

Caution

After valided an invoice, it is not possible to delete it or update it without create a credit note.

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}

Retrive 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. You can only delete draft invoice. If your invoice is not a draft you will obtain a 403 response If this invoiceId does not exist you will obtain 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

List your quotations in Herbby. If you want 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 may create a new quotation 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}

Retrive 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

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 time session
POST/time-sessions

You may create a new time session 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}

Retrive an 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 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

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/{id}
HideShow
Headers
Content-Type: application/json
X-AUTH-TOKEN: your-x-auth-token
x-api-key: your-x-api-key
Body
{
  "start": "Hello, world!",
  "end": "Hello, world!",
  "title": "Hello, world!",
  "description": "Hello, world!",
  "projectId": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "start": {
      "type": "string",
      "description": "Start DateTime"
    },
    "end": {
      "type": "string",
      "description": "End DateTime"
    },
    "title": {
      "type": "string",
      "description": "Title"
    },
    "description": {
      "type": "string",
      "description": "Description"
    },
    "projectId": {
      "type": "string",
      "description": "Project Id"
    }
  },
  "required": [
    "start",
    "end",
    "title"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json

Folders

Folders

List folders
GET/folders

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 may update a folder 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

List your documents. You can filter to get only document 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 05 Nov 2019