Update Location

Warning

This documentation is for translated APIs and intended only for some implementations who have upgraded from a previous version of Order Management. Verify whether your implementation uses translated APIs before making this call, as you will experience errors if your tenant is not configured to use these. If your implementation is not configured to do so, then refer to the standard API documentation instead.

The Location API also allows the details of a location to be updated. This includes the address, primary contact information, and fulfillment options such as whether the location is enabled for pickup or has a storefront.

Note that the request body and parameter schemas outlined in this guide are the exact same as in the previous version of OMS, as the Unified Commerce platform supports backwards compatibility for this API. The only change to this request is the format of the base endpoint, as shown in the below table. Remember to provide the x-vol-tenant key for authentication in the headers.

Production URLhttps://{tenantId}-translation.mozu.com/api/v2/location/[locationID]
Sandbox URLhttps://{tenantId}-translation.sandbox.mozu.com/api/v2/location/[locationID]
Supported FormatsJSON
HTTP MethodPUT

Example

This example case creates a call that will edit an existing location. The important properties and new edits are:

  • Location name is “TEST LOCATION”
  • Taxable shipping location in Dallas

This guide will demonstrate how to put together each section of the request to edit this item.

Required Parameters

The following are required for all instances of this call:

ParameterTypeDescription
namestringThe name of the location. The minimum length is 1 and the maximum length is 50.
addressLine1stringThe first line of the street address. The minimum length is 1 and the maximum length is 50.
citystringThe city that the street address is located in. The minimum length is 1 and the maximum length is 50.
countryCodeenumThe code indicating the country that the address is location in (e.g. US, AD, etc.).
phonestringThe phone number of the location. The minimum length is 1 and the maximum length is 20.
localSalesTaxnumberThe local sales tax of the location.
activebooleanIndicates whether the location is active or not within the Kibo network.
shippingLocationbooleanIndicates whether the location can ship shipments.
taxableLocationbooleanIndicates whether the location is taxable.

Optional Parameters

These are the other details that can be used to edit a location:

ParameterTypeDescription
locationIDintegerA unique identifier for the fulfillment location. The minimum value is “1”.
externalStoreIDstringA client-generated unique identifier for the location.
retailerIDintegerA unique identifier for the retailer.
manufacturerIDintegerA unique identifier for a manufacturer. The minimum value is “1”.
fulfillerIDintegerA unique identifier for a fulfiller. The minimum value is “1”.
addressLine2stringThe second line of the street address. The maximum length is 50.
addressLine3stringThe third line of the street address. The maximum length is 50.
stateenumThe state that the street address is located in (e.g. TX, CO).
postalCodestringThe postal code or zip code of the address. The minimum length is 1 and the maximum length is 35.
latitudenumberThe latitudinal value of the location.
longitudenumberThe longitudinal value of the location.
contactstringThe name of the location’s primary contact person.
contactPhonestringThe phone number of the location’s primary contact person. The minimum length is 1 and the maximum length is 20.
faxstringThe location’s preferred fax number. The maximum length is 20.
emailstringThe location’s desired contact email address. The maximum length is 50.
restockEnabledbooleanIndicates whether the location can be restocked by its distribution center.
pickupEnabledbooleanIndicates whether shipments can be picked up at the location.
showInAggregateReportbooleanIndicates whether the location shows up in the aggregate report.
hasStorefrontbooleanIndicates whether the location has a storefront that customers can walk into.
assemblybooleanIndicates if the location offers assembly services, in which items are put together for the client on request.
deliverybooleanIndicates if the location offers employee delivery of an order to the customer’s address.
mainLocationbooleanIndicates whether the location is the fulfiller’s primary location.
expressbooleanIndicates whether the requesting retailer is able to express ship for the given catalog.
lastUpdatedstring (date-time)The date that this location was last updated.

The Full Request

This is the entire request that will update a location. The parameters that are not being specifically edited are left unchanged from the original data values.

Recall that the locationID should be appended to the endpoint, as well as listed in the body of the request.

{
 "locationID":012345,
 "name":"TEST LOCATION",
 "addressLine1": "000 Test St",
 "city": "Dallas",
 "countryCode": "US",
 "phone": "000-000-0000",
 "localSalesTax": 0.06075,
 "active": true,
 "shippingLocation": true,
 "taxableLocation": true
}

The Full Response

This is the entire response returned by the API.

{
 "locationID": 012345,
 "manufacturerID": 11111,
 "fulfillerID": 22222,
 "name": "TEST LOCATION",
 "addressLine1": "000 Test St",
 "city": "Dallas",
 "countryCode": "US",
 "contact": " ",
 "phone": "000-000-0000",
 "localSalesTax": 0.06075,
 "active": true,
 "shippingLocation": true,
 "restockEnabled": false,
 "pickupEnabled": false,
 "showInAggregateReport": false,
 "taxableLocation": true,
 "mainLocation": false,
 "lastUpdated": "2018-01-03T16:14:21+0000"
}