The Get Location API retrieves basic information about a location.
The data returned by this request is 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/v2/location/{locationID} |
Sandbox URL | https://{tenantId}-translation.sandbox.mozu.com/api/v2/location/{locationID} |
Supported Formats | JSON |
HTTP Method | GET |
You can append one optional parameter, “includeHours,” to the end of the above endpoint to determine whether information about the location’s timezone and daily store hours are included in the response. If this parameter is not provided, then the API will default to false and not return this information.
- https://integration.shopatron.com/api/v2/location/{locationID}?includeHours=true
Example
In this example, the location details includes these particular properties:
- Location name is “Example Location” with ID 00000
- Multiple contact details available for primary contact John Smith
- Taxable shipping location with a storefront in Dallas
- Express fulfillment available but not pickup
General Information
The response returns the following information about a location:
- Identification (associated IDs)
- Address Information
- Fulfillment Details (local taxes, enabled options, etc.)
The Full Request
The below endpoint will request the data from Location ID 00000, including the hours and timezone information. There is no request body needed.
https://{tenantId}-translation.mozu.com/api/v2/location/00000?includeHours=true
The Full Response
This is the full response returned by the API.
{ "locationID": 00000, "manufacturerID": 12121, "fulfillerID": 90909, "name": "Example Location", "addressLine1": "111 Example St", "city": "Dallas", "state": "TX", "countryCode": "US", "postalCode": "75201", "latitude": 39.5755, "longitude": -104.862, "contact": "John Smith", "contactPhone": "00-000-0000", "phone": "000-000-0000", "fax": "111-111-1111", "email": "example.email@kibocommerce.com", "localSalesTax": 0.06075, "active": true, "shippingLocation": true, "restockEnabled": false, "pickupEnabled": false, "showInAggregateReport": true, "taxableLocation": true, "hasStorefront": true, "mainLocation": false, "express": true, "lastUpdated": "2018-01-01T19:40:30+0000", "hours": { "SUNDAY": { "open": "09:00:00", "close": "21:00:00" }, "MONDAY": { "open": "09:00:00", "close": "22:00:00" }, "TUESDAY": { "open": "09:00:00", "close": "22:00:00" }, "WEDNESDAY": { "open": "09:00:00", "close": "22:00:00" }, "THURSDAY": { "open": "09:00:00", "close": "22:00:00" }, "FRIDAY": { "open": "09:00:00", "close": "22:00:00" }, "SATURDAY": { "open": "09:00:00", "close": "22:00:00" } }, "timeZone": "CST", "dstObserved": true } }