POST api/v1/AddressCreate
Add an additional permanent address to an existing customer account
You must send a customer id or account number along with the address details
Request Information
URI Parameters
None.
Body Parameters
AddressCreateParamsName | 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 |
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. |
VATNumber |
VAT registration number |
string |
Max length: 30 |
Request Formats
application/json, text/json
{ "apiKey": "sample string 1", "ChannelID": 2, "CustomerID": 3, "AccountNo": "sample string 4", "AddressRef": "sample string 5", "CompanyName": "sample string 6", "Line1": "sample string 7", "Line2": "sample string 8", "Line3": "sample string 9", "Town": "sample string 10", "County": "sample string 11", "Postcode": "sample string 12", "Country": "sample string 13", "AllowDeliveries": true, "AllowInvoices": true, "VATNumber": "sample string 16" }
application/xml, text/xml
<AddressCreateParams 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> <AddressRef>sample string 5</AddressRef> <CompanyName>sample string 6</CompanyName> <Line1>sample string 7</Line1> <Line2>sample string 8</Line2> <Line3>sample string 9</Line3> <Town>sample string 10</Town> <County>sample string 11</County> <Postcode>sample string 12</Postcode> <Country>sample string 13</Country> <AllowDeliveries>true</AllowDeliveries> <AllowInvoices>true</AllowInvoices> <VATNumber>sample string 16</VATNumber> </AddressCreateParams>
Response Information
Resource Description
Returns:
200 OK Returns address id of the address created, or 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,32,33
Name | Description | Type | Additional information |
---|---|---|---|
AddressCreateData | AddressCreateData |
None. |
Response Formats
application/json, text/json
{ "AddressCreateData": { "OK": true, "AddressID": 2, "AddressCreateIssues": [ { "ID": 1, "Message": "sample string 2", "ExtraData": "sample string 3" }, { "ID": 1, "Message": "sample string 2", "ExtraData": "sample string 3" } ] } }
application/xml, text/xml
<AddressCreateResults xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <AddressCreateData> <OK>true</OK> <AddressID>2</AddressID> <AddressCreateIssues> <AddressCreateIssue> <ID>1</ID> <Message>sample string 2</Message> <ExtraData>sample string 3</ExtraData> </AddressCreateIssue> <AddressCreateIssue> <ID>1</ID> <Message>sample string 2</Message> <ExtraData>sample string 3</ExtraData> </AddressCreateIssue> </AddressCreateIssues> </AddressCreateData> </AddressCreateResults>