Skip to content

Latest commit

 

History

History
4104 lines (3130 loc) · 80.2 KB

File metadata and controls

4104 lines (3130 loc) · 80.2 KB

Ecommerce API v0.2.0

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:

Authentication

  • API Key (cookieAuth)
    • Parameter Name: session_token, in: cookie.
  • HTTP Authentication, scheme: bearer

auth

register

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

Parameters

Name In Type Required Description
body body RegisterRequest true none

Responses

Status Meaning Description Schema
201 Created Registered AuthResponse
400 Bad Request Bad request Error
409 Conflict Conflict Error
This operation does not require authentication

login

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

Parameters

Name In Type Required Description
body body LoginRequest true none

Responses

Status Meaning Description Schema
200 OK Authenticated AuthResponse
400 Bad Request Bad request Error
401 Unauthorized Unauthorized Error
This operation does not require authentication

logout

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

Responses

Status Meaning Description Schema
200 OK Logged out MessageResponse
This operation does not require authentication

oidcLogin

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

Parameters

Name In Type Required Description
redirect query string false none

Responses

Status Meaning Description Schema
302 Found Redirect to provider None
This operation does not require authentication

oidcCallback

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

Parameters

Name In Type Required Description
code query string false none
state query string false none
format query string false none

Enumerated Values

Parameter Value
format json

Responses

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
This operation does not require authentication

products

List products

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

Parameters

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

Enumerated Values

Parameter Value
sort price
sort name
sort created_at
order asc
order desc

Responses

Status Meaning Description Schema
200 OK Paginated products ProductPage
500 Internal Server Error Internal server error Error
This operation does not require authentication

List active storefront brands

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

Responses

Status Meaning Description Schema
200 OK Active brands BrandListResponse
This operation does not require authentication

List storefront product attributes

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

Responses

Status Meaning Description Schema
200 OK Filterable product attribute definitions ProductAttributeDefinitionListResponse
This operation does not require authentication

Get product by id

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}

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Product Product
404 Not Found Not found Error
This operation does not require authentication

profile

getProfile

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/

Responses

Status Meaning Description Schema
200 OK Profile User
401 Unauthorized Unauthorized Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

updateProfile

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

Parameters

Name In Type Required Description
body body UpdateProfileRequest true none

Responses

Status Meaning Description Schema
200 OK Updated profile User
400 Bad Request Bad request Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

listSavedPaymentMethods

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

Responses

Status Meaning Description Schema
200 OK Saved payment methods Inline

Response Schema

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
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

createSavedPaymentMethod

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
}

Parameters

Name In Type Required Description
body body CreateSavedPaymentMethodRequest true none

Responses

Status Meaning Description Schema
201 Created Created payment method SavedPaymentMethod
400 Bad Request Bad request Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

deleteSavedPaymentMethod

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}

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Deleted MessageResponse
404 Not Found Not found Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

setDefaultPaymentMethod

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

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Updated payment method SavedPaymentMethod
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

listSavedAddresses

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

Responses

Status Meaning Description Schema
200 OK Saved addresses Inline

Response Schema

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
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

createSavedAddress

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
}

Parameters

Name In Type Required Description
body body CreateSavedAddressRequest true none

Responses

Status Meaning Description Schema
201 Created Created address SavedAddress
400 Bad Request Bad request Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

deleteSavedAddress

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}

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Deleted MessageResponse
404 Not Found Not found Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

setDefaultAddress

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

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Updated address SavedAddress
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

cart

getCart

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

Responses

Status Meaning Description Schema
200 OK Cart Cart
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

addCartItem

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
}

Parameters

Name In Type Required Description
body body AddCartItemRequest true none

Responses

Status Meaning Description Schema
200 OK Cart Cart
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

updateCartItem

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
}

Parameters

Name In Type Required Description
itemId path integer true none
body body UpdateCartItemRequest true none

Responses

Status Meaning Description Schema
200 OK Updated item CartItem
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

deleteCartItem

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}

Parameters

Name In Type Required Description
itemId path integer true none

