POST api/v1/AddressChange
Update an existing address on an existing customer account
You must send a customer id or account number along with the address details
Any part of the data which is supplied as null will be left as is in Caliq
Request Information
URI Parameters
None.
Body Parameters
AddressChangeParamsName | Description | Type | Additional information |
---|---|---|---|
apiKey |
Please contact Caliq support to get your key |
string |
Required |
ChannelID |
List of channels can be retrieved via API |
integer |
Required |
CustomerID |
Caliq internal unique customer identifier |
integer |
None. |
AccountNo |
User entered unique customer account number |
string |
Required Max length: 10 |
AddressID |
Internal ID of the address to be changed |
integer |
Required |
Active |
Should the address be set to active or inactive? |
boolean |
Required |
AddressRef |
Alias for this address |
string |
Max length: 30 |
CompanyName |
Override company name if different to the account name |
string |
Max length: 40 |
Line1 | string |
Required Max length: 50 |
|
Line2 | string |
Max length: 50 |
|
Line3 | string |
Max length: 50 |
|
Town | string |
Max length: 50 |
|
County | string |
Max length: 25 |
|
Postcode | string |
Max length: 15 |
|
Country |
Country code from the country list in ISO3 format |
string |
Required Max length: 3 |
AllowDeliveries |
Can orders be delivered to this address? |
boolean |
None. |
AllowInvoices |
Can invoices be sent to this address? |
boolean |
None. |
Request Formats
application/json, text/json
{ "apiKey": "sample string 1", "ChannelID": 2, "CustomerID": 3, "AccountNo": "sample string 4", "AddressID": 5, "Active": true, "AddressRef": "sample string 7", "CompanyName": "sample string 8", "Line1": "sample string 9", "Line2": "sample string 10", "Line3": "sample string 11", "Town": "sample string 12", "County": "sample string 13", "Postcode": "sample string 14", "Country": "sample string 15", "AllowDeliveries": true, "AllowInvoices": true }
application/xml, text/xml
<AddressChangeParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <apiKey>sample string 1</apiKey> <ChannelID>2</ChannelID> <CustomerID>3</CustomerID> <AccountNo>sample string 4</AccountNo> <AddressID>5</AddressID> <Active>true</Active> <AddressRef>sample string 7</AddressRef> <CompanyName>sample string 8</CompanyName> <Line1>sample string 9</Line1> <Line2>sample string 10</Line2> <Line3>sample string 11</Line3> <Town>sample string 12</Town> <County>sample string 13</County> <Postcode>sample string 14</Postcode> <Country>sample string 15</Country> <AllowDeliveries>true</AllowDeliveries> <AllowInvoices>true</AllowInvoices> </AddressChangeParams>
Response Information
Resource Description
Returns:
200 OK Returns error list if failed
400 Bad Request - parameters supplied cannot be properly interpreted
401 Not Authorised if supplied api key is not valid
503 Service Unavailable
Messages returned for error: 1,29,30,31,38,39,42,43
Name | Description | Type | Additional information |
---|---|---|---|
AddressChangeData | AddressChangeData |
None. |
Response Formats
application/json, text/json
{ "AddressChangeData": { "OK": true, "AddressChangeIssues": [ { "ID": 1, "Message": "sample string 2", "ExtraData": "sample string 3" }, { "ID": 1, "Message": "sample string 2", "ExtraData": "sample string 3" } ] } }
application/xml, text/xml
<AddressChangeResults xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <AddressChangeData> <OK>true</OK> <AddressChangeIssues> <AddressChangeIssue> <ID>1</ID> <Message>sample string 2</Message> <ExtraData>sample string 3</ExtraData> </AddressChangeIssue> <AddressChangeIssue> <ID>1</ID> <Message>sample string 2</Message> <ExtraData>sample string 3</ExtraData> </AddressChangeIssue> </AddressChangeIssues> </AddressChangeData> </AddressChangeResults>