Products API

Use the products API to extract information about products, to add products or to update data of existing products or variants.

Fields available

Extract product list

Extract product data

Add product

Modification of product data

Delete product

Fields available

The list below indicates all the fields available for this API, which are returned when extracting a list or individual resource, that are mandatory when creating a new resource or updating an existing resource.

Field Type Description List Not required
id int Product ID ✔
type string Product type (basic, multi_variant, digital, bundle) ✔ ✔
sku string SKU of the product ✔ ✔
ean string EAN code of the product ✔ ✔
ext_ref string The reference identifier in the provider's system ✔ ✔
names string Product name ✔ ✔
description string Product description ✔
meta_description string Product meta description ✔
inventory_enabled string Activation of the product inventory function (default value off) ✔ ✔
stock int Quantity in stock ✔ ✔
warehouses array Allocation of stocks in warehouses ✔ ✔
warehouses[].id int The repository ID ✔
warehouses[].name string The name of the repository ✔
warehouses[].stock int Quantity in stock ✔ ✔
warehouses[].label string Shelf position ✔ ✔
availability_id int Supplier availability ✔ ✔
price_net float Net price ✔ ✔
price_gross float The price includes taxes ✔ ✔
old_price_net float The old unreduced price of the product ✔ ✔
old_price_gross float The old unreduced price of the product (taxes included) ✔ ✔
tax_id int The tax ID ✔ ✔
tax_value float The percentage value of the tax ✔ ✔
tax_name string The name of the fee ✔
shipping_type string Set delivery cost at product level (default, free, unit, disabled) ✔
quantity_multiplier int Quantity multiplier (default value 1) ✔ ✔
unit_type string Type of unit of measure ✔ ✔
shipping_unit_cost float Product delivery unit cost ✔ ✔
weight float Product weight ✔ ✔
category_id int Category ID ✔ ✔
category_name string The name of the category ✔
categories array Allocating the product to multiple categories ✔
categories [].id int Category ID
categories[].name string The name of the category
manufacturer_id int Manufacturer ID ✔ ✔
manufacturer_name string Manufacturer's name ✔ ✔
tags array Tags related to the product ✔
tags[].id int The ID of the tag
tags[].name string The name of the tag ✔
product_attributes array Descriptive attributes of the product ✔ ✔
Product_attributes[].id int The ID of the attribute ✔
product_attributes[].name string The name of the attribute ✔ ✔
product_attributes[].options array List of selected attribute values ✔
product_attributes[].options[].id int The ID of the attribute value ✔
product_attributes[].options[].value string The name of the attribute value ✔ ✔
variant_attributes array The attributes of the product that differentiate its variants ✔ ✔
variant_attributes[].id int The ID of the attribute ✔
variant_attributes[].name string The name of the attribute ✔ ✔
variant_attributes[].options array List of selected attribute values ✔
variant_attributes[].options[].id int The ID of the attribute value ✔
variant_attributes[].options[].value string The name of the attribute value ✔ ✔
variants array Product variants (multi_variant type products) ✔ ✔
variants[].id int The variant ID ✔
variants[].sku string Variant SKU ✔ ✔
variants[].ean string EAN code of the variant ✔ ✔
variants[].inventory_enabled string Activating the variant inventory function ✔ ✔
variants[].stock int Variant stock ✔ ✔
variants[].price_net float Net price ✔ ✔
Variants[].price_gross float The price includes taxes ✔ ✔
variants[].variant_options[] array The attributes that define product variants ✔ ✔
Variants[].variant_options[].id int The ID of the attribute ✔ ✔
variants[].variant_options[].name int The name of the attribute ✔ ✔
variants[].variant_options[].value string The value of the attribute ✔ ✔
variants[].visibility string Visibility options ("visible", "discontinued") ✔ ✔
meta_fields object Additional fields ✔ ✔
meta_fields[].img[] array Additional image type field ✔ ✔
meta_fields[].img[] .name int Image name ✔
meta_fields[].img[] .ext string Image extension ✔
meta_fields[].img[] .width int Image width ✔
meta_fields[].img[] .height int Image length ✔
meta_fields[].img[] .path string Image path ✔
meta_fields[].list[] string Additional list type field ✔ ✔
meta_fields[].text[] string Additional text field ✔ ✔
user_fields array List of customizable fields ✔ ✔
url string Product URL (active, inactive) ✔
images array List of images ✔ ✔
images[].id int The ID of the image ✔
images[].url string The URL of the image ✔
images[].caption int Name of the image ✔
meta_links array Product URLs for active languages
meta_links[].lang string Language
meta_links[].url string Product URL
data_created data Date of product addition (ISO 8601 format) ✔
date_modified data The date of the last change on the product, does not include price and stock updates (ISO 8601 format) ✔
date_last_updated data Date of last modification, includes price and stock updates (ISO 8601 format) ✔
status string Registration status (active, inactive) ✔ ✔
is_featured bool The product is displayed on the homepage ✔
is_listed bool The product meets the conditions to be listed on the website ✔
is_new bool The product is marked as New or recently added ✔
is_marked_new bool The product is marked as New
in_stock bool The product meets the conditions to be purchased ✔
total_sales int The number of orders in which the product is found ✔
total_units_balance int Total number of units sold ✔
total_views int The total number of impressions of the product ✔
bundled_products array The products included in the package ✔ ✔
visibility string Visibility options ("visible", "discontinued", "hidden")

