Create a product.
If you receive an error message stating "Precondition failed, the store not found.", please first create a store using the Create a store API.
The unique store identifier is generated by AfterShip. You can obtain this id by making a GET /stores call to get existing stores or a POST /stores to create a new store.
A unique identifier for the product.
The title of the product.
URL friendly unique identifier for the product. It is different from the order slug.
Catogories for the product used for filtering and searching products.
Tags that are used for filtering and search.
URLs of the images.
URL of a product.
To indicate whether a product has been published.
Description of a product.
Variants of a product.
A unique identifier for the product variant.
Available quantity.
A unique identifier for the product variant in the shop
The title of the product variant
The price of the product variant.
URLs of the images.
The original price of the item before an adjustment or a sale.
To indicate whether customers are allowed to place an order for the product variant that's out of stock.
The custom product properties.
The date and time when the product was created. ISO 8601.
The date and time when the product was last modified. ISO 8601.
Created
Meta data object.
Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.
Unique identifier generated by AfterShip.
A unique identifier for the product in your system.
Indicate which store the product belongs to.
The title of the product.
URL friendly unique identifier for the product. It is different from the order slug.
Catogories for the product used for filtering and searching products.
Tags that are used for filtering and search.
URLs of the images.
URL of a product.
To indicate whether a product has been published.
Description of a product.
Variants of a product.
The date and time when the product was created. ISO 8601.
The date and time when the product was last modified. ISO 8601.
The date and time (ISO 8601 format) when an order was created in AfterShip.
The date and time (ISO 8601 format) when an order was updated in AfterShip.
Bad Request
Meta data object.
Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.
Unauthorized
Meta data object.
Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.
Forbidden
Meta data object.
Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.
Precondition Failed
Meta data object.
Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.
Unprocessable Entity (WebDAV)
Meta data object.
Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.
Too Many Requests
Meta data object.
Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.
Internal Server Error
Meta data object.
Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.
{
"source_id": "00093d19495447a2a082bfe44d75658a",
"title": "baby girl clothes",
"slug": "baby-girl-clothes",
"categories": [
"shoes"
],
"tags": [
"baby"
],
"image_urls": [
"https://cdn.shopify.com/s/files/1/xxx/xxx/products/xxx.jpg?v=xxx"
],
"url": "https://xxx.myshopify.com/products/baby-girl-clothes",
"published": true,
"description": "<strong>Brand Name: </strong>",
"variants": [
{
"source_id": "00b0a1e329cf4ecc861136ed0ab94fc2",
"available_quantity": 20,
"sku": "23213-sda-asa-2T",
"title": "baby girl clothes",
"price": "31.8",
"compare_at_price": "31.8",
"image_urls": [
"https://cdn.shopify.com/s/files/1/xxx/xxx/products/xxx.jpg?v=xxx"
],
"weight": {
"unit": "kg",
"value": 0.35
},
"allow_backorder": true,
"options": [
{
"name": "Color",
"value": "BLACK DRESSES"
}
]
}
],
"source_created_at": "2020-07-03T15:37:30Z",
"source_updated_at": "2020-07-04T16:41:50Z"
}{ "meta": { "code": 20100, "type": "Created", "message": "The request was successful, we created a new resource and the response body contains the representation." }, "data": { "id": "f74f8af7578042b0991e104533158ad1", "source_id": "00093d19495447a2a082bfe44d75658a", "store": { "id": "0ecb8ff7efa84d7d8f763ed7b21851d1" }, "title": "update title", "slug": "baby-girl-clothes", "categories": [ "shoes" ], "tags": [ "baby" ], "image_urls": [ "https://cdn.shopify.com/s/files/1/xxx/xxx/products/xxx.jpg?v=xxx" ], "url": "https://xxx.myshopify.com/products/baby-girl-clothes", "published": true, "description": "<strong>Brand Name: </strong>", "variants": [ { "source_id": "00b0a1e329cf4ecc861136ed0ab94fc2", "available_quantity": 20, "sku": "23213-sda-asa-2T", "title": "baby girl clothes", "price": "31.8", "image_urls": [ "https://cdn.shopify.com/s/files/1/xxx/xxx/products/xxx.jpg?v=xxx" ], "compare_at_price": "31.8", "weight": { "unit": "kg", "value": 0.1 }, "allow_backorder": true, "options": [ { "name": "Color", "value": "BLACK DRESSES" } ] } ], "source_created_at": "2021-07-26T13:42:22Z", "source_updated_at": "2021-07-26T13:43:22Z", "created_at": "2022-07-19T10:56:40Z", "updated_at": "2022-07-20T12:53:32Z" } }