Risorse

Categorie

Tutti gli endpoint Categorie, con l'ambito che impongono, il corpo che accettano, una risposta leggibile e i rifiuti che possono restituire.

Elencare le categorie di prodotto.

get/categories
Ambito
Nessun ambito richiesto
Idempotency-Key
Non accettata
Restituisce
200
Richiesta
curl "https://passportcraft.com/api/v1/categories" \
  -H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"
Risposta · 200
{
  "object": "list",
  "data": [
    {
      "object": "category",
      "id": "general",
      "name": "categories/general",
      "display_name": "General Product",
      "schema_version": "1.0.0-draft",
      "field_count": 28
    },
    {
      "object": "category",
      "id": "textile",
      "name": "categories/textile",
      "display_name": "Textile / Apparel",
      "schema_version": "1.0.0-draft",
      "field_count": 51
    },
    {
      "object": "category",
      "id": "battery",
      "name": "categories/battery",
      "display_name": "Battery",
      "schema_version": "1.0.0-draft",
      "field_count": 92
    }
  ],
  "has_more": false,
  "next_cursor": null
}

GET /categories

Recuperare lo schema dei campi di una categoria.

get/categories/{category}/schema
Ambito
Nessun ambito richiesto
Idempotency-Key
Non accettata
Restituisce
200

Parametri di percorso

categorystringObbligatorio

Un identificativo di categoria, così come lo restituisce l'elenco delle categorie.

Errori

Tutti i rifiuti che questo endpoint può restituire, con lo stato con cui arrivano.

Richiesta
curl "https://passportcraft.com/api/v1/categories/textile/schema" \
  -H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"
Risposta · 200
{
  "object": "category_schema",
  "id": "textile",
  "name": "categories/textile/schema",
  "category": "textile",
  "display_name": "Textile / Apparel",
  "schema_version": "1.0.0-draft",
  "field_groups": [
    {
      "object": "field_group",
      "id": "identification",
      "label": "Product Identification",
      "description": "Core identifiers and descriptors for the product"
    },
    {
      "object": "field_group",
      "id": "manufacturer",
      "label": "Manufacturer / Economic Operator",
      "description": "Details of the manufacturer or EU responsible person"
    },
    {
      "object": "field_group",
      "id": "sustainability",
      "label": "Environmental Data",
      "description": "Carbon footprint and material recycling data"
    },
    {
      "object": "field_group",
      "id": "compliance",
      "label": "Regulatory Compliance",
      "description": "Substances of concern and conformity declarations"
    },
    {
      "object": "field_group",
      "id": "end_of_life",
      "label": "End of Life",
      "description": "Recycling and disposal guidance for the product"
    },
    {
      "object": "field_group",
      "id": "circular_economy",
      "label": "Circular Economy",
      "description": "Recyclability, disassembly, and end-of-life information"
    },
    {
      "object": "field_group",
      "id": "materials",
      "label": "Material Composition",
      "description": "Fiber content and testing methodology for textile materials"
    },
    {
      "object": "field_group",
      "id": "care",
      "label": "Care Instructions",
      "description": "ISO 3758 care symbols and human-readable care guidance"
    },
    {
      "object": "field_group",
      "id": "manufacturing",
      "label": "Manufacturing Details",
      "description": "Country of manufacture, production date, and batch traceability"
    },
    {
      "object": "field_group",
      "id": "durability",
      "label": "Durability & Repairability",
      "description": "Lifetime estimates, repairability score, and repair resources"
    }
  ],
  "fields": [
    {
      "object": "field",
      "name": "product_name",
      "type": "text",
      "required": true,
      "access_tier": "public",
      "group": "identification",
      "label": "Product Name",
      "description": "Commercial name of the product",
      "hint": "Shown as the headline on the public passport and in search.",
      "requirement": "required",
      "functional_basis": "Record identity — the passport cannot identify its product without a name.",
      "regulatory_basis": [
        {
          "regulation": "ESPR (Reg (EU) 2024/1781)",
          "reference": "Annex III(a)",
          "status": "anticipated",
          "note": "Product identifier/name — DA-gated for textiles."
        }
      ]
    },
    {
      "object": "field",
      "name": "recyclable_content_percentage",
      "type": "number",
      "required": false,
      "access_tier": "public",
      "group": "sustainability",
      "label": "Recyclable Content (%)",
      "description": "Percentage of the product that is recyclable at end of life",
      "min": 0,
      "max": 100
    },
    {
      "object": "field",
      "name": "conformity_declaration_url",
      "type": "url",
      "required": false,
      "access_tier": "authority",
      "group": "compliance",
      "label": "Declaration of Conformity URL",
      "description": "Link to the EU Declaration of Conformity document, or upload the PDF.",
      "document_types": [
        "conformity_declaration"
      ],
      "document_id_key": "conformity_declaration_url__document_id"
    }
  ]
}

GET /categories/textile/schema

Categorie — riferimento dell'API di PassportCraft | PassportCraft