TIP
Any field returned that is not documented can be ignored because it is not yet available.

Extract product list

Shows the filtered list of records.

Type : Resource list
Method : GET
Url : /api/v2/products
Filter results : Yes
Field selection : Yes
Inclusion of additional fields : Yes
Pagination : Yes

The http response code is 200 in case of success, the response will have the form of a list of resources related to the defined filters.

Only the list type fields will be included in the standard result. You can include additional fields that are not included by default using the parameter include and explicitly mentioning only the additional fields (separated by commas) that you want included.

GET /api/v2/products?include=variants 

You can filter the fields you want included in the result for each resource using the parameter 'fields' and explicitly mentioning only the fields (separated by commas) you want included (the field id will always be included by default).

GET /api/v2/products?fields=id,name,url

Filter results

It is possible to filter the results by adding specific parameters to the URL.

Parameter Description Example
id The product id id=10001
IFS Comma separated list of product ids ids=10001,10002,10003
type Product type (basic, multi_variant, digital, bundle) type=multi_variant
sku SKU of the product sku=PN.1358
ean EAN code of the product ean=7501031311309
category_id The id of the category it belongs to category_id=101
category_ids List of category ids category_ids=101,102,103
manufacturer_id Manufacturer ID manufacturer_id=1001
manufacturer_ids List of producer IDs manufacturer_ids=1001,1002,1003
meta_fields Additional fields meta_fields[field_key]=field_value
created_after Date from which records were created (ISO 8601 format) created_after=2019-01-01
created_before Date up to which records were created (ISO 8601 format) created_before=2020-01-01
modified_after Date from which the records were last modified (ISO 8601 format) modified_after=2019-01-01
modified_before Date up to which the records were last modified (ISO 8601 format) modified_before=2020-01-01
status Registration status (active, inactive) status=active
is_featured The records displayed on the homepage (0, 1) is_featured=1
is_new New or marked as new records (0, 1) is_new=1
tag_name The name of the tag tag_name=value
tag_ids Comma separated list of tag ids tag_ids=123,456
ext_ref The value of the external reference ext_ref=value
GET /api/v2/products?category_id=101&status=active

Sort results

It is possible to sort results by adding specific parameters to the URL.

Parameter Description Example
name Name of the parent product sort=name
name.desc The name of the product, alphabetically descending sort=name.desc
data_created The date the product was added, ascending sort=date_created
date_created.desc The date the product was added sort=date_created.desc
newest The newest products sort=newest
date_modified Product update date, ascending sort=date_modified
date_modified.desc Product update date, descending sort=date_modified.desc
rank The most popular products sort=rank
best_seller Best selling products sort=best_seller
price Net turnover of products is increasing sort=price
price.desc Net price, descending order sort=price.desc
GET /api/v2/products?sort=name

Pagination

Pagination parameters can be added to the API request to limit the number of records per page and access all available pages.

Parameter Type Default
start int 0
limit int 20

The maximum limit of registrations per page cannot exceed 100.

GET /api/v2/products?start=150&limit=50 

Request format

Example of a CURL request that returns all records:

curl --request GET \
--url 'https://shop.demo.ro/api/v2/products' \
--header 'Accept: application/json' \
--header 'Content-type: application/json' \
--header 'Authorization: Basic {base64-encoded-credentials}'

Extract all records, extract all fields

Request example

GET /api/v2/products
Response example

