Product Templates
A ProductTemplate is the schema (sections + fields) that DPPs in your
organisation are built from. Reads need templates:read; mutations need
templates:write.
The API only sees your organisation's own templates. Shared Orobo
templates that you can use in the web app (for example a battery or textile
passport template) are not listed here and can't be used astemplate_id.
To build DPPs on one through the API, first copy it into your organisation:
in the web app open Templates, use Clone in the template's menu, and
use the copy'sid. A new organisation's list is often empty until then.
List
GET /api/v2/product_templates
curl -sS https://orobo.io/api/v2/product_templates \
-H "Authorization: Bearer $TOKEN"
Returns paginated data + meta. Filter / search via standard query params
(q, industry, page, per_page).
Show
GET /api/v2/product_templates/:id
Returns the template with embedded sections and fields. 403 if the template
belongs to another organisation.
Create
POST /api/v2/product_templates with templates:write.
{ "product_template": { "name": "EV Battery v3", "description": "…", "industry": "automotive" } }
Returns 201 Created with the new template.
Update
PATCH /api/v2/product_templates/:id
Send only the fields you want to change.
Delete
DELETE /api/v2/product_templates/:id — 204 No Content on success.
Clone
POST /api/v2/product_templates/:id/clone (templates:write)
Duplicates the template (and its sections/fields) inside the same organisation.
The clone's name is suffixed with (copy) plus a timestamp; rename via
PATCH after.
Data mapping
GET /api/v2/product_templates/:id/data_mapping (templates:read)
Returns the section/field tree with the data_mapping block per field — the
canonical reference partners use to map external system fields onto Orobo
fields. Shape:
{
"data_mapping_version": "1.0",
"template_id": "…",
"sections": [
{
"name": "General Information",
"fields": [
{ "name": "Product Name", "field_type": "text", "required": true,
"access_rights": "public", "data_mapping": { "data_source": "Manufacturer", "regulatory_reference": "EU Battery Reg. Art. 7" } }
]
}
]
}
Nested template sections
GET/POST/PATCH/DELETE /api/v2/product_templates/:product_template_id/template_sections[/:id]
manages the join row that places a Section into a template (position,
required flag, per-section metadata). Section creation itself is a separate
admin concern; the partner API operates on sections that already exist.