HIVEO API (1.0)

Download OpenAPI specification:Download

Getting started

Glossary

The Hiveo API uses several notions and objects. We will describe them here.

Organisations

Companies and their work sites are call organisations. Each organisation has a corresponding national identifier, called national ID, and a reference country code.

For example:

  1. The french organisation Hiveo (top level) has the national ID 841226053.
  2. The french Hiveo headquarter has the national ID 84122605300012.
  3. Both have the FR country code.

On Hiveo, collector organisations (our customers) invite their suppliers as depositors. Thus they create relations between them.

Each organisation is referenced with an Hiveo ID (also called internal ID), built by concatening the country code and the national ID of the organisation (ex: Hiveo top level organisation has the Hiveo ID FR-841226053):

    "country": "FR"
    "nationalId": "841226053"
    "internalId": "FR-841226053"

Dossiers and documents

Each depositor uploads documents on Hiveo. A Hiveo document has:

  • A type (ex: Justificatif d’Immatriculation Kbis (Extrait RCS) ) which is very specific to the nature of the document,
  • Belongs to an usage (ex: Justificatif d’Immatriculation),
  • And is sorted in a dossier.

Every depositor has a legal dossier, containing documents from the following usages:

  1. Justificatif d’Immatriculation
  2. Attestation sociale de vigilance
  3. Liste des salariés étrangers soumis à autorisation de travail

If you collect more than these 3 usages, your depositors will also have a complementary dossier, containing the rest of the collected documents.

Versions of documents are called revisions. A same PDF file can be linked to several revisions, corresponding to either:

  • Different attempts to upload and validate the PDF file
  • Revisions of several document types (for example, in France, a same PDF file can be both of type Attestation Décennale Standard and of type Attestation de Responsibilité Professionnelle)

A revision has several attributes related to its validity state:

  • usable if the depositor has gone through the whole upload process (non usable revisions are drafts that never reach the depositor’s dossiers)
  • valid if the document has passed all validation rules: it has a start validity date, and an end validity date, but the revision will always be considered valid between these 2 dates
  • operational if the document is valid at the specified date – This notion is relative

Users and contacts

Users can be attached to one of several companies (e.g top-level organisations). Once a user is invited to join a company, she can subscribe to every work site (e.g child organisations) she needs to.

When subscribing to a child organisation, a user:

  1. Exposes herself on this organisation: Users from organisations in relation will see her as a contact of this organisation,
  2. Will receive notifications for this organisation,
  3. Is able to select this child organisation on her menu.

With the Hiveo API you can:

  1. Invite new users on your own organisation,
  2. Invite a new contact on one of your relations.

Reminders

Hiveo provide collectors with the ability to send reminders to their suppliers. These reminders are of several types:

  1. Invitation reminders, used for users and contacts,
  2. Documents reminders, used to warn non up to date suppliers.

Reminds are only sent when needed: A supplier with valid dossiers and contacts will NOT be notified.

Invitation reminders are only manual: They can be sent by users, or programmatically. Documents reminders are automatically sent by Hiveo, and can also be sent manually or programmatically by users.

Use cases

Example 1: Synchronize your relations directory

To get all your suppliers at once, use:

    GET /api/collectors/{internal-id}/relations

This call can be used to synchronize the first time, or once in a while to force a full synchronisation.

Then to only get modifications since your last call, use:

    GET /api/collectors/{internal-id}/relations?fromLastModifiedDate={previous call date, such as 2019-04-01T17:32:28Z}

Reference

