POST address/{collectionKey}

Create new address in collection Creates new collection if one does not exist

Request Information

URI Parameters

NameDescriptionTypeAdditional information
collectionKey

Address collection key

string

Required

Body Parameters

Address model

AddressModel
NameDescriptionTypeAdditional information
AddressType

Specifies Type of address (SoldTo, BillTo, Payer, ShipTo, EndUser)
0 – SoldTo
1 – BillTo
2 – Payer
3 – ShipTo
4 – EndUser

AddressType

None.

Name

Recipient’s name

string

Max length: 100

Attention

Attention line

string

Max length: 100

Phone

Contact phone #

string

Max length: 20

Street1

Street address line one

string

Max length: 100

Street2

Street address line two

string

Max length: 100

City

City

string

Max length: 100

StateProvince

State / Province code Valid 2 character State or Province code. See ISO-3166

string

Max length: 100

PostalCode

Postal code

string

Max length: 20

CountryCode

Country Code Standard ISO-3166 2-Character country code

string

Max length: 2

ExtendedData

Client defined data

string

None.

Request Formats

application/json, text/json

Sample:
{
  "AddressType": 0,
  "Name": "sample string 1",
  "Attention": "sample string 2",
  "Phone": "sample string 3",
  "Street1": "sample string 4",
  "Street2": "sample string 5",
  "City": "sample string 6",
  "StateProvince": "sample string 7",
  "PostalCode": "sample string 8",
  "CountryCode": "sample string 9",
  "ExtendedData": "sample string 10"
}

application/xml, text/xml

Sample:
<AddressModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <AddressType>SoldTo</AddressType>
  <Name>sample string 1</Name>
  <Attention>sample string 2</Attention>
  <Phone>sample string 3</Phone>
  <Street1>sample string 4</Street1>
  <Street2>sample string 5</Street2>
  <City>sample string 6</City>
  <StateProvince>sample string 7</StateProvince>
  <PostalCode>sample string 8</PostalCode>
  <CountryCode>sample string 9</CountryCode>
  <ExtendedData>sample string 10</ExtendedData>
</AddressModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'AddressModel'.

Response Information

Resource Description

integer

Response Formats

application/json, text/json

Sample:
1

application/xml, text/xml

Sample:
<int>1</int>