Batches API
List batches
GET /brand/batches
Authorization: Bearer <token>
X-Organization-Id: <org_id>Optional query parameters:
productId— filter by productstate— filter by state (draft, sent, submitted, published)
Returns:
{
"data": [
{
"id": "01KS...",
"productName": "Classic Crew T-Shirt",
"productSku": "NE-TSH-001",
"factoryName": "Guangzhou Garment Co.",
"poReference": "PO-2026-001",
"quantity": 500,
"unit": "pcs",
"state": "submitted",
"createdAt": 1716000000000
}
]
}Create batch
POST /brand/batches
Authorization: Bearer <token>
X-Organization-Id: <org_id>
Content-Type: application/json
{
"productId": "01KS...",
"factoryId": "01KS...",
"poReference": "PO-2026-001",
"quantity": 500,
"unit": "pcs"
}Get batch detail
GET /brand/batches/:id
Authorization: Bearer <token>
X-Organization-Id: <org_id>Returns the full batch including:
requests— array of DPP requests (Tier 1 + sub-supplier requests)pefcr— PEFCR scores if data has been submitted (climate_change_total, climate_change_per_unit, breakdown, data_quality, vs_average_pct)dpp— published DPP info if published (id, gtin, serial, qrUrl, publishedAt)dataJson— factory-submitted production data
Send DPP request
POST /brand/batches/:id/send-request
Authorization: Bearer <token>
X-Organization-Id: <org_id>
Content-Type: application/json
{
"notes": "Please submit by end of month"
}Sends an email to the Tier 1 factory. If the product references sub-suppliers, each one also receives their own request automatically.
Publish DPP
POST /brand/batches/:id/publish
Authorization: Bearer <token>
X-Organization-Id: <org_id>Returns:
{
"qrUrl": "https://p.pasera.app/p/5701234567001/ABC123",
"dppId": "01KS..."
}Request changes
POST /brand/batches/:id/request-changes
Authorization: Bearer <token>
X-Organization-Id: <org_id>
Content-Type: application/json
{
"notes": "Energy data seems too low, please double-check"
}The factory receives an email notification with your feedback.