Skip to main content

Fourthwall APIs (v1.0)

Download OpenAPI specification:Download

How to get credentials?

We are excited to offer you access to our Open API, allowing you to integrate our services seamlessly with your applications.

However, kindly note that the creation of API credentials is reserved for users with the SUPER ADMIN role for security reasons.

To obtain the required credentials, please follow these steps:

  1. Log in to your shop dashboard with your SUPER ADMIN account.
  2. In the left panel, navigate to the "Settings" section.
  3. Click on the "For Developers" tab.

Creating API User

If API credentials haven't been generated yet, you will find a "Create API User" button under the "Open API" section. Click on it, and shortly after, the Username and Password for the Open API User will be provided.

Important Security Note

Keep your API credentials confidential and do not share them with unauthorized personnel. These credentials grant access to sensitive data and actions within our system. Always use HTTPS/SSL for encrypted communication when making API requests.

How to authorize with credentials?

After Open API User was created, you can authorize your request by using Basic Access Authentication.

This can be achieved by constructing an Authorization header with the format Basic . The base64-encoded credentials should be passed with each request to gain access to the protected resources.

Example for Javascript:

const username = "your_username";
const password = "your_password";

// Combine username and password with a colon
const combinedCredentials = `${username}:${password}`;

// Encode the combined credentials to Base64
const base64Credentials = btoa(combinedCredentials);

const apiUrl = "http://api.fourthwall.com/open-api/v1/order/{YOUR_ORDER_ID}";
const requestOptions = {
  method: "GET",
  headers: {
    "Authorization": `Basic ${base64Credentials}`,
    "Content-Type": "application/json"
  }
};

fetch(apiUrl, requestOptions)
  .then(response => response.json()) // Parse the JSON response directly
  .then(data => {
  // Handle the API response data here
  console.log(data);
})
  .catch(error => {
  // Handle errors
  console.error("Error:", error);
});

Rate limiting policy

To ensure fair usage and maintain optimal system performance, we have implemented rate limiting for API requests. This means that each user is allowed a maximum of 100 requests within a 10-second rolling window.

What it means for you:

  • You can make up to 100 requests within any 10-second period.
  • If you exceed this limit, any additional requests will be delayed until the 10-second window is reset.

Please plan your API usage accordingly to avoid interruptions and ensure the smooth functioning of our services.

Webhooks

Need to check webhooks? The documentation provides comprehensive guidance.

Products RSS feed

If you're just looking to read public product information, you do not need to use Open API. All sites publish a Merchant Center Feed under an RSS address:

{$shop_url}/.well-known/merchant-center/rss.xml

Example: for https://shop.fourthwall.com the RSS feed url would be https://shop.fourthwall.com/.well-known/merchant-center/rss.xml

Streaming

Set streaming status to started

Sets streaming status to started for specified services

Authorizations:
basicAuth
Request Body schema: application/json
required
required
Array of com.fourthwall.app.openapi.StreamingStartedRequest$Service$Twitch (object)
Array
One of
type
required
string
Value: "TWITCH"
broadcasterId
required
string
broadcasterLogin
required
string
thumbnailUrl
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "shopId": "string",
  • "services": [
    ]
}

Set streaming status to ended

Sets streaming status to ended for specified services

Authorizations:
basicAuth
Request Body schema: application/json
required
services
required
Array of strings
Items Value: "TWITCH"

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "shopId": "string",
  • "services": [
    ]
}

Get streaming status

Returns streaming status for all services

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
{
  • "shopId": "string",
  • "services": [
    ]
}

Products (offers)

Update product (offer) availability by id

Updates a product (offer) availability

Authorizations:
oauthbasicAuth
path Parameters
productId
required
string
Example: 00aa4abd-5778-4199-8161-0b49b2f212e5
Request Body schema: application/json
required
available
required
boolean

Responses

Request samples

Content type
application/json
{
  • "available": true
}

Response samples

