Create waste forms
Introduction
You can use Dashdoc Wam API to create waste forms from your own software.
β οΈ A form created via API must then be signed in Dashdoc Wam web application. It can not be signed using the API.
Creating forms requires several steps:
companies that appear on the form have to be existing (see Β§1 below)
additional details on companies that are specific to the waste activity must be set (see Β§1 below)
contacts must be existing (see Β§2 below)
finally the waste form can be created with a combination of those existing companies and contacts (see Β§3 below)
and the waste loads can be detailed and linked to the form (see Β§4 below)
1 - Managing companies
Reminder
During the waste form initialization in Dashdoc Wam you have to pick 4 companies as producer, organizer, carrier and processor. Organizer is always your own own company, even if you're a producer and have your own arrangements for the transport or you waste. In this case, the organizer is filled but won't appear on the PDF document.
All companies available are visible in the "address book" in Dashdoc TMS.
Though they have additional properties specifically for the needs of waste form. Those additional information can only bee seen in Wam.
The list of extra information available in Wam is:
Type of actor :
options "waste producer", "organizer", "waste processor" are only available in the details of a company in Wam
Administrative numbers:
any company you select must have at least one valid administrative number (this will be checked when you sign the form as organizer)
there are different kind of administrative number that can be used as "VAT number", "entreprise number", "EORI number" and more. The list of possible number depends on the roles of the company that are selected with tags in the "Type of actor list"
Creating companies
If you want to create a waste form and one of the producer, carrier or processor company is not existing in the address book, you need to create it first. To do so, just use the main endpoint on companies, that is part of the TMS API : /v4/companies/. Send a POST request to create the company. You can also update the company later if required.
Payload exemple
Adding mandatory details for waste forms
Legal constraints on digital waste identification forms forces to have at least one identification number for each company on the form. The possible kind of identification number accepted vary on the role of the company among "producer", "organizer", "carrier", "processor". So you need to give companies one or many role and identification number. Here is a recap of accepted identification number by role:
type of number / role | for waste producers | for transport organizers | for carriers | for waste processors |
---|---|---|---|---|
VAT number | YES | YES | YES | YES |
Belgian enterprise number | YES | YES | YES | YES |
EORI number | YES | YES | YES | YES |
establishment unit number | YES | NO | NO | YES |
Sea ship number if the producer is a ship | YES | NO | NO | NO |
Citizen if the producer is a private person | YES | NO | NO | NO |
As these information are specific to waste forms, they do not appear in the TMS and are not manageable with the main endpoint on companies. To set those specific details on companies, you need to use the /v4/wam/companies/{pk}/details/ endpoint. You can set the details and change it later if required.
Payload exemple
2 - Manage contacts
Digital waste identification form will be sent to the producer and the processor at some stage. Validation and signature links can also be sent to some actors during the lifecycle of the waste form. To enable this, some contacts are required in the details of the waste form for Dashdoc Wam to work properly. Contacts can be created and updated using the endpoint /v4/wam/contacts/
3 - Create a waste form
To create a digital waste identification form, send a POST on the /v4/wam/forms/ endpoint. The payload is built with a combination of ids of companies and uids of contacts already existing (see Β§1 and 2)
All companies (producer, organizer, carrier and processor) are mandatory.
βοΈTo find your own company id, you can check if you have at least one form existing in the web application or create a draft form in the web application, then send a GET request on /v4/wam/forms. You will then see your own company id in the organizer_id
field of any form in the response body.
Mandatory contacts are :
the producer contact who will receive a copy of the form after loading and after final signature by the processor
the processor contact who will receive the final version of the document
Addtional contact can be set:
the processor signatory who will receive a email to validate the loads ang apply final signature on the waste from, after the unloading is done and the trucker has left the site. If that person is the same as the processor contact, then no need to fill it and the signature request email will be sent the processor contact. If it is another person, then just fill it.
Payload exemple:
4 - Add loads on a waste form
When the structure of the waste form is created, you need to send more request to add the loads details on the form. You can add one or multiple loads. To add a load, send a POST request on /v4/wam/forms/{form-uid}/loads/. The load will be added to the waste form targeted in the URL with its uid. If you need to add more that one load, send additionnal request for each load.
Payload exemple:
You can access all loads of a waste form by sending a GET request on the same endpoint with the uid of the waste form in the URL.
exemple : https://api.dashdoc.eu/api/v4/wam/forms/9be1bd0c-8f55-4825-9d64-116f611070d2/loads/
Last updated