Responses

Status Meaning Description Schema
200 OK Deleted MessageResponse
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

checkout

listCheckoutPlugins

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

Responses

Status Meaning Description Schema
200 OK Available checkout provider plugins CheckoutPluginCatalog
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

quoteCheckout

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

Parameters

Name In Type Required Description
body body CheckoutQuoteRequest true none

Responses

Status Meaning Description Schema
200 OK Quote CheckoutQuoteResponse
400 Bad Request Invalid request payload Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

orders

listUserOrders

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

Parameters

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

Enumerated Values

Parameter Value
status PENDING
status PAID
status FAILED
status SHIPPED
status DELIVERED
status CANCELLED
status REFUNDED

Responses

Status Meaning Description Schema
200 OK Orders page OrderPage
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

createOrder

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
    }
  ]
}

Parameters

Name In Type Required Description
body body CreateOrderRequest true none

Responses

Status Meaning Description Schema
201 Created Created order Order
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

getUserOrder

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}

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Order Order
404 Not Found Not found Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

processPayment

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

Parameters

Name In Type Required Description
id path integer true none
body body ProcessPaymentRequest false none

Responses

Status Meaning Description Schema
200 OK Payment result ProcessPaymentResponse
400 Bad Request Bad request Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

cancelUserOrder

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

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Cancelled order Order
400 Bad Request Bad request Error
404 Not Found Not found Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

admin

listAdminProducts

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

Parameters

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

Enumerated Values

Parameter Value
sort price
sort name
sort created_at
order asc
order desc

Responses

Status Meaning Description Schema
200 OK Paginated admin products ProductPage
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

createProduct

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

Parameters

Name In Type Required Description
body body ProductUpsertInput true none

Responses

Status Meaning Description Schema
201 Created Created product Product
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

listAdminBrands

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

Responses

Status Meaning Description Schema
200 OK Available brands BrandListResponse
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

createAdminBrand

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
}

Parameters

Name In Type Required Description
body body BrandInput true none

Responses

Status Meaning Description Schema
201 Created Created brand Brand
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

updateAdminBrand

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
}

Parameters

Name In Type Required Description
id path integer true none
body body BrandInput true none

Responses

Status Meaning Description Schema
200 OK Updated brand Brand
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

deleteAdminBrand

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}

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Deleted brand MessageResponse
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

listAdminProductAttributes

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

Responses

Status Meaning Description Schema
200 OK Product attribute definitions ProductAttributeDefinitionListResponse
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

createAdminProductAttribute

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
}

Parameters

Name In Type Required Description
body body ProductAttributeDefinitionInput true none

Responses

Status Meaning Description Schema
201 Created Created product attribute definition ProductAttributeDefinition
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

updateAdminProductAttribute

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
}

Parameters

Name In Type Required Description
id path integer true none
body body ProductAttributeDefinitionInput true none

Responses

Status Meaning Description Schema
200 OK Updated product attribute definition ProductAttributeDefinition
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

deleteAdminProductAttribute

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}

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Deleted product attribute definition MessageResponse
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

getAdminProduct

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}

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Admin product Product
404 Not Found Not found Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

updateProduct

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

Parameters

Name In Type Required Description
id path integer true none
body body ProductUpsertInput true none

Responses

Status Meaning Description Schema
200 OK Updated product Product
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

deleteProduct

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}

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Deleted MessageResponse
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

attachProductMedia

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

Parameters

Name In Type Required Description
id path integer true none
body body MediaIDsRequest true none

Responses

Status Meaning Description Schema
200 OK Updated product Product
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

publishProduct

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

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Published product Product
404 Not Found Not found Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

unpublishProduct

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

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Unpublished product Product
404 Not Found Not found Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

discardProductDraft

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

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Product after draft discard Product
404 Not Found Not found Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

updateProductMediaOrder

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

Parameters

Name In Type Required Description
id path integer true none
body body MediaIDsRequest true none

Responses

Status Meaning Description Schema
200 OK Updated product Product
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

detachProductMedia

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}

Parameters

