PATCH Addresses/{id}/AddAccountWideLabel/{label}/{primary}

Adds an Account-wide label to this Address. Note that if an address has any labels, then one must be the primary label. Set this with the primary option.


Parameters

NameDescriptionAdditional information
id
The id of the Address to be labelled.

Define this parameter in the request URI.

label
The label to give the Address.

Define this parameter in the request URI.

primary
Whether the label should be the primary label for the address.

Define this parameter in the request URI.

Response body formats

An AddressResponse with the labelled Address.

application/json, text/json

Sample:
{
  "Item": {
    "Id": 1,
    "GlobalIdentifier": "sample string 2",
    "AddressSource": 0,
    "AddressName": "sample string 3",
    "FriendlyName": "sample string 4",
    "Line1": "sample string 5",
    "Line2": "sample string 6",
    "Line3": "sample string 7",
    "City": "sample string 8",
    "County": "sample string 9",
    "Country": 10,
    "Postcode": "sample string 11",
    "AccountWideLabels": [
      1,
      2,
      3
    ],
    "IsAccountWideFavourite": true,
    "FavouriteId": 13,
    "PrimaryAccountWideLabel": 1,
    "RecommendedDistances": [
      1,
      2,
      3
    ],
    "IsRetriveable": true,
    "AddressActionOutcome": 0,
    "Label": "sample string 15",
    "LabelId": 16,
    "StartDate": "2025-01-26T06:52:19.2469024+00:00",
    "EndDate": "2025-01-26T06:52:19.2469024+00:00",
    "IsHomeAddress": true,
    "IsOfficeAddress": true,
    "StepSummary": "sample string 19",
    "AddressFriendlyText": "sample string 20",
    "EsrAssignmentId": 21,
    "Archived": true
  },
  "ResponseInformation": {
    "Errors": [
      {
        "ErrorCode": "sample string 1",
        "Message": "sample string 2"
      },
      {
        "ErrorCode": "sample string 1",
        "Message": "sample string 2"
      },
      {
        "ErrorCode": "sample string 1",
        "Message": "sample string 2"
      }
    ],
    "Status": 0,
    "Links": [
      {
        "Rel": "sample string 1",
        "Href": "sample string 2",
        "Title": "sample string 3",
        "IsTemplated": true
      },
      {
        "Rel": "sample string 1",
        "Href": "sample string 2",
        "Title": "sample string 3",
        "IsTemplated": true
      },
      {
        "Rel": "sample string 1",
        "Href": "sample string 2",
        "Title": "sample string 3",
        "IsTemplated": true
      }
    ]
  }
}

application/xml, text/xml

Sample:
<AddressResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Responses">
  <ResponseInformation xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Common">
    <Errors>
      <ApiErrorDetail>
        <ErrorCode>sample string 1</ErrorCode>
        <Message>sample string 2</Message>
      </ApiErrorDetail>
      <ApiErrorDetail>
        <ErrorCode>sample string 1</ErrorCode>
        <Message>sample string 2</Message>
      </ApiErrorDetail>
      <ApiErrorDetail>
        <ErrorCode>sample string 1</ErrorCode>
        <Message>sample string 2</Message>
      </ApiErrorDetail>
    </Errors>
    <Links>
      <Link>
        <Href>sample string 2</Href>
        <IsTemplated>true</IsTemplated>
        <Rel>sample string 1</Rel>
        <Title>sample string 3</Title>
      </Link>
      <Link>
        <Href>sample string 2</Href>
        <IsTemplated>true</IsTemplated>
        <Rel>sample string 1</Rel>
        <Title>sample string 3</Title>
      </Link>
      <Link>
        <Href>sample string 2</Href>
        <IsTemplated>true</IsTemplated>
        <Rel>sample string 1</Rel>
        <Title>sample string 3</Title>
      </Link>
    </Links>
    <Status>Failure</Status>
  </ResponseInformation>
  <Item xmlns:d2p1="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Types" xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Common">
    <d2p1:Archived>true</d2p1:Archived>
    <d2p1:AccountWideLabels xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>1</d3p1:int>
      <d3p1:int>2</d3p1:int>
      <d3p1:int>3</d3p1:int>
    </d2p1:AccountWideLabels>
    <d2p1:AddressActionOutcome>Success</d2p1:AddressActionOutcome>
    <d2p1:AddressFriendlyText>sample string 20</d2p1:AddressFriendlyText>
    <d2p1:AddressName>sample string 3</d2p1:AddressName>
    <d2p1:AddressSource>SEL</d2p1:AddressSource>
    <d2p1:City>sample string 8</d2p1:City>
    <d2p1:Country>10</d2p1:Country>
    <d2p1:County>sample string 9</d2p1:County>
    <d2p1:EndDate>2025-01-26T06:52:19.2469024+00:00</d2p1:EndDate>
    <d2p1:EsrAssignmentId>21</d2p1:EsrAssignmentId>
    <d2p1:FavouriteId>13</d2p1:FavouriteId>
    <d2p1:FriendlyName>sample string 4</d2p1:FriendlyName>
    <d2p1:GlobalIdentifier>sample string 2</d2p1:GlobalIdentifier>
    <d2p1:Id>1</d2p1:Id>
    <d2p1:IsAccountWideFavourite>true</d2p1:IsAccountWideFavourite>
    <d2p1:IsHomeAddress>true</d2p1:IsHomeAddress>
    <d2p1:IsOfficeAddress>true</d2p1:IsOfficeAddress>
    <d2p1:IsRetriveable>true</d2p1:IsRetriveable>
    <d2p1:Label>sample string 15</d2p1:Label>
    <d2p1:LabelId>16</d2p1:LabelId>
    <d2p1:Line1>sample string 5</d2p1:Line1>
    <d2p1:Line2>sample string 6</d2p1:Line2>
    <d2p1:Line3>sample string 7</d2p1:Line3>
    <d2p1:Postcode>sample string 11</d2p1:Postcode>
    <d2p1:PrimaryAccountWideLabel>1</d2p1:PrimaryAccountWideLabel>
    <d2p1:RecommendedDistances xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>1</d3p1:int>
      <d3p1:int>2</d3p1:int>
      <d3p1:int>3</d3p1:int>
    </d2p1:RecommendedDistances>
    <d2p1:StartDate>2025-01-26T06:52:19.2469024+00:00</d2p1:StartDate>
    <d2p1:StepSummary>sample string 19</d2p1:StepSummary>
  </Item>
</AddressResponse>
URI parameters
=
Headers | Add header
: Delete
Body
Samples:
Status
Headers
Body