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_bodyCreate 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_bodyoffer_writeAPI keys have full access to this endpoint.Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
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.
Id of the product template to render the design onto, from GET /open-api/v1.0/product-templates.
"pro_k66ZW4fsRm6c2def3itltA"
Design regions to place on the product. Each region references a registered media image by id (register it via POST /open-api/v1.0/media/images and pass the returned id as imageId).
Show child attributes
Show child attributes
Product name
"My Awesome Design Tee"
Colors to render. Defaults to all available product colors when omitted. Values not offered by the product are ignored; the request is rejected with 400 if none of the supplied colors are available.
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.
Product description
"Limited edition design"
Profit margin in USD applied on top of the base cost.
10
Publish the product immediately on creation. Defaults to false (product stays hidden).