Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
API contract for backend and frontend type generation.
Base URLs:
- API Key (cookieAuth)
- Parameter Name: session_token, in: cookie.
- HTTP Authentication, scheme: bearer
Code samples
const inputBody = '{
"username": "string",
"email": "string",
"password": "string",
"name": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/auth/register',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/auth/register
Body parameter
{
"username": "string",
"email": "string",
"password": "string",
"name": "string"
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | RegisterRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Registered | AuthResponse |
| 400 | Bad Request | Bad request | Error |
| 409 | Conflict | Conflict | Error |
Code samples
const inputBody = '{
"email": "string",
"password": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/auth/login',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/auth/login
Body parameter
{
"email": "string",
"password": "string"
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | LoginRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Authenticated | AuthResponse |
| 400 | Bad Request | Bad request | Error |
| 401 | Unauthorized | Unauthorized | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/auth/logout',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/auth/logout
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Logged out | MessageResponse |
Code samples
fetch('http://localhost:3000/api/v1/auth/oidc/login',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/auth/oidc/login
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| redirect | query | string | false | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 302 | Found | Redirect to provider | None |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/auth/oidc/callback',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/auth/oidc/callback
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| code | query | string | false | none |
| state | query | string | false | none |
| format | query | string | false | none |
| Parameter | Value |
|---|---|
| format | json |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Callback as JSON | AuthResponse |
| 302 | Found | Callback as redirect | None |
| 400 | Bad Request | Bad request | Error |
| 401 | Unauthorized | Unauthorized | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/products',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/products
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| q | query | string | false | none |
| min_price | query | number(double) | false | none |
| max_price | query | number(double) | false | none |
| brand_slug | query | string | false | none |
| has_variant_stock | query | boolean | false | none |
| attribute | query | object | false | none |
| sort | query | string | false | none |
| order | query | string | false | none |
| page | query | integer | false | none |
| limit | query | integer | false | none |
| Parameter | Value |
|---|---|
| sort | price |
| sort | name |
| sort | created_at |
| order | asc |
| order | desc |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Paginated products | ProductPage |
| 500 | Internal Server Error | Internal server error | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/brands',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/brands
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Active brands | BrandListResponse |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/product-attributes',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/product-attributes
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Filterable product attribute definitions | ProductAttributeDefinitionListResponse |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/products/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/products/{id}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Product | Product |
| 404 | Not Found | Not found | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/me/
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Profile | User |
| 401 | Unauthorized | Unauthorized | Error |
Code samples
const inputBody = '{
"name": "string",
"currency": "str",
"profile_photo_url": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});PATCH /api/v1/me/
Body parameter
{
"name": "string",
"currency": "str",
"profile_photo_url": "string"
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | UpdateProfileRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated profile | User |
| 400 | Bad Request | Bad request | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/payment-methods',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/me/payment-methods
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Saved payment methods | Inline |
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | [SavedPaymentMethod] | false | none | none |
| » id | integer | true | none | none |
| » user_id | integer | true | none | none |
| » type | string | true | none | none |
| » brand | string | true | none | none |
| » last4 | string | true | none | none |
| » exp_month | integer | true | none | none |
| » exp_year | integer | true | none | none |
| » cardholder_name | string | true | none | none |
| » nickname | string | true | none | none |
| » is_default | boolean | true | none | none |
| » created_at | string(date-time) | true | none | none |
| » updated_at | string(date-time) | true | none | none |
| » deleted_at | string(date-time)¦null | false | none | none |
Code samples
const inputBody = '{
"cardholder_name": "string",
"card_number": "string",
"exp_month": 1,
"exp_year": 0,
"nickname": "string",
"set_default": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/payment-methods',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/me/payment-methods
Body parameter
{
"cardholder_name": "string",
"card_number": "string",
"exp_month": 1,
"exp_year": 0,
"nickname": "string",
"set_default": true
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | CreateSavedPaymentMethodRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Created payment method | SavedPaymentMethod |
| 400 | Bad Request | Bad request | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/payment-methods/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});DELETE /api/v1/me/payment-methods/{id}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Deleted | MessageResponse |
| 404 | Not Found | Not found | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/payment-methods/{id}/default',
{
method: 'PATCH',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});PATCH /api/v1/me/payment-methods/{id}/default
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated payment method | SavedPaymentMethod |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/addresses',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/me/addresses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Saved addresses | Inline |
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | [SavedAddress] | false | none | none |
| » id | integer | true | none | none |
| » user_id | integer | true | none | none |
| » label | string | true | none | none |
| » full_name | string | true | none | none |
| » line1 | string | true | none | none |
| » line2 | string | true | none | none |
| » city | string | true | none | none |
| » state | string | true | none | none |
| » postal_code | string | true | none | none |
| » country | string | true | none | none |
| » phone | string | true | none | none |
| » is_default | boolean | true | none | none |
| » created_at | string(date-time) | true | none | none |
| » updated_at | string(date-time) | true | none | none |
| » deleted_at | string(date-time)¦null | false | none | none |
Code samples
const inputBody = '{
"label": "string",
"full_name": "string",
"line1": "string",
"line2": "string",
"city": "string",
"state": "string",
"postal_code": "string",
"country": "string",
"phone": "string",
"set_default": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/addresses',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/me/addresses
Body parameter
{
"label": "string",
"full_name": "string",
"line1": "string",
"line2": "string",
"city": "string",
"state": "string",
"postal_code": "string",
"country": "string",
"phone": "string",
"set_default": true
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | CreateSavedAddressRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Created address | SavedAddress |
| 400 | Bad Request | Bad request | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/addresses/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});DELETE /api/v1/me/addresses/{id}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Deleted | MessageResponse |
| 404 | Not Found | Not found | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/addresses/{id}/default',
{
method: 'PATCH',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});PATCH /api/v1/me/addresses/{id}/default
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated address | SavedAddress |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/cart',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/me/cart
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Cart | Cart |
Code samples
const inputBody = '{
"product_variant_id": 1,
"quantity": 1
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/cart',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/me/cart
Body parameter
{
"product_variant_id": 1,
"quantity": 1
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | AddCartItemRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Cart | Cart |
Code samples
const inputBody = '{
"quantity": 1
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/cart/{itemId}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});PATCH /api/v1/me/cart/{itemId}
Body parameter
{
"quantity": 1
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| itemId | path | integer | true | none |
| body | body | UpdateCartItemRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated item | CartItem |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/cart/{itemId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});DELETE /api/v1/me/cart/{itemId}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| itemId | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Deleted | MessageResponse |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/checkout/plugins',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/me/checkout/plugins
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Available checkout provider plugins | CheckoutPluginCatalog |
Code samples
const inputBody = '{
"payment_provider_id": "string",
"shipping_provider_id": "string",
"tax_provider_id": "string",
"payment_data": {
"property1": "string",
"property2": "string"
},
"shipping_data": {
"property1": "string",
"property2": "string"
},
"tax_data": {
"property1": "string",
"property2": "string"
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/checkout/quote',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/me/checkout/quote
Body parameter
{
"payment_provider_id": "string",
"shipping_provider_id": "string",
"tax_provider_id": "string",
"payment_data": {
"property1": "string",
"property2": "string"
},
"shipping_data": {
"property1": "string",
"property2": "string"
},
"tax_data": {
"property1": "string",
"property2": "string"
}
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | CheckoutQuoteRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Quote | CheckoutQuoteResponse |
| 400 | Bad Request | Invalid request payload | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/orders',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/me/orders
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| status | query | string | false | none |
| start_date | query | string | false | none |
| end_date | query | string | false | none |
| page | query | integer | false | none |
| limit | query | integer | false | none |
| Parameter | Value |
|---|---|
| status | PENDING |
| status | PAID |
| status | FAILED |
| status | SHIPPED |
| status | DELIVERED |
| status | CANCELLED |
| status | REFUNDED |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Orders page | OrderPage |
Code samples
const inputBody = '{
"items": [
{
"product_variant_id": 1,
"quantity": 1
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/orders',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/me/orders
Body parameter
{
"items": [
{
"product_variant_id": 1,
"quantity": 1
}
]
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | CreateOrderRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Created order | Order |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/orders/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/me/orders/{id}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Order | Order |
| 404 | Not Found | Not found | Error |
Code samples
const inputBody = '{
"payment_method_id": 0,
"address_id": 0,
"payment_method": {
"cardholder_name": "string",
"card_number": "string",
"exp_month": 1,
"exp_year": 0
},
"address": {
"full_name": "string",
"line1": "string",
"line2": "string",
"city": "string",
"state": "string",
"postal_code": "string",
"country": "string"
},
"payment_provider_id": "string",
"shipping_provider_id": "string",
"tax_provider_id": "string",
"payment_data": {
"property1": "string",
"property2": "string"
},
"shipping_data": {
"property1": "string",
"property2": "string"
},
"tax_data": {
"property1": "string",
"property2": "string"
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/orders/{id}/pay',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/me/orders/{id}/pay
Body parameter
{
"payment_method_id": 0,
"address_id": 0,
"payment_method": {
"cardholder_name": "string",
"card_number": "string",
"exp_month": 1,
"exp_year": 0
},
"address": {
"full_name": "string",
"line1": "string",
"line2": "string",
"city": "string",
"state": "string",
"postal_code": "string",
"country": "string"
},
"payment_provider_id": "string",
"shipping_provider_id": "string",
"tax_provider_id": "string",
"payment_data": {
"property1": "string",
"property2": "string"
},
"shipping_data": {
"property1": "string",
"property2": "string"
},
"tax_data": {
"property1": "string",
"property2": "string"
}
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| body | body | ProcessPaymentRequest | false | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Payment result | ProcessPaymentResponse |
| 400 | Bad Request | Bad request | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/orders/{id}/cancel',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/me/orders/{id}/cancel
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Cancelled order | Order |
| 400 | Bad Request | Bad request | Error |
| 404 | Not Found | Not found | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/products',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/admin/products
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| q | query | string | false | none |
| min_price | query | number(double) | false | none |
| max_price | query | number(double) | false | none |
| brand_slug | query | string | false | none |
| has_variant_stock | query | boolean | false | none |
| attribute | query | object | false | none |
| sort | query | string | false | none |
| order | query | string | false | none |
| page | query | integer | false | none |
| limit | query | integer | false | none |
| Parameter | Value |
|---|---|
| sort | price |
| sort | name |
| sort | created_at |
| order | asc |
| order | desc |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Paginated admin products | ProductPage |
Code samples
const inputBody = '{
"sku": "string",
"name": "string",
"subtitle": "string",
"description": "string",
"images": [
"string"
],
"related_product_ids": [
1
],
"brand_id": 1,
"default_variant_sku": "string",
"options": [
{
"name": "string",
"position": 1,
"display_type": "string",
"values": [
{
"value": "string",
"position": 1
}
]
}
],
"variants": [
{
"sku": "string",
"title": "string",
"price": 0.1,
"compare_at_price": 0.1,
"stock": 0,
"position": 1,
"is_published": true,
"weight_grams": 0,
"length_cm": 0.1,
"width_cm": 0.1,
"height_cm": 0.1,
"selections": [
{
"option_name": "string",
"option_value": "string",
"position": 1
}
]
}
],
"attributes": [
{
"product_attribute_id": 1,
"text_value": "string",
"number_value": 0.1,
"boolean_value": true,
"enum_value": "string",
"position": 1
}
],
"seo": {
"title": "string",
"description": "string",
"canonical_path": "string",
"og_image_media_id": "string",
"noindex": true
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/products',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/admin/products
Body parameter
{
"sku": "string",
"name": "string",
"subtitle": "string",
"description": "string",
"images": [
"string"
],
"related_product_ids": [
1
],
"brand_id": 1,
"default_variant_sku": "string",
"options": [
{
"name": "string",
"position": 1,
"display_type": "string",
"values": [
{
"value": "string",
"position": 1
}
]
}
],
"variants": [
{
"sku": "string",
"title": "string",
"price": 0.1,
"compare_at_price": 0.1,
"stock": 0,
"position": 1,
"is_published": true,
"weight_grams": 0,
"length_cm": 0.1,
"width_cm": 0.1,
"height_cm": 0.1,
"selections": [
{
"option_name": "string",
"option_value": "string",
"position": 1
}
]
}
],
"attributes": [
{
"product_attribute_id": 1,
"text_value": "string",
"number_value": 0.1,
"boolean_value": true,
"enum_value": "string",
"position": 1
}
],
"seo": {
"title": "string",
"description": "string",
"canonical_path": "string",
"og_image_media_id": "string",
"noindex": true
}
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | ProductUpsertInput | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Created product | Product |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/brands',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/admin/brands
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Available brands | BrandListResponse |
Code samples
const inputBody = '{
"name": "string",
"slug": "string",
"description": "string",
"logo_media_id": "string",
"is_active": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/brands',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/admin/brands
Body parameter
{
"name": "string",
"slug": "string",
"description": "string",
"logo_media_id": "string",
"is_active": true
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | BrandInput | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Created brand | Brand |
Code samples
const inputBody = '{
"name": "string",
"slug": "string",
"description": "string",
"logo_media_id": "string",
"is_active": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/brands/{id}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});PATCH /api/v1/admin/brands/{id}
Body parameter
{
"name": "string",
"slug": "string",
"description": "string",
"logo_media_id": "string",
"is_active": true
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| body | body | BrandInput | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated brand | Brand |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/brands/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});DELETE /api/v1/admin/brands/{id}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Deleted brand | MessageResponse |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/product-attributes',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/admin/product-attributes
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Product attribute definitions | ProductAttributeDefinitionListResponse |
Code samples
const inputBody = '{
"key": "string",
"slug": "string",
"type": "text",
"filterable": true,
"sortable": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/product-attributes',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/admin/product-attributes
Body parameter
{
"key": "string",
"slug": "string",
"type": "text",
"filterable": true,
"sortable": true
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | ProductAttributeDefinitionInput | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Created product attribute definition | ProductAttributeDefinition |
Code samples
const inputBody = '{
"key": "string",
"slug": "string",
"type": "text",
"filterable": true,
"sortable": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/product-attributes/{id}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});PATCH /api/v1/admin/product-attributes/{id}
Body parameter
{
"key": "string",
"slug": "string",
"type": "text",
"filterable": true,
"sortable": true
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| body | body | ProductAttributeDefinitionInput | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated product attribute definition | ProductAttributeDefinition |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/product-attributes/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});DELETE /api/v1/admin/product-attributes/{id}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Deleted product attribute definition | MessageResponse |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/products/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/admin/products/{id}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Admin product | Product |
| 404 | Not Found | Not found | Error |
Code samples
const inputBody = '{
"sku": "string",
"name": "string",
"subtitle": "string",
"description": "string",
"images": [
"string"
],
"related_product_ids": [
1
],
"brand_id": 1,
"default_variant_sku": "string",
"options": [
{
"name": "string",
"position": 1,
"display_type": "string",
"values": [
{
"value": "string",
"position": 1
}
]
}
],
"variants": [
{
"sku": "string",
"title": "string",
"price": 0.1,
"compare_at_price": 0.1,
"stock": 0,
"position": 1,
"is_published": true,
"weight_grams": 0,
"length_cm": 0.1,
"width_cm": 0.1,
"height_cm": 0.1,
"selections": [
{
"option_name": "string",
"option_value": "string",
"position": 1
}
]
}
],
"attributes": [
{
"product_attribute_id": 1,
"text_value": "string",
"number_value": 0.1,
"boolean_value": true,
"enum_value": "string",
"position": 1
}
],
"seo": {
"title": "string",
"description": "string",
"canonical_path": "string",
"og_image_media_id": "string",
"noindex": true
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/products/{id}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});PATCH /api/v1/admin/products/{id}
Body parameter
{
"sku": "string",
"name": "string",
"subtitle": "string",
"description": "string",
"images": [
"string"
],
"related_product_ids": [
1
],
"brand_id": 1,
"default_variant_sku": "string",
"options": [
{
"name": "string",
"position": 1,
"display_type": "string",
"values": [
{
"value": "string",
"position": 1
}
]
}
],
"variants": [
{
"sku": "string",
"title": "string",
"price": 0.1,
"compare_at_price": 0.1,
"stock": 0,
"position": 1,
"is_published": true,
"weight_grams": 0,
"length_cm": 0.1,
"width_cm": 0.1,
"height_cm": 0.1,
"selections": [
{
"option_name": "string",
"option_value": "string",
"position": 1
}
]
}
],
"attributes": [
{
"product_attribute_id": 1,
"text_value": "string",
"number_value": 0.1,
"boolean_value": true,
"enum_value": "string",
"position": 1
}
],
"seo": {
"title": "string",
"description": "string",
"canonical_path": "string",
"og_image_media_id": "string",
"noindex": true
}
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| body | body | ProductUpsertInput | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated product | Product |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/products/{id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});DELETE /api/v1/admin/products/{id}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Deleted | MessageResponse |
Code samples
const inputBody = '{
"media_ids": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/products/{id}/media',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/admin/products/{id}/media
Body parameter
{
"media_ids": [
"string"
]
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| body | body | MediaIDsRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated product | Product |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/products/{id}/publish',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/admin/products/{id}/publish
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Published product | Product |
| 404 | Not Found | Not found | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/products/{id}/unpublish',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/admin/products/{id}/unpublish
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Unpublished product | Product |
| 404 | Not Found | Not found | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/products/{id}/draft',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});DELETE /api/v1/admin/products/{id}/draft
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Product after draft discard | Product |
| 404 | Not Found | Not found | Error |
Code samples
const inputBody = '{
"media_ids": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/products/{id}/media/order',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});PATCH /api/v1/admin/products/{id}/media/order
Body parameter
{
"media_ids": [
"string"
]
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| body | body | MediaIDsRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated product | Product |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/products/{id}/media/{mediaId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});DELETE /api/v1/admin/products/{id}/media/{mediaId}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| mediaId | path | string | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated product | Product |
Code samples
const inputBody = '{
"related_ids": [
1
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/products/{id}/related',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});PATCH /api/v1/admin/products/{id}/related
Body parameter
{
"related_ids": [
1
]
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| body | body | UpdateRelatedRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated product | Product |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/orders',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/admin/orders
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| page | query | integer | false | none |
| limit | query | integer | false | none |
| q | query | string | false | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Orders page | OrderPage |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/orders/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/admin/orders/{id}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Order | Order |
Code samples
const inputBody = '{
"status": "PENDING"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/orders/{id}/status',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});PATCH /api/v1/admin/orders/{id}/status
Body parameter
{
"status": "PENDING"
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| body | body | UpdateOrderStatusRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated order | Order |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/users',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/admin/users
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| page | query | integer | false | none |
| limit | query | integer | false | none |
| q | query | string | false | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Users page | UserPage |
Code samples
const inputBody = '{
"role": "admin"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/users/{id}/role',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});PATCH /api/v1/admin/users/{id}/role
Body parameter
{
"role": "admin"
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | true | none |
| body | body | UpdateUserRoleRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated user | User |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/checkout/plugins',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/admin/checkout/plugins
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Checkout providers including disabled ones | CheckoutPluginCatalog |
Code samples
const inputBody = '{
"enabled": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/checkout/plugins/{type}/{id}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});PATCH /api/v1/admin/checkout/plugins/{type}/{id}
Body parameter
{
"enabled": true
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| type | path | string | true | none |
| id | path | string | true | none |
| body | body | UpdateCheckoutPluginRequest | true | none |
| Parameter | Value |
|---|---|
| type | payment |
| type | shipping |
| type | tax |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated checkout provider catalog | CheckoutPluginCatalog |
| 400 | Bad Request | Invalid request payload | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/storefront',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/admin/storefront
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Storefront settings | StorefrontSettingsResponse |
| 500 | Internal Server Error | Internal server error | Error |
Code samples
const inputBody = '{
"settings": {
"site_title": "string",
"homepage_sections": [
{
"id": "string",
"type": "hero",
"enabled": true,
"hero": {
"eyebrow": "string",
"title": "string",
"subtitle": "string",
"background_image_url": "string",
"background_image_media_id": "string",
"primary_cta": {
"label": "string",
"url": "string"
},
"secondary_cta": {
"label": "string",
"url": "string"
}
},
"product_section": {
"title": "string",
"subtitle": "string",
"source": "manual",
"query": "string",
"product_ids": [
1
],
"sort": "created_at",
"order": "asc",
"limit": 1,
"brand_slug": "string",
"has_variant_stock": true,
"attribute_filters": {
"property1": "string",
"property2": "string"
},
"show_stock": true,
"show_description": true,
"image_aspect": "square"
},
"promo_cards": [
{
"kicker": "string",
"title": "string",
"description": "string",
"image_url": "string",
"link": {
"label": "string",
"url": "string"
}
}
],
"promo_card_limit": 1,
"badges": [
"string"
]
}
],
"footer": {
"brand_name": "string",
"tagline": "string",
"copyright": "string",
"columns": [
{
"title": "string",
"links": [
{
"label": "string",
"url": "string"
}
]
}
],
"social_links": [
{
"label": "string",
"url": "string"
}
],
"bottom_notice": "string"
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/storefront',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});PUT /api/v1/admin/storefront
Body parameter
{
"settings": {
"site_title": "string",
"homepage_sections": [
{
"id": "string",
"type": "hero",
"enabled": true,
"hero": {
"eyebrow": "string",
"title": "string",
"subtitle": "string",
"background_image_url": "string",
"background_image_media_id": "string",
"primary_cta": {
"label": "string",
"url": "string"
},
"secondary_cta": {
"label": "string",
"url": "string"
}
},
"product_section": {
"title": "string",
"subtitle": "string",
"source": "manual",
"query": "string",
"product_ids": [
1
],
"sort": "created_at",
"order": "asc",
"limit": 1,
"brand_slug": "string",
"has_variant_stock": true,
"attribute_filters": {
"property1": "string",
"property2": "string"
},
"show_stock": true,
"show_description": true,
"image_aspect": "square"
},
"promo_cards": [
{
"kicker": "string",
"title": "string",
"description": "string",
"image_url": "string",
"link": {
"label": "string",
"url": "string"
}
}
],
"promo_card_limit": 1,
"badges": [
"string"
]
}
],
"footer": {
"brand_name": "string",
"tagline": "string",
"copyright": "string",
"columns": [
{
"title": "string",
"links": [
{
"label": "string",
"url": "string"
}
]
}
],
"social_links": [
{
"label": "string",
"url": "string"
}
],
"bottom_notice": "string"
}
}
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | StorefrontSettingsRequest | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated storefront settings | StorefrontSettingsResponse |
| 400 | Bad Request | Bad request | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/storefront/publish',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/admin/storefront/publish
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Published storefront settings | StorefrontSettingsResponse |
| 400 | Bad Request | Bad request | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/storefront/draft',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});DELETE /api/v1/admin/storefront/draft
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Storefront settings after draft discard | StorefrontSettingsResponse |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/preview',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/admin/preview
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Current preview session state | DraftPreviewSessionResponse |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/preview/start',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/admin/preview/start
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Preview session started | DraftPreviewSessionResponse |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/admin/preview/stop',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/admin/preview/stop
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Preview session stopped | DraftPreviewSessionResponse |
Code samples
const inputBody = '{
"media_id": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/profile-photo',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/me/profile-photo
Body parameter
{
"media_id": "string"
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| » media_id | body | string | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated profile | User |
| 400 | Bad Request | Bad request | Error |
| 409 | Conflict | Conflict | Error |
| 413 | Payload Too Large | Too large | Error |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/me/profile-photo',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});DELETE /api/v1/me/profile-photo
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated profile | User |
Code samples
const inputBody = 'string';
const headers = {
'Content-Type':'application/offset+octet-stream',
'Tus-Resumable':'string',
'Upload-Length':'0',
'Upload-Metadata':'string'
};
fetch('http://localhost:3000/api/v1/media/uploads',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});POST /api/v1/media/uploads
Body parameter
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Tus-Resumable | header | string | false | none |
| Upload-Length | header | integer | false | none |
| Upload-Metadata | header | string | false | none |
| body | body | string(binary) | false | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Upload created | None |
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 201 | Location | string | none |
Code samples
const inputBody = 'string';
const headers = {
'Content-Type':'application/offset+octet-stream'
};
fetch('http://localhost:3000/api/v1/media/uploads/{path}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});PATCH /api/v1/media/uploads/{path}
Body parameter
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | path | string | true | none |
| body | body | string(binary) | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | Upload chunk accepted | None |
Code samples
fetch('http://localhost:3000/api/v1/media/uploads/{path}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});HEAD /api/v1/media/uploads/{path}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | path | string | true | none |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Upload status | None |
Code samples
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:3000/api/v1/storefront',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});GET /api/v1/storefront
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Storefront settings | StorefrontSettingsResponse |
| 500 | Internal Server Error | Internal server error | Error |