Trackdéchets Developer Documentation
website·Indexed 18 days ago
https://developers.trackdechets.beta.gouv.fr/Technical documentation for the Trackdéchets API, featuring a GraphQL-based interface. It includes guides on authentication via access tokens, a GraphQL playground, and detailed reference materials for waste tracking schemas such as BSDD, BSFF, BSVHU, and BSPAOH. The documentation provides validation rules, query filters, and practical examples for scenarios like multi-modal transport, provisional storage, and waste grouping.
What's inside Trackdéchets API
- Trackdéchets is a free digital platform developed by the French Ministry of Ecological Transition to digitize the traceability of hazardous waste. It provides a GraphQL API that allows existing information systems (business software or commercial software) across the waste traceability chain to interconnect and exchange standardized data.
Overview of Trackdéchets Webhooks
Webhooks allow a user's Information System (IS) to receive notifications when a waste tracking document (BSD) associated with them is created, modified, or deleted. This reduces the need for periodic polling of the Trackdéchets API.Define waste emitter details with BsffEmitterInput
TheBsffEmitterInputobject is used to provide information about the entity emitting the waste, including the associated company and optional custom information.input BsffEmitterInput { company: CompanyInput customInfo: String # Free text field (Max 250 chars) }Define an AcceptedFormInput object
The
AcceptedFormInputobject is used to specify the details of a waste tracking form. It includes information about the waste producer, the destination facility, transporters, and waste characteristics.Key constraints:
- Direct Supply: If
isDirectSupplyis set totrue, no transporter or packaging information (wasteDetails.packagingInfos) should be provided. - Transporters: The
transporterslist contains IDs in the order of waste handling. It must contain exactly one ID for direct shipment and a maximum of 5 IDs for multi-modal transport. Transporters are managed viacreateFormTransporter,updateFormTransporter, anddeleteFormTransportermutations. - Intermediaries: A maximum of 3 intermediary companies (entities involved in management but not traceability responsibility) can be added. These entities can read the form without signing it.
{ "id": "ID", "customId": "String", "emitter": "EmitterInput", "recipient": "RecipientInput", "transporter": "TransporterInput", "isDirectSupply": "Boolean", "transporters": ["ID!"], "wasteDetails": "WasteDetailsInput", "trader": "TraderInput", "broker": "BrokerInput", "grouping": ["InitialFormFractionInput!"], "ecoOrganisme": "EcoOrganismeInput", "temporaryStorageDetail": "TemporaryStorageDetailInput", "intermediaries": ["CompanyInput!"] }- Direct Supply: If
CompanyPrivate object schema
TheCompanyPrivateobject contains detailed administrative and operational information about a company within the Trackdéchets system, including identification numbers, contact details, and regulatory certifications. It is used to manage the private profile of an establishment.# Fields for CompanyPrivate { id: ID! companyTypes: [CompanyType!]! collectorTypes: [CollectorType!]! wasteProcessorTypes: [WasteProcessorType!]! wasteVehiclesTypes: [WasteVehiclesType!]! gerepId: String securityCode: Int! verificationStatus: CompanyVerificationStatus! contact: String contactEmail: String contactPhone: String website: String users: [CompanyMember!] userRole: UserRole userPermissions: [UserPermission!]! userNotifications: UserNotifications! ecoOrganismePartnersIds: [String!]! givenName: String orgId: String! siret: String vatNumber: String address: String name: String naf: String libelleNaf: String installation: Installation transporterReceipt: TransporterReceipt traderReceipt: TraderReceipt brokerReceipt: BrokerReceipt vhuAgrementDemolisseur: VhuAgrement vhuAgrementBroyeur: VhuAgrement }Retrieve authenticated user details via me
Themequery returns information about the currently authenticated user.Access form metadata via FormMetadata
TheFormMetadataobject provides additional information about a form. Note thatlatestRevisionis currently marked as EXPERIMENTAL and should not be used.interface FormMetadata { latestRevision: FormRevisionRequest; // EXPERIMENTAL - Do not use }Manage waste tracking documents for DASRI, asbestos, VHU, and Refrigerant Fluids
The API operational mode for DASRI, asbestos, VHU (ELV), and Refrigerant Fluid documents differs from the standard BSDD. Key differences include:
- The
idfield serves as the human-readable identifier (there is no separatereadableId). - Draft status is managed via a boolean
isDraftrather than a specific status value. - The draft stage is optional.
- The
Data schema for AddRegistryLine
TheAddRegistryLineobject defines the required and optional fields for adding a registry line in theregistreV2API. It captures detailed information about waste types, quantities, dates, and the entities involved in the waste transfer chain (initial emitter, emitter, broker, trader, and recipient).# Key fields for AddRegistryLine { publicId: ID! # Unique identifier reportAsCompanySiret: String # SIRET of the declarant reportForCompanySiret: String! # SIRET of the recipient wasteDescription: String! # Common name of excavated earth, sediments, or waste wasteCode: String # Waste code wasteCodeBale: String # Basel waste code wastePop: Boolean! # POP indicator wasteIsDangerous: Boolean # Dangerous waste indicator wasteDap: String # DAP receptionDate: DateTime! # Date of reception weightValue: Float! # Weight in tonnes weightIsEstimate: Boolean! # Weight type (estimate or actual) volume: Float # Volume in M3 parcelInseeCodes: [String!] # INSEE codes of the parcels parcelNumbers: [String!] # Parcel number(s) parcelCoordinates: [String!] # Parcel coordinates sisIdentifier: String # SIS identifier of the land initialEmitterCompanyType: RegistryCompanyType # Type of initial producer initialEmitterCompanyOrgId: String # Identification number of initial producer initialEmitterCompanyName: String # Company name of initial producer initialEmitterCompanyAddress: String # Address of initial producer initialEmitterCompanyPostalCode: String # Postal code of initial producer initialEmitterCompanyCity: String # City of initial producer initialEmitterCompanyCountryCode: String # Country code of initial producer initialEmitterMunicipalitiesInseeCodes: [String!] # INSEE code(s) of municipality(ies) emitterCompanyType: RegistryCompanyType! # Type of sender or holder emitterCompanyOrgId: String # Identification number of sender or holder emitterCompanyName: String # Company name of sender or holder emitterCompanyAddress: String # Address of sender or holder emitterCompanyPostalCode: String # Postal code of sender or holder emitterCompanyCity: String # City of sender or holder emitterCompanyCountryCode: String # Country code of sender or holder emitterPickupSiteName: String # Reference of the sender's site or collection point emitterPickupSiteAddress: String # Address of the sender's site or collection point emitterPickupSitePostalCode: String # Postal code of the sender's site or collection point emitterPickupSiteCity: String # City of the sender's site or collection point emitterPickupSiteCountryCode: String # Country code of the sender's site or collection point ecoOrganismeSiret: String # SIRET of the eco-organism ecoOrganismeName: String # Company name of the eco-organism brokerCompanySiret: String # SIRET of the broker brokerCompanyName: String # Company name of the broker brokerRecepisseNumber: String # Broker receipt number traderCompanySiret: String # SIRET of the trader traderCompanyName: String # Company name of the trader traderRecepisseNumber: String # Trader receipt number operationCode: String! # Treatment code performed operationMode: OperationMode # Treatment mode noTraceability: Boolean # Traceability break authorized ttdImportNumber: String # Import notification or declaration number }Define the AcceptedFormInput object for BSDD API
TheAcceptedFormInputobject is used to provide details about the processing and destination of waste. It includes requirements for processing operations, destination parcel identification (via INSEE codes, parcel numbers, or coordinates), and processing metadata.{ processingOperationDone: string; // Required. Treatment performed (code D/R). Max 250 chars. destinationOperationMode: OperationMode; // Required. Treatment mode. isUpcycled: boolean; // Optional. Indicates if soil was recovered (Terre valorisée). destinationParcelInseeCodes: string[]; // Optional. INSEE codes of parcels (5 characters each, e.g., "96140"). destinationParcelNumbers: string[]; // Optional. Parcel numbers in format [prefix]-[section]-[number] (e.g., "123-A-4567"). destinationParcelCoordinates: string[]; // Optional. Coordinates in degrees with a space separator (e.g., "48.894258 2.240027"). processingOperationDescription: string; // Optional. Description of elimination/recovery operation. Max 250 chars. processedBy: string; // Required. Person in charge of treatment. Max 250 chars. processedAt: DateTime; // Required. Date when the waste was treated. }BsvhuBroker object schema
TheBsvhuBrokerobject provides details about the broker involved in the VHU waste tracking process, including the company's contact information and the broker's receipt.BsvhuBroker { company: FormCompany recepisse: BsvhuRecepisse }Define a pickup site using PickupSiteInput
ThePickupSiteInputobject is used to provide details about a construction site or pickup location. All fields have a maximum length of 250 characters.{ "name": "Site Name", "address": "123 Street Name", "city": "City Name", "postalCode": "75000", "infos": "Additional site information" }