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

Bu makale İngilizce olarak mevcuttur.

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.

Çerez tercihleri

Hangi çerezlerin kullanılacağını siz seçersiniz. Tercihinizi istediğiniz zaman alt bilgideki “Çerez ayarları”ndan değiştirebilirsiniz. Gizlilik politikası

Gerekli

Her zaman açık

Sitenin çalışması için gereklidir: açık/koyu tema seçiminiz ve bu çerez tercihiniz tarayıcınızda saklanır. Sizi izlemek için kullanılmazlar.

Analitik

Google Analytics 4, sayfaların nasıl kullanıldığını istatistiklerle ölçer ve siteyi iyileştirmemize yardımcı olur. Kabul ederseniz çerez bırakır ve ziyaretinizi tam olarak ölçer. Reddederseniz çerez bırakmaz, ancak Google yine de görüntülenen sayfa, tarayıcı türü ve IP adresi gibi teknik veriler alabilir.

_ga, _ga_* · en çok 2 yıl · Google