{
  "openapi": "3.1.0",
  "info": {
    "title": "RMG Eco Solutions API",
    "version": "v1",
    "summary": "Recovered materials catalogue, accepted materials, documents and waste-shipment information.",
    "description": "Public and unauthenticated. Every read sends Access-Control-Allow-Origin: * and declares charset=utf-8.\n\nReads are not rate limited. The only rate-limited endpoint is POST /api/v1/rfq.\n\nRegulatory data is read from RMG Circular, an independent information service, and is returned with its own source and retrieval date in an `attribution` object. Data marked official_auto upstream may only be presented as \"listed in <source> as of <date>\" — never as authorised, confirmed or approved.\n\nInformation only, not legal advice.",
    "contact": {
      "name": "RMG Eco Solutions",
      "url": "https://rmgecosolutions.com"
    },
    "license": {
      "name": "Not specified"
    }
  },
  "servers": [
    {
      "url": "https://rmgecosolutions.com"
    }
  ],
  "tags": [
    {
      "name": "service",
      "description": "Service metadata."
    },
    {
      "name": "catalogue",
      "description": "What we offer and what we accept."
    },
    {
      "name": "documents",
      "description": "Published documents and their checksums."
    },
    {
      "name": "company",
      "description": "Company registry lookups."
    },
    {
      "name": "regulatory",
      "description": "Waste-shipment information from RMG Circular."
    },
    {
      "name": "rfq",
      "description": "Requests for quotation."
    },
    {
      "name": "mcp",
      "description": "Model Context Protocol endpoint."
    }
  ],
  "paths": {
    "/api/v1/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Service health",
        "description": "Confirms the service is running and reports the API version and server time.",
        "tags": [
          "service"
        ],
        "responses": {
          "200": {
            "description": "Service health",
            "headers": {
              "ETag": {
                "description": "Strong validator for this representation.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "no-store",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "Always *.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Health"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/status": {
      "get": {
        "operationId": "getSelfCheckStatus",
        "summary": "Daily self-check result",
        "description": "The result of the most recent daily self-check. The site fetches its own public surface once a day — the home page, the health endpoint, robots.txt and the MCP tool list — and records the status, the content type and whether anything was injected into the HTML at the edge. Read-only, and empty until the first run.",
        "tags": [
          "service"
        ],
        "responses": {
          "200": {
            "description": "Daily self-check result",
            "headers": {
              "ETag": {
                "description": "Strong validator for this representation.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "no-store",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "Always *.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SelfCheckStatus"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/company/certificates": {
      "get": {
        "operationId": "getCompanyCertificates",
        "summary": "Management-system certificates",
        "description": "The ISO 9001, 14001 and 45001 certificates held by the operating company, with the certificate number, the scope exactly as printed, the issuer and its accreditation mark, the dates, and the URL and SHA-256 of each PDF so the document can be downloaded and checked. A certificate past its next annual surveillance date is not returned. The `awards` member carries conferred distinctions. The `rankings` member carries positions computed automatically from public financial statements, which are not awards and must not be reported as such. Neither has an expiry.",
        "tags": [
          "company"
        ],
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Language for names and labels. Defaults to en.",
            "schema": {
              "type": "string",
              "enum": [
                "ro",
                "en",
                "tr",
                "zh-hans"
              ],
              "description": "Language for names and labels. Defaults to en."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Management-system certificates",
            "headers": {
              "ETag": {
                "description": "Strong validator for this representation.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public, max-age=300, s-maxage=3600, stale-while-revalidate=86400",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "Always *.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Certificate"
                      }
                    },
                    "awards": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Award"
                      }
                    },
                    "rankings": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Ranking"
                      }
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified; the ETag you sent still matches."
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/company/financials": {
      "get": {
        "operationId": "getCompanyFinancials",
        "summary": "Filed annual figures",
        "description": "Net turnover, net profit, average employees and total equity for each year on file, as filed with the Romanian Ministry of Finance and published by ANAF. Each record carries the public source URL for its year and the time we read it, so any figure can be checked at source. Values are transcribed exactly and never rounded.",
        "tags": [
          "company"
        ],
        "responses": {
          "200": {
            "description": "Filed annual figures",
            "headers": {
              "ETag": {
                "description": "Strong validator for this representation.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public, max-age=300, s-maxage=3600, stale-while-revalidate=86400",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "Always *.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FinancialYear"
                      }
                    },
                    "source": {
                      "type": "string"
                    },
                    "retrieved_at": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified; the ETag you sent still matches."
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/company/{cui}": {
      "get": {
        "operationId": "getCompany",
        "summary": "Company registry lookup",
        "description": "Registry data for a Romanian company, read from ANAF through RMG Circular and returned with its source and retrieval date.",
        "tags": [
          "company"
        ],
        "parameters": [
          {
            "name": "cui",
            "in": "path",
            "required": true,
            "description": "Romanian fiscal code, with or without the RO prefix.",
            "schema": {
              "type": "string",
              "pattern": "^(RO)?[0-9]{2,10}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Company registry lookup",
            "headers": {
              "ETag": {
                "description": "Strong validator for this representation.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public, max-age=300, s-maxage=1800, stale-while-revalidate=86400",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "Always *.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Company"
                    },
                    "attribution": {
                      "$ref": "#/components/schemas/Attribution"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified; the ETag you sent still matches."
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "x-attribution": "RMG Circular"
      }
    },
    "/api/v1/regulatory/materials": {
      "get": {
        "operationId": "listRegulatoryMaterials",
        "summary": "List regulatory materials",
        "description": "The materials RMG Circular publishes, passed through with its attribution.",
        "tags": [
          "regulatory"
        ],
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Language for names and labels. Defaults to en.",
            "schema": {
              "type": "string",
              "enum": [
                "ro",
                "en",
                "tr",
                "zh-hans"
              ],
              "description": "Language for names and labels. Defaults to en."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List regulatory materials",
            "headers": {
              "ETag": {
                "description": "Strong validator for this representation.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public, max-age=300, s-maxage=1800, stale-while-revalidate=86400",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "Always *.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "attribution": {
                      "$ref": "#/components/schemas/Attribution"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified; the ETag you sent still matches."
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "x-attribution": "RMG Circular"
      }
    },
    "/api/v1/regulatory/materials/{id}": {
      "get": {
        "operationId": "getRegulatoryMaterial",
        "summary": "One regulatory material",
        "description": "One material with its facts and their sources. A fact marked official_auto may only be shown as \"listed in <source> as of <date>\", never as authorised or confirmed.",
        "tags": [
          "regulatory"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Material identifier, as listed by /api/v1/regulatory/materials.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Language for names and labels. Defaults to en.",
            "schema": {
              "type": "string",
              "enum": [
                "ro",
                "en",
                "tr",
                "zh-hans"
              ],
              "description": "Language for names and labels. Defaults to en."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One regulatory material",
            "headers": {
              "ETag": {
                "description": "Strong validator for this representation.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public, max-age=300, s-maxage=1800, stale-while-revalidate=86400",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "Always *.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RegulatoryMaterial"
                    },
                    "attribution": {
                      "$ref": "#/components/schemas/Attribution"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified; the ETag you sent still matches."
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "x-attribution": "RMG Circular"
      }
    },
    "/api/v1/regulatory/shipment-regime": {
      "get": {
        "operationId": "getShipmentRegime",
        "summary": "Shipment regime",
        "description": "How a shipment of one waste code to one destination is regulated.",
        "tags": [
          "regulatory"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "description": "A Basel or EU list code (B1010, EU3011) or a six-digit List of Waste code.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            }
          },
          {
            "name": "destination",
            "in": "query",
            "required": true,
            "description": "ISO 3166-1 alpha-2 code of the destination country.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "description": "Where the shipment starts. Defaults upstream to the EU.",
            "schema": {
              "type": "string",
              "maxLength": 32
            }
          },
          {
            "name": "mixture",
            "in": "query",
            "required": false,
            "description": "Set to 1 when the question is about a mixture of wastes.",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Shipment regime",
            "headers": {
              "ETag": {
                "description": "Strong validator for this representation.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public, max-age=300, s-maxage=1800, stale-while-revalidate=86400",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "Always *.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ShipmentRegime"
                    },
                    "attribution": {
                      "$ref": "#/components/schemas/Attribution"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified; the ETag you sent still matches."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "x-attribution": "RMG Circular"
      }
    },
    "/api/v1/regulatory/ask": {
      "get": {
        "operationId": "askRegulatory",
        "summary": "Ask a regulatory question",
        "description": "Answers a free-text question about waste shipment rules. The question and the language are forwarded to RMG Circular, an independent information service; nothing else is. Do not include personal data.",
        "tags": [
          "regulatory"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "The question, up to 500 characters.",
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 500
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Language for names and labels. Defaults to en.",
            "schema": {
              "type": "string",
              "enum": [
                "ro",
                "en",
                "tr",
                "zh-hans"
              ],
              "description": "Language for names and labels. Defaults to en."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ask a regulatory question",
            "headers": {
              "ETag": {
                "description": "Strong validator for this representation.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "no-store",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "Always *.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RegulatoryAnswer"
                    },
                    "attribution": {
                      "$ref": "#/components/schemas/Attribution"
                    },
                    "notice": {
                      "type": "string",
                      "description": "The forwarding notice shown to people before they ask."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "x-attribution": "RMG Circular"
      }
    },
    "/api/v1/openapi.json": {
      "get": {
        "operationId": "getOpenApi",
        "summary": "OpenAPI description",
        "description": "This API described as OpenAPI 3.1, generated from the same schemas the endpoints use.",
        "tags": [
          "service"
        ],
        "responses": {
          "200": {
            "description": "OpenAPI description",
            "headers": {
              "ETag": {
                "description": "Strong validator for this representation.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public, max-age=300, s-maxage=3600, stale-while-revalidate=86400",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "Always *.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An OpenAPI 3.1 document."
                }
              }
            }
          },
          "304": {
            "description": "Not modified; the ETag you sent still matches."
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "postMcp",
        "summary": "MCP endpoint",
        "description": "Model Context Protocol over Streamable HTTP: stateless, JSON-RPC 2.0, no authentication. One POST carries one message or a batch.",
        "tags": [
          "mcp"
        ],
        "responses": {
          "200": {
            "description": "MCP endpoint",
            "headers": {
              "ETag": {
                "description": "Strong validator for this representation.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "no-store",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "Always *.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A JSON-RPC 2.0 response."
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "x-rate-limited": false
      }
    }
  },
  "components": {
    "schemas": {
      "Attribution": {
        "type": "object",
        "description": "Where third-party data came from, carried through unchanged. Present on every response derived from RMG Circular.",
        "required": [
          "source",
          "retrieved_at",
          "via"
        ],
        "additionalProperties": false,
        "properties": {
          "source": {
            "type": "object",
            "description": "The upstream source as RMG Circular reports it.",
            "required": [
              "name"
            ],
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the register or document."
              },
              "url": {
                "type": "string",
                "description": "Link to the source record, when it has one."
              }
            }
          },
          "retrieved_at": {
            "type": "string",
            "description": "When the source was read, as RMG Circular reports it — not when we served this response."
          },
          "via": {
            "type": "string",
            "const": "RMG Circular",
            "description": "The service we read it through."
          },
          "url": {
            "type": "string",
            "description": "The RMG Circular record this came from."
          },
          "disclaimer": {
            "type": "string",
            "description": "RMG Circular's own disclaimer, unchanged."
          },
          "cache": {
            "type": "string",
            "enum": [
              "hit",
              "miss",
              "disabled"
            ],
            "description": "Whether we served this from our cache."
          }
        }
      },
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details. Every error response uses this shape.",
        "required": [
          "title",
          "status"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "A URI reference identifying the problem type."
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          }
        }
      },
      "Unavailable": {
        "type": "object",
        "description": "Returned when a third-party source could not be read. The request itself succeeded; the data is simply not available right now.",
        "required": [
          "available",
          "reason"
        ],
        "additionalProperties": false,
        "properties": {
          "available": {
            "type": "boolean",
            "const": false
          },
          "reason": {
            "type": "string",
            "enum": [
              "timeout",
              "network",
              "http",
              "malformed",
              "bad_request"
            ],
            "description": "Why the source could not be read."
          },
          "detail": {
            "type": "string"
          }
        }
      },
      "Product": {
        "type": "object",
        "description": "One recovered-material grade we offer. A grade missing any required field below is not published at all — it appears in no listing, no page, no sitemap entry and no MCP result.",
        "required": [
          "id",
          "name",
          "form",
          "material",
          "moq",
          "incoterms",
          "packaging",
          "documents",
          "ewc_codes",
          "specs",
          "updated_at"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier, usable in /api/v1/products/{id}."
          },
          "name": {
            "type": "string",
            "description": "Name in the requested language."
          },
          "summary": {
            "type": "string"
          },
          "form": {
            "type": "string",
            "enum": [
              "regrind",
              "regranulate",
              "production-scrap"
            ],
            "description": "The physical form of the material."
          },
          "material": {
            "type": "string",
            "description": "The polymer or metal, as a short identifier."
          },
          "moq": {
            "type": "object",
            "description": "Minimum order quantity.",
            "required": [
              "value",
              "unit"
            ],
            "additionalProperties": false,
            "properties": {
              "value": {
                "type": "number",
                "minimum": 0
              },
              "unit": {
                "type": "string",
                "enum": [
                  "kg",
                  "t",
                  "container",
                  "truck"
                ]
              }
            }
          },
          "incoterms": {
            "type": "array",
            "description": "Incoterms 2020 this grade is offered on.",
            "items": {
              "type": "string",
              "enum": [
                "EXW",
                "FCA",
                "FAS",
                "FOB",
                "CFR",
                "CIF",
                "CPT",
                "CIP",
                "DAP",
                "DPU",
                "DDP"
              ]
            }
          },
          "packaging": {
            "type": "array",
            "description": "How it ships.",
            "items": {
              "type": "string",
              "enum": [
                "big-bag",
                "octabin",
                "bale",
                "loose-bulk",
                "palletised-box",
                "drum"
              ]
            }
          },
          "documents": {
            "type": "array",
            "description": "Documents supplied with a consignment.",
            "items": {
              "type": "string",
              "enum": [
                "technical-data-sheet",
                "safety-data-sheet",
                "certificate-of-analysis",
                "annex-vii",
                "weighbridge-ticket",
                "declaration-of-conformity"
              ]
            }
          },
          "ewc_codes": {
            "type": "array",
            "description": "European Waste Catalogue codes, where they apply.",
            "items": {
              "type": "string"
            }
          },
          "colour": {
            "type": "string"
          },
          "melt_flow_index": {
            "type": "number",
            "description": "g/10 min, for polymers."
          },
          "bulk_density": {
            "type": "number",
            "description": "kg/m³."
          },
          "notes": {
            "type": "string",
            "description": "Contamination or tolerance note, in the requested language."
          },
          "origin_country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2."
          },
          "specs": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "key",
                "value"
              ],
              "additionalProperties": false,
              "properties": {
                "key": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "unit": {
                  "type": "string"
                }
              }
            }
          },
          "updated_at": {
            "type": "string",
            "description": "ISO 8601 date this entry was last confirmed."
          }
        }
      },
      "AcceptedMaterial": {
        "type": "object",
        "description": "A material category we accept.",
        "required": [
          "id",
          "name",
          "ewc_codes"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Name in the requested language."
          },
          "ewc_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "DocumentMeta": {
        "type": "object",
        "description": "Metadata for one published document. The bytes are served separately from /api/v1/documents/{id}/file.",
        "required": [
          "id",
          "title",
          "version",
          "date",
          "sha256",
          "content_type",
          "bytes",
          "file_url"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "description": "ISO 8601 date this version was issued."
          },
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "Lowercase hex SHA-256 of the exact bytes served, so a download can be verified."
          },
          "content_type": {
            "type": "string"
          },
          "bytes": {
            "type": "integer"
          },
          "file_url": {
            "type": "string",
            "description": "Where to fetch the bytes."
          }
        }
      },
      "Company": {
        "type": "object",
        "description": "Registry data for a Romanian company, read from ANAF through RMG Circular. Only fields the registry returned are present.",
        "required": [
          "cui"
        ],
        "properties": {
          "cui": {
            "type": "string",
            "description": "Normalised fiscal code, digits only."
          },
          "name": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "registration_status": {
            "type": "string"
          },
          "registration_number": {
            "type": "string"
          },
          "caen_code": {
            "type": "string"
          },
          "vat_registered": {
            "type": "boolean"
          },
          "vat_on_collection": {
            "type": "boolean"
          },
          "inactive": {
            "type": "boolean"
          }
        }
      },
      "FinancialYear": {
        "type": "object",
        "description": "One year as filed with the Romanian Ministry of Finance and published by ANAF. Values are transcribed exactly from the filing — never rounded, derived or adjusted — and `source_url` is the public record for that year, so any figure can be checked at source.",
        "required": [
          "year",
          "turnover_ron",
          "net_profit_ron",
          "employees",
          "equity_ron",
          "source",
          "source_url",
          "retrieved_at"
        ],
        "additionalProperties": false,
        "properties": {
          "year": {
            "type": "integer",
            "description": "Financial year."
          },
          "turnover_ron": {
            "type": "integer",
            "description": "ANAF indicator I13, net turnover, in RON."
          },
          "net_profit_ron": {
            "type": "integer",
            "description": "ANAF indicator I18 (net profit), or I19 (net loss) expressed as a negative value. ANAF reports the two as separate non-negative indicators."
          },
          "employees": {
            "type": "integer",
            "description": "ANAF indicator I20, average number of employees."
          },
          "equity_ron": {
            "type": "integer",
            "description": "ANAF indicator I10, total equity, in RON."
          },
          "caen": {
            "type": "string",
            "description": "CAEN code on that year’s filing. It can change between years."
          },
          "company_name": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "description": "The filing the figures come from."
          },
          "source_url": {
            "type": "string",
            "description": "The public ANAF record for that year."
          },
          "retrieved_at": {
            "type": "string",
            "description": "When we read it."
          }
        }
      },
      "Health": {
        "type": "object",
        "required": [
          "status",
          "api_version",
          "time"
        ],
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string",
            "const": "ok"
          },
          "api_version": {
            "type": "string",
            "const": "v1"
          },
          "environment": {
            "type": "string"
          },
          "time": {
            "type": "string",
            "description": "Server time, ISO 8601."
          }
        }
      },
      "SelfCheckResult": {
        "type": "object",
        "description": "One check from the daily self-check.",
        "required": [
          "id",
          "url",
          "ok",
          "status"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "Which check: `home`, `health`, `robots` or `mcp`."
          },
          "url": {
            "type": "string",
            "description": "The URL that was fetched."
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "integer",
            "description": "HTTP status, or 0 if the request failed."
          },
          "contentType": {
            "type": "string"
          },
          "detail": {
            "type": "string",
            "description": "Why it failed. Absent when it passed."
          },
          "ms": {
            "type": "integer",
            "description": "How long the request took."
          }
        }
      },
      "SelfCheckStatus": {
        "type": "object",
        "description": "The result of the most recent daily self-check, and how many runs are on file. The site checks its own public surface once a day: the home page, this API, robots.txt and the MCP tool list, including whether anything was injected into the HTML at the edge.",
        "required": [
          "ran_at",
          "ok",
          "passed",
          "failed",
          "checks",
          "runs_on_file"
        ],
        "additionalProperties": false,
        "properties": {
          "ran_at": {
            "type": "string",
            "description": "When the run finished, ISO 8601."
          },
          "ok": {
            "type": "boolean",
            "description": "True when every check passed."
          },
          "passed": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "checks": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One check from the daily self-check.",
              "required": [
                "id",
                "url",
                "ok",
                "status"
              ],
              "additionalProperties": false,
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Which check: `home`, `health`, `robots` or `mcp`."
                },
                "url": {
                  "type": "string",
                  "description": "The URL that was fetched."
                },
                "ok": {
                  "type": "boolean"
                },
                "status": {
                  "type": "integer",
                  "description": "HTTP status, or 0 if the request failed."
                },
                "contentType": {
                  "type": "string"
                },
                "detail": {
                  "type": "string",
                  "description": "Why it failed. Absent when it passed."
                },
                "ms": {
                  "type": "integer",
                  "description": "How long the request took."
                }
              }
            }
          },
          "runs_on_file": {
            "type": "integer",
            "description": "How many runs are retained. At most 30."
          }
        }
      },
      "Certificate": {
        "type": "object",
        "description": "One management-system certificate, as printed. The scope is quoted verbatim and covers the wholesale trade in waste and scrap; it does not describe processing. The accreditation field is the mark printed on the certificate and nothing else.",
        "required": [
          "id",
          "standard",
          "title",
          "certificate_number",
          "scope",
          "issuer",
          "accreditation",
          "valid_from",
          "valid_until",
          "pdf_url",
          "sha256"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "standard": {
            "type": "string",
            "description": "As printed, Romanian adoption first."
          },
          "title": {
            "type": "string",
            "description": "The management system, in the requested language."
          },
          "certificate_number": {
            "type": "string",
            "description": "Series and number, as printed."
          },
          "scope": {
            "type": "string",
            "description": "Scope of certification, verbatim."
          },
          "issuer": {
            "type": "string"
          },
          "issuer_url": {
            "type": "string"
          },
          "accreditation": {
            "type": "string",
            "description": "The accreditation mark printed on the certificate."
          },
          "valid_from": {
            "type": "string",
            "description": "Initial issue, ISO date."
          },
          "updated_at": {
            "type": "string",
            "description": "Most recent update, ISO date."
          },
          "valid_until": {
            "type": "string",
            "description": "Next annual surveillance, ISO date."
          },
          "pdf_url": {
            "type": "string",
            "description": "Absolute URL of the certificate PDF."
          },
          "bytes": {
            "type": "integer"
          },
          "sha256": {
            "type": "string",
            "description": "SHA-256 of the PDF exactly as served."
          }
        }
      },
      "Award": {
        "type": "object",
        "description": "A ranking or award, with the issuing body and the page where it can be checked. Awards carry no expiry: a ranking for a given year does not stop being true.",
        "required": [
          "id",
          "name",
          "issuer",
          "year",
          "position",
          "source_url"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The ranking name, as the issuer publishes it."
          },
          "issuer": {
            "type": "string"
          },
          "issuer_abbreviation": {
            "type": "string"
          },
          "year": {
            "type": "integer",
            "description": "Edition year."
          },
          "domain": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "size_category": {
            "type": "string"
          },
          "position": {
            "type": "integer",
            "description": "Position in the group."
          },
          "source_url": {
            "type": "string",
            "description": "The issuer page for this company."
          },
          "display": {
            "type": "string",
            "description": "The sentence to show, in the requested language."
          }
        }
      },
      "Ranking": {
        "type": "object",
        "description": "A ranking computed automatically by ListaFirme from public financial statements. **Not an award**: nobody assessed the company and nobody conferred anything, so this must not be reported as one. An edition of year N ranks the statements filed for N-1.",
        "required": [
          "id",
          "type",
          "issuer",
          "edition",
          "balance_year",
          "place",
          "ranking",
          "source_url"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "automatic"
          },
          "issuer": {
            "type": "string"
          },
          "edition": {
            "type": "integer",
            "description": "The ListaFirme edition year."
          },
          "balance_year": {
            "type": "integer",
            "description": "The financial year ranked, edition minus one."
          },
          "place": {
            "type": "integer"
          },
          "ranking": {
            "type": "string",
            "description": "The ranking's own name, in Romanian."
          },
          "area": {
            "type": "string",
            "description": "County and activity the ranking covers."
          },
          "source_url": {
            "type": "string"
          }
        }
      },
      "RfqRequest": {
        "type": "object",
        "description": "A request for quotation. `flow` says which side of the trade you are on.",
        "required": [
          "flow",
          "contact_name",
          "contact_email"
        ],
        "additionalProperties": false,
        "properties": {
          "flow": {
            "type": "string",
            "enum": [
              "buy",
              "sell"
            ],
            "description": "'buy' if you want to buy material from us, 'sell' if you want to sell material to us."
          },
          "contact_name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 120
          },
          "contact_email": {
            "type": "string",
            "format": "email",
            "minLength": 5,
            "maxLength": 200
          },
          "contact_company": {
            "type": "string",
            "maxLength": 160
          },
          "contact_country": {
            "type": "string",
            "pattern": "^[A-Za-z]{2}$",
            "description": "ISO 3166-1 alpha-2 country code."
          },
          "contact_phone": {
            "type": "string",
            "maxLength": 40
          },
          "material": {
            "type": "string",
            "maxLength": 160,
            "description": "Free text, or a product or material id."
          },
          "quantity_value": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000
          },
          "quantity_unit": {
            "type": "string",
            "enum": [
              "kg",
              "t",
              "container",
              "truck",
              "piece"
            ]
          },
          "incoterm": {
            "type": "string",
            "maxLength": 16
          },
          "message": {
            "type": "string",
            "maxLength": 4000
          },
          "locale": {
            "type": "string",
            "enum": [
              "ro",
              "en",
              "tr",
              "zh-hans"
            ]
          },
          "turnstile_token": {
            "type": "string",
            "maxLength": 2048,
            "description": "Required only while TURNSTILE_ENABLED is true. Ignored otherwise."
          }
        }
      },
      "RfqCreated": {
        "type": "object",
        "description": "The identifiers for a request that has been stored.",
        "required": [
          "id",
          "status",
          "status_token",
          "status_url",
          "created_at"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^(RMG-RFQ|RMG-TEST)-[0-9]{4}-[0-9]{4}$",
            "description": "Sequential per calendar year, allocated in a transaction. An RMG-TEST- prefix marks verification traffic, which is drawn from a separate sequence and deleted after 24 hours.",
            "examples": [
              "RMG-RFQ-2026-0001"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "received",
              "in_review",
              "quoted",
              "closed",
              "rejected"
            ]
          },
          "status_token": {
            "type": "string",
            "description": "Shown once, here, and never again — only its hash is stored. Required to read the status back."
          },
          "status_url": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          }
        }
      },
      "RfqStatus": {
        "type": "object",
        "description": "The current state of one request.",
        "required": [
          "id",
          "flow",
          "status",
          "created_at",
          "updated_at",
          "is_test"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^(RMG-RFQ|RMG-TEST)-[0-9]{4}-[0-9]{4}$"
          },
          "flow": {
            "type": "string",
            "enum": [
              "buy",
              "sell"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "received",
              "in_review",
              "quoted",
              "closed",
              "rejected"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "is_test": {
            "type": "boolean",
            "description": "True for verification traffic, which is excluded from exports and swept daily."
          }
        }
      },
      "RfqPrepared": {
        "type": "object",
        "description": "A prefilled link a person can open to review and submit a request themselves. Nothing is stored when this is produced.",
        "required": [
          "confirmation_url",
          "flow",
          "stored"
        ],
        "additionalProperties": false,
        "properties": {
          "confirmation_url": {
            "type": "string",
            "description": "Open this to review and submit."
          },
          "flow": {
            "type": "string",
            "enum": [
              "buy",
              "sell"
            ]
          },
          "stored": {
            "type": "boolean",
            "const": false,
            "description": "Always false: preparing a request never writes to our database."
          },
          "notice": {
            "type": "string"
          }
        }
      },
      "RegulatoryMaterial": {
        "type": "object",
        "description": "A material as RMG Circular publishes it, passed through unchanged. Facts marked official_auto may only be shown as \"listed in <source> as of <date>\".",
        "properties": {
          "subject_id": {
            "type": "string"
          },
          "subject_type": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "facts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "ShipmentRegime": {
        "type": "object",
        "description": "How a shipment of one waste code to one destination is regulated.",
        "properties": {
          "code": {
            "type": "string"
          },
          "origin": {
            "type": "string"
          },
          "destination": {
            "type": "string"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "RegulatoryAnswer": {
        "type": "object",
        "description": "The answer to a free-text regulatory question.",
        "properties": {
          "question": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "answered": {
            "type": "boolean"
          },
          "summary": {
            "type": "string"
          },
          "records": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      }
    }
  },
  "x-mcp": {
    "endpoint": "/mcp",
    "transport": "streamable-http",
    "stateless": true,
    "authentication": "none",
    "tools": [
      {
        "name": "get_certificates",
        "title": "Get management-system certificates",
        "description": "The ISO 9001, 14001 and 45001 certificates held by RMG Reciclare Deșeuri SRL, with the number, the scope exactly as printed, the issuer and accreditation mark, the dates, and the URL and SHA-256 of each PDF. The scope covers the wholesale trade in waste and scrap and must not be reported as covering processing. A lapsed certificate is never returned.",
        "inputSchema": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "locale": {
              "type": "string",
              "enum": [
                "ro",
                "en",
                "tr",
                "zh-hans"
              ],
              "description": "Language for names and labels. Defaults to en."
            }
          }
        },
        "endpoint": "/api/v1/company/certificates",
        "readOnly": true
      },
      {
        "name": "check_company",
        "title": "Check a company",
        "description": "Registry data for a Romanian company by fiscal code, from ANAF through RMG Circular, with its source and retrieval date.",
        "inputSchema": {
          "type": "object",
          "required": [
            "cui"
          ],
          "additionalProperties": false,
          "properties": {
            "cui": {
              "type": "string",
              "pattern": "^(RO)?[0-9]{2,10}$",
              "description": "Romanian fiscal code."
            }
          }
        },
        "endpoint": "/api/v1/company/{cui}",
        "readOnly": true
      },
      {
        "name": "get_financials",
        "title": "Get filed annual figures",
        "description": "Net turnover, net profit, average employees and total equity per year for RMG Eco Solutions, as filed with the Romanian Ministry of Finance and published by ANAF. Each record carries its public source URL and retrieval time. Figures are transcribed exactly from the filing; do not round or recompute them.",
        "inputSchema": {
          "type": "object",
          "additionalProperties": false,
          "properties": {}
        },
        "endpoint": "/api/v1/company/financials",
        "readOnly": true
      },
      {
        "name": "get_shipment_regime",
        "title": "Get a shipment regime",
        "description": "How a shipment of one waste code to one destination is regulated.",
        "inputSchema": {
          "type": "object",
          "required": [
            "code",
            "destination"
          ],
          "additionalProperties": false,
          "properties": {
            "code": {
              "type": "string",
              "description": "A Basel or EU list code, or a six-digit List of Waste code."
            },
            "destination": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$",
              "description": "Destination country code."
            },
            "origin": {
              "type": "string",
              "description": "Origin. Defaults upstream to the EU."
            },
            "mixture": {
              "type": "boolean",
              "description": "True when the question is about a mixture of wastes."
            }
          }
        },
        "endpoint": "/api/v1/regulatory/shipment-regime",
        "readOnly": true
      },
      {
        "name": "ask_regulatory",
        "title": "Ask a regulatory question",
        "description": "Answers a free-text question about waste shipment rules. The question and language are forwarded to RMG Circular, an independent information service. Do not include personal data.",
        "inputSchema": {
          "type": "object",
          "required": [
            "q"
          ],
          "additionalProperties": false,
          "properties": {
            "q": {
              "type": "string",
              "minLength": 3,
              "maxLength": 500,
              "description": "The question."
            },
            "locale": {
              "type": "string",
              "enum": [
                "ro",
                "en",
                "tr",
                "zh-hans"
              ],
              "description": "Language for names and labels. Defaults to en."
            }
          }
        },
        "endpoint": "/api/v1/regulatory/ask",
        "readOnly": true
      }
    ]
  }
}