POST api/v3/customers/{customerId}/locations
Creates or updates a location for a customer.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| customerId |
The Id of the customer to which the location belongs. |
integer |
Required |
Body Parameters
Represents the information for the location
CustomerLocationUpdateRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| LocationId |
Represents the LocationId of the customer's location to edit. If null, creates a new location for the customer. |
integer |
Minimum value: 1 |
| Status |
Indicates if the location should be open or closed. |
OpenCloseStatus |
Required |
| ShortName |
A short name for the location. |
string |
Required String length: inclusive between 1 and 50 |
| Name |
A long name for the location |
string |
Required String length: inclusive between 1 and 100 |
| TaxCode |
The default tax code for the location |
string |
Required String length: inclusive between 1 and 30 |
| ShippingAddressSameAsBillingAddress |
Is the shipping address the same as the billing address. |
boolean |
Default value is false |
| BillingAddress |
The billing address for the location |
Address |
Required |
| ShippingAddress |
The shipping address for the location. Not required if same as billing address. |
Address |
None. |
| DefaultAbcShopLocationId |
The Id of the ABC Shop location to use as a default for the location. The location must be an AbcShop, FM, or VFM. |
integer |
Minimum value: 1 |
| ShippingAttention |
The attention line associated with the ShippingAddress |
string |
String length: inclusive between 0 and 50 |
| BillingAttention |
The attenion line associated with the BillingAddress |
string |
String length: inclusive between 0 and 50 |
Request Formats
application/json, text/json
{
"LocationId": 1,
"Status": 0,
"ShortName": "sample string 1",
"Name": "sample string 2",
"TaxCode": "sample string 3",
"ShippingAddressSameAsBillingAddress": true,
"BillingAddress": {
"Street1": "sample string 1",
"Street2": "sample string 2",
"Street3": "sample string 3",
"City": "sample string 4",
"Region": "sample string 5",
"Postalcode": "sample string 6",
"PostalZip4": "sample string 7",
"CountryCode": "sample string 8"
},
"ShippingAddress": {
"Street1": "sample string 1",
"Street2": "sample string 2",
"Street3": "sample string 3",
"City": "sample string 4",
"Region": "sample string 5",
"Postalcode": "sample string 6",
"PostalZip4": "sample string 7",
"CountryCode": "sample string 8"
},
"DefaultAbcShopLocationId": 1,
"ShippingAttention": "sample string 5",
"BillingAttention": "sample string 6"
}
application/xml, text/xml
<CustomerLocationUpdateRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<LocationId>1</LocationId>
<Status>Open</Status>
<ShortName>sample string 1</ShortName>
<Name>sample string 2</Name>
<TaxCode>sample string 3</TaxCode>
<ShippingAddressSameAsBillingAddress>true</ShippingAddressSameAsBillingAddress>
<BillingAddress>
<Street1>sample string 1</Street1>
<Street2>sample string 2</Street2>
<Street3>sample string 3</Street3>
<City>sample string 4</City>
<Region>sample string 5</Region>
<Postalcode>sample string 6</Postalcode>
<PostalZip4>sample string 7</PostalZip4>
<CountryCode>sample string 8</CountryCode>
</BillingAddress>
<ShippingAddress>
<Street1>sample string 1</Street1>
<Street2>sample string 2</Street2>
<Street3>sample string 3</Street3>
<City>sample string 4</City>
<Region>sample string 5</Region>
<Postalcode>sample string 6</Postalcode>
<PostalZip4>sample string 7</PostalZip4>
<CountryCode>sample string 8</CountryCode>
</ShippingAddress>
<DefaultAbcShopLocationId>1</DefaultAbcShopLocationId>
<ShippingAttention>sample string 5</ShippingAttention>
<BillingAttention>sample string 6</BillingAttention>
</CustomerLocationUpdateRequest>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
An object containing basic information on the modified location.
CustomerLocationUpdateResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| LocationId |
The LocationId of the modified location. |
integer |
None. |
Response Formats
application/json, text/json
{
"LocationId": 1
}
application/xml, text/xml
<CustomerLocationUpdateResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <LocationId>1</LocationId> </CustomerLocationUpdateResponse>