Elastic Path Locations API
The Locations API from Elastic Path — 2 operation(s) for locations.
The Locations API from Elastic Path — 2 operation(s) for locations.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/elastic-path-locations-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
version: 2.0.0
title: Inventories Introduction Locations API
description: The Inventory API allows you to manage stock for products at both organization and store levels.
servers:
- url: https://euwest.api.elasticpath.com/v2
description: EU West cluster
- url: https://useast.api.elasticpath.com/v2
description: US East cluster
security:
- bearerAuth: []
tags:
- name: Locations
paths:
/inventories/locations:
get:
parameters:
- $ref: '#/components/parameters/PageOffset'
- $ref: '#/components/parameters/PageLimit'
- $ref: '#/components/parameters/Filter'
- description: Only supported value is `location`. When specified, the results are sorted in ascending order based on the value of the field. For `location`, this means ascending distance from the supplied geolocation. For more information, see [Sorting](/guides/Getting-Started/sorting). For location sorting, `Ep-Geolocation` header must be provided as well.
name: sort
in: query
schema:
type: string
enum:
- location
- $ref: '#/components/parameters/EpGeolocation'
summary: List Locations
description: Lists all Inventory Locations
tags:
- Locations
operationId: ListLocations
responses:
'200':
description: Success. A list of locations is returned
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Location'
links:
$ref: '#/components/schemas/Links'
example:
data:
- id: ebc7652d-bb7d-4359-9a83-78f2998208d9
type: inventory_location
attributes:
name: Milton Keynes Warehouse
external_ref: mk-stock-warehouse-walnut-tree
slug: milton-keynes-warehouse
description: Southern dispatch location for all inventory
address:
- Troughton Supplies
- 38 Pipernel Grove
- Walnut Tree
- MK7 4UL
geolocation:
lat: -90
lon: 180
'400':
$ref: '#/components/responses/ValidationError'
post:
summary: Create a Location
description: Creates an Inventory Location
tags:
- Locations
operationId: CreateLocation
requestBody:
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/LocationRequest'
responses:
'201':
description: Success. The location was created successfully
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/Location'
example:
data:
id: ebc7652d-bb7d-4359-9a83-78f2998208d9
type: inventory_location
attributes:
name: Milton Keynes Warehouse
external_ref: mk-stock-warehouse-walnut-tree
slug: milton-keynes-warehouse
description: Southern dispatch location for all inventory
address:
- Troughton Supplies
- 38 Pipernel Grove
- Walnut Tree
- MK7 4UL
geolocation:
lat: -90
lon: 180
'400':
$ref: '#/components/responses/ValidationError'
/inventories/locations/{location_uuid}:
parameters:
- name: location_uuid
in: path
description: The unique identifier of the location.
required: true
schema:
$ref: '#/components/schemas/UUID'
get:
summary: Get a Location
description: Get an Inventory Location
tags:
- Locations
operationId: GetLocation
responses:
'200':
description: Success. The location is returned
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/Location'
example:
data:
id: ebc7652d-bb7d-4359-9a83-78f2998208d9
type: inventory_location
attributes:
name: Milton Keynes Warehouse
external_ref: mk-stock-warehouse-walnut-tree
slug: milton-keynes-warehouse
description: Southern dispatch location for all inventory
address:
- Troughton Supplies
- 38 Pipernel Grove
- Walnut Tree
- MK7 4UL
geolocation:
lat: -90
lon: 180
'404':
$ref: '#/components/responses/NotFoundError'
put:
summary: Update a Location
description: Updates an Inventory Location
tags:
- Locations
operationId: UpdateLocation
requestBody:
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/LocationUpdateRequest'
responses:
'200':
description: Success. The location was updated successfully
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/Location'
example:
data:
id: ebc7652d-bb7d-4359-9a83-78f2998208d9
type: inventory_location
attributes:
name: Milton Keynes Warehouse
external_ref: mk-stock-warehouse-walnut-tree
slug: milton-keynes-warehouse
description: Southern dispatch location for all inventory
address:
- Troughton Supplies
- 38 Pipernel Grove
- Walnut Tree
- MK7 4UL
geolocation:
lat: -90
lon: 180
'400':
$ref: '#/components/responses/ValidationError'
'404':
$ref: '#/components/responses/NotFoundError'
delete:
summary: Delete a Location
description: Delete an Inventory Location
tags:
- Locations
operationId: DeleteLocation
responses:
'204':
description: Success. The location is deleted
components:
schemas:
LocationUpdateAttributes:
properties:
name:
type: string
minLength: 3
maxLength: 1024
example: Milton Keynes Warehouse
external_ref:
type:
- string
- 'null'
minLength: 3
maxLength: 1024
example: mk-stock-warehouse-walnut-tree
slug:
type: string
minLength: 1
maxLength: 128
example: milton-keynes-warehouse
description:
type:
- string
- 'null'
minLength: 3
maxLength: 1024
example: Southern dispatch location for all inventory
address:
type:
- array
- 'null'
minItems: 1
maxItems: 8
items:
type:
- string
- 'null'
maxLength: 1024
geolocation:
$ref: '#/components/schemas/GeolocationDetails'
LocationRequest:
type: object
required:
- attributes
properties:
type:
$ref: '#/components/schemas/InventoryLocationType'
attributes:
$ref: '#/components/schemas/LocationAttributes'
ErrorResponse:
type: object
required:
- errors
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
UUID:
type: string
description: The unique identifier.
x-go-type: uuid.UUID
x-go-type-import:
name: uuid
path: github.com/google/uuid
example: 00000000-0000-0000-0000-000000000000
Timestamps:
required:
- created_at
properties:
updated_at:
description: The date and time a resource was updated.
type: string
example: '2017-01-10T11:41:19.244842Z'
created_at:
description: The date and time a resource was created.
type: string
example: '2017-01-10T11:41:19.244842Z'
LocationUpdateRequest:
type: object
required:
- id
- type
- attributes
properties:
id:
$ref: '#/components/schemas/UUID'
type:
$ref: '#/components/schemas/InventoryLocationType'
attributes:
$ref: '#/components/schemas/LocationUpdateAttributes'
Meta:
type: object
required:
- timestamps
properties:
timestamps:
$ref: '#/components/schemas/Timestamps'
Location:
type: object
required:
- id
- type
- attributes
properties:
id:
$ref: '#/components/schemas/UUID'
type:
$ref: '#/components/schemas/InventoryLocationType'
attributes:
$ref: '#/components/schemas/LocationAttributes'
meta:
$ref: '#/components/schemas/Meta'
Links:
type: object
additionalProperties:
$ref: '#/components/schemas/Link'
LinkObject:
type: object
properties:
href:
type: string
format: uri
example: http://example.com/articles/1/comments
title:
type: string
example: Comments
describedby:
type: string
format: uri
example: http://example.com/schemas/article-comments
LinkURI:
type:
- string
- 'null'
format: uri
example: http://example.com/articles/1/comments
GeolocationDetails:
type:
- object
- 'null'
description: The longitude and latitude of a location.
required:
- lat
- lon
properties:
lat:
type: number
format: double
example: 51.477928
lon:
type: number
format: double
example: -0.001545
example:
lat: 51.477928
lon: -0.001545
Link:
anyOf:
- $ref: '#/components/schemas/LinkURI'
- $ref: '#/components/schemas/LinkObject'
InventoryLocationType:
type: string
enum:
- inventory_location
example: inventory_location
Error:
type: object
required:
- status
- title
properties:
status:
type: string
description: The HTTP response code of the error.
example: 500
title:
type: string
description: A brief summary of the error.
example: Internal server error
detail:
type: string
description: Optional additional detail about the error.
example: An internal error has occurred.
meta:
type: object
description: Additional supporting meta data for the error.
example:
missing_ids:
- e7d50bd5-1833-43c0-9848-f9d325b08be8
LocationAttributes:
required:
- name
- slug
properties:
name:
type: string
minLength: 3
maxLength: 1024
example: Milton Keynes Warehouse
external_ref:
type: string
minLength: 3
maxLength: 1024
example: mk-stock-warehouse-walnut-tree
slug:
type: string
minLength: 1
maxLength: 128
example: milton-keynes-warehouse
description:
type: string
minLength: 3
maxLength: 1024
example: Southern dispatch location for all inventory
address:
type: array
minItems: 1
maxItems: 8
items:
type: string
maxLength: 1024
geolocation:
$ref: '#/components/schemas/GeolocationDetails'
responses:
ValidationError:
description: Bad request. The request failed validation.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
missing-name:
value:
errors:
- title: Validation Error
status: '400'
detail: Your request was invalid
NotFoundError:
description: Not found. The requested entity does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
not-found:
value:
errors:
- title: Not Found
status: '404'
detail: No location found
parameters:
PageLimit:
description: The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
name: page[limit]
in: query
required: false
schema:
type: integer
format: int
minimum: 0
example: 100
EpGeolocation:
description: Latitude, Longitude representing current location
name: Ep-Geolocation
in: header
schema:
type: string
pattern: ^-?\d+(\.\d+)?,-?\d+(\.\d+)?$
example: 49.2847027,-123.1109329
Filter:
name: filter
in: query
required: false
schema:
type: string
format: string
description: 'Some Inventories API endpoints support filtering. For the general syntax, see [**Filtering**](/guides/Getting-Started/filtering), but you must go to a specific endpoint to understand the attributes and operators an endpoint supports.
'
example: eq(location,new-york)
PageOffset:
name: page[offset]
description: The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
in: query
required: false
schema:
type: integer
format: int
minimum: 0
maximum: 10000
example: 10
securitySchemes:
bearerAuth:
type: http
scheme: bearer