POST api/customers/{customerCode}/locations
Creates or updates a location for a customer.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
customerCode |
The CustomerCode for customer to which the location belongs. |
string |
Required |
Body Parameters
Represents the information for the location
CustomerLocationUpdateRequestName | 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", "City": "sample string 3", "Region": "sample string 4", "Postalcode": "sample string 5", "PostalZip4": "sample string 6", "CountryCode": "sample string 7" }, "ShippingAddress": { "Street1": "sample string 1", "Street2": "sample string 2", "City": "sample string 3", "Region": "sample string 4", "Postalcode": "sample string 5", "PostalZip4": "sample string 6", "CountryCode": "sample string 7" }, "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> <City>sample string 3</City> <Region>sample string 4</Region> <Postalcode>sample string 5</Postalcode> <PostalZip4>sample string 6</PostalZip4> <CountryCode>sample string 7</CountryCode> </BillingAddress> <ShippingAddress> <Street1>sample string 1</Street1> <Street2>sample string 2</Street2> <City>sample string 3</City> <Region>sample string 4</Region> <Postalcode>sample string 5</Postalcode> <PostalZip4>sample string 6</PostalZip4> <CountryCode>sample string 7</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.
CustomerLocationUpdateResponseName | 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>