Name In Type Required Description
id path integer true none
mediaId path string true none

Responses

Status Meaning Description Schema
200 OK Updated product Product
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

updateProductRelated

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
  ]
}

Parameters

Name In Type Required Description
id path integer true none
body body UpdateRelatedRequest true none

Responses

Status Meaning Description Schema
200 OK Updated product Product
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

listAdminOrders

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

Parameters

Name In Type Required Description
page query integer false none
limit query integer false none
q query string false none

Responses

Status Meaning Description Schema
200 OK Orders page OrderPage
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

getAdminOrder

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}

Parameters

Name In Type Required Description
id path integer true none

Responses

Status Meaning Description Schema
200 OK Order Order
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

updateOrderStatus

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

Parameters

Name In Type Required Description
id path integer true none
body body UpdateOrderStatusRequest true none

Responses

Status Meaning Description Schema
200 OK Updated order Order
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

listUsers

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

Parameters

Name In Type Required Description
page query integer false none
limit query integer false none
q query string false none

Responses

Status Meaning Description Schema
200 OK Users page UserPage
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

updateUserRole

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

Parameters

Name In Type Required Description
id path integer true none
body body UpdateUserRoleRequest true none

Responses

Status Meaning Description Schema
200 OK Updated user User
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

listAdminCheckoutPlugins

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

Responses

Status Meaning Description Schema
200 OK Checkout providers including disabled ones CheckoutPluginCatalog
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

updateAdminCheckoutPlugin

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
}

Parameters

Name In Type Required Description
type path string true none
id path string true none
body body UpdateCheckoutPluginRequest true none

Enumerated Values

Parameter Value
type payment
type shipping
type tax

Responses

Status Meaning Description Schema
200 OK Updated checkout provider catalog CheckoutPluginCatalog
400 Bad Request Invalid request payload Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

getAdminStorefrontSettings

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

Responses

Status Meaning Description Schema
200 OK Storefront settings StorefrontSettingsResponse
500 Internal Server Error Internal server error Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

updateStorefrontSettings

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

Parameters

Name In Type Required Description
body body StorefrontSettingsRequest true none

Responses

Status Meaning Description Schema
200 OK Updated storefront settings StorefrontSettingsResponse
400 Bad Request Bad request Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

publishStorefrontSettings

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

Responses

Status Meaning Description Schema
200 OK Published storefront settings StorefrontSettingsResponse
400 Bad Request Bad request Error
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

discardStorefrontDraft

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

Responses

Status Meaning Description Schema
200 OK Storefront settings after draft discard StorefrontSettingsResponse
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

getAdminPreview

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

Responses

Status Meaning Description Schema
200 OK Current preview session state DraftPreviewSessionResponse
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

startAdminPreview

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

Responses

Status Meaning Description Schema
200 OK Preview session started DraftPreviewSessionResponse
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

stopAdminPreview

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

Responses

Status Meaning Description Schema
200 OK Preview session stopped DraftPreviewSessionResponse
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

media

setProfilePhoto

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

Parameters

Name In Type Required Description
body body object true none
» media_id body string true none

Responses

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
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

deleteProfilePhoto

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

Responses

Status Meaning Description Schema
200 OK Updated profile User
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

createMediaUpload

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

Parameters

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

Responses

Status Meaning Description Schema
201 Created Upload created None

Response Headers

Status Header Type Format Description
201 Location string none
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

patchMediaUpload

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

Parameters

Name In Type Required Description
path path string true none
body body string(binary) true none

Responses

Status Meaning Description Schema
204 No Content Upload chunk accepted None
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

headMediaUpload

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}

Parameters

Name In Type Required Description
path path string true none

Responses

Status Meaning Description Schema
200 OK Upload status None
To perform this operation, you must be authenticated by means of one of the following methods: cookieAuth, bearerAuth

storefront

getStorefrontSettings

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

Responses

Status Meaning Description Schema
200 OK Storefront settings StorefrontSettingsResponse
500 Internal Server Error Internal server error Error
This operation does not require authentication