Type Name Needed rights Authentication theme Resource
Invitation Invite a user to your own organisation Write User POST /api/organisations/{internal-id}/contacts
Invitation Invite a new supplier Write User POST /api/invite-depositor
Dossiers Get all information from your suppliers Read Machine GET /api/collectors/{internal-id}/relations
Dossiers Get information for a specific supplier Read Machine GET accept: application/json /api/collectors/{internal-id}/relations?depositor={depositor-internal-id}
Dossiers Get information for a specific document Read User GET /api/revisions/{revision}
Dossiers Get a specific PDF file Read User GET accept: application/pdf /api/revisions/{revision}/file
Dossiers Get all current documents and dossiers for a specific supplier Read Machine GET accept: application/zip /api/collectors/{internal-id}/relations?depositor={depositor-internal-id}
Dossiers Get all modifications on your suppliers since your last update Read Machine GET /api/collectors/{internal-id}/relations?fromLastModifiedDate=2019-04-01T17:32:28Z
Reminders send reminders to all suppliers who require it Write User POST /api/collectors/{internal-id}/manual-reminds
Reminders Get a supplier’s reminder history Read Machine GET ​/api​/collectors​/{internal-id}​/reminds

OpenAPI file

Our Swagger file is available here.

Overview

The Hiveo API allows Hiveo customers to programmatically manage their own organisation and their suppliers.

Through the API you can:

  • Retrieve dossier and document statuses from your suppliers,
  • Retrieve specific files from your suppliers,
  • Invite new suppliers,
  • Remind suppliers,
  • Invite new users to your organisation,
  • And much more.

The Hiveo API is organised around REST and JSON, and uses standard HTTP response codes, verbs and authentication.

API versioning

The Hiveo API is accessed through an generic URL. If you want to call a specific version of the Hiveo API, use the x-version HTTP header to specify it. For example:

x-version:1.2

Any breaking changes to the API will be introduced through a new version number.

Non-breaking changes may be introduced without changing version. These may include additional fields to JSON data structures, optional parameters to API calls, new features that can be exposed through existing API calls, or new API calls.

Our API versioning uses 2 digits, such as major.minor (1.0, 1.1…). An increment in the major digit means that ground-breaking changes have been introduced (ex: rework on entire resources, major changes in the authentication system…).

Environnements

We provide 2 different environnements:

  1. Our staging environnment, used for testing our API
  2. Our production environnement, used for… production :)

When creating your account, we will provide credentials for both environnements.

Authentication

All endpoints of the Hiveo API require authentication.

We accept the following Oauth2 grant types:

Operations types Oauth2 grant types Label
read-only Client Credentials Grant OauthClientSecurity
write Password Grant or Authorization Code Grant OauthUserSecurity

Pagination

Many of our API resources use pagination.

You can select whatever you want to receive using page and size parameters.

Errors

Hiveo uses conventional HTTP response codes to indicate the success or failure of an API request.

In general:

  • 2xx codes indicate success,
  • 4xx codes indicate an error that failed given the information provided (e.g., a required parameter was omitted, the resource does not exist…),
  • 5xx codes indicate an error with Hiveo’s servers.
HTTP code Label Meaning
200 OK Success.
201 Created A resource has been created
202 Accepted The request has been accepted for processing, but the processing has not been completed
400 Bad Request The request was unacceptable, often due to missing a required parameter
401 Unauthorized No valid API key provided
402 Request Failed The parameters were valid but the request failed
403 Forbidden The API key doesn’t have permissions to perform the request
404 Not Found The requested resource doesn’t exist
409 Conflict The request conflicts with another request
429 Too Many Requests Too many requests hit the API too quickly
500, 502, 503, 504 Server Errors Something went wrong on Hiveo’s side

Authentication

OauthUserSecurity

Security Scheme Type OAuth2
password OAuth Flow
Token URL: https://authdev.hiveo.fr/auth/realms/hiveo/protocol/openid-connect/token
Scopes:
  • offline_access -

    offline_access

OauthClientSecurity

Security Scheme Type OAuth2
clientCredentials OAuth Flow
Token URL: https://authdev.hiveo.fr/auth/realms/hiveo/protocol/openid-connect/token
Scopes:
  • offline_access -

    offline_access

contacts

Contacts related resources

Get the contacts of an organisation

Get the contacts of a specific organisation, using its Hiveo internal ID.

Authorizations:
path Parameters
internal-id
required
string

Hiveo internal ID (-) of the organisation

query Parameters
direct
boolean
Default: false

If true, only get the direct contacts. If false, also get the parent's contacts

query
string

