block-quote On this pagechevron-down
copy Copy chevron-down
π¦ Developer ToolsLocksmith Admin API Locksmith's Admin API can be used to query Locksmith to get information about your locks, keys, and settings. As a REST API, it closely resembles Shopify's own REST Admin APIarrow-up-right .
circle-exclamation
Locksmith's Admin API is not intended for use in themes or user-facing browser experiences. For that, use Locksmith's Storefront API . Any client-side browser Javascript calling the Admin API will encounter CORSarrow-up-right errors.
We maintain a 1-to-1 relationship with Shopify's API versions. Any current and valid Shopify API versionsarrow-up-right are also current and valid Locksmith versions.
Read more about Shopify's versioning philosophyarrow-up-right .
circle-check
For simplicity, the use of unstable as the version when calling this API will work for most use-cases.
There are two required headers:
Must be of the format "example.myshopify.com"
Must be an enabled access token, generated in your Locksmith settings.
Using cURL, one might access the API this way:
Copy curl \
--header "x-shopify-shop-domain: example.myshopify.com" \
--header "x-locksmith-access-token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
https://uselocksmith.com/api/unstable/shop.json All requests should be prefixed with https://uselocksmith.com/api/:version
POST /input-lists/:id/sync
Requests an input list sync for the input list indicated by the ID
POST /install
Requests a full Locksmith installation to the currently published theme
GET /locks.json
Returns an array of all locks in your Locksmith account
GET /locks/:id.json
Returns data for a single lock in your Locksmith account
DELETE /locks/:id
Deletes the lock indicated by the ID
GET /shop.json
Returns Locksmith's entire configuration for your store
Do not rely upon data keys that are prefixed with an underscore (e.g. "_foobar"). They are subject to change or removal at any time.
Generating an access token
To access this API, generate an access token. You can find these toward the end of your settings area:
Use the "Add access token" link to add your first token.
Once created, an access token may be edited to enable/disable it, or to change its name. It may also be deleted.
Last updated 8 months ago