Recursos

Categorías

Todos los endpoints de Categorías, con el ámbito que imponen, el cuerpo que admiten, una respuesta legible y los rechazos que pueden devolver.

Listar las categorías de producto.

get/categories
Ámbito
No requiere ámbito
Idempotency-Key
No se acepta
Devuelve
200
Solicitud
curl "https://passportcraft.com/api/v1/categories" \
  -H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"
Respuesta · 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

Obtener el esquema de campos de una categoría.

get/categories/{category}/schema
Ámbito
No requiere ámbito
Idempotency-Key
No se acepta
Devuelve
200

Parámetros de ruta

categorystringObligatorio

Un identificador de categoría, tal como lo devuelve la lista de categorías.

Errores

Todos los rechazos que este endpoint puede devolver, con el estado con el que llegan.

Solicitud
curl "https://passportcraft.com/api/v1/categories/textile/schema" \
  -H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"
Respuesta · 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

Categorías — referencia de la API de PassportCraft | PassportCraft