Term to search in the contacts list. Search works on username, email, firstName, lastName, phone, jobs

page
integer <int32>

Pagination - Page number of the requested page

size
integer <int32>

Pagination - Number of elements on each page

sort
Array of strings

Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported

Responses

200

OK

401

Unauthorized

403

Forbidden

404

The organisation cannot be found

get/api/organisations/{internal-id}/contacts
https://apidev.hiveo.fr/organisation/api/organisations/{internal-id}/contacts

documents

Document Files related resources

Get a document revision

Get a document revision. A document revision contains all metadata relative to this document.

A revision is:

  • usable if the depositor has gone through the whole upload process
  • valid if the document has passed all validation rules
  • operational if the document is valid at the specified date
Authorizations:
path Parameters
revision
required
string

Identifier of the revision

Responses

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

get/api/revisions/{revision}
https://apidev.hiveo.fr/organisation/api/revisions/{revision}

Download revision file

Get the PDF file corresponding to this specific revision.

Authorizations:
path Parameters
revision
required
string

Identifier of the revision

header Parameters
Accept-Language
string

User locale (ex: fr-FR)

Responses

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

get/api/revisions/{revision}/file
https://apidev.hiveo.fr/organisation/api/revisions/{revision}/file

Download proof file

If it exists, get the proof file corresponding to this specific revision.

Authorizations:
path Parameters
revision
required
string

Identifier of the revision

header Parameters
Accept-Language
string

User locale (ex: fr-FR)

Responses

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

get/api/revisions/{revision}/proof
https://apidev.hiveo.fr/organisation/api/revisions/{revision}/proof

invitations

Invitations related resources

Invite a depositor organisation

Invite a depositor organisation to join your network.

When successful, this will create a new relation between the selected inviting organisation (must be one of your scope, such as one of your work site) and the invited depositor organisation.

Authorizations:
Request Body schema: application/json

An invitation request, composed of:

  • An inviting organisation Hiveo internal ID
  • An invited organisation Hiveo internal ID
  • An optional internal code (user data)
  • Optional categories (user data)
  • Optional contacts to invite on this organisation
categories
Array of strings
guests
Array of objects (Guest)
internalCode
string
invitedOrganisationInternalId
string
invitingOrganisationInternalId
string

Responses

200

OK

201

Created

401

Unauthorized

403

Forbidden

404

One of the specified organisations (inviter or invitee) cannot be found

post/api/invite-depositor
https://apidev.hiveo.fr/organisation/api/invite-depositor

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "categories":
    [
    ],
  • "guests":
    [
    ],
  • "internalCode": "string",
  • "invitedOrganisationInternalId": "string",
  • "invitingOrganisationInternalId": "string"
}

Add contacts to an organisation

Invite new contacts to one of the collector's organisations. This resource is used to invite new internal contacts of your company.

Authorizations:
path Parameters
internal-id
required
string

Hiveo internal ID (-) of the organisation

Request Body schema: application/json

Contacts to invite on this organisation

guests
required
Array of objects (Guest)

Users to add to the organisation

Responses

200

OK

201

Created

401

Unauthorized

403

Forbidden

404

Not Found

post/api/organisations/{internal-id}/contacts
https://apidev.hiveo.fr/organisation/api/organisations/{internal-id}/contacts

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "guests":
    [
    ]
}

organisations

Organisations related resources

Get an organisation details

Get a specific organisation using its Hiveo internal ID.

Authorizations:
path Parameters
internal-id
required
string

Hiveo internal ID (-) of the organisation

Responses

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

get/api/organisations/{internal-id}
https://apidev.hiveo.fr/organisation/api/organisations/{internal-id}

Get an organisation direct children details

Get the direct children of a specific organisation using its Hiveo internal ID.

Authorizations:
path Parameters
internal-id
required
string

Hiveo internal ID (-) of the organisation

query Parameters
page
integer <int32>
Default: 0

Pagination - Page number of the requested page

size
integer <int32>
Default: 5

Pagination - Number of elements on each page

Responses

200

OK

401

