POST request/Switch/Pro/Update/Address

Returns a set of specific address detail capture for a consumer switching energy to either provide or has already provided as mandatory. Updates to address is NOT recommended. The consumer must start a new quote journey if the address requires updating.

Request Information

URI Parameters

None.

Body Parameters

The details address binding model.

DetailsAddressBindingModel
NameDescriptionTypeAdditional information
BusinessAddress

BusinessAddress

None.

IsTou

boolean

None.

previousAddresses

Collection of ResidentialAddress

None.

ResidentialAddresses

Dictionary of ResidentialAddressType [key] and ResidentialAddress [value]

Required

SwitchKey

string

Required

Max length: 50

Min length: 1

Request Formats

application/json, text/json

Sample:
{
  "residentialAddresses": {
    "present": {
      "residentialStatusId": 1,
      "lengthOfResidencyInMonths": 1,
      "line1": "sample string 1",
      "line2": "sample string 2",
      "city": "sample string 3",
      "county": "sample string 4",
      "postcode": "sample string 5"
    }
  },
  "previousAddresses": [
    {
      "residentialStatusId": 1,
      "lengthOfResidencyInMonths": 1,
      "line1": "sample string 1",
      "line2": "sample string 2",
      "city": "sample string 3",
      "county": "sample string 4",
      "postcode": "sample string 5"
    },
    {
      "residentialStatusId": 1,
      "lengthOfResidencyInMonths": 1,
      "line1": "sample string 1",
      "line2": "sample string 2",
      "city": "sample string 3",
      "county": "sample string 4",
      "postcode": "sample string 5"
    }
  ],
  "businessAddress": {
    "line1": "sample string 1",
    "line2": "sample string 2",
    "city": "sample string 3",
    "county": "sample string 4",
    "postcode": "sample string 5"
  },
  "switchKey": "sample string 1",
  "isTou": true
}

application/xml, text/xml

Sample:
<DetailsAddressBindingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MyUtilityGenius.Api.Domain.Default.BindingModel">
  <IsTou>true</IsTou>
  <SwitchKey>sample string 1</SwitchKey>
  <BusinessAddress xmlns:d2p1="http://schemas.datacontract.org/2004/07/MyUtilityGenius.Api.Domain.Default.Address">
    <d2p1:City>sample string 3</d2p1:City>
    <d2p1:County>sample string 4</d2p1:County>
    <d2p1:Line1>sample string 1</d2p1:Line1>
    <d2p1:Line2>sample string 2</d2p1:Line2>
    <d2p1:Postcode>sample string 5</d2p1:Postcode>
  </BusinessAddress>
  <ResidentialAddresses xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfResidentialAddressTypeResidentialAddress1CP1QzxJ>
      <d2p1:Key>Present</d2p1:Key>
      <d2p1:Value xmlns:d4p1="http://schemas.datacontract.org/2004/07/MyUtilityGenius.Api.Domain.Default.Address">
        <d4p1:City>sample string 3</d4p1:City>
        <d4p1:County>sample string 4</d4p1:County>
        <d4p1:Line1>sample string 1</d4p1:Line1>
        <d4p1:Line2>sample string 2</d4p1:Line2>
        <d4p1:Postcode>sample string 5</d4p1:Postcode>
        <d4p1:LengthOfResidencyInMonths>1</d4p1:LengthOfResidencyInMonths>
        <d4p1:ResidentialStatusId>1</d4p1:ResidentialStatusId>
      </d2p1:Value>
    </d2p1:KeyValueOfResidentialAddressTypeResidentialAddress1CP1QzxJ>
  </ResidentialAddresses>
  <previousAddresses xmlns:d2p1="http://schemas.datacontract.org/2004/07/MyUtilityGenius.Api.Domain.Default.Address">
    <d2p1:ResidentialAddress>
      <d2p1:City>sample string 3</d2p1:City>
      <d2p1:County>sample string 4</d2p1:County>
      <d2p1:Line1>sample string 1</d2p1:Line1>
      <d2p1:Line2>sample string 2</d2p1:Line2>
      <d2p1:Postcode>sample string 5</d2p1:Postcode>
      <d2p1:LengthOfResidencyInMonths>1</d2p1:LengthOfResidencyInMonths>
      <d2p1:ResidentialStatusId>1</d2p1:ResidentialStatusId>
    </d2p1:ResidentialAddress>
    <d2p1:ResidentialAddress>
      <d2p1:City>sample string 3</d2p1:City>
      <d2p1:County>sample string 4</d2p1:County>
      <d2p1:Line1>sample string 1</d2p1:Line1>
      <d2p1:Line2>sample string 2</d2p1:Line2>
      <d2p1:Postcode>sample string 5</d2p1:Postcode>
      <d2p1:LengthOfResidencyInMonths>1</d2p1:LengthOfResidencyInMonths>
      <d2p1:ResidentialStatusId>1</d2p1:ResidentialStatusId>
    </d2p1:ResidentialAddress>
  </previousAddresses>
</DetailsAddressBindingModel>

multipart/form-data

Sample:
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="ResidentialAddresses[0].Key"

Present
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="ResidentialAddresses[0].Value.ResidentialStatusId"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="ResidentialAddresses[0].Value.LengthOfResidencyInMonths"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="ResidentialAddresses[0].Value.Line1"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="ResidentialAddresses[0].Value.Line2"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="ResidentialAddresses[0].Value.City"

sample string 3
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="ResidentialAddresses[0].Value.County"

sample string 4
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="ResidentialAddresses[0].Value.Postcode"

sample string 5
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="previousAddresses[0].ResidentialStatusId"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="previousAddresses[0].LengthOfResidencyInMonths"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="previousAddresses[0].Line1"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="previousAddresses[0].Line2"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="previousAddresses[0].City"

sample string 3
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="previousAddresses[0].County"

sample string 4
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="previousAddresses[0].Postcode"

sample string 5
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="previousAddresses[1].ResidentialStatusId"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="previousAddresses[1].LengthOfResidencyInMonths"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="previousAddresses[1].Line1"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="previousAddresses[1].Line2"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="previousAddresses[1].City"

sample string 3
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="previousAddresses[1].County"

sample string 4
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="previousAddresses[1].Postcode"

sample string 5
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="BusinessAddress.Line1"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="BusinessAddress.Line2"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="BusinessAddress.City"

sample string 3
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="BusinessAddress.County"

sample string 4
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="BusinessAddress.Postcode"

sample string 5
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="SwitchKey"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="IsTou"

True
--MultipartDataMediaFormatterBoundary1q2w3e--

Response Information

Resource Description

Object

None.

Response Formats

application/json, text/json

Sample:
{}

application/xml, text/xml

Sample:
<z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />

multipart/form-data

Sample:
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name=""

System.Object
--MultipartDataMediaFormatterBoundary1q2w3e--