Skip to main content
Every storefront resource is found and created the same way. The examples here use posts. Swap posts for any other resource path, and post for that resource’s body key — see Storefront resources for the list.

List a resource

GET /api/v202604/<resource> returns a page of live resources: the ones a shopper can see right now. Call it on the store’s own host, with no token:
Rows come back in an array named after the resource, next to a status and a meta block:

Search, filter, and sort

Every resource list accepts these query parameters:
string
Free-text search over title and description.
string
An ISO-2 country code. Returns resources available in that country, including unrestricted ones. Products use country instead. See Country availability.
string
A language code. Returns only resources translated into that language. Not available on products.
string
A sort key. Prefix it with - for descending order, for example -created_at. Each resource has its own default order — see Storefront resources.
string
The language to return text in, for example fr. Omit it for the store’s default language.
Some resources add their own filters, such as filter[parent_id] on categories or filter[media_type] on media. See Storefront resources.

Page through results

Lists use cursor pagination. Pass meta.pagination.next_cursor back as page[cursor] to get the next page, and repeat until next_cursor is null. page[limit] sets the page size: the default is 25 and the maximum is 100. A larger value returns 422.

Look one up by slug

GET /api/v202604/<resource>/{slug} returns one resource, under its singular key:
A slug lookup can return a resource that isn’t in the public list, such as a draft. See Visibility, drafts, and scheduling before you rely on it.

Find anything as an admin

The company list returns every resource of that type, whatever its state. Call it on https://api.fluid.app with a Bearer token:
It accepts the same parameters as the public list, plus two that the public side ignores:
string
One status value, such as draft or published. On products, use active, draft, or archived.
string
"true" or "false". Not available on products.
To fetch one resource as an admin, use its numeric id:

Create a resource

POST /api/v202604/company/<resource> creates a resource. Wrap the fields in the resource’s body key. title is the only required field:
A fuller create can set the slug, lifecycle, countries, metafields, and SEO in one request:
A successful create returns 201 with the new resource under its singular key. Things to know when you write:
  • Updates change only what you send. PATCH /api/v202604/company/<resource>/{id} leaves every key you leave out as it was.
  • Unknown keys are rejected. A key the write schema doesn’t define returns 422. Don’t send a response object back as a write: fields like countries and seo are read-only.
  • SEO is written and read under different keys. Write it as search_engine_optimizer_attributes. Read it as seo. See SEO.
  • Visibility is two fields. active (or public, for products) switches the resource on or off, and status sets its lifecycle. See Visibility, drafts, and scheduling.
  • Slugs are generated unless you pin one. See Slugs and URLs.
  • Metafields are public. Everything in metafields is returned by the public endpoints, so keep private data out of them.

Next steps