{
  "data": [
    {
      "id": 11,
      "type": "basic",
      "sku": null,
      "name": "Cotton Twill Shirt for men",
      "description": "

Rendered in feather-light cotton twill, this long-sleeved shirt from Ralph Lauren equips new season collections with comfortable breathability and an iconic profile.

Embroidered with the iconic Polo Pony logo on the chest, its slim point collar and button fastening combine to offer the label's signature preppy appeal.

", "meta_description": null, "inventory_enabled": "off", "category_id": 6, "category_name": "Shirts", "manufacturer_id": 1000005, "manufacturer_name": "Ralph Lauren", "price_net": 127.72, "price_gross": 127.72, "tax_id": 1, "tax_name": "VAT", "tax_value": 0, "url": "https://shop.demo.ro/shirts/cotton-twill-shirt-for-men", "date_created": "2019-01-29T16:43:35+02:00", "date_modified": "2020-03-01T20:55:51+02:00", "status": "active", "visibility": "visible", "is_listed": true, "in_stock": true, "total_sales": 0, "total_units_sold": 0, "total_views": 0 }, { "id": 12, "type": "basic", "sku": null, "name": "Striped Shirt", "description": "

A staple piece that cleverly merges statement with minimalist, this shirt from Polo Ralph Lauren is infused with nautical stripes that can be transformed from casual to formal depending on the occasion.

Embroidered with the signature Pony logo to the chest, the breezy cotton silhouette boasts a classic point collar and mother-of-pearl button fastenings to complement the cobalt tones.

", "meta_description": null, "inventory_enabled": "off", "category_id": 6, "category_name": "Shirts", "manufacturer_id": 1000005, "manufacturer_name": "Ralph Lauren", "price_net": 126.04, "price_gross": 126.04, "tax_id": 1, "tax_name": "VAT", "tax_value": 0, "url": "https://shop.demo.ro/shirts/striped-shirt", "date_created": "2019-01-29T16:43:35+02:00", "date_modified": "2020-03-01T20:55:51+02:00", "status": "active", "visibility": "visible", "is_listed": true, "in_stock": true, "total_sales": 0, "total_units_sold": 0, "total_views": 0 }, { ... } ], "meta": { "count": { "total": 2000, "current": 20, "start": 0, "limit": 20 }, "links": { "prev": null, "current": "/api/v2/products", "next": "/api/v2/products?start=20" } } }

Extract all records, filter only certain fields

Request example

GET /api/v2/products?fields=id,name,url
Response example

{
  "data": [
    {
      "id": 11,
      "name": "Cotton Twill Shirt for men",
      "url": "https://shop.demo.ro/shirts/cotton-twill-shirt-for-men"
    },
    {
      "id": 12,
      "name": "Striped Shirt",
      "url": "https://shop.demo.ro/shirts/striped-shirt"
    },
    { ... }
  ],
  "meta": {
    "count": {
      "total": 2000,
      "current": 20,
      "start": 0,
      "limit": 20
    },
    "links": {
      "prev": null,
      "current": "/api/v2/products",
      "next": "/api/v2/products?start=20"
    }
  }
}

Extract all records, include additional fields

Request example

GET /api/v2/products?include=images
Response example

{
  "data": [
    {
      "id": 11,
      "type": "basic",
      "sku": null,
      "ean": null,
      "name": "Cotton Twill Shirt for men",
      "description": "

Rendered in feather-light cotton twill, this long-sleeved shirt from Ralph Lauren equips new season collections with comfortable breathability and an iconic profile.

Embroidered with the iconic Polo Pony logo on the chest, its slim point collar and button fastening combine to offer the label's signature preppy appeal.

", "meta_description": null, "inventory_enabled": "off", "category_id": 6, "category_name": "Camasi", "manufacturer_id": 1000005, "manufacturer_name": "Ralph Lauren", "price_net": 127.72, "price_gross": 151.99, "tax_id": 1, "tax_name": "TVA", "tax_value": 19, "url": "http://shop.demo.ro/shirts/cotton-twill-shirt-for-men", "images": [ { "id": 43, "url": "https://s.cdnmpro.com/242394140/p/l/3/cotton-twill-shirt-for-men~43.jpg", "caption": null }, { "id": 686, "url": "https://s.cdnmpro.com/242394140/p/l/6/cotton-twill-shirt-for-men~686.jpg", "caption": null }, { "id": 687, "url": "https://s.cdnmpro.com/242394140/p/l/7/cotton-twill-shirt-for-men~687.jpg", "caption": null } ], "date_created": "2019-01-29T16:43:35+02:00", "date_modified": "2020-04-08T12:22:17+03:00", "status": "active", "visibility": "visible", "is_listed": true, "in_stock": true, "total_sales": 1, "total_units_sold": 1, "total_views": 0 }, { "id": 12, "type": "basic", "sku": null, "ean": null, "name": "Striped Shirt", "description": "

A staple piece that cleverly merges statement with minimalist, this shirt from Polo Ralph Lauren is infused with nautical stripes that can be transformed from casual to formal depending on the occasion.

Embroidered with the signature Pony logo to the chest, the breezy cotton silhouette boasts a classic point collar and mother-of-pearl button fastenings to complement the cobalt tones.

", "meta_description": null, "inventory_enabled": "off", "category_id": 6, "category_name": "Camasi", "manufacturer_id": 1000005, "manufacturer_name": "Ralph Lauren", "price_net": 126.04, "price_gross": 149.99, "tax_id": 1, "tax_name": "TVA", "tax_value": 19, "url": "http://shop.demo.ro/shirts/striped-shirt", "images": [ { "id": 46, "url": "https://s.cdnmpro.com/242394140/p/l/6/striped-shirt~46.jpg", "caption": null }, { "id": 693, "url": "https://s.cdnmpro.com/242394140/p/l/3/striped-shirt~693.jpg", "caption": null }, { "id": 694, "url": "https://s.cdnmpro.com/242394140/p/l/4/striped-shirt~694.jpg", "caption": null } ], "date_created": "2019-01-29T16:43:35+02:00", "date_modified": "2020-04-08T12:22:17+03:00", "status": "active", "visibility": "visible", "is_listed": true, "in_stock": true, "total_sales": 5, "total_units_sold": 5, "total_views": 0 }, { ... } ], "meta": { "count": { "total": 2000, "current": 20, "start": 0, "limit": 20 }, "links": { "prev": null, "current": "/api/v2/products?include=images", "next": "/api/v2/products?include=images&start=20" } } }

Filter the records based on the list of IDs, filter only certain fields

Request example

GET /api/v2/products?ids=101,102&fields=id,name
Response example

{
  "data": [
    {
      "id": 101,
      "name": "Cotton Twill Shirt for men"
     },
    {
      "id": 102,
      "name": "Striped Shirt"
    },
    { ... }
  ],
  "meta": {
    "count": {
      "total": 2,
      "current": 2,
      "start": 0,
      "limit": 20
    },
    "links": {
      "prev": null,
      "current": "/api/v2/products?ids=101,102&fields=id,name",
      "next": null
    }
  }
}

Extract product data

It displays the data of a single record.

Type : Individual resource
Method : GET
Url : /api/v2/products/{id}
Filter results : No
Field selection : Yes
Inclusion of additional fields : No
Pagination : No

The http response code is 200 in case of success, the response will have the form of an individual resource related to the requested id.

You can filter the fields you want to include in the result for each resource using the 'fields' parameter and explicitly mentioning only the fields (separated by commas) you want included (the id field will always be included by default)

GET /api/v2/products/{id}?fields=id,name,category_id 

Request format

Example of a CURL request that returns an individual record:

curl --request GET \
--url 'https://shop.demo.ro/api/v2/products/30' \
--header 'Accept: application/json' \
--header 'Content-type: application/json' \
--header 'Authorization: Basic {base64-encoded-credentials}'

Extract all fields

Request example

GET /api/v2/products/30
Reponse example

{
  "id": 30,
  "type": "basic",
  "sku": null,
  "name": "Low Neckline Dress",
  "description": "

Boasting a deep neckline and gathering details, this dress from Roberto Cavalli is sure to make an impression. The sleeveless design can be worn during the day with tights and boots and elevated come evening with an embellished clutch bag and pointed heels.

", "meta_description": null, "inventory_enabled": "off", "category_id": 9, "category_name": "Dresses", "manufacturer_id": 1000010, "manufacturer_name": "Roberto Cavalli", "price_net": 515.96, "price_gross": 515.96, "tax_id": 1, "tax_name": "VAT", "tax_value": 0, "url": "https://shop.demo.ro/dresses/low-neckline-dress", "meta_links": [ { "lang": "en_US", "url": "https://shop.demo.ro/dresses/low-neckline-dress" } ], "images": [ { "id": 100, "url": "https://cdn1.shopmania.biz/files/s15/936942325/p/l/0/100.jpg", "caption": null }, { "id": 822, "url": "https://cdn1.shopmania.biz/files/s15/936942325/p/l/2/822.jpg", "caption": null } ], "product_attributes": [ { "id": 5, "name": "Colour", "options": [ "id": 5, "name": "Purple", ] }, { "id": 6, "name": "Occasion", "options": [ "id": 15, "name": "Party", ] } ], "date_created": "2019-01-29T16:43:36+02:00", "date_modified": "2020-03-01T20:55:51+02:00", "status": "active", "visibility": "visible", "is_listed": true, "in_stock": true, "total_sales": 0, "total_units_sold": 0, "total_views": 0 }

Filter only certain fields

Request example

GET /api/v2/products/101?fields=id,name,url
Response example

{
  "id": 101,
  "name": "Low Neckline Dress",
  "url": "https://shop.demo.ro/dresses/low-neckline-dress"
}

Add a product

Allows adding a new record.

Type : Create resource
Method : POST
Url :/api/v2/products

The response http code is 200in case of success, the response will have the form of an individual resource representing the record that was just added.

Request format

Example of a CURL request that creates a new basic product:

curl --request POST \
--url 'https://shop.demo.ro/api/v2/products' \
--header 'Accept: application/json' \
--header 'Content-type: application/json' \
--header 'Authorization: Basic {base64-encoded-credentials}' \
--data-raw '{
  "type": "basic",
  "name": "Leather Cardholder Wallet",
  "description": "A classic bi-fold wallet, perfect for everyday use",
  "category_id": 22,
  "price_gross": 89
}'

Example of a CURL request that creates a new product of the multi_variant type:

curl --request POST \
--url 'https://shop.demo.ro/api/v2/products' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic {base64-encoded-credentials}' \
--data-raw '{
  "type": "multi_variant",
  "name": "Leather biker jacket",
  "description": "We\u0027ve fused traditional bomber jackets with classic elements from biker styles.",
  "category_id": 10,
  "manufacturer_id": 1000014,
  "product_attributes": [
    {
      "name": "Material",
      "options": [
        {
          "value": "Leather"
        },
        {
          "value": "Faux leather"
        }
      ]
    },
    {
      "name": "Sleeve size",
      "options": [
        {
          "value": "Small"
        },
        {
          "value": "Medium"
        },
        {
          "value": "Large"
        }
      ]
    }
  ],
  "variant_attributes": [
    {
      "name": "Size",
      "options": [
        {
          "value": "S"
        },
        {
          "value": "M"
        },
        {
          "value": "L"
        }
      ]
    }
  ],
  "variants": [
    {
      "inventory_enabled": "off",
      "price_gross": 457,
      "variant_options": [
        {
          "name": "Size",
          "value": "M"
        }
      ]
    }
  ],
  "images": [
    {
      "caption": "Front side",
      "default": true,
      "base64": "/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAIBAQIBAQICAgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCAAyADIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD8q6KKK+PP9CAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q=="
    }
  ]
}'

Add basic type product

Request example

POST /api/v2/products
{
  "type": "basic",
  "name": "Leather Cardholder Wallet",
  "description": "A classic bi-fold wallet, perfect for everyday use",
  "category_id": 22,
  "price_gross": 89,
  "stock": 10
}
Response example

{
  "id": 17838,
  "type": "basic",
  "sku": null,
  "ean": null,
  "ext_ref": null,
  "name": "Leather Cardholder Wallet",
  "description": "A classic bi-fold wallet, perfect for everyday use",
  "meta_description": null,
  "inventory_enabled": "off",
  "category_id": 22,
  "category_name": "Wallets",
  "categories": [
    {
      "id": 22,
      "name": "Wallets"
    }
  ],
  "manufacturer_id": 0,
  "manufacturer_name": null,
  "price_net": 80.91,
  "price_gross": 89,
  "tax_id": 3,
  "tax_name": "taxa 10",
  "tax_value": 10,
  "quantity_multiplier": 1,
  "unit_id": 0,
  "shipping_unit_cost": 0,
  "weight": null,
  "url": "http://shop.demo.ro/leather-cardholder-wallet-17838",
  "meta_links": [
    {
      "lang": "ro_RO",
      "url": "http://shop.demo.ro/cumpara/leather-cardholder-wallet-17838"
    },
    {
      "lang": "de_DE",
      "url": "http://shop.demo.ro/de/cumpara/leather-cardholder-wallet-17838"
    },
    {
      "lang": "en_GB",
      "url": "http://shop.demo.ro/buy/leather-cardholder-wallet-17838"
    },
    {
      "lang": "fr_FR",
      "url": "http://shop.demo.ro/acheter/leather-cardholder-wallet-17838"
    },
    {
      "lang": "it_IT",
      "url": "http://shop.demo.ro/compra/leather-cardholder-wallet-17838"
    },
    {
      "lang": "hu_HU",
      "url": "http://shop.demo.ro/hu/cumpara/leather-cardholder-wallet-17838"
    }
  ],
  "images": [],
  "date_created": "2020-04-30T13:30:51+03:00",
  "date_modified": "2020-04-30T13:30:51+03:00",
  "status": "active",
  "visibility": "visible",
  "is_listed": true,
  "in_stock": true,
  "total_sales": 0,
  "total_units_sold": 0,
  "total_views": 0
}

Add multi-variant product

Request example

POST /api/v2/products
{
  "type": "multi_variant",
  "name": "Leather biker jacket",
  "description": "We\u0027ve fused traditional bomber jackets with classic elements from biker styles.",
  "category_id": 10,
  "manufacturer_id": 1000014,
  "product_attributes": [
    {
      "name": "Material",
      "options": [
        {
          "value": "Leather"
        },
        {
          "value": "Faux leather"
        }
      ]
    },
    {
      "name": "Sleeve size",
      "options": [
        {
          "value": "Small"
        },
        {
          "value": "Medium"
        },
        {
          "value": "Large"
        }
      ]
    }
  ],
  "variant_attributes": [
    {
      "name": "Size",
      "options": [
        {
          "value": "S"
        },
        {
          "value": "M"
        },
        {
          "value": "L"
        }
      ]
    }
  ],
  "variants": [
    {
      "inventory_enabled": "off",
      "price_gross": 457,
      "variant_options": [
        {
          "name": "Size",
          "value": "M"
        }
      ]
    }
  ],
  "images": [
    {
      "caption": "Front side",
      "default": true,
      "base64": "/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAIBAQIBAQICAgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCAAyADIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD8q6KKK+PP9CAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q=="
    }
  ]
}
Example response

{
  "id": 620,
  "type": "multi_variant",
  "sku": null,
  "name": "Leather biker jacket",
  "description": "We've fused traditional bomber jackets with classic elements from biker styles.",
  "meta_description": null,
  "inventory_enabled": "on",
  "stock": 0,
  "stock_value": 0,
  "category_id": 10,
  "category_name": "Coats & Jackets",
  "manufacturer_id": 1000014,
  "manufacturer_name": "Dolce & Gabbana",
  "price_net": 457,
  "price_gross": 457,
  "tax_id": 0,
  "tax_value": null,
  "url": "https://shop.demo.ro/coats-jackets/leather-biker-jacket",
  "meta_links": [
    {
      "lang": "en_US",
      "url": "https://shop.demo.ro/coats-jackets/leather-biker-jacket"
    }
  ],
  "images": [
    {
      "id": 2051,
      "url": "https://cdn1.shopmania.biz/files/s15/936942325/p/l/1/2051.jpg",
      "caption": "Front side"
    }
  ],
  "product_attributes": [
  {
      "id": 8,
      "name": "Material",
      "options": [
        {
          "value": "Leather"
        },
        {
          "value": "Faux leather"
        }
      ]
    },
    {
      "id": 9,
      "name": "Sleeve size",
      "options": [
        {
          "value": "Small"
        },
        {
          "value": "Medium"
        },
        {
          "value": "Large"
        }
      ]
    }
  ],
  "variant_attributes": [
    {
      "id": 4,
      "name": "Size",
      "options": [
        {
          "value": "S"
        },
        {
          "value": "M"
        },
        {
          "value": "L"
        }
      ]
    }
  ],
  "variants": [
    {
      "id": 10000001,
      "sku": null,
      "inventory_enabled": "off",
      "price_net": 457,
      "price_gross": 457,
      "variant_options": [
        {
          "id": 4,
          "name": "Size",
          "value": "M"
        }
      ],
      "visibility": "visible"
    }
  ],
  "date_created": "2020-03-04T16:19:02+02:00",
  "date_modified": "2020-03-04T16:19:03+02:00",
  "status": "active",
  "visibility": "visible",
  "is_listed": true,
  "in_stock": true,
  "total_sales": 0,
  "total_units_sold": 0,
  "total_views": 0
}

Modification of product data

Allows updating an existing record based on ID.

Type : Resource update
Method : PATCH
Url :/api/v2/products/{id}

The response http code is 200in case of success, the response will take the form of an individual resource representing the record that has just been updated.

Request format

Example of a CURL request that updates an existing record:

curl --request PATCH \
--url 'https://shop.demo.ro/api/v2/products/619' \
--header 'Accept: application/json' \
--header 'Content-type: application/json' \
--header 'Authorization: Basic {base64-encoded-credentials}' \
--data-raw '{
  "price_gross": 59,
  "old_price_gross": 89,
  "stock": 250
}'

Update product data

Request example

PATCH /api/v2/products/17838
{
  "price_gross": 59,
  "old_price_gross": 89
}
Response example

{
  "id": 17838,
  "type": "basic",
  "sku": null,
  "ean": null,
  "ext_ref": null,
  "name": "Leather Cardholder Wallet",
  "description": "A classic bi-fold wallet, perfect for everyday use",
  "meta_description": null,
  "inventory_enabled": "off",
  "category_id": 22,
  "category_name": "Wallets",
  "categories": [
    {
      "id": 22,
      "name": "Wallets"
    }
  ],
  "manufacturer_id": 0,
  "manufacturer_name": null,
  "price_net": 53.64,
  "price_gross": 59,
  "old_price_net": 80.91,
  "old_price_gross": 89,
  "tax_id": 3,
  "tax_name": "taxa 10",
  "tax_value": 10,
  "quantity_multiplier": 1,
  "unit_id": 0,
  "shipping_unit_cost": 0,
  "weight": null,
  "url": "http://shop.demo.ro/leather-cardholder-wallet-17838",
  "meta_links": [
    {
      "lang": "ro_RO",
      "url": "http://shop.demo.ro/cumpara/leather-cardholder-wallet-17838"
    },
    {
      "lang": "de_DE",
      "url": "http://shop.demo.ro/de/cumpara/leather-cardholder-wallet-17838"
    },
    {
      "lang": "en_GB",
      "url": "http://shop.demo.ro/buy/leather-cardholder-wallet-17838"
    },
    {
      "lang": "fr_FR",
      "url": "http://shop.demo.ro/acheter/leather-cardholder-wallet-17838"
    },
    {
      "lang": "it_IT",
      "url": "http://shop.demo.ro/compra/leather-cardholder-wallet-17838"
    },
    {
      "lang": "hu_HU",
      "url": "http://shop.demo.ro/hu/cumpara/leather-cardholder-wallet-17838"
    }
  ],
  "images": [],
  "product_attributes": [],
  "variant_attributes": [],
  "date_created": "2020-04-30T13:30:51+03:00",
  "date_modified": "2020-04-30T13:30:51+03:00",
  "status": "active",
  "visibility": "visible",
  "is_listed": true,
  "in_stock": true,
  "total_sales": 0,
  "total_units_sold": 0,
  "total_views": 0
}

Product status change

Request example

PATCH /api/v2/products/101
{
  "status": "inactive"
}
Response example

{
  "id": 17838,
  "type": "basic",
  "sku": null,
  "ean": null,
  "ext_ref": null,
  "name": "Leather Cardholder Wallet",
  "description": "A classic bi-fold wallet, perfect for everyday use",
  "meta_description": null,
  "inventory_enabled": "off",
  "category_id": 22,
  "category_name": "Wallets",
  "categories": [
    {
      "id": 22,
      "name": "Wallets"
    }
  ],
  "manufacturer_id": 0,
  "manufacturer_name": null,
  "price_net": 53.64,
  "price_gross": 59,
  "old_price_net": 80.91,
  "old_price_gross": 89,
  "tax_id": 3,
  "tax_name": "taxa 10",
  "tax_value": 10,
  "quantity_multiplier": 1,
  "unit_id": 0,
  "shipping_unit_cost": 0,
  "weight": null,
  "url": "http://shop.demo.ro/cumpara/leather-cardholder-wallet-17838",
  "meta_links": [
    {
      "lang": "ro_RO",
      "url": "http://shop.demo.ro/cumpara/leather-cardholder-wallet-17838"
    },
    {
      "lang": "de_DE",
      "url": "http://shop.demo.ro/de/cumpara/leather-cardholder-wallet-17838"
    },
    {
      "lang": "en_GB",
      "url": "http://shop.demo.ro/buy/leather-cardholder-wallet-17838"
    },
    {
      "lang": "fr_FR",
      "url": "http://shop.demo.ro/acheter/leather-cardholder-wallet-17838"
    },
    {
      "lang": "it_IT",
      "url": "http://shop.demo.ro/compra/leather-cardholder-wallet-17838"
    },
    {
      "lang": "hu_HU",
      "url": "http://shop.demo.ro/hu/cumpara/leather-cardholder-wallet-17838"
    }
  ],
  "images": [],
  "product_attributes": [],
  "variant_attributes": [],
  "date_created": "2020-04-30T13:30:51+03:00",
  "date_modified": "2020-04-30T13:30:51+03:00",
  "status": "inactive",
  "visibility": "visible",
  "is_listed": false,
  "in_stock": true,
  "total_sales": 0,
  "total_units_sold": 0,
  "total_views": 0
}

Change product variants

Request example

PATCH /api/v2/products/101
{
  "variant_attributes": [
    {
      "name": "Color",
      "options": [
        {
          "value": "White"
        },
        {
          "value": "Blue"
        }
      ]
    }
  ],
  "variants": [
    {
      "price_net": 457,
      "price_gross": 457,
      "variant_options": [
        {
          "name": "Color",
          "value": "Blue"
        }
      ]
    }
  ]
}
Response example

{
  "id": 630,
  "type": "multi_variant",
  "sku": null,
  "ean": null,
  "name": "Leather biker jacket",
  "description": "We've fused traditional bomber jackets with classic elements from biker styles.",
  "meta_description": null,
  "inventory_enabled": "on",
  "stock": 0,
  "category_id": 10,
  "category_name": "Jackets",
  "categories": [
    {
      "id": 10,
      "name": "Jackets"
    }
  ],
  "manufacturer_id": 1000014,
  "manufacturer_name": "Dolce & Gabbana",
  "price_net": 457,
  "price_gross": 457,
  "tax_id": 0,
  "tax_value": null,
  "url": "http://shop.demo.ro//cumpara/leather-biker-jacket-630",
  "meta_links": [
    {
      "lang": "ro_RO",
      "url": "http://shop.demo.ro//cumpara/leather-biker-jacket-630"
    },
    {
      "lang": "en_GB",
      "url": "http://shop.demo.ro//en/cumpara/leather-biker-jacket-630"
    },
    {
      "lang": "es_ES",
      "url": "http://shop.demo.ro//es/cumpara/leather-biker-jacket-630"
    }
  ],
  "images": [
    {
      "id": 2057,
      "url": "https://s.cdnmpro.com/242394140/p/l/5/narn-quilted-funnel-neck-jacket~205.jpg",
      "caption": "Front side"
    }
  ],
  "product_attributes": [
    {
      "id": 15,
      "name": "Sleeve size",
      "options": [
        {
          "id": 108,
          "value": "Small"
        },
        {
          "id": 109,
          "value": "Medium"
        },
        {
           "id": 110,
           "value": "Large"
        }
      ]
    },
    {
      "id": 3,
      "name": "Material",
      "options": [
        {
          "id": 106,
          "value": "Leather"
        },
        {
          "id": 107,
          "value": "Faux leather"
        }
      ]
   }
  ],
  "variant_attributes": [
    {
      "id": 17
      "name": "Color",
      "options": [
        {
          "id": 114,
          "value": "White"
        },
        {
          "id": 115,
          "value": "Blue"
        }
      ]
    }
  ],
  "variants": [
    {
      "id": 10000112,
      "sku": null,
      "inventory_enabled": "off",
      "price_net": 457,
      "price_gross": 457,
      "variant_options": [
        {
          "id": 17,
          "name": "Color",
          "value": "Blue"
        }
      ]
    }
  ],
  "date_created": "2020-04-30T13:27:37+03:00",
  "date_modified": "2020-04-30T14:10:42+03:00",
  "status": "active",
  "visibility": "visible",
  "is_listed": true,
  "in_stock": true,
  "total_sales": 0,
  "total_units_sold": 0,
  "total_views": 0
}

Delete product

Allows deletion of an existing record based on ID.

Type : Delete resource Method : DELETE Url :/api/v2/products/{id}

The http response code is 200 in case of success.

Request format

Example of a CURL request that deletes an existing record:

curl --request DELETE \
--url 'https://shop.demo.ro/api/v2/products/619' \
--header 'Accept: application/json' \
--header 'Content-type: application/json' \
--header 'Authorization: Basic {base64-encoded-credentials}'
Example response

{
  "ok": true
}

Последна промяна: 11 Aug 2022
Полезна ли бе страницата?
Все още ли имате нужда от помощ?