Skip to content

Markets API

Markets, their websites and publishable keys. All requests need a secret key; see REST API for keys, errors and limits.

List the active organization's sites with their publishable keys

GET /v1/sites

Parameters

NameInTypeDescription
cursorquerystring
limitqueryinteger
sortByquery"createdAt"
sortDirquery"asc" | "desc"
Terminal window
curl -X GET https://api.loomieo.com/v1/sites \
-H "Authorization: Bearer $LUMIEO_KEY"

Response 200

NameTypeDescription
paginationrequiredobject
sitesrequiredlist of object
Errors
  • 401: auth_unauthenticated
  • 403: forbidden
  • 422: validation_failed
  • 429: rate_limited

Create a site on a catalog connection

POST /v1/sites

Create a site on a catalog connection (owner); it gets one pk_live_ and one pk_test_ key

Body

NameTypeDescription
currencyrequiredstringISO 4217 code, e.g. SEK.
localerequiredstringBCP 47 language tag, e.g. sv or en-GB.
namerequiredstring1 to 120 characters
actionslist of object or nullProduct card buttons on this market's widgets. Null: the catalog's default (view product, plus add to cart when the shop has a cart).
allowedOriginslist of stringup to 50 items
connectionIdid or nullThe catalog source; defaults to the organization's built-in Lumieo catalog.
defaultThemeIdid or null
feedUrluri or nullThis site's catalog feed (feed connections).
marketstring or nullMarket id within the connection (Centra).
Terminal window
curl -X POST https://api.loomieo.com/v1/sites \
-H "Authorization: Bearer $LUMIEO_KEY" \
-H "Content-Type: application/json" \
-d '{"currency":"…","locale":"…","name":"…"}'

Response 200

NameTypeDescription
siterequiredobject
Errors
  • 400: bad_request
  • 401: auth_unauthenticated
  • 402: plan_limit_reached
  • 403: auth_csrf_rejected, forbidden, out_of_scope
  • 404: connection_not_found
  • 422: validation_failed
  • 429: rate_limited

Delete a site

DELETE /v1/sites/{id}

Delete a site (owner): its publishable keys stop working and its listings go. A site stores still use can't be deleted (site_in_use, with storeCount)

Parameters

NameInTypeDescription
idrequiredpathid
Terminal window
curl -X DELETE https://api.loomieo.com/v1/sites/:id \
-H "Authorization: Bearer $LUMIEO_KEY"

Response 200

NameTypeDescription
siterequiredobject
Errors
  • 401: auth_unauthenticated
  • 403: auth_csrf_rejected, forbidden, out_of_scope
  • 404: site_not_found
  • 409: site_in_use
  • 422: validation_failed
  • 429: rate_limited

One site with its publishable keys

GET /v1/sites/{id}

Parameters

NameInTypeDescription
idrequiredpathid
Terminal window
curl -X GET https://api.loomieo.com/v1/sites/:id \
-H "Authorization: Bearer $LUMIEO_KEY"

Response 200

NameTypeDescription
siterequiredobject
Errors
  • 401: auth_unauthenticated
  • 403: forbidden
  • 404: site_not_found
  • 422: validation_failed
  • 429: rate_limited

Update a site

PATCH /v1/sites/{id}

Update a site (owner): name, language, origins; new origins apply to its keys at once, the currency can't change

Parameters

NameInTypeDescription
idrequiredpathid

Body

NameTypeDescription
actionslist of object or nullProduct card buttons on this market's widgets. Null: the catalog's default (view product, plus add to cart when the shop has a cart).
allowedOriginslist of stringup to 50 items
currencystringFixed at create: any other value answers site_currency_locked.
defaultThemeIdid or null
feedUrluri or nullThis site's catalog feed (feed connections).
localestringBCP 47 language tag, e.g. sv or en-GB.
marketstring or nullMarket id within the connection (Centra).
namestring1 to 120 characters
Terminal window
curl -X PATCH https://api.loomieo.com/v1/sites/:id \
-H "Authorization: Bearer $LUMIEO_KEY"

Response 200

NameTypeDescription
siterequiredobject
Errors
  • 400: bad_request
  • 401: auth_unauthenticated
  • 403: auth_csrf_rejected, forbidden, out_of_scope
  • 404: site_not_found
  • 409: site_currency_locked
  • 422: validation_failed
  • 429: rate_limited

Set what the screens of a site's stores show

PUT /v1/sites/{id}/assignment

Set what the screens of a site's stores show; a store, group or screen of their own still wins. All null: clear it

Parameters

NameInTypeDescription
idrequiredpathid

Body

NameTypeDescription
fallbackPlaylistIdid or nullPlays when the main playlist is empty or none is set; cached on the screen.
layoutIdid or nullPlays this layout (zones, each with its playlist, and overlays) instead of a playlist (S-13).
playlistIdid or null
Terminal window
curl -X PUT https://api.loomieo.com/v1/sites/:id/assignment \
-H "Authorization: Bearer $LUMIEO_KEY"

Response 200

NameTypeDescription
assignmentrequiredobject or nullWhat the target now shows; null once cleared.
Errors
  • 400: bad_request
  • 401: auth_unauthenticated
  • 403: auth_csrf_rejected, forbidden, out_of_scope
  • 404: layout_not_found, playlist_not_found, site_not_found
  • 422: validation_failed
  • 429: rate_limited

Rotate a site's pk_live_ or pk_test_ key

POST /v1/sites/{id}/keys/{environment}/rotate

Rotate a site's pk_live_ or pk_test_ key (owner); the old key keeps working for 7 days

Parameters

NameInTypeDescription
environmentrequiredpath"live" | "test"
idrequiredpathid
Terminal window
curl -X POST https://api.loomieo.com/v1/sites/:id/keys/:environment/rotate \
-H "Authorization: Bearer $LUMIEO_KEY"

Response 200

NameTypeDescription
siterequiredobject
Errors
  • 400: bad_request
  • 401: auth_unauthenticated
  • 403: auth_csrf_rejected, forbidden, out_of_scope
  • 404: site_not_found
  • 422: validation_failed
  • 429: rate_limited

The site's setup checklist

GET /v1/sites/{id}/setup

The site's setup checklist: products, allowed origins, embed seen, a live experience

Parameters

NameInTypeDescription
idrequiredpathid
Terminal window
curl -X GET https://api.loomieo.com/v1/sites/:id/setup \
-H "Authorization: Bearer $LUMIEO_KEY"

Response 200

NameTypeDescription
setuprequiredobject
Errors
  • 401: auth_unauthenticated
  • 403: forbidden
  • 404: site_not_found
  • 422: validation_failed
  • 429: rate_limited

Switch a site's catalog source

POST /v1/sites/{id}/source

Switch a site's catalog source (owner): its listings and product snapshots are removed, and live experiences show no products until re-tagged

Parameters

NameInTypeDescription
idrequiredpathid

Body

NameTypeDescription
connectionIdrequiredid or nullThe new source; null is the built-in Lumieo catalog.
feedUrluri or nullThis site's catalog feed (feed connections).
marketstring or nullMarket id within the connection (Centra).
Terminal window
curl -X POST https://api.loomieo.com/v1/sites/:id/source \
-H "Authorization: Bearer $LUMIEO_KEY" \
-H "Content-Type: application/json" \
-d '{"connectionId":"…"}'

Response 200

NameTypeDescription
sourceSwitchrequiredobject
Errors
  • 400: bad_request
  • 401: auth_unauthenticated
  • 403: auth_csrf_rejected, forbidden, out_of_scope
  • 404: connection_not_found, site_not_found
  • 422: validation_failed
  • 429: rate_limited