The Location API allows a fulfillment location to be created with basic location data. 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 URL | https://{tenantId}-translation.mozu.com/api/system/v1/location/ |
Sandbox URL | https://{tenantId}-translation.sandbox.mozu.com/api/system/v1/location/ |
Supported Formats | JSON |
HTTP Method | POST |
Example
This example case creates a location based on the following characteristics:
- Location name is “TEST LOCATION”
- Taxable shipping location in Dallas
This guide will demonstrate how to put together each section of the request.
Required Parameters
The following are required for all instances of this call:
Parameter | Type | Description |
name | string | The name of the location. The minimum length is 1 and the maximum length is 50. |
addressLine1 | string | The first line of the street address. The minimum length is 1 and the maximum length is 50. |
city | string | The city that the street address is located in. The minimum length is 1 and the maximum length is 50. |
countryCode | enum | The code indicating the country that the address is location in (e.g. US, AD, etc.). |
phone | string | The phone number of the location. The minimum length is 1 and the maximum length is 20. |
localSalesTax | number | The local sales tax of the location. |
active | boolean | Indicates whether the location is active or not within the Kibo network. |
shippingLocation | boolean | Indicates whether the location can ship shipments. |
taxableLocation | boolean | Indicates whether the location is taxable. |
Optional Parameters
These are the other details that can be used to create a location:
Parameter | Type | Description |
locationID | integer | A unique identifier for the fulfillment location. The minimum value is “1”. |
externalStoreID | string | A client-generated unique identifier for the location. |
retailerID | integer | A unique identifier for the retailer. |
manufacturerID | integer | A unique identifier for a manufacturer. The minimum value is “1”. |
fulfillerID | integer | A unique identifier for a fulfiller. The minimum value is “1”. |
addressLine2 | string | The second line of the street address. The maximum length is 50. |
addressLine3 | string | The third line of the street address. The maximum length is 50. |
state | enum | The state that the street address is located in (e.g. TX, CO). |
postalCode | string | The postal code or zip code of the address. The minimum length is 1 and the maximum length is 35. |
latitude | number | The latitudinal value of the location. |
longitude | number | The longitudinal value of the location. |
contact | string | The name of the location’s primary contact person. |
contactPhone | string | The phone number of the location’s primary contact person. The minimum length is 1 and the maximum length is 20. |
fax | string | The location’s preferred fax number. The maximum length is 20. |
string | The location’s desired contact email address. The maximum length is 50. | |
restockEnabled | boolean | Indicates whether the location can be restocked by its distribution center. |
pickupEnabled | boolean | Indicates whether shipments can be picked up at the location. |
showInAggregateReport | boolean | Indicates whether the location shows up in the aggregate report. |
hasStorefront | boolean | Indicates whether the location has a storefront that customers can walk into. |
assembly | boolean | Indicates if the location offers assembly services, in which items are put together for the client on request. |
delivery | boolean | Indicates if the location offers employee delivery of an order to the customer’s address. |
mainLocation | boolean | Indicates whether the location is the fulfiller’s primary location. |
express | boolean | Indicates whether the requesting retailer is able to express ship for the given catalog. |
lastUpdated | string (date-time) | The date that this location was last updated. |
The Full Request
This is the entire request that will create a new location.
{ "manufacturerID": 11111, "fulfillerID": 22222, "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. It will include a Kibo-assigned identifier for the location and other related information, including default values for any configurations that were not set.
{ "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" }