Skip to main content

Storefront APIs (v1.0)

Download OpenAPI specification:Download

Products

Get a product by slug

path Parameters
slug
required
string
query Parameters
storefront_token
string
Example: storefront_token=ptkn_xxxxxxxxxxxxxxxxxx
currency
string
Enum: "USD" "EUR" "CAD" "GBP" "AUD" "NZD" "SEK" "NOK" "DKK" "PLN" "INR" "JPY" "MYR" "SGD"

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "slug": "string",
  • "description": "string",
  • "state": {
    },
  • "access": {
    },
  • "images": [],
  • "variants": [
    ],
  • "createdAt": "2020-08-13T09:05:36.939Z",
  • "updatedAt": "2020-08-13T09:05:36.939Z"
}

Collections

Get all collections

Returns all collections

query Parameters
storefront_token
string
Example: storefront_token=ptkn_xxxxxxxxxxxxxxxxxx
page
integer <int32>
size
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "results": [
    ],
  • "paging": {
    }
}

Get a collection

Returns a collection

path Parameters
slug
required
string
query Parameters
storefront_token
string
Example: storefront_token=ptkn_xxxxxxxxxxxxxxxxxx

Responses

Response samples

Content type
application/json
{
  • "id": "col_b1EVARkUTcCTSfspQaXr1Q",
  • "name": "My collection",
  • "slug": "my-collection",
  • "description": "My collection description"
}

Get products (offers) in a collection

Returns all products in the collection

path Parameters
slug
required
string
query Parameters
storefront_token
string
Example: storefront_token=ptkn_xxxxxxxxxxxxxxxxxx
currency
string
Enum: "USD" "EUR" "CAD" "GBP" "AUD" "NZD" "SEK" "NOK" "DKK" "PLN" "INR" "JPY" "MYR" "SGD"
page
integer <int32>
size
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "results": [
    ],
  • "paging": {
    }
}

Carts

Create cart

query Parameters
storefront_token
string
Example: storefront_token=ptkn_xxxxxxxxxxxxxxxxxx
currency
string
Enum: "USD" "EUR" "CAD" "GBP" "AUD" "NZD" "SEK" "NOK" "DKK" "PLN" "INR" "JPY" "MYR" "SGD"
Request Body schema: application/json
required
required
Array of objects (com.fourthwall.app.headless.HeadlessCart$RequestItem)
Array
variantId
required
string <uuid>
quantity
required
integer <int32> [ 0 .. 1000 ]

Responses

Request samples

Content type
application/json
{
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "items": [
    ]
}

Remove from cart

path Parameters
cartId
required
string
query Parameters
storefront_token
string
Example: storefront_token=ptkn_xxxxxxxxxxxxxxxxxx
currency
string
Enum: "USD" "EUR" "CAD" "GBP" "AUD" "NZD" "SEK" "NOK" "DKK" "PLN" "INR" "JPY" "MYR" "SGD"
Request Body schema: application/json
required
required
Array of objects (com.fourthwall.cart.usecase.CartRemoveFromCart$RequestItem)
Array
variantId
required
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "items": [
    ]
}

Change cart items quantity

path Parameters
cartId
required
string
query Parameters
storefront_token
string
Example: storefront_token=ptkn_xxxxxxxxxxxxxxxxxx
currency
string
Enum: "USD" "EUR" "CAD" "GBP" "AUD" "NZD" "SEK" "NOK" "DKK" "PLN" "INR" "JPY" "MYR" "SGD"
Request Body schema: application/json
required
required
Array of objects (com.fourthwall.cart.usecase.CartUpdateItemsQuantity$RequestItem)
Array
variantId
required
string <uuid>
quantity
required
integer <int32> [ 0 .. 1000 ]

Responses

Request samples

Content type
application/json
{
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "items": [
    ]
}

Add to cart

path Parameters
cartId
required
string
query Parameters
storefront_token
string
Example: storefront_token=ptkn_xxxxxxxxxxxxxxxxxx
currency
string
Enum: "USD" "EUR" "CAD" "GBP" "AUD" "NZD" "SEK" "NOK" "DKK" "PLN" "INR" "JPY" "MYR" "SGD"
Request Body schema: application/json
required
required
Array of objects (com.fourthwall.cart.usecase.CartAdd$RequestItem)
Array
variantId
required
string <uuid>
quantity
required
integer <int32> [ 1 .. 1000 ]
recStrategy
string

Responses

Request samples

Content type
application/json
{
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "items": [
    ]
}

Get cart by id

path Parameters
cartId
required
string
query Parameters
storefront_token
string
Example: storefront_token=ptkn_xxxxxxxxxxxxxxxxxx
currency
string
Enum: "USD" "EUR" "CAD" "GBP" "AUD" "NZD" "SEK" "NOK" "DKK" "PLN" "INR" "JPY" "MYR" "SGD"

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "items": [
    ]
}