Developers · API endpoints

Facilities

List and register the manufacturing plants your passports name as their place of manufacture.

Version
v1.0.0
Base URL
https://dppapi-production.up.railway.app/v1
Format
JSON · OpenAPI 3.1
FeedbackLast updated

Este artículo aún no está disponible en español; se muestra a continuación en inglés.

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.

GET/v1/plants
read scope

List facilities

Your plants, alphabetically, each with usedBy: the number of batteries whose placeOfManufacture is the plant’s name.

Responses

  • 200OK — The facilities.

Errors1

GET /v1/plants
curl "https://dppapi-production.up.railway.app/v1/plants" \-H "Authorization: Bearer $DPP_API_KEY"
200 OK · The facilities.
[{"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}]
POST/v1/plants
write scope

Add a facility

Registers a plant. Use its name as placeOfManufacture when you create batteries.

Request body3

  • namestring, 1–200required

    How passports name the plant.

  • locationstring, 1–300required

    Address or city and country.

  • esprFacilityIdstring, ≤ 120optional

    Your ESPR facility identifier, if you have one.

Headers2

  • Idempotency-Keystringheaderoptional

    Optional. 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"headeroptional

    Optional, live keys. Validate the write in full and store nothing. Test keys always dry-run; see Test keys.

Responses

  • 201Created — The facility.

Errors3

POST /v1/plants
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"}'
201The facility.

Preferencias de cookies

Tú decides qué cookies se usan. Puedes cambiar tu elección en cualquier momento desde «Configuración de cookies» en el pie de página. Política de privacidad

Necesarias

Siempre activas

Imprescindibles para que el sitio funcione: tu tema claro/oscuro y esta elección de cookies se guardan en tu navegador. No sirven para rastrearte.

Analítica

Google Analytics 4 mide cómo se usan las páginas mediante estadísticas, lo que nos ayuda a mejorar el sitio. Si aceptas, instala cookies y mide tu visita por completo. Si rechazas, no instala cookies, pero Google aún puede recibir datos técnicos como la página vista, el tipo de navegador y la dirección IP.

_ga, _ga_* · hasta 2 años · Google