The documents

The documents

Description

In Chouette, you can create documents linked to your offer. These documents can be timetables for your lines, images, etc.

Creation of a document type

Each document created in Chouette must have a type. Document types are managed at Workgroup level in the ‘Document types’ block:

This section is available only to administrators of the Workgroup.

For every document type: name, short name, description, document count, are displayed.

For each Document Type, a gearwheel is used to launch the available actions:

  • Show this document type

  • Edit this document type

  • Delete this document type

To create a new document type, click on ‘Create a Document Type’ at the top right of the page:

You then define the name, short name and description of the type of document created:

Once validated, the document type is created and can be viewed and edited:

Creation of a document

Users of a Workbench are responsible for creating documents relating to their offer.

You can check the list of documents created in your Workbench:

For each document you create, a gearwheel allows you to view, edit or delete the document:

To add a document, click on ‘Create a Document’ at the top right of the page.

In the edit form, fill in the information relating to your document.

In the ‘Identification’ block :

You must enter the name of the document being created and assign it a document type.

You can define a validity period for your document:

01e04abd-8a77-467f-8bc5-86c9ba594fab.png

In the ‘Content’ block, select the document from your directory and add a description:

You can define the document provider and add a code :

 

After validation, your document is created. A summary of the document appears with a preview if it is an image. You can edit or delete your document.

Associate a document to a line

Once you have created your documents, you can associate them with the corresponding lines.

To associate a document with a line, go to the line record in the repository and click on ‘Associate other documents’:

You are redirected to the document selection page. The upper part of the page shows the documents already associated with the line. A cogwheel allows you to dissociate the document in question:

The lower part of the page corresponds to the documents not associated with the line and available in your Workbench. For each document in the list, a cogwheel allows you to associate it with a line:

Once the document has been linked, it moves to the top section of the page with a confirmation message:

Associate a document to a stop

Once you have created your documents, you can associate them with the corresponding stops.

To associate a document with a stop, go to the stop record in the referential and click on the ‘Associate other documents’ button:

You will be redirected to the document association page:

Use the cogwheel to associate one or more documents with your stop:

After association, the stop record is updated, displaying the associated documents:

To open the associated document record, click on its name. Here you can edit, download or delete the document:

To dissociate a document, return to the ‘Associate Documents’ page using the ‘Link other documents’ button, click on the cogwheel of a linked document, then on ‘Dissociate’:

Associating a document with a company

Once you have created your documents, you can associate them with the corresponding companies.

To associate a document with a company, go to the company record in the line referential and click on the ‘Associate other documents’ button:

You will be redirected to the document association page:

Use the cogwheel to link one or more documents to your carrier:

After association, the carrier record is updated, displaying the associated documents:

To open the associated document page, click on its name. Here you can edit, download or delete the document:

To dissociate a document, return to the ‘Associate Documents’ page using the ‘Associate other documents’ button, click on the cogwheel of a linked document, then on ‘Unlink’:

Document Providers

Each document must belong to a provider. It is up to the user of a Workbench to create document providers in relation to their offer.

You can check the list of document providers created in your Workbench:

For each provider: the name, short name, number of documents and workbench are displayed.

A cogwheel lets you display, edit or delete the document provider:

To add a provider, click on the ‘Create a Document Provider’ button at the top right of the page.

In the edit form, you need to give your provider a name and a short name.

Once the form has been validated, your provider is created, it appears in the list of document providers and can be used to create documents.

Publication of documents via API

The documents associated with the lines can be retrieved via a Publication API set up in your Workgroup.

The description and use of this API (among others) is available in many languages via our Postman documentation.

Retrieving documents

To retrieve your documents published via API, simply use the following endpoint:

# Line /api/v1/datas/<publication api>/lines/<registration number>/documents/<document_type> # Stop Area /api/v1/datas/<publication api>/stop_areas/<registration number>/documents/<document_type> # Company /api/v1/datas/<publication api>/companies/<registration number>/documents/<document_type> # On a specific date /api/v1/datas/<publication api>/companies/<registration number>/documents/<document_type>?valid_on=<date>
  • <publication api> must be replaced by the short name of your publication API

  • <registration number> must be replaced by the registration number of your line. In reference to GTFS, this corresponds to route_id.

  • <document_type> must be replaced by the short name of the document type of the desired document.

  • <date> must be replaced by the validity date of the desired document. This date must be in YYYY-MM-DD format.

For example, using the endpoint :

/api/v1/datas/GTFS/lines/230/documents/fiche_horaire?valid_on=2024-05-22

⇒ The ‘GTFS’ Publication API is used to retrieve the ‘timetable’ document type associated with the ‘302’ line, which is valid on 22 May 2024.

If a line is associated with several documents, only the last document updated with the correct type and validity date will be retrieved.

 

Looking for labels? They can now be found in the details panel on the floating action bar.

Related content