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

Get all giveaway packages

Returns all packages with giveaway links

Authorizations:
basicAuth

Responses

Response samples

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

Get giveaway links

Returns all giveaway links for packageId

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": [
    ]
}

Thank yous

Get Thank You by id

Get Thank You details

Authorizations:
basicAuth
path Parameters
thankYouId
required
string
Example: ty_EdJvIXu3SEiXe_QkPavHSA

Responses

Response samples

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

Products (offers)

Get all products (offers)

Returns all products with pagination

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 product (offer) by id

Returns product by id

Authorizations:
basicAuth
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"
}

Orders

Get all orders

Returns all orders with pagination

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 order by id

Returns 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",
  • "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

Returns gift purchase details 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

Returns all donations with pagination

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

Returns 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"
}