curl --request POST \
--url https://api.fourthwall.com/open-api/v1.0/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"productTemplateId": "pro_k66ZW4fsRm6c2def3itltA",
"regions": [
{
"region": "front",
"imageId": "img_k66ZW4fsRm6c2def3itltA",
"placementId": "<string>",
"placementStrategy": "AUTO"
}
],
"name": "My Awesome Design Tee",
"type": "<string>",
"colors": [
"<string>"
],
"sizes": [
"<string>"
],
"description": "Limited edition design",
"profitMargin": 10,
"publishOnCreate": true
}
'import requests
url = "https://api.fourthwall.com/open-api/v1.0/products"
payload = {
"productTemplateId": "pro_k66ZW4fsRm6c2def3itltA",
"regions": [
{
"region": "front",
"imageId": "img_k66ZW4fsRm6c2def3itltA",
"placementId": "<string>",
"placementStrategy": "AUTO"
}
],
"name": "My Awesome Design Tee",
"type": "<string>",
"colors": ["<string>"],
"sizes": ["<string>"],
"description": "Limited edition design",
"profitMargin": 10,
"publishOnCreate": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
productTemplateId: 'pro_k66ZW4fsRm6c2def3itltA',
regions: [
{
region: 'front',
imageId: 'img_k66ZW4fsRm6c2def3itltA',
placementId: '<string>',
placementStrategy: 'AUTO'
}
],
name: 'My Awesome Design Tee',
type: '<string>',
colors: ['<string>'],
sizes: ['<string>'],
description: 'Limited edition design',
profitMargin: 10,
publishOnCreate: true
})
};
fetch('https://api.fourthwall.com/open-api/v1.0/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fourthwall.com/open-api/v1.0/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'productTemplateId' => 'pro_k66ZW4fsRm6c2def3itltA',
'regions' => [
[
'region' => 'front',
'imageId' => 'img_k66ZW4fsRm6c2def3itltA',
'placementId' => '<string>',
'placementStrategy' => 'AUTO'
]
],
'name' => 'My Awesome Design Tee',
'type' => '<string>',
'colors' => [
'<string>'
],
'sizes' => [
'<string>'
],
'description' => 'Limited edition design',
'profitMargin' => 10,
'publishOnCreate' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fourthwall.com/open-api/v1.0/products"
payload := strings.NewReader("{\n \"productTemplateId\": \"pro_k66ZW4fsRm6c2def3itltA\",\n \"regions\": [\n {\n \"region\": \"front\",\n \"imageId\": \"img_k66ZW4fsRm6c2def3itltA\",\n \"placementId\": \"<string>\",\n \"placementStrategy\": \"AUTO\"\n }\n ],\n \"name\": \"My Awesome Design Tee\",\n \"type\": \"<string>\",\n \"colors\": [\n \"<string>\"\n ],\n \"sizes\": [\n \"<string>\"\n ],\n \"description\": \"Limited edition design\",\n \"profitMargin\": 10,\n \"publishOnCreate\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fourthwall.com/open-api/v1.0/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"productTemplateId\": \"pro_k66ZW4fsRm6c2def3itltA\",\n \"regions\": [\n {\n \"region\": \"front\",\n \"imageId\": \"img_k66ZW4fsRm6c2def3itltA\",\n \"placementId\": \"<string>\",\n \"placementStrategy\": \"AUTO\"\n }\n ],\n \"name\": \"My Awesome Design Tee\",\n \"type\": \"<string>\",\n \"colors\": [\n \"<string>\"\n ],\n \"sizes\": [\n \"<string>\"\n ],\n \"description\": \"Limited edition design\",\n \"profitMargin\": 10,\n \"publishOnCreate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fourthwall.com/open-api/v1.0/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"productTemplateId\": \"pro_k66ZW4fsRm6c2def3itltA\",\n \"regions\": [\n {\n \"region\": \"front\",\n \"imageId\": \"img_k66ZW4fsRm6c2def3itltA\",\n \"placementId\": \"<string>\",\n \"placementStrategy\": \"AUTO\"\n }\n ],\n \"name\": \"My Awesome Design Tee\",\n \"type\": \"<string>\",\n \"colors\": [\n \"<string>\"\n ],\n \"sizes\": [\n \"<string>\"\n ],\n \"description\": \"Limited edition design\",\n \"profitMargin\": 10,\n \"publishOnCreate\": true\n}"
response = http.request(request)
puts response.read_body{
"images": [
{
"url": "<string>",
"width": 123,
"height": 123,
"style": "<string>",
"color": "<string>",
"size": "<string>",
"region": "<string>"
}
],
"productId": "<string>",
"customizationId": "<string>"
}Create a product
Rate limit: 5 requests / minute per shop. See Rate limiting.
Creates a product from a design or a digital product.
curl --request POST \
--url https://api.fourthwall.com/open-api/v1.0/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"productTemplateId": "pro_k66ZW4fsRm6c2def3itltA",
"regions": [
{
"region": "front",
"imageId": "img_k66ZW4fsRm6c2def3itltA",
"placementId": "<string>",
"placementStrategy": "AUTO"
}
],
"name": "My Awesome Design Tee",
"type": "<string>",
"colors": [
"<string>"
],
"sizes": [
"<string>"
],
"description": "Limited edition design",
"profitMargin": 10,
"publishOnCreate": true
}
'import requests
url = "https://api.fourthwall.com/open-api/v1.0/products"
payload = {
"productTemplateId": "pro_k66ZW4fsRm6c2def3itltA",
"regions": [
{
"region": "front",
"imageId": "img_k66ZW4fsRm6c2def3itltA",
"placementId": "<string>",
"placementStrategy": "AUTO"
}
],
"name": "My Awesome Design Tee",
"type": "<string>",
"colors": ["<string>"],
"sizes": ["<string>"],
"description": "Limited edition design",
"profitMargin": 10,
"publishOnCreate": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
productTemplateId: 'pro_k66ZW4fsRm6c2def3itltA',
regions: [
{
region: 'front',
imageId: 'img_k66ZW4fsRm6c2def3itltA',
placementId: '<string>',
placementStrategy: 'AUTO'
}
],
name: 'My Awesome Design Tee',
type: '<string>',
colors: ['<string>'],
sizes: ['<string>'],
description: 'Limited edition design',
profitMargin: 10,
publishOnCreate: true
})
};
fetch('https://api.fourthwall.com/open-api/v1.0/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fourthwall.com/open-api/v1.0/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'productTemplateId' => 'pro_k66ZW4fsRm6c2def3itltA',
'regions' => [
[
'region' => 'front',
'imageId' => 'img_k66ZW4fsRm6c2def3itltA',
'placementId' => '<string>',
'placementStrategy' => 'AUTO'
]
],
'name' => 'My Awesome Design Tee',
'type' => '<string>',
'colors' => [
'<string>'
],
'sizes' => [
'<string>'
],
'description' => 'Limited edition design',
'profitMargin' => 10,
'publishOnCreate' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fourthwall.com/open-api/v1.0/products"
payload := strings.NewReader("{\n \"productTemplateId\": \"pro_k66ZW4fsRm6c2def3itltA\",\n \"regions\": [\n {\n \"region\": \"front\",\n \"imageId\": \"img_k66ZW4fsRm6c2def3itltA\",\n \"placementId\": \"<string>\",\n \"placementStrategy\": \"AUTO\"\n }\n ],\n \"name\": \"My Awesome Design Tee\",\n \"type\": \"<string>\",\n \"colors\": [\n \"<string>\"\n ],\n \"sizes\": [\n \"<string>\"\n ],\n \"description\": \"Limited edition design\",\n \"profitMargin\": 10,\n \"publishOnCreate\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fourthwall.com/open-api/v1.0/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"productTemplateId\": \"pro_k66ZW4fsRm6c2def3itltA\",\n \"regions\": [\n {\n \"region\": \"front\",\n \"imageId\": \"img_k66ZW4fsRm6c2def3itltA\",\n \"placementId\": \"<string>\",\n \"placementStrategy\": \"AUTO\"\n }\n ],\n \"name\": \"My Awesome Design Tee\",\n \"type\": \"<string>\",\n \"colors\": [\n \"<string>\"\n ],\n \"sizes\": [\n \"<string>\"\n ],\n \"description\": \"Limited edition design\",\n \"profitMargin\": 10,\n \"publishOnCreate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fourthwall.com/open-api/v1.0/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"productTemplateId\": \"pro_k66ZW4fsRm6c2def3itltA\",\n \"regions\": [\n {\n \"region\": \"front\",\n \"imageId\": \"img_k66ZW4fsRm6c2def3itltA\",\n \"placementId\": \"<string>\",\n \"placementStrategy\": \"AUTO\"\n }\n ],\n \"name\": \"My Awesome Design Tee\",\n \"type\": \"<string>\",\n \"colors\": [\n \"<string>\"\n ],\n \"sizes\": [\n \"<string>\"\n ],\n \"description\": \"Limited edition design\",\n \"profitMargin\": 10,\n \"publishOnCreate\": true\n}"
response = http.request(request)
puts response.read_body{
"images": [
{
"url": "<string>",
"width": 123,
"height": 123,
"style": "<string>",
"color": "<string>",
"size": "<string>",
"region": "<string>"
}
],
"productId": "<string>",
"customizationId": "<string>"
}offer_writeAPI keys have full access to this endpoint.Authorizations
OAuth 2.0 access token, sent as Authorization: Bearer <token>. See https://docs.fourthwall.com/guides/oauth. The scopes an operation requires are listed in its x-fourthwall-scopes.
Body
- Create Design Product Request
- Create Digital Product Request
- Create Customization Product Request
Create a product by running the design pipeline: renders each region's registered image into mockups and creates a purchasable product. The product is created hidden unless publishOnCreate is true.
Sizes to include. Defaults to all available product sizes when omitted. Values not offered by the product are ignored; the request is rejected with 400 if none of the supplied sizes are available. When both colors and sizes are supplied, the request is also rejected with 400 if no requested color/size combination is an available variant.