Content type
application/json
{
  • "id": "00aa4abd-5778-4199-8161-0b49b2f212e5",
  • "name": "My t-shirt",
  • "slug": "my-t-shirt",
  • "description": "My t-shirt description",
  • "state": {
    },
  • "access": {
    },
  • "images": [],
  • "variants": [
    ],
  • "createdAt": "2020-08-13T09:05:36.939Z",
  • "updatedAt": "2020-08-13T09:05:36.939Z"
}

Get all products (offers)

Authorizations:
oauthbasicAuth
query Parameters
page
integer <int32>
Default: 0
Example: page=5
size
integer <int32>
Default: 20
Example: size=5

Responses

Response samples

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

Get product (offer) by id

Authorizations:
oauthbasicAuth
path Parameters
productId
required
string
Example: 00aa4abd-5778-4199-8161-0b49b2f212e5

Responses

Response samples

Content type
application/json
{
  • "id": "00aa4abd-5778-4199-8161-0b49b2f212e5",
  • "name": "My t-shirt",
  • "slug": "my-t-shirt",
  • "description": "My t-shirt description",
  • "state": {
    },
  • "access": {
    },
  • "images": [],
  • "variants": [
    ],
  • "createdAt": "2020-08-13T09:05:36.939Z",
  • "updatedAt": "2020-08-13T09:05:36.939Z"
}

Gifting

Finish draw

Finish draw and select winners

Authorizations:
basicAuth
path Parameters
id
required
string
Request Body schema: application/json
required
required
Array of com.fourthwall.app.openapi.DrawFinishedRequest$Participant$Twitch (object)
Array
One of
service
required
string
Value: "TWITCH"
userId
required
string
userName
required
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": "gdr_EdJvIXu3SEiXe_QkPavHSA",
  • "type": "INITIAL",
  • "giveawayId": "giv_EdJvIXu3SEiXe_QkPavHSA",
  • "giveawayFriendlyId": "D3XZFWPP",
  • "shopId": "sh_c689d374-22ca-43d3-8d29-9ef0805cc4cb",
  • "offer": {
    },
  • "amounts": {
    },
  • "email": "supporter@fourthwall.com",
  • "username": "Johnny123",
  • "message": "Sample message",
  • "gifts": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "durationSeconds": 0
}

Get draw

Get draw details

Authorizations:
basicAuth
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "gdr_EdJvIXu3SEiXe_QkPavHSA",
  • "type": "INITIAL",
  • "giveawayId": "giv_EdJvIXu3SEiXe_QkPavHSA",
  • "giveawayFriendlyId": "D3XZFWPP",
  • "shopId": "sh_c689d374-22ca-43d3-8d29-9ef0805cc4cb",
  • "offer": {
    },
  • "amounts": {
    },
  • "email": "supporter@fourthwall.com",
  • "username": "Johnny123",
  • "message": "Sample message",
  • "gifts": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "durationSeconds": 0
}

Get all giveaway packages

Authorizations:
basicAuth

Responses

Response samples

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

Get giveaway links

Authorizations:
basicAuth
path Parameters
packageId
required
string
Example: 00aa4abd-5778-4199-8161-0b49b2f212e5

Responses

Response samples

Content type
application/json
{
  • "packageId": "gpg_EdJvIXu3SEiXe_QkPavHSA",
  • "giveawayLinks": [
    ]
}

BETA: Fulfillment

Create a fulfillment for an order

Creates a fulfillment with a shipment tracker for provided order items. When trackers change their state, order.status will change to IN_PRODUCTION, PARTIALLY_IN_PRODUCTION, PARTIALLY_SHIPPED, SHIPPED depending on the shipping tracker info. Order updated webhooks will be triggered.

Authorizations:
basicAuth
Request Body schema: application/json
required
orderId
required
string <uuid>
required
Array of objects (com.fourthwall.app.openapi.FulfillmentItem)
required
object (com.fourthwall.app.openapi.ShippingLabel)

Responses

Request samples

Content type
application/json
{
  • "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5",
  • "items": [
    ],
  • "shippingLabel": {
    }
}

Response samples

Content type
application/json
{
  • "fulfillmentId": "string"
}

Thank yous

Get Thank You by id

Authorizations:
basicAuth
path Parameters
thankYouId
required
string
Example: ty_EdJvIXu3SEiXe_QkPavHSA

Responses

Response samples

Content type
application/json
{
  • "id": "ty_EdJvIXu3SEiXe_QkPavHSA",
  • "contribution": {
    }
}

Orders

Get all orders

Authorizations:
basicAuth
query Parameters
page
integer <int32>
Default: 0
Example: page=5
size
integer <int32>
Default: 20
Example: size=5
createdAt[gt]
string <date-time>
Example: createdAt[gt]=2020-08-13T09:05:36.939Z
createdAt[lt]
string <date-time>
Example: createdAt[lt]=2020-08-13T09:05:36.939Z
updatedAt[gt]
string <date-time>
Example: updatedAt[gt]=2020-08-13T09:05:36.939Z
updatedAt[lt]
string <date-time>
Example: updatedAt[lt]=2020-08-13T09:05:36.939Z
status
Array of strings unique
Items Enum: "CONFIRMED" "PARTIALLY_IN_PRODUCTION" "IN_PRODUCTION" "PARTIALLY_SHIPPED" "SHIPPED" "PARTIALLY_DELIVERED" "DELIVERED" "CANCELLED" "COMPLETED"
Example: status=CONFIRMED

Responses

Response samples

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

Get order by id

Authorizations:
basicAuth
path Parameters
orderId
required
string
Example: 00aa4abd-5778-4199-8161-0b49b2f212e5

Responses

Response samples

Content type
application/json
{
  • "id": "00aa4abd-5778-4199-8161-0b49b2f212e5",
  • "shopId": "sh_c689d374-22ca-43d3-8d29-9ef0805cc4cb",
  • "friendlyId": "D3XZFWPP",
  • "checkoutId": "ch_BV44UYrXQA2T_Xcf1288tw",
  • "promotionId": "prm_EdJvIXu3SEiXe_QkPavHSA",
  • "status": "CONFIRMED",
  • "email": "supporter@fourthwall.com",
  • "emailMarketingOptIn": true,
  • "username": "Johnny123",
  • "message": "Sample message",
  • "amounts": {
    },
  • "billing": {
    },
  • "shipping": {
    },
  • "offers": [
    ],
  • "source": {
    },
  • "createdAt": "2020-08-13T09:05:36.939Z",
  • "updatedAt": "2020-08-13T09:05:36.939Z"
}

Twitch gift purchases

Get gift purchase by id

Authorizations:
basicAuth
path Parameters
giftPurchaseId
required
string
Example: giv_EdJvIXu3SEiXe_QkPavHSA

Responses

Response samples

Content type
application/json
{
  • "id": "giv_EdJvIXu3SEiXe_QkPavHSA",
  • "friendlyId": "D3XZFWPP",
  • "shopId": "sh_c689d374-22ca-43d3-8d29-9ef0805cc4cb",
  • "offer": {
    },
  • "amounts": {
    },
  • "email": "supporter@fourthwall.com",
  • "username": "Johnny123",
  • "message": "Sample message",
  • "gifts": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z"
}

Donations

Get all donations

Authorizations:
basicAuth
query Parameters
page
integer <int32>
Default: 0
Example: page=5
size
integer <int32>
Default: 20
Example: size=5

Responses

Response samples

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

Get donation by id

Authorizations:
basicAuth
path Parameters
donationId
required
string
Example: 00aa4abd-5778-4199-8161-0b49b2f212e5

Responses

Response samples

Content type
application/json
{
  • "id": "don_Kpcjx4HIQ1e4bTIOjX9CsA",
  • "shopId": "sh_c689d374-22ca-43d3-8d29-9ef0805cc4cb",
  • "status": "OPEN",
  • "email": "supporter@fourthwall.com",
  • "username": "Johnny123",
  • "message": "Sample message",
  • "amounts": {
    },
  • "createdAt": "2020-08-13T09:05:36.939Z",
  • "updatedAt": "2020-08-13T09:05:36.939Z"
}