Directory
B2Brouter Directory API
The B2Brouter Directory is a curated list of entities. Entities are mostly Invoice receivers. B2Brouter uses this directory to assign the correct Document type and Transport type to a Contact. B2Brouter App has the directory already integrated for Contact creation, but to use the directory in your application you must relay on this API.
The B2Brouter Directory API does not allow enumeration of entities. You can only query a receiver if you already know its country and identifier:
- Country: The country of the entity. You can list all the available countries and their codes through API here.
- Scheme: The EAS (Electronic Address Scheme) of the entity. To list entity schemes in B2Brouter you can use the Schemes API.
- Id: The identifier of the entity that can be a Tax Identification Number or any other identifier corresponding to the scheme or country.
Entity lookup
To obtain information about the transport method and document types that a entity can receive, perform a Lookup in our directory. If the entity is listed, you will receive a JSON response containing basic entity details and specific information about document reception.
The response will include a key for each document type, such as Invoice, Order, Despatch Advice, etc. Each document will have the following details:
- transport_type_code to identify the transport most commonly used to send documents to the entity.
- document_type_code to identify the most appropriate document type for sending documents.
- other_document_type_codes, an array of other document types that the entity can receive.
For clients using Peppol, you can perform a Lookup in our directory to list all the available Peppol document types that your client uses. Keep in mind that in case of transport type Peppol, the list of other document type codes may contain document types that B2Brouter is not able to generate. You can list all the document types that B2Brouter supports here.
Country specific routing codes
Some public entities that have organizational units or offices may have special codes. If you want to send an Invoice to public administration you may need to use those codes.
Different countries use different number of codes to designate public entities and offices. B2Brouter uses fields cinX_scheme and cinX_value for routing codes, where X is a number that can go from 1 to 5. The meaning of a value depends on its scheme.
Note: 8xxx schemes are not part of the EAS code list. This range is specific to B2Brouter.
Spain (DIR3 / DIRe)
Spanish public entities use DIR3 (scheme 8014) routing codes:
- cin1_value: Accounting office (Oficina contable)
- cin2_value: Managing body (Órgano gestor)
- cin3_value: Processing unit (Unidad tramitadora)
- cin4_value: Proposing body (Órgano proponente)
Spanish private entities use DIRe (scheme 8015) routing codes:
- cin5_value: DIRe code (Código DIRe)
France
French companies or public entities may use code service (scheme 8017). Learn more
- cin1_value: Code service
Croatia
Croatian entities may use Croatian internal code business unit (cicbu) (scheme 8016)
- cin1_value: cicbu
EDIFACT routing codes
EDIFACT uses GLN codes (scheme 0088):
- cin1_value: Buyer (Comprador)
- cin2_value: Delivery place (Lugar de entrega)
- cin3_value: Invoice receiver (Receptor de la factura)
- cin4_value: Payer (Pagador)
- cin5_value: Final recipient (Destinatario final)
Updated 3 months ago