Metering Service Schema Reference
This page summarizes the request and response contract for the Metering Service API.
Headers and Parameters
| Field | Location | Required | Type | Format / Constraints |
|---|
X-API-KEY | Header | Yes | string | UUID format |
X-IDEMPOTENCY-KEY | Header | Yes | string | Non-empty string |
X-TEST-MODE | Header | No | string | Optional; "true" enables test mode |
mpid | Path | Yes | string | Supplier MPID |
Request Schema (MSAppointmentSchemaRequest)
| Field | Required | Type | Format / Constraints |
|---|
mpan_core | Yes | integer | Exactly 13 digits, numeric |
metering_service_mpid | Yes | string | Exactly 4 alphabetic characters |
effective_from | Yes | string(datetime) | ISO 8601 with timezone; must be midnight; cannot be 28 days or more in the future |
contract_reference | No | string or null | Max 50 chars; must be alphanumeric |
appointment_scenario | Yes | string(enum) | One of COS, CSP, USP, SEG, MCA, MCS |
Additional validation notes:
- Unknown fields are explicitly rejected.
Response Schema (SupplierProcessResponseSchema)
| Field | Required | Type | Format / Constraints |
|---|
request_id | Yes | string | UUID |
request_type | Yes | string | Process type name |
request_status | Yes | string(enum) | Pending, Success, Failed |
description | No | string or null | Optional process description |
created_at | Yes | string(datetime) | ISO 8601 datetime |
last_updated_at | Yes | string(datetime) | ISO 8601 datetime |
mpan_core | Yes | integer | MPAN core |