Create a product

post
/products

Create a product.

as-store-id
string

The identifier of your store. You need to generate it yourself. Note that this value must consist of numbers and letters (A-Z, a-z, 0-9), and special characters can only be hyphens (-) or underscores (_). For example, if you have a store called "soft life", you can fill in soft-life or soft_life for the value.

Please note that every time you change this value, you need to contact the support team to help you initialize some configuration for the new store.

source_id
string
required

A unique identifier for the product.

<= 32 characters
title
string
required

The title of the product.

<= 1024 characters
slug
string

URL friendly unique identifier for the product. It is different from the order slug.

<= 1024 characters
categories
array[string]

Catogories for the product used for filtering and searching products.

<= 100 items
tags
array[string]

Tags that are used for filtering and search.

<= 100 items
image_urls
array[string]
required

URLs of the images.

<= 100 items
url
string

URL of a product.

<= 2048 characters
published
boolean

To indicate whether a product has been published.

Default:
true
description
string

Description of a product.

<= 10240 characters
variants
array[object]
required

Variants of a product.

>= 1 items<= 100 items
source_id
string
required

A unique identifier for the product variant.

<= 32 characters
available_quantity
integer

Available quantity.

sku
string
required

A unique identifier for the product variant in the shop

<= 256 characters
title
string
required

The title of the product variant

<= 1024 characters
price
string
required

The price of the product variant.

<= 100 characters
image_urls
array[string]

URLs of the images.

<= 100 items
compare_at_price
string

The original price of the item before an adjustment or a sale.

weight
Weight

When using this weight object as the unit_weight in order.items, it is considered a Snapshot field that cannot be changed after creating in AfterShip.

Example:
{"unit":"kg","value":10}
allow_backorder
boolean

To indicate whether customers are allowed to place an order for the product variant that's out of stock.

options
array[object]

The custom product properties.

>= 1 items
source_created_at
string

The date and time when the product was created. ISO 8601.

source_updated_at
string

The date and time when the product was last modified. ISO 8601.

Auth
:
Parameters
:
Body
preparing...