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
X-TEST-MODEHeader (v1 POST)NostringOptional; "true" enables test mode
mpidPathYesstringSupplier MPID

v1 Request Schema (CoSRequestSchema)

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 fields from CoSRequestSchema plus the fields below.

FieldRequiredTypeFormat / Constraints
ms_appointment_requestNoobject or nullOptional object
ms_appointment_request.metering_service_mpidNostring or nullSubject to appointment-request business validation
ms_appointment_request.contract_referenceNostring or nullSubject to appointment-request business validation
ds_appointment_requestNoobject or nullOptional object
ds_appointment_request.data_service_mpidNostring or nullSubject to appointment-request business validation
ds_appointment_request.contract_referenceNostring or nullSubject to appointment-request business validation
ds_appointment_request.mdr_mpidNostring or nullSubject to appointment-request business validation
ds_appointment_request.consent_granularityNostring or nullSubject to appointment-request business validation
ds_appointment_request.fall_back_read_frequencyNostring or nullSubject to appointment-request business validation
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 20 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_numberYesstringUK phone regex `^(?:0
contact_details[].contacts[].telephones[].fax_numberNostring or nullSame phone regex
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.

Common Response Schema (CoSProcessResponseSchema)

Used by:

  • POST /change-of-supplier/v1/{mpid}
  • 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_coreYesintegerMPAN core
css_reg_idNostring or nullCSS registration ID
css_reg_statusNostring or nullCSS registration status