Easymailing
Products

Create a store product

POST /stores/{storeResourceId}/products

POST/stores/{storeResourceId}/products

Adds a product to the catalog of a store. It has no price or stock until you add variants with create_product_variant.

When to use: When a shop synchronizes its catalog, before creating the orders that include the product.

When not to use: To change a product that already exists use update_store_product.

Permissions: Requires the manager role or higher, or the marketing.audiences.write capability.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Path Parameters

storeResourceId*string

Identifier (resource_id) of the store the product belongs to.

Request Body

The new Product resource

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.easymailing.com/stores/acme-shop/products" \  -H "X-Auth-Token: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "resource_id": "string",    "title": "string",    "description": "string",    "vendor": "string",    "url": "http://example.com",    "image_url": "http://example.com",    "categories": [      "/entity/1"    ]  }'
{  "resource_id": "string",  "title": "string",  "description": "string",  "vendor": "string",  "url": "http://example.com",  "image_url": "http://example.com",  "variants": [    {      "resource_id": "string",      "title": "string",      "sku": "string",      "price": 0,      "inventory_quantity": 0,      "image_url": "http://example.com",      "url": "http://example.com",      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "categories": [    "/entity/1"  ],  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}