POST api/customers/deliveryaddress

Add customer delivery address.

Request Information

URI Parameters

None.

Body Parameters

CustomerDeliveryAddressPostRequest
NameDescriptionTypeAdditional information
CustomerNumber

Customer number

integer

None.

Name

Name on the delivery address

string

Required

Max length: 50

Address1

Address line 1

string

Max length: 50

Address2

Address line 2

string

Max length: 50

Address3

Address line 3

string

Max length: 50

PostalCode

Postal code

string

Max length: 50

Town

Town

string

Max length: 50

CountryId

Id of the country

string

Max length: 2

Phone1

Phone

string

Max length: 50

Phone2

string

Max length: 50

IsDefaultAddress

True if delivery address should be selected as default in e.g order

boolean

Required

Remarks

None.

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "CustomerNumber": 1,
  "Name": "sample string 2",
  "Address1": "sample string 3",
  "Address2": "sample string 4",
  "Address3": "sample string 5",
  "PostalCode": "sample string 6",
  "Town": "sample string 7",
  "CountryId": "sample string 8",
  "Phone1": "sample string 9",
  "Phone2": "sample string 10",
  "IsDefaultAddress": true
}

application/xml, text/xml

Sample:
<CustomerDeliveryAddressPostRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Business">
  <Address1>sample string 3</Address1>
  <Address2>sample string 4</Address2>
  <Address3>sample string 5</Address3>
  <CountryId>sample string 8</CountryId>
  <IsDefaultAddress>true</IsDefaultAddress>
  <Name>sample string 2</Name>
  <Phone1>sample string 9</Phone1>
  <Phone2>sample string 10</Phone2>
  <PostalCode>sample string 6</PostalCode>
  <Town>sample string 7</Town>
  <CustomerNumber>1</CustomerNumber>
</CustomerDeliveryAddressPostRequest>

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 'CustomerDeliveryAddressPostRequest'.

Response Information

Resource Description

CustomerDeliveryAddressPostResponse
NameDescriptionTypeAdditional information
Errors

List of errors when adding delivery address on customer

Collection of PostCustomerDeliveryAddressError

None.

Success

Returns true if customer delivery address is added

boolean

None.

Id

Id of the added customer delivery address

globally unique identifier

None.

Response Formats

application/json, text/json

Sample:
{
  "Errors": [
    {
      "ErrorCode": 1,
      "ErrorMessage": "sample string 1"
    },
    {
      "ErrorCode": 1,
      "ErrorMessage": "sample string 1"
    }
  ],
  "Success": true,
  "Id": "e7af48da-dfee-4492-aa97-4a8833d60612"
}

application/xml, text/xml

Sample:
<CustomerDeliveryAddressPostResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Business">
  <Errors>
    <PostCustomerDeliveryAddressError>
      <ErrorCode>InternalServerError</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PostCustomerDeliveryAddressError>
    <PostCustomerDeliveryAddressError>
      <ErrorCode>InternalServerError</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PostCustomerDeliveryAddressError>
  </Errors>
  <Id>e7af48da-dfee-4492-aa97-4a8833d60612</Id>
  <Success>true</Success>
</CustomerDeliveryAddressPostResponse>