Skip to main content

Change of Supplier Schema Reference

Headers and Parameters​

FieldLocationRequiredTypeFormat / Constraints
X-API-KEYHeaderYesstringUUID format
X-IDEMPOTENCY-KEYHeader (POST)YesstringNon-empty string
mpidPathYesstringSupplier MPID

Core Request Fields​

FieldRequiredTypeFormat / Constraints
mpan_coreYesintegerExactly 13 digits, numeric (^\d{13}$)
supply_start_dateYesstring(datetime)ISO 8601 with timezone; must be midnight; cannot be in the past; cannot be > 28 days ahead; min lead-time: 1 working day (domestic), 2 working days (non-domestic)
ofaf_refNostring or nullIf provided: length 1-50
domestic_indicatorYesbooleantrue or false
is_initial_registrationYesbooleantrue or false
change_of_occupancy_indicatorNoboolean or nullIf provided: true or false; defaults false
erroneous_switch_resolution_indicatorNoboolean or nullIf provided: true or false; cannot be true when is_initial_registration is true; defaults false
supplier_referenceNostring or nullIf provided: length 1-50

Additional validation:

  • Extra/unknown fields are rejected.

v2 Request Schema (CosRequestSchemaV2)​

CosRequestSchemaV2 includes all core request fields above plus the fields below.

FieldRequiredTypeFormat / Constraints
is_legacyNobooleanDefaults to false; identifies a forward-migrated legacy registration
ms_appointment_requestNoobject or nullOptional object
ms_appointment_request.metering_service_mpidYes (when object provided)stringExactly 4 alphabetic characters
ms_appointment_request.contract_referenceNostring or nullSubject to appointment-request business validation
ds_appointment_requestNoobject or nullOptional object
ds_appointment_request.data_service_mpidYes (when object provided)stringExactly 4 alphabetic characters
ds_appointment_request.contract_referenceNostring or nullSubject to appointment-request business validation
ds_appointment_request.mdr_mpidConditionalstring or nullRequired when mdr_effective_from is supplied; exactly 4 alphabetic characters
ds_appointment_request.mdr_effective_fromConditionalstring(datetime) or nullRequired with mdr_mpid, and vice versa; timezone-aware and must resolve to midnight UTC
ds_appointment_request.consent_granularityYes (when object provided)stringOne of H, D, M, N
ds_appointment_request.fall_back_read_frequencyNostring or nullOne of F, W, M, Q, S, A, x
psr_detailsNoobject or nullOptional object
psr_details.primary_psr_contact_nameYes (when object provided)stringMax 50 chars
psr_details.primary_psr_phone_number_1Conditionalstring or nullUK phone regex `^(?:0
psr_details.primary_psr_phone_number_2Nostring or nullSame phone regex
psr_details.alternate_psr_contact_nameNostring or nullMax 50 chars
psr_details.alternate_psr_phone_number_1Nostring or nullSame phone regex
psr_details.alternate_psr_phone_number_2Nostring or nullSame phone regex
psr_details.psr_address_line_1 .. psr_details.psr_address_line_9Conditionalstring or nullMax 40 chars each; at least one address line or primary_psr_phone_number_1 must be provided
psr_details.psr_postcodeConditionalstring or nullMax 10 chars; required when any PSR address line is present
psr_details.lawful_basis_for_sharingYes (when object provided)booleantrue or false
psr_details.psr_detailsYes (when object provided)arrayMust be non-empty
psr_details.psr_details[].psr_categoryYesstringExactly 2 chars; allowed values: 01,02,03,04,08,09,10,12,14,15,17,18,19,20,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37
psr_details.psr_details[].psr_expiry_dateConditionalstring or nullRequired for categories 29,32,33,34; format YYYYMMDD; must be a future date
psr_details.psr_details[].additional_informationConditionalstring or nullRequired for category 17; max 200 chars
contact_detailsNoarray or nullOptional list of ContactCustomerRequestSchema objects
contact_details[].customer_nameYesstringMax 100 chars
contact_details[].additional_informationNostring or nullMax 200 chars
contact_details[].customer_passwordNostring or nullMax 10 chars
contact_details[].customer_password_efdNostring(date) or datetime or nullIf string, format YYYY-MM-DD
contact_details[].special_accessNostring or nullMax 40 chars
contact_details[].max_power_reqNointeger or nullInteger, >= 0, max 6 digits
contact_details[].delete_address_dataNoboolean or nulltrue or false
contact_details[].mailing_address_1 .. contact_details[].mailing_address_9Nostring or nullMax 40 chars each
contact_details[].mailing_address_postcodeNostring or nullMax 10 chars
contact_details[].contactsYesarrayList of contact records
contact_details[].contacts[].contact_nameYesstringMax 30 chars
contact_details[].contacts[].preferred_contact_methodNostring(enum) or nullAllowed values: E, H, L, T, W
contact_details[].contacts[].telephonesYesarrayMust be non-empty
contact_details[].contacts[].telephones[].telephone_numberYesstring7–14 digits with optional leading +; whitespace removed for validation (^\+?\d{7,14}$)
contact_details[].contacts[].telephones[].fax_numberNostring or nullSame phone rule when non-empty
contact_details[].contacts[].emailsYesarrayMust be a list (can be empty)
contact_details[].contacts[].emails[].email_addressNostring or nullIf provided: valid email format and max 100 chars

Additional validation:

  • Extra/unknown fields are rejected.
  • MS and DS appointment objects are independently optional. Requests may omit both, provide only one, or provide both.
  • Supplying an empty appointment object is invalid because that object's conditionally required fields must be present.

Common Response Schema (CoSProcessResponseSchema)​

Used by POST /change-of-supplier/v2/{mpid}.

FieldRequiredTypeFormat / Constraints
request_idYesstringUUID
request_typeYesstringProcess type name
request_statusYesstring(enum)Pending, Success, Failed
descriptionNostring or nullProcess type description
created_atYesstring(datetime)ISO 8601 datetime
last_updated_atYesstring(datetime)ISO 8601 datetime
mpan_coreNointeger or nullMPAN core; may be absent from the process response
css_reg_idNostring or nullCSS registration ID
css_reg_statusNostring or nullCSS registration status

Withdrawal Request​

FieldRequiredTypeFormat / Constraints
mpanYesstringExactly 13 characters representing the MPAN core
supplierProcessIdYesstringUUID of the original CoS gain process

Both fields must identify the supplier's CoS gain process and registration cycle.

Withdrawal Response​

ChangeOfSupplierWithdrawalResponseData uses the common response fields, without css_reg_id or css_reg_status, and adds:

FieldRequiredTypeFormat / Constraints
initiated_byNostring or nullInitiator identifier
withdrawal_idYesstringUUID of the withdrawal
withdrawal_statusYesstringInitially PendingSubmission

request_id is the original process UUID; request_status is that process's status. request_type is change-of-supplier-withdrawal.