Cet article n'est pas encore disponible en français ; il est affiché ci-dessous en anglais.
Manufacturing plants. A battery’s placeOfManufacture (data point 8) is required before its passport can be published; keeping the plants here gives every integration the same spelling, and each plant shows how many batteries name it.
Personalise the samples. Paste a test key and every snippet uses it — and your own model and passport ids.
/v1/plantsList facilities
Your plants, alphabetically, each with usedBy: the number of batteries whose placeOfManufacture is the plant’s name.
curl "https://dppapi-production.up.railway.app/v1/plants" \-H "Authorization: Bearer $DPP_API_KEY"[{"id": "cm1qh7k8l0080l70fs9d0f1g2","name": "Stuttgart, Germany","location": "Musterstraße 1, 70173 Stuttgart, DE","esprFacilityId": "FAC-STR-01","createdAt": "2027-01-05T08:00:00.000Z","usedBy": 100}]/v1/plantsAdd a facility
Registers a plant. Use its name as placeOfManufacture when you create batteries.
Request body3
namestring, 1–200requiredHow passports name the plant.
locationstring, 1–300requiredAddress or city and country.
esprFacilityIdstring, ≤ 120optionalYour ESPR facility identifier, if you have one.
Headers2
Idempotency-KeystringheaderoptionalOptional. A unique string per logical operation (a UUID is ideal). The first response is stored for 24 hours and replayed for retries; see Idempotency.
X-DPP-Dry-Run"true"headeroptionalOptional, live keys. Validate the write in full and store nothing. Test keys always dry-run; see Test keys.
Responses
- 201Created — The facility.
Errors3
- 400
Validation faileddetailsnames each invalid field. - 401
unauthorizedThe key is missing, unknown or revoked. - 403
insufficient_scopeThe key has nowritescope.
curl -X POST "https://dppapi-production.up.railway.app/v1/plants" \-H "Authorization: Bearer $DPP_API_KEY" \-H "Content-Type: application/json" \-d '{"name": "Stuttgart, Germany","location": "Musterstraße 1, 70173 Stuttgart, DE","esprFacilityId": "FAC-STR-01"}'