{
  "openapi": "3.1.0",
  "info": {
    "title": "Panspectra EUDR API",
    "description": "Check plots for deforestation, read their results, record the organisation's conclusions and file due diligence statements in the EU Information System. The guide is at https://eudr-api.panspectra.com/.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://eudr-api.panspectra.com"
    }
  ],
  "paths": {
    "/v1/assessments/quote": {
      "post": {
        "tags": [
          "Plots"
        ],
        "summary": "Quote a send",
        "description": "What sending the plots would use of the plan, creating nothing: each plot as the intake reads it, the plots a send leaves out (those being checked already, and those checked today as they are now), and the plan's figures. Any key.",
        "operationId": "quotePlots",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Plots"
              },
              "example": {
                "plots": {
                  "features": [
                    {
                      "geometry": {
                        "coordinates": [
                          [
                            [
                              -54.196000000000005,
                              -10.0
                            ],
                            [
                              -54.196000000000005,
                              -9.996
                            ],
                            [
                              -54.2,
                              -9.996
                            ],
                            [
                              -54.2,
                              -10.0
                            ],
                            [
                              -54.196000000000005,
                              -10.0
                            ]
                          ]
                        ],
                        "type": "Polygon"
                      },
                      "properties": {
                        "commodity": "soya",
                        "country": "BR",
                        "plot_id": "FARM-7",
                        "supplier": "Coop Norte"
                      },
                      "type": "Feature"
                    },
                    {
                      "geometry": {
                        "coordinates": [
                          [
                            [
                              -54.096000000000004,
                              -10.0
                            ],
                            [
                              -54.096000000000004,
                              -9.996
                            ],
                            [
                              -54.1,
                              -9.996
                            ],
                            [
                              -54.1,
                              -10.0
                            ],
                            [
                              -54.096000000000004,
                              -10.0
                            ]
                          ]
                        ],
                        "type": "Polygon"
                      },
                      "properties": {
                        "commodity": "soya",
                        "country": "BR",
                        "plot_id": "FARM-9",
                        "supplier": "Coop Norte"
                      },
                      "type": "Feature"
                    }
                  ],
                  "type": "FeatureCollection"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quoted"
                },
                "example": {
                  "allowance": {
                    "basis": "per_plot",
                    "charge_cents": 0,
                    "contract_year": 1,
                    "counted": 2,
                    "currency": "EUR",
                    "free": 0,
                    "granted": 0,
                    "included": null,
                    "overage": 0,
                    "pending_before": 0,
                    "plan": {
                      "id": "pay_as_you_go",
                      "name": "Pay as you go"
                    },
                    "plots": 2,
                    "rejected": 0,
                    "remaining_after": null,
                    "remaining_before": null,
                    "repeated": 0,
                    "standing": "per_plot",
                    "unit_price_cents": 0,
                    "used_after": null,
                    "used_before": null,
                    "within": null,
                    "year_end": "2027-11-07",
                    "year_start": "2026-11-08"
                  },
                  "left_out": [],
                  "plots": [
                    {
                      "notices": [],
                      "plot_id": "FARM-7",
                      "problems": [],
                      "valid": true
                    },
                    {
                      "notices": [],
                      "plot_id": "FARM-9",
                      "problems": [],
                      "valid": true
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "A refusal, in one form: its code from a fixed list, its message, the fields refused and the request's id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assessments": {
      "post": {
        "tags": [
          "Plots"
        ],
        "summary": "Send plots to be checked",
        "description": "Each plot sent becomes an assessment of its own, numbered on the plot; a plot named that the send does not take is named in left_out, with why. Plots beyond the plan's allowance need the consent to exactly the figures their quote gave. Safe to retry with an Idempotency-Key. An editor's key.",
        "operationId": "sendPlots",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Makes a retried send safe: the same key and body answer with the assessments the first made.",
              "title": "Idempotency-Key"
            },
            "description": "Makes a retried send safe: the same key and body answer with the assessments the first made."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Send"
              },
              "example": {
                "plots": {
                  "features": [
                    {
                      "geometry": {
                        "coordinates": [
                          [
                            [
                              -54.196000000000005,
                              -10.0
                            ],
                            [
                              -54.196000000000005,
                              -9.996
                            ],
                            [
                              -54.2,
                              -9.996
                            ],
                            [
                              -54.2,
                              -10.0
                            ],
                            [
                              -54.196000000000005,
                              -10.0
                            ]
                          ]
                        ],
                        "type": "Polygon"
                      },
                      "properties": {
                        "commodity": "soya",
                        "country": "BR",
                        "plot_id": "FARM-7",
                        "supplier": "Coop Norte"
                      },
                      "type": "Feature"
                    },
                    {
                      "geometry": {
                        "coordinates": [
                          [
                            [
                              -54.096000000000004,
                              -10.0
                            ],
                            [
                              -54.096000000000004,
                              -9.996
                            ],
                            [
                              -54.1,
                              -9.996
                            ],
                            [
                              -54.1,
                              -10.0
                            ],
                            [
                              -54.096000000000004,
                              -10.0
                            ]
                          ]
                        ],
                        "type": "Polygon"
                      },
                      "properties": {
                        "commodity": "soya",
                        "country": "BR",
                        "plot_id": "FARM-9",
                        "supplier": "Coop Norte"
                      },
                      "type": "Feature"
                    }
                  ],
                  "type": "FeatureCollection"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sent"
                }
              }
            },
            "description": "The same request again under its Idempotency-Key: what the first made, nothing sent again."
          },
          "201": {
            "description": "The plots sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sent"
                },
                "example": {
                  "allowance": {
                    "basis": "per_plot",
                    "charge_cents": 0,
                    "contract_year": 1,
                    "counted": 2,
                    "currency": "EUR",
                    "free": 0,
                    "granted": 0,
                    "included": null,
                    "overage": 0,
                    "pending_before": 0,
                    "plan": {
                      "id": "pay_as_you_go",
                      "name": "Pay as you go"
                    },
                    "plots": 2,
                    "rejected": 0,
                    "remaining_after": null,
                    "remaining_before": null,
                    "repeated": 0,
                    "standing": "per_plot",
                    "unit_price_cents": 0,
                    "used_after": null,
                    "used_before": null,
                    "within": null,
                    "year_end": "2027-11-07",
                    "year_start": "2026-11-08"
                  },
                  "assessments": [
                    {
                      "assessment_id": "asm-000000000004",
                      "number": 1,
                      "plot_id": "FARM-7",
                      "status": "in_progress"
                    },
                    {
                      "assessment_id": "asm-000000000001",
                      "number": 1,
                      "plot_id": "FARM-9",
                      "status": "in_progress"
                    }
                  ],
                  "left_out": [],
                  "plots": [
                    {
                      "notices": [],
                      "plot_id": "FARM-7",
                      "problems": [],
                      "valid": true
                    },
                    {
                      "notices": [],
                      "plot_id": "FARM-9",
                      "problems": [],
                      "valid": true
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "A refusal, in one form: its code from a fixed list, its message, the fields refused and the request's id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/plots": {
      "get": {
        "tags": [
          "Plots"
        ],
        "summary": "List the plots",
        "description": "The organisation's plots in the order of their references, a page at a time; with changed_since, those changed since a moment of our clock: a page's as_of, less a few minutes. Any key.",
        "operationId": "listPlots",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "not_checked",
                    "in_progress",
                    "done"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "not_checked, in_progress or done.",
              "title": "Status"
            },
            "description": "not_checked, in_progress or done."
          },
          {
            "name": "commodity",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Commodity"
            },
            "description": "The commodity: cattle, cocoa, coffee, oil_palm, rubber, soya or wood."
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Two letters, ISO 3166.",
              "title": "Country"
            },
            "description": "Two letters, ISO 3166."
          },
          {
            "name": "changed_since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the plots whose status, result, conclusion or filing changed after this moment, by our clock (updated_at): the as_of of the last page read, less a few minutes.",
              "title": "Changed Since"
            },
            "description": "Only the plots whose status, result, conclusion or filing changed after this moment, by our clock (updated_at): the as_of of the last page read, less a few minutes."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            },
            "description": "How many items a page holds: 100 unless asked, 1,000 at most."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The page's next.",
              "title": "Cursor"
            },
            "description": "The page's next."
          }
        ],
        "responses": {
          "200": {
            "description": "Done.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlotPage"
                },
                "example": {
                  "as_of": "2026-11-02T09:00:00+00:00",
                  "items": [
                    {
                      "commodity": "soya",
                      "conclusion_risk": null,
                      "country": "BR",
                      "filing": {
                        "ready": true,
                        "until": "2027-01-31",
                        "why": null
                      },
                      "latest": {
                        "assessment_id": "asm-000000000004",
                        "period_end": "2026-11-02",
                        "result": "no_deforestation_found"
                      },
                      "number": 1,
                      "plot_id": "FARM-7",
                      "status": "done",
                      "supplier": "Coop Norte",
                      "updated_at": "2026-11-02T09:00:00+00:00"
                    },
                    {
                      "commodity": "soya",
                      "conclusion_risk": "negligible",
                      "country": "BR",
                      "filing": {
                        "ready": true,
                        "until": "2027-01-31",
                        "why": null
                      },
                      "latest": {
                        "assessment_id": "asm-000000000001",
                        "period_end": "2026-11-02",
                        "result": "supplier_evidence_needed"
                      },
                      "number": 2,
                      "plot_id": "FARM-9",
                      "status": "done",
                      "supplier": "Coop Norte",
                      "updated_at": "2026-11-02T09:00:00+00:00"
                    }
                  ],
                  "next": null
                }
              }
            }
          },
          "default": {
            "description": "A refusal, in one form: its code from a fixed list, its message, the fields refused and the request's id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/plots/{plot_id}": {
      "get": {
        "tags": [
          "Plots"
        ],
        "summary": "Read a plot",
        "description": "A plot: its latest assessment that stands, the organisation's conclusion, and whether a statement may file it now. Any key.",
        "operationId": "getPlot",
        "parameters": [
          {
            "name": "plot_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Plot Id"
            },
            "description": "The plot, by the organisation's reference."
          }
        ],
        "responses": {
          "200": {
            "description": "Done.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plot"
                },
                "example": {
                  "commodity": "soya",
                  "conclusion_risk": "negligible",
                  "country": "BR",
                  "filing": {
                    "ready": true,
                    "until": "2027-01-31",
                    "why": null
                  },
                  "latest": {
                    "assessment_id": "asm-000000000001",
                    "period_end": "2026-11-02",
                    "result": "supplier_evidence_needed"
                  },
                  "number": 2,
                  "plot_id": "FARM-9",
                  "status": "done",
                  "supplier": "Coop Norte",
                  "updated_at": "2026-11-02T09:00:00+00:00"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, in one form: its code from a fixed list, its message, the fields refused and the request's id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assessments/{assessment_id}": {
      "get": {
        "tags": [
          "Assessments"
        ],
        "summary": "Read an assessment",
        "description": "An assessment: its status, its current report's result, the questions it leaves for the supplier in the language asked for, and the organisation's conclusion. Any key.",
        "operationId": "getAssessment",
        "parameters": [
          {
            "name": "assessment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Assessment Id"
            },
            "description": "The assessment."
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "en",
                    "fr",
                    "es",
                    "pt",
                    "id",
                    "vi"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The supplier's language for the questions; English by default.",
              "title": "Lang"
            },
            "description": "The supplier's language for the questions; English by default."
          }
        ],
        "responses": {
          "200": {
            "description": "Done.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Assessment"
                },
                "example": {
                  "assessment_id": "asm-000000000001",
                  "conclusion": null,
                  "number": 1,
                  "pdf_sha256": "8ee89711330c1ccf39a2e65ad12bbd7df4a4a2ee857f53b4823f00fecb7bd252",
                  "pdf_url": "https://eudr-api.panspectra.com/v1/assessments/asm-000000000001/pdf",
                  "plot_id": "FARM-9",
                  "questions": [
                    {
                      "answered": false,
                      "ask": "What happened to this ground, and has it been used for agriculture since?",
                      "code": "explain_clearing",
                      "english": null,
                      "events": [
                        1
                      ],
                      "settles": "Evidence that it is growing back with no farming over two seasons; of a use other than farming that explains the whole area, such as a road, a reservoir or buildings; or a planting record showing that the trees there were a crop planted before 2021."
                    }
                  ],
                  "result": {
                    "assessed_at": "2026-11-02T09:00:00+00:00",
                    "assessment": 1,
                    "changed_area_ha": 3.61,
                    "changes": [
                      {
                        "area_ha": 3.61,
                        "centre": [
                          -54.098018,
                          -9.997944
                        ],
                        "cleared_from": "2023-02",
                        "cleared_to": "2023-03",
                        "number": 1,
                        "outline": {
                          "coordinates": [
                            [
                              [
                                -54.0971591,
                                -9.9970785
                              ],
                              [
                                -54.0988905,
                                -9.9970936
                              ],
                              [
                                -54.0988753,
                                -9.9988099
                              ],
                              [
                                -54.0971439,
                                -9.9987948
                              ],
                              [
                                -54.0971591,
                                -9.9970785
                              ]
                            ]
                          ],
                          "type": "Polygon"
                        }
                      }
                    ],
                    "period_end": "2026-11-02",
                    "period_start": "2020-12-31",
                    "plot_id": "FARM-9",
                    "problems": [],
                    "result": "supplier_evidence_needed",
                    "schema_version": "1.0",
                    "unseen_forest_ha": null,
                    "verification_code": "0e8f7f17837b6871",
                    "version": 1
                  },
                  "sent_at": "2026-11-02T09:00:00+00:00",
                  "status": "done",
                  "updated_at": "2026-11-02T09:00:00+00:00",
                  "verify_url": "https://panspectra.com/eudr/verify/0e8f7f17837b6871"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, in one form: its code from a fixed list, its message, the fields refused and the request's id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assessments/{assessment_id}/pdf": {
      "get": {
        "tags": [
          "Assessments"
        ],
        "summary": "Download its report",
        "description": "The assessment's current report, as a PDF. Any key.",
        "operationId": "getAssessmentPdf",
        "parameters": [
          {
            "name": "assessment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Assessment Id"
            },
            "description": "The assessment."
          }
        ],
        "responses": {
          "200": {
            "description": "Done.",
            "content": {
              "application/pdf": {}
            }
          },
          "default": {
            "description": "A refusal, in one form: its code from a fixed list, its message, the fields refused and the request's id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assessments/{assessment_id}/conclusion": {
      "post": {
        "tags": [
          "Assessments"
        ],
        "summary": "Record a conclusion",
        "description": "The organisation's conclusion on a result that asked for the supplier's evidence, with the evidence it rests on, as a form (multipart/form-data), made on the result's version it names: one replaced since is refused, result_changed. A later one on the same report replaces it, both kept. Safe to retry with an Idempotency-Key. An editor's key.",
        "operationId": "concludeAssessment",
        "parameters": [
          {
            "name": "assessment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Assessment Id"
            },
            "description": "The assessment."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Makes a retried request safe: the same key and request answer what the first made (200), making nothing again; another request under the key is refused (idempotency_conflict).",
              "title": "Idempotency-Key"
            },
            "description": "Makes a retried request safe: the same key and request answer what the first made (200), making nothing again; another request under the key is refused (idempotency_conflict)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ConclusionForm"
              },
              "example": {
                "reason": "The cleared land is a fallow the supplier replanted with soya before 2020, as its photographs show.",
                "risk": "negligible",
                "text": "The supplier's answer of 12 October: the fallow was replanted in 2019.",
                "version": "1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Assessment"
                }
              }
            },
            "description": "The same request again under its Idempotency-Key: the assessment as it stands, nothing recorded again."
          },
          "201": {
            "description": "The conclusion recorded: the assessment, with it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Assessment"
                },
                "example": {
                  "assessment_id": "asm-000000000001",
                  "conclusion": {
                    "carried": false,
                    "evidence": [
                      {
                        "files": [],
                        "received_at": "2026-11-02T09:00:00+00:00",
                        "source": "customer",
                        "text": "The supplier's answer of 12 October: the fallow was replanted in 2019."
                      }
                    ],
                    "reason": "The cleared land is a fallow the supplier replanted with soya before 2020, as its photographs show.",
                    "recorded_at": "2026-11-02T09:00:00+00:00",
                    "recorded_by": "the API key “initial” (key-000000000002)",
                    "risk": "negligible"
                  },
                  "number": 1,
                  "pdf_sha256": "8ee89711330c1ccf39a2e65ad12bbd7df4a4a2ee857f53b4823f00fecb7bd252",
                  "pdf_url": "https://eudr-api.panspectra.com/v1/assessments/asm-000000000001/pdf",
                  "plot_id": "FARM-9",
                  "questions": [
                    {
                      "answered": true,
                      "ask": "What happened to this ground, and has it been used for agriculture since?",
                      "code": "explain_clearing",
                      "english": null,
                      "events": [
                        1
                      ],
                      "settles": "Evidence that it is growing back with no farming over two seasons; of a use other than farming that explains the whole area, such as a road, a reservoir or buildings; or a planting record showing that the trees there were a crop planted before 2021."
                    }
                  ],
                  "result": {
                    "assessed_at": "2026-11-02T09:00:00+00:00",
                    "assessment": 1,
                    "changed_area_ha": 3.61,
                    "changes": [
                      {
                        "area_ha": 3.61,
                        "centre": [
                          -54.098018,
                          -9.997944
                        ],
                        "cleared_from": "2023-02",
                        "cleared_to": "2023-03",
                        "number": 1,
                        "outline": {
                          "coordinates": [
                            [
                              [
                                -54.0971591,
                                -9.9970785
                              ],
                              [
                                -54.0988905,
                                -9.9970936
                              ],
                              [
                                -54.0988753,
                                -9.9988099
                              ],
                              [
                                -54.0971439,
                                -9.9987948
                              ],
                              [
                                -54.0971591,
                                -9.9970785
                              ]
                            ]
                          ],
                          "type": "Polygon"
                        }
                      }
                    ],
                    "period_end": "2026-11-02",
                    "period_start": "2020-12-31",
                    "plot_id": "FARM-9",
                    "problems": [],
                    "result": "supplier_evidence_needed",
                    "schema_version": "1.0",
                    "unseen_forest_ha": null,
                    "verification_code": "0e8f7f17837b6871",
                    "version": 1
                  },
                  "sent_at": "2026-11-02T09:00:00+00:00",
                  "status": "done",
                  "updated_at": "2026-11-02T09:00:00+00:00",
                  "verify_url": "https://panspectra.com/eudr/verify/0e8f7f17837b6871"
                }
              }
            }
          },
          "default": {
            "description": "A refusal, in one form: its code from a fixed list, its message, the fields refused and the request's id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/statements": {
      "post": {
        "tags": [
          "Statements"
        ],
        "summary": "Draft a statement",
        "description": "A statement drafted from goods and the plots they came from, each plot filed on its current report, a plot not ready to be filed named among its errors; a correction names the statement it corrects. Safe to retry with an Idempotency-Key. An editor's key.",
        "operationId": "draftStatement",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Makes a retried request safe: the same key and request answer what the first made (200), making nothing again; another request under the key is refused (idempotency_conflict).",
              "title": "Idempotency-Key"
            },
            "description": "Makes a retried request safe: the same key and request answer what the first made (200), making nothing again; another request under the key is refused (idempotency_conflict)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatementDraft"
              },
              "example": {
                "internal_reference_number": "PO-2026-118",
                "lines": [
                  {
                    "commodity": "soya",
                    "description": "Soya beans",
                    "net_weight_kg": "25000",
                    "plot_ids": [
                      "FARM-7",
                      "FARM-9"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Statement"
                }
              }
            },
            "description": "The same request again under its Idempotency-Key: the statement the first drafted, as it stands."
          },
          "201": {
            "description": "The statement drafted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Statement"
                },
                "example": {
                  "amends": null,
                  "attestation": "2026-10-29b",
                  "can_file": true,
                  "can_withdraw": false,
                  "change_until": null,
                  "created_at": "2026-11-02T09:00:00+00:00",
                  "digest": "553295e4b848bee781c30a0c86a5b731330806eaaca214de195e48761b8a61ee",
                  "errors": [],
                  "filed_as": null,
                  "filed_at": null,
                  "internal_reference_number": "PO-2026-118",
                  "operator_identifier": "SANDBOX",
                  "operator_name": "Importer GmbH",
                  "plots": [
                    "FARM-7",
                    "FARM-9"
                  ],
                  "reference_number": null,
                  "replaces": null,
                  "statement_id": "dft-000000000003",
                  "status": "draft",
                  "submission": null,
                  "submission_detail": null,
                  "updated_at": "2026-11-02T09:00:00+00:00",
                  "verification_number": null,
                  "why_not": null,
                  "withdraw_why_not": "Only a filed statement is withdrawn."
                }
              }
            }
          },
          "default": {
            "description": "A refusal, in one form: its code from a fixed list, its message, the fields refused and the request's id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Statements"
        ],
        "summary": "List the statements",
        "description": "The organisation's statements, the newest first, a page at a time; with changed_since, those changed since a moment of our clock: a page's as_of, less a few minutes. Any key.",
        "operationId": "listStatements",
        "parameters": [
          {
            "name": "changed_since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the statements changed after this moment, by our clock (updated_at): the as_of of the last page read, less a few minutes.",
              "title": "Changed Since"
            },
            "description": "Only the statements changed after this moment, by our clock (updated_at): the as_of of the last page read, less a few minutes."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            },
            "description": "How many items a page holds: 100 unless asked, 1,000 at most."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The page's next.",
              "title": "Cursor"
            },
            "description": "The page's next."
          }
        ],
        "responses": {
          "200": {
            "description": "Done.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatementPage"
                },
                "example": {
                  "as_of": "2026-11-02T09:00:00+00:00",
                  "items": [
                    {
                      "created_at": "2026-11-02T09:00:00+00:00",
                      "digest": "553295e4b848bee781c30a0c86a5b731330806eaaca214de195e48761b8a61ee",
                      "filed_at": null,
                      "internal_reference_number": "PO-2026-118",
                      "reference_number": null,
                      "statement_id": "dft-000000000003",
                      "status": "draft",
                      "submission": null,
                      "updated_at": "2026-11-02T09:00:00+00:00",
                      "verification_number": null
                    }
                  ],
                  "next": null
                }
              }
            }
          },
          "default": {
            "description": "A refusal, in one form: its code from a fixed list, its message, the fields refused and the request's id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/statements/{statement_id}": {
      "get": {
        "tags": [
          "Statements"
        ],
        "summary": "Read a statement",
        "description": "A statement as it will be or was filed: its digest, its plots, why it cannot be filed now where not, the operator and the words it is filed with, and its numbers once filed. Any key.",
        "operationId": "getStatement",
        "parameters": [
          {
            "name": "statement_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Statement Id"
            },
            "description": "The statement."
          }
        ],
        "responses": {
          "200": {
            "description": "Done.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Statement"
                },
                "example": {
                  "amends": null,
                  "attestation": "2026-10-29b",
                  "can_file": true,
                  "can_withdraw": false,
                  "change_until": null,
                  "created_at": "2026-11-02T09:00:00+00:00",
                  "digest": "553295e4b848bee781c30a0c86a5b731330806eaaca214de195e48761b8a61ee",
                  "errors": [],
                  "filed_as": null,
                  "filed_at": null,
                  "internal_reference_number": "PO-2026-118",
                  "operator_identifier": "SANDBOX",
                  "operator_name": "Importer GmbH",
                  "plots": [
                    "FARM-7",
                    "FARM-9"
                  ],
                  "reference_number": null,
                  "replaces": null,
                  "statement_id": "dft-000000000003",
                  "status": "draft",
                  "submission": null,
                  "submission_detail": null,
                  "updated_at": "2026-11-02T09:00:00+00:00",
                  "verification_number": null,
                  "why_not": null,
                  "withdraw_why_not": "Only a filed statement is withdrawn."
                }
              }
            }
          },
          "default": {
            "description": "A refusal, in one form: its code from a fixed list, its message, the fields refused and the request's id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Statements"
        ],
        "summary": "Delete a draft",
        "description": "A draft nobody filed. One filed through TRACES stays in the records. An editor's key.",
        "operationId": "deleteStatement",
        "parameters": [
          {
            "name": "statement_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Statement Id"
            },
            "description": "The statement."
          }
        ],
        "responses": {
          "204": {
            "description": "Done."
          },
          "default": {
            "description": "A refusal, in one form: its code from a fixed list, its message, the fields refused and the request's id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/statements/{statement_id}/file": {
      "post": {
        "tags": [
          "Statements"
        ],
        "summary": "File a statement",
        "description": "Files exactly the statement read, by its digest, through TRACES for the operator it names, once whatever is retried. A correction is filed as the amendment of the statement standing in its place, or as a new statement where as_new asks, once that one can no longer be amended. Its numbers come back when TRACES gives them. An editor's key.",
        "operationId": "fileStatement",
        "parameters": [
          {
            "name": "statement_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Statement Id"
            },
            "description": "The statement."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Makes a retried filing safe: the same key and request answer the statement again (200), whatever has become of it since, and file nothing; another request under the key is refused (idempotency_conflict).",
              "title": "Idempotency-Key"
            },
            "description": "Makes a retried filing safe: the same key and request answer the statement again (200), whatever has become of it since, and file nothing; another request under the key is refused (idempotency_conflict)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileStatement"
              },
              "example": {
                "attestation": "2026-10-29b",
                "digest": "553295e4b848bee781c30a0c86a5b731330806eaaca214de195e48761b8a61ee",
                "operator_identifier": "SANDBOX"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Asked again: the statement as it stands, nothing sent again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Statement"
                }
              }
            }
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Statement"
                },
                "example": {
                  "amends": null,
                  "attestation": "2026-10-29b",
                  "can_file": false,
                  "can_withdraw": true,
                  "change_until": "2026-11-05T08:50:00+00:00",
                  "created_at": "2026-11-02T09:00:00+00:00",
                  "digest": "553295e4b848bee781c30a0c86a5b731330806eaaca214de195e48761b8a61ee",
                  "errors": [],
                  "filed_as": "statement",
                  "filed_at": "2026-11-02T09:00:00+00:00",
                  "internal_reference_number": "PO-2026-118",
                  "operator_identifier": "SANDBOX",
                  "operator_name": "Importer GmbH",
                  "plots": [
                    "FARM-7",
                    "FARM-9"
                  ],
                  "reference_number": "SANDBOX-000001",
                  "replaces": null,
                  "statement_id": "dft-000000000003",
                  "status": "filed",
                  "submission": "available",
                  "submission_detail": null,
                  "updated_at": "2026-11-02T09:00:00+00:00",
                  "verification_number": "SB00000002",
                  "why_not": "This statement was filed.",
                  "withdraw_why_not": null
                }
              }
            },
            "description": "Taken: sent to TRACES within the minute."
          },
          "default": {
            "description": "A refusal, in one form: its code from a fixed list, its message, the fields refused and the request's id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/statements/{statement_id}/withdraw": {
      "post": {
        "tags": [
          "Statements"
        ],
        "summary": "Withdraw a statement",
        "description": "Withdraws a filed statement from TRACES, within its 72 hours. An editor's key.",
        "operationId": "withdrawStatement",
        "parameters": [
          {
            "name": "statement_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Statement Id"
            },
            "description": "The statement."
          }
        ],
        "responses": {
          "200": {
            "description": "Done.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Statement"
                }
              }
            }
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Statement"
                },
                "example": {
                  "amends": null,
                  "attestation": "2026-10-29b",
                  "can_file": false,
                  "can_withdraw": false,
                  "change_until": null,
                  "created_at": "2026-11-02T09:00:00+00:00",
                  "digest": "553295e4b848bee781c30a0c86a5b731330806eaaca214de195e48761b8a61ee",
                  "errors": [],
                  "filed_as": "statement",
                  "filed_at": "2026-11-02T09:00:00+00:00",
                  "internal_reference_number": "PO-2026-118",
                  "operator_identifier": "SANDBOX",
                  "operator_name": "Importer GmbH",
                  "plots": [
                    "FARM-7",
                    "FARM-9"
                  ],
                  "reference_number": "SANDBOX-000001",
                  "replaces": null,
                  "statement_id": "dft-000000000003",
                  "status": "withdrawn",
                  "submission": "withdrawn",
                  "submission_detail": null,
                  "updated_at": "2026-11-02T09:00:00+00:00",
                  "verification_number": "SB00000002",
                  "why_not": "This statement was filed.",
                  "withdraw_why_not": "Only a filed statement is withdrawn."
                }
              }
            },
            "description": "Taken: its withdrawal is sent to TRACES within the minute."
          },
          "default": {
            "description": "A refusal, in one form: its code from a fixed list, its message, the fields refused and the request's id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "summary": "Whether the API is up",
        "description": "Whether the API's service is up, and nothing else. It looks at nothing behind the service, so a request may still be refused unavailable for a moment. Ask it at most once a minute. No key.",
        "operationId": "getHealth",
        "responses": {
          "200": {
            "description": "The API's service is up.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                },
                "example": {
                  "status": "ok"
                }
              }
            }
          }
        },
        "security": [],
        "tags": [
          "Health"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ActivityType": {
        "type": "string",
        "enum": [
          "IMPORT",
          "EXPORT",
          "DOMESTIC"
        ]
      },
      "Allowance": {
        "properties": {
          "plan": {
            "$ref": "#/components/schemas/PlanRef"
          },
          "basis": {
            "type": "string"
          },
          "contract_year": {
            "type": "integer"
          },
          "year_start": {
            "type": "string",
            "format": "date"
          },
          "year_end": {
            "type": "string",
            "format": "date"
          },
          "plots": {
            "type": "integer",
            "description": "The plots named."
          },
          "rejected": {
            "type": "integer",
            "description": "Those the intake refused, never counted."
          },
          "repeated": {
            "type": "integer",
            "description": "Those counted already within the last 12 months."
          },
          "counted": {
            "type": "integer",
            "description": "What those that count count as, each as its first report is issued: a plot larger than 150 ha once for every 150 ha begun."
          },
          "included": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The year's allowance: the plan's plots and any granted."
          },
          "granted": {
            "type": "integer",
            "description": "The plots granted for the contract year.",
            "default": 0
          },
          "used_before": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The plots counted this contract year before."
          },
          "pending_before": {
            "type": "integer",
            "description": "The plots being checked before, which count as their reports are issued.",
            "default": 0
          },
          "remaining_before": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "within": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "overage": {
            "type": "integer",
            "description": "Those beyond the allowance, billed."
          },
          "free": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "On a plan without an allowance, those the year's granted plots pay for."
          },
          "used_after": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "remaining_after": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "unit_price_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "charge_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "standing": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "plan",
          "basis",
          "contract_year",
          "year_start",
          "year_end",
          "plots",
          "rejected",
          "repeated",
          "counted",
          "overage",
          "standing"
        ],
        "description": "What the plots will use of the plan's allowance this contract year: each plot counts as its first report is issued, so a plot whose check is not completed is never counted. Every figure but the plots named, those refused and those counted already is in plots as counted: a plot larger than 150 ha counts once for every 150 ha begun, an outline by its measured area, a point by the area it declares (4 ha when it declares none), and stays one plot."
      },
      "Assessment": {
        "properties": {
          "assessment_id": {
            "type": "string"
          },
          "plot_id": {
            "type": "string",
            "description": "The plot, by the organisation's reference."
          },
          "number": {
            "type": "integer",
            "minimum": 1.0,
            "description": "The assessment's number on the plot."
          },
          "status": {
            "type": "string",
            "enum": [
              "in_progress",
              "done"
            ],
            "description": "in_progress until its result issues, and while it is checked again; done once its result stands."
          },
          "sent_at": {
            "type": "string",
            "format": "date-time"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReportResult"
              },
              {
                "type": "null"
              }
            ],
            "description": "The result of its current report, once issued."
          },
          "questions": {
            "items": {
              "$ref": "#/components/schemas/Question"
            },
            "type": "array",
            "description": "What the result leaves for the supplier; empty where it asks nothing."
          },
          "conclusion": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Conclusion"
              },
              {
                "type": "null"
              }
            ],
            "description": "The organisation's conclusion on the current report, recorded on it or carried to it."
          },
          "pdf_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The report, as a PDF."
          },
          "pdf_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The PDF's SHA-256."
          },
          "verify_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The verification page anyone may open to check the report."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "assessment_id",
          "plot_id",
          "number",
          "status",
          "sent_at",
          "updated_at"
        ],
        "description": "A plot's assessment: one send of the plot, numbered on it."
      },
      "AssessmentEvent": {
        "additionalProperties": false,
        "description": "A delivery of assessment.updated.",
        "properties": {
          "type": {
            "const": "assessment.updated",
            "type": "string"
          },
          "timestamp": {
            "description": "When it happened.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/AssessmentUpdated"
          }
        },
        "required": [
          "type",
          "timestamp",
          "data"
        ],
        "type": "object"
      },
      "AssessmentUpdated": {
        "additionalProperties": false,
        "description": "What changed of an assessment, as a webhook tells it: what happened, and its state at that moment, which a later change may have moved on; a receiver reads the assessment again from the API before acting on it.",
        "properties": {
          "assessment_id": {
            "type": "string"
          },
          "plot_id": {
            "description": "The plot, by the organisation's reference.",
            "type": "string"
          },
          "reason": {
            "description": "What happened: its result reported, replaced by a later report, being checked again, back as it was, or the organisation's conclusion recorded.",
            "enum": [
              "reported",
              "replaced",
              "rechecking",
              "restored",
              "concluded"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "in_progress",
              "done"
            ],
            "type": "string"
          },
          "outcome": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Its result's outcome, while it is done."
          }
        },
        "required": [
          "assessment_id",
          "plot_id",
          "reason",
          "status"
        ],
        "type": "object"
      },
      "Commodity": {
        "type": "string",
        "enum": [
          "cattle",
          "cocoa",
          "coffee",
          "oil_palm",
          "rubber",
          "soya",
          "wood"
        ],
        "description": "The Regulation's seven relevant commodities; a plot declares one."
      },
      "Conclusion": {
        "properties": {
          "risk": {
            "type": "string",
            "enum": [
              "negligible",
              "non_negligible"
            ],
            "description": "The organisation's assessment of the risk."
          },
          "reason": {
            "type": "string",
            "description": "Its reason, in its words."
          },
          "evidence": {
            "items": {
              "$ref": "#/components/schemas/EvidencePiece"
            },
            "type": "array",
            "description": "The pieces of evidence it rests on."
          },
          "recorded_at": {
            "type": "string",
            "format": "date-time"
          },
          "recorded_by": {
            "type": "string",
            "description": "Who recorded it: a person's address, or the API key by its label."
          },
          "carried": {
            "type": "boolean",
            "description": "Whether it was recorded on an earlier report of the plot and carries to this one, for the same change.",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "risk",
          "reason",
          "recorded_at",
          "recorded_by"
        ],
        "description": "The customer's own conclusion on a report that asked for the supplier's evidence: its assessment of the risk, never a word on our result."
      },
      "ConclusionForm": {
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 1.0,
            "description": "The version of the result the conclusion was made on, as the assessment's result gave it (result.version): refused, result_changed, where the assessment's result is another now."
          },
          "risk": {
            "type": "string",
            "enum": [
              "negligible",
              "non_negligible"
            ],
            "description": "The organisation's assessment of the risk."
          },
          "reason": {
            "type": "string",
            "maxLength": 5000,
            "minLength": 1,
            "description": "Its reason."
          },
          "text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10000
              },
              {
                "type": "null"
              }
            ],
            "description": "The evidence's words: the supplier's answer, say."
          },
          "files": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "The evidence's files: JPEG, PNG or PDF, 20 MB each."
          }
        },
        "type": "object",
        "required": [
          "version",
          "risk",
          "reason"
        ],
        "description": "A conclusion, as a form (multipart/form-data)."
      },
      "Consent": {
        "properties": {
          "overage_plots": {
            "type": "integer",
            "minimum": 0.0,
            "description": "The plots beyond the allowance."
          },
          "charge_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "description": "Their amount, in cents; none while unset."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "overage_plots"
        ],
        "description": "The consent to what plots beyond the plan's allowance add to the invoice, exactly as the quote said it."
      },
      "Error": {
        "additionalProperties": false,
        "description": "A refusal.",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "ErrorDetail": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "description": "What went wrong, from a fixed list: unauthorized, forbidden, organisation_closing, not_found, method_not_allowed, invalid, conflict, consent_needed, being_assessed, assessed_today, not_ready, not_filable, filing_not_available, digest_changed, result_changed, ceiling_reached, idempotency_conflict, too_large, rate_limited, paused, unavailable, fault.",
            "type": "string"
          },
          "message": {
            "description": "What went wrong, in words.",
            "type": "string"
          },
          "fields": {
            "description": "Each field refused, for a request not in the form it takes.",
            "items": {
              "$ref": "#/components/schemas/Problem"
            },
            "type": "array"
          },
          "details": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "What a refusal gives to act on, where it gives anything: a send's fresh quote (consent_needed), a statement's new digest (digest_changed), the version of the words a statement is filed with (conflict), the version of the result now (result_changed)."
          },
          "request_id": {
            "description": "The request's id, also in the X-Request-Id header, to quote to us.",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message",
          "request_id"
        ],
        "type": "object"
      },
      "EvidenceFile": {
        "properties": {
          "name": {
            "type": "string",
            "description": "The file's name as it was added."
          },
          "size_bytes": {
            "type": "integer",
            "description": "Its size, in bytes."
          },
          "sha256": {
            "type": "string",
            "description": "Its content's SHA-256."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "size_bytes",
          "sha256"
        ]
      },
      "EvidencePiece": {
        "properties": {
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its words, if any."
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/EvidenceFile"
            },
            "type": "array"
          },
          "source": {
            "type": "string",
            "description": "Where it came from: the organisation's own, or the supplier's answer."
          },
          "received_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it reached the organisation."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "source",
          "received_at"
        ],
        "description": "A piece of the plot's evidence a conclusion rests on."
      },
      "FileStatement": {
        "properties": {
          "digest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "The statement's digest as its answer gave it: what is filed is exactly what was read."
          },
          "attestation": {
            "type": "string",
            "maxLength": 40,
            "minLength": 1,
            "description": "The version of the words the organisation files with, as the statement's answer and the guide give them."
          },
          "operator_identifier": {
            "type": "string",
            "maxLength": 16,
            "minLength": 1,
            "description": "The operator it is filed for, as the statement's answer named it."
          },
          "as_new": {
            "type": "boolean",
            "description": "For a correction (amends) whose statement can no longer be amended, its 72 hours over or the statement withdrawn: file it as a new statement. Without it such a correction is refused, so that the same goods never stand twice in TRACES unawares.",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "digest",
          "attestation",
          "operator_identifier"
        ],
        "description": "A statement filed through TRACES, exactly as it was read."
      },
      "Filing": {
        "properties": {
          "ready": {
            "type": "boolean"
          },
          "why": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why not, where not: not_checked, being_checked, too_old, outline_changed, conclusion_needed, not_negligible or to_correct."
          },
          "until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "The last day a statement files the plot on its latest result: 90 days after the last day the result covers. After it the plot is too_old until it is checked again. None for a plot without a result."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "ready"
        ],
        "description": "Whether a statement may file the plot now."
      },
      "Finding": {
        "type": "string",
        "enum": [
          "no_deforestation_found",
          "supplier_evidence_needed",
          "not_assessed",
          "in_progress"
        ],
        "description": "An outcome: no_deforestation_found, supplier_evidence_needed or not_assessed; in_progress while an assessment's result is not out."
      },
      "GeoJSONGeometry": {
        "properties": {
          "type": {
            "type": "string",
            "minLength": 1,
            "description": "The GeoJSON geometry type; a plot is a Point, Polygon or MultiPolygon."
          },
          "coordinates": {
            "description": "Longitude, latitude pairs in degrees, nested as the type requires; always lists, so a record round-trips through JSON unchanged."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type",
          "coordinates"
        ],
        "description": "A GeoJSON geometry in WGS-84 (longitude, latitude)."
      },
      "Health": {
        "properties": {
          "status": {
            "type": "string",
            "const": "ok",
            "description": "The API's service is up. It looks at nothing behind the service, so a request may still be refused unavailable for a moment."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "status"
        ],
        "description": "Whether the API is up."
      },
      "Intake": {
        "properties": {
          "plot_id": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          },
          "problems": {
            "items": {
              "$ref": "#/components/schemas/IntakeProblem"
            },
            "type": "array"
          },
          "notices": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "plot_id",
          "valid"
        ],
        "description": "A plot as the intake read it: whether it can be assessed as supplied, why not, and what was mended."
      },
      "IntakeProblem": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "message"
        ]
      },
      "Latest": {
        "properties": {
          "assessment_id": {
            "type": "string"
          },
          "result": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its outcome, once issued."
          },
          "period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "assessment_id"
        ]
      },
      "LeftOut": {
        "properties": {
          "plot_id": {
            "type": "string"
          },
          "why": {
            "type": "string",
            "enum": [
              "being_assessed",
              "assessed_today",
              "unknown",
              "retired",
              "invalid",
              "beyond_pilot"
            ],
            "description": "being_assessed: it is being checked already; assessed_today: it was checked today as it is now, and its result stands until the next day or until the plot changes; unknown: the library holds no plot of that reference; retired: it was retired from the library; invalid: the library holds it as one that cannot be checked as supplied, to correct first; beyond_pilot: a paid pilot's plots are used, and it does not fit in what is left of them."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "plot_id",
          "why"
        ],
        "description": "A plot named and not sent, and why."
      },
      "Operator": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "identifier_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "EORI",
                  "VAT",
                  "GLN",
                  "TIN",
                  "OTHER"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "identifier_value": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "street": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ]
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200,
                "pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ]
      },
      "PlanRef": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "name"
        ]
      },
      "Plot": {
        "properties": {
          "plot_id": {
            "type": "string",
            "description": "The plot, by the organisation's reference."
          },
          "number": {
            "type": "integer",
            "minimum": 1.0,
            "description": "The plot's number in the organisation."
          },
          "supplier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its supplier, as the library names it."
          },
          "commodity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its commodity: cattle, cocoa, coffee, oil_palm, rubber, soya or wood."
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its country of production: two letters, ISO 3166."
          },
          "status": {
            "type": "string",
            "enum": [
              "not_checked",
              "in_progress",
              "done"
            ],
            "description": "not_checked, in_progress, or done for a plot whose latest result stands."
          },
          "latest": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Latest"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its latest assessment that stands."
          },
          "conclusion_risk": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "negligible",
                  "non_negligible"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The organisation's conclusion on its latest report, where it recorded one or one carried to it."
          },
          "filing": {
            "$ref": "#/components/schemas/Filing"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When its status, result, conclusion or filing last changed, which changed_since reads: a result passing its 90 days among them, from the day after filing.until."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "plot_id",
          "number",
          "status",
          "filing",
          "updated_at"
        ],
        "description": "A plot of the organisation's library."
      },
      "PlotPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Plot"
            },
            "type": "array"
          },
          "next": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The cursor of the next page; none on the last."
          },
          "as_of": {
            "type": "string",
            "format": "date-time",
            "description": "When the page was read, by our clock: ask the next changed_since a few minutes before it, since a change is stamped as it is made and may be read a moment after."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "items",
          "as_of"
        ],
        "description": "A page of the organisation's plots, in the order of their references."
      },
      "Plots": {
        "properties": {
          "plots": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "A GeoJSON FeatureCollection, each feature naming its plot_id, supplier, country and commodity in its properties."
          },
          "plot_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 20000
              },
              {
                "type": "null"
              }
            ],
            "description": "Or the references of plots the library holds."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "description": "The plots of a quote or a send: GeoJSON, or the references of plots the library holds, to check them again."
      },
      "Problem": {
        "additionalProperties": false,
        "properties": {
          "field": {
            "description": "The field refused, by its path in the request.",
            "type": "string"
          },
          "message": {
            "description": "Why, in words.",
            "type": "string"
          }
        },
        "required": [
          "field",
          "message"
        ],
        "type": "object"
      },
      "Question": {
        "properties": {
          "code": {
            "type": "string",
            "description": "The question's kind: clearing_date, forest_at_2020, explain_clearing or explain_disturbance, of a change found; other_changes, of the smaller changes beyond a result's ten largest, asked of together; or correct, for a plot that could not be assessed as supplied."
          },
          "events": {
            "items": {
              "type": "integer",
              "minimum": 1.0
            },
            "type": "array",
            "description": "The changes it asks of, by their numbers on the plot, as the result's changes number them; none for a correction."
          },
          "ask": {
            "type": "string",
            "description": "The question, in the language asked for."
          },
          "settles": {
            "type": "string",
            "description": "What would settle it, in the language asked for."
          },
          "english": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The question and what would settle it in English, beside a translation."
          },
          "answered": {
            "type": "boolean",
            "description": "Whether it is answered already: by the organisation's conclusion on the result, recorded on it or carried from an earlier report, or by the supplier's answer, to this result's questions or to an earlier report's about the same change."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "ask",
          "settles",
          "answered"
        ],
        "description": "A question the result leaves for the supplier, as the supplier's page and paper put it."
      },
      "Quoted": {
        "properties": {
          "allowance": {
            "$ref": "#/components/schemas/Allowance"
          },
          "left_out": {
            "items": {
              "$ref": "#/components/schemas/LeftOut"
            },
            "type": "array"
          },
          "plots": {
            "items": {
              "$ref": "#/components/schemas/Intake"
            },
            "type": "array"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "allowance",
          "left_out",
          "plots"
        ],
        "description": "What sending the plots would use, creating nothing."
      },
      "ReportChange": {
        "properties": {
          "number": {
            "type": "integer",
            "minimum": 1.0,
            "description": "Its number on the plot, as the report numbers it."
          },
          "area_ha": {
            "type": "number",
            "exclusiveMinimum": 0.0,
            "description": "Its area, in hectares."
          },
          "cleared_from": {
            "type": "string",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
            "description": "The months it happened between, \"YYYY-MM\"."
          },
          "cleared_to": {
            "type": "string",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
          },
          "centre": {
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "type": "array",
            "maxItems": 2,
            "minItems": 2,
            "description": "A point on it, its largest part's: longitude and latitude."
          },
          "outline": {
            "$ref": "#/components/schemas/GeoJSONGeometry",
            "description": "Its outline."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "number",
          "area_ha",
          "cleared_from",
          "cleared_to",
          "centre",
          "outline"
        ],
        "description": "A change the report found in the plot's forest."
      },
      "ReportResult": {
        "properties": {
          "schema_version": {
            "type": "string",
            "const": "1.0",
            "default": "1.0"
          },
          "plot_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "description": "The plot, by the customer's own reference."
          },
          "assessment": {
            "type": "integer",
            "minimum": 1.0,
            "description": "The plot's assessment, numbered on the plot, and the report's version in it: 1 the first, a later one replacing it."
          },
          "version": {
            "type": "integer",
            "minimum": 1.0
          },
          "verification_code": {
            "type": "string",
            "pattern": "^[a-f0-9]{16}$",
            "description": "The report's verification code, which finds and checks it."
          },
          "assessed_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the assessment was finished."
          },
          "period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "The period the result covers: from the cut-off to the last day analysed; None when the plot was not assessed."
          },
          "period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "result": {
            "$ref": "#/components/schemas/Finding",
            "description": "The outcome: no_deforestation_found, supplier_evidence_needed or not_assessed."
          },
          "changes": {
            "items": {
              "$ref": "#/components/schemas/ReportChange"
            },
            "type": "array",
            "default": [],
            "description": "Each change found, in the order they happened."
          },
          "changed_area_ha": {
            "type": "number",
            "minimum": 0.0,
            "default": 0.0,
            "description": "The changes' area together, in hectares."
          },
          "unseen_forest_ha": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "description": "The forest that could not be seen clearly for long stretches since the cut-off, or too seldom before it, in hectares: the limitation the report states of it, which asks nothing of the supplier; None where none went unseen."
          },
          "problems": {
            "items": {
              "type": "string",
              "maxLength": 200,
              "minLength": 1
            },
            "type": "array",
            "default": [],
            "description": "Why the plot could not be assessed as supplied, by code; empty on a plot that was assessed."
          },
          "trial": {
            "type": "boolean",
            "default": false,
            "description": "Whether the report was made in a free trial: on real observations, to show how Panspectra works, and not for due diligence."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "plot_id",
          "assessment",
          "version",
          "verification_code",
          "assessed_at",
          "result"
        ],
        "description": "A plot report's result, as a customer's systems read it."
      },
      "Send": {
        "properties": {
          "plots": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "A GeoJSON FeatureCollection, each feature naming its plot_id, supplier, country and commodity in its properties."
          },
          "plot_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 20000
              },
              {
                "type": "null"
              }
            ],
            "description": "Or the references of plots the library holds."
          },
          "consent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Consent"
              },
              {
                "type": "null"
              }
            ],
            "description": "Needed where the plots go beyond the plan's allowance."
          }
        },
        "additionalProperties": false,
        "type": "object"
      },
      "Sent": {
        "properties": {
          "assessments": {
            "items": {
              "$ref": "#/components/schemas/SentAssessment"
            },
            "type": "array"
          },
          "left_out": {
            "items": {
              "$ref": "#/components/schemas/LeftOut"
            },
            "type": "array"
          },
          "allowance": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Allowance"
              },
              {
                "type": "null"
              }
            ]
          },
          "plots": {
            "items": {
              "$ref": "#/components/schemas/Intake"
            },
            "type": "array"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "assessments"
        ],
        "description": "The plots sent: an assessment of each, the plots left out because they are being assessed, the allowance's figures, and each plot as the intake read it."
      },
      "SentAssessment": {
        "properties": {
          "assessment_id": {
            "type": "string"
          },
          "plot_id": {
            "type": "string"
          },
          "number": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "in_progress",
              "done"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "assessment_id",
          "plot_id",
          "number",
          "status"
        ]
      },
      "Statement": {
        "properties": {
          "statement_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "draft, submitting, submitted, filed, refused, rejected, withdrawing, withdrawn or amended."
          },
          "internal_reference_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "digest": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its SHA-256, which filing it binds."
          },
          "reference_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "verification_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "filed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "submission": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where its latest sending to TRACES stands, where it was approved for TRACES: queued, sending, submitted, available, refused, rejected, not_sent, withdrawn, amended, unanswered (TRACES never answered: look for it there, it is never sent again) or unsettled (TRACES took it and had not settled it a week later)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "plots": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "Its plots, by their references."
          },
          "errors": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "Why it cannot be filed as it is."
          },
          "can_file": {
            "type": "boolean",
            "description": "Whether it can be filed now, by an editor's key."
          },
          "why_not": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why it cannot be filed now, where not."
          },
          "operator_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The operator it is filed for: the one it was approved for once approved, else the organisation's connected operator."
          },
          "operator_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "attestation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The version of the words it is filed with, for FileStatement."
          },
          "can_withdraw": {
            "type": "boolean",
            "default": false
          },
          "withdraw_why_not": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "change_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When its 72 hours to correct or withdraw end."
          },
          "amends": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The statement it corrects, by its id."
          },
          "filed_as": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "statement",
                  "amendment"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "How it was approved to be filed: as a statement of its own, or as the amendment of the statement it replaces in TRACES (replaces); none before."
          },
          "replaces": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The statement an amendment replaces in TRACES, by its id: the one it corrects, or the latest correction of it that stands."
          },
          "submission_detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why its latest sending was refused or rejected, in TRACES's reasons, or why nothing was sent, in words."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "statement_id",
          "status",
          "created_at",
          "updated_at",
          "can_file"
        ],
        "description": "A statement as it will be, or was, filed."
      },
      "StatementDraft": {
        "properties": {
          "lines": {
            "items": {
              "$ref": "#/components/schemas/StatementLine"
            },
            "type": "array",
            "maxItems": 1000,
            "minItems": 1
          },
          "production_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "operator": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Operator"
              },
              {
                "type": "null"
              }
            ]
          },
          "activity_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActivityType"
              },
              {
                "type": "null"
              }
            ]
          },
          "country_of_activity": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "border_cross_country": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "internal_reference_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "comment": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "geolocation_confidential": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "again_of": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40
              },
              {
                "type": "null"
              }
            ]
          },
          "amends": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "lines"
        ],
        "description": "A statement drafted from goods and plots, as the app's form drafts one: each line's plots filed on their current reports."
      },
      "StatementEvent": {
        "additionalProperties": false,
        "description": "A delivery of statement.updated.",
        "properties": {
          "type": {
            "const": "statement.updated",
            "type": "string"
          },
          "timestamp": {
            "description": "When it happened.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/StatementUpdated"
          }
        },
        "required": [
          "type",
          "timestamp",
          "data"
        ],
        "type": "object"
      },
      "StatementLine": {
        "properties": {
          "commodity": {
            "$ref": "#/components/schemas/Commodity"
          },
          "hs_heading": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?:[0-9]{2,6}|[0-9]{8}|[0-9]{10})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 150,
            "minLength": 1
          },
          "net_weight_kg": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ]
          },
          "supplementary_unit": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ]
          },
          "supplementary_unit_qualifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "percentage_estimation_or_deviation": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ]
          },
          "species_scientific_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "species_common_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "plot_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 20000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "commodity",
          "description"
        ],
        "description": "A line of goods: its commodity and HS heading, its description and quantities, and the plots it came from, by their references."
      },
      "StatementPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/StatementSummary"
            },
            "type": "array"
          },
          "next": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "as_of": {
            "type": "string",
            "format": "date-time",
            "description": "When the page was read, by our clock: ask the next changed_since a few minutes before it, since a change is stamped as it is made and may be read a moment after."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "items",
          "as_of"
        ],
        "description": "A page of the organisation's statements, the newest first."
      },
      "StatementSummary": {
        "properties": {
          "statement_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "draft, submitting, submitted, filed, refused, rejected, withdrawing, withdrawn or amended."
          },
          "internal_reference_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "digest": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its SHA-256, which filing it binds."
          },
          "reference_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "verification_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "filed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "submission": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where its latest sending to TRACES stands, where it was approved for TRACES: queued, sending, submitted, available, refused, rejected, not_sent, withdrawn, amended, unanswered (TRACES never answered: look for it there, it is never sent again) or unsettled (TRACES took it and had not settled it a week later)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "statement_id",
          "status",
          "created_at",
          "updated_at"
        ],
        "description": "A statement as the list gives it."
      },
      "StatementUpdated": {
        "additionalProperties": false,
        "description": "What changed of a statement, as a webhook tells it: what happened, and its state at that moment; the statement read again from the API says where it stands now.",
        "properties": {
          "statement_id": {
            "type": "string"
          },
          "reason": {
            "description": "What happened: approved to be filed, filed, filed as a correction, refused by TRACES, withdrawn, or never answered by TRACES.",
            "enum": [
              "approved",
              "filed",
              "amended",
              "refused",
              "withdrawn",
              "unanswered",
              "unsettled"
            ],
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Its status now."
          },
          "reference_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "verification_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          }
        },
        "required": [
          "statement_id",
          "reason"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "key": {
        "type": "http",
        "scheme": "bearer",
        "description": "The organisation's API key: eudr_live_…, or eudr_test_… for a sandbox."
      }
    }
  },
  "security": [
    {
      "key": []
    }
  ],
  "tags": [
    {
      "name": "Plots",
      "description": "Plots sent to be checked, and the organisation's library."
    },
    {
      "name": "Assessments",
      "description": "Each send of a plot: its result, its questions for the supplier, and the organisation's conclusion."
    },
    {
      "name": "Statements",
      "description": "Due diligence statements, from a draft to their numbers."
    },
    {
      "name": "Health",
      "description": "Whether the API is up, for a monitor to watch."
    }
  ],
  "webhooks": {
    "assessment.updated": {
      "post": {
        "summary": "assessment.updated",
        "description": "An assessment's result was reported, replaced, taken back to be checked again or restored, or the organisation's conclusion was recorded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssessmentEvent"
              },
              "example": {
                "data": {
                  "assessment_id": "asm-000000000004",
                  "outcome": "no_deforestation_found",
                  "plot_id": "FARM-7",
                  "reason": "reported",
                  "status": "done"
                },
                "timestamp": "2026-11-02T09:00:00+00:00",
                "type": "assessment.updated"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Taken: any 2xx."
          }
        }
      }
    },
    "statement.updated": {
      "post": {
        "summary": "statement.updated",
        "description": "A statement was approved to be filed, filed, filed as a correction, refused, withdrawn, or never answered by TRACES.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatementEvent"
              },
              "example": {
                "data": {
                  "reason": "filed",
                  "reference_number": "SANDBOX-000001",
                  "statement_id": "dft-000000000003",
                  "status": "filed",
                  "verification_number": "SB00000002"
                },
                "timestamp": "2026-11-02T09:00:00+00:00",
                "type": "statement.updated"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Taken: any 2xx."
          }
        }
      }
    }
  }
}