Unauthorized

403

Forbidden

404

If the organisation can't be found

get/api/organisations/{internal-id}/children
https://apidev.hiveo.fr/organisation/api/organisations/{internal-id}/children

reminds

Reminders related resources

Send reminders to relations

Send reminders to the specified relations.

Only relations with non operational documents, or with pending contact invitations will receive reminder notifications.

Authorizations:
path Parameters
internal-id
required
string

Hiveo internal ID (-) of the collector organisation that requests the reminds

Request Body schema: application/json

query

actualDossiersToFilter
Array of integers <int64>
categories
Array of strings
collectors
Array of strings
depositors
Array of strings
filterDate
string <date-time>
filterDossiers
Array of integers <int64>
onlyHasExempted
boolean
onlyNoRegisteredContact
boolean
onlyNotOperational
boolean
onlyOperational
boolean
providers
Array of strings
query
string

Responses

200

OK

201

Created

401

Unauthorized

403

Forbidden

404

Not Found

post/api/collectors/{internal-id}/manual-reminds
https://apidev.hiveo.fr/organisation/api/collectors/{internal-id}/manual-reminds

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "actualDossiersToFilter":
    [
    ],
  • "categories":
    [
    ],
  • "collectors":
    [
    ],
  • "depositors":
    [
    ],
  • "filterDate": "2020-07-10T10:38:27Z",
  • "filterDossiers":
    [
    ],
  • "onlyHasExempted": true,
  • "onlyNoRegisteredContact": true,
  • "onlyNotOperational": true,
  • "onlyOperational": true,
  • "providers":
    [
    ],
  • "query": "string"
}

Get reminder history

Get the reminders history of a specific organisation.

Authorizations:
path Parameters
internal-id
required
string

Hiveo internal ID (-) of the collector organisation

query Parameters
depositor
string

Hiveo internal ID (-) of the depositor organisation whose reminds history is requested

page
integer <int32>
Default: 0

Pagination - Page number of the requested page

size
integer <int32>
Default: 10

Pagination - Number of elements on each page

Responses

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

get/api/collectors/{internal-id}/reminds
https://apidev.hiveo.fr/organisation/api/collectors/{internal-id}/reminds

relations

Relations related resources

Get existing relations for a collector organisation

Get all your relations at once. With this resource you can:

  • Get all your relations, or a subset of them
  • Get all changes since a previous date
  • Get your relations dossiers and documents statuses

Use:

  • application/zip to export relation files (*.zip)
  • application/pdf to get your relations' conformity certificates (*.pdf)
Authorizations:
path Parameters
internal-id
required
string

Hiveo internal ID (-) of the collector organisation

query Parameters
fromLastModifiedDate
string <date-time>

Get all modifications on relations that have occured since the given date

filterDate
string

Get relations statuses at the given date

filterDossiers
string

Id of the dossiers to search for not operational relations. If not setted, will search on all selected dossiers for the relation

onlyNoRegisteredContact
string

Only get relations without active contacts

onlyHasExempted
string

Only get relations with at least one operational exempted revision

onlyOperational
string

Only get operational relations on requested dossiers

onlyNotOperational
string

Only get not operational relations on requested dossiers

categories
string

Only get relations with the specified categories

depositors
string

Only get relations corresponding to these Hiveo internal ID (-)

providers
string

Only get relations with at least one document from this external provider

query
string

Terms to search in the relation

page
integer <int32>

Pagination - Page number of the requested page

size
integer <int32>

Pagination - Number of elements on each page

sort
Array of strings

Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

header Parameters
Accept-Language
string

User locale (ex: fr-FR)

Responses

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

get/api/collectors/{internal-id}/relations
https://apidev.hiveo.fr/organisation/api/collectors/{internal-id}/relations

Response samples

Content type
Copy
Expand all Collapse all
{
  • "content":
    [
    ],
  • "first": true,
  • "last": true,
  • "number": 0,
  • "numberOfElements": 0,
  • "size": 0,
  • "sort": { },
  • "totalElements": 0,
  • "totalPages": 0
}