Haravan — Products
List products — haravan.list_products
List or find products by SKU, barcode, vendor, type or collection.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | com.read_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
sku | string | no | Exact SKU. |
barcode | string | no | Exact barcode. |
vendor | string | no | Vendor or brand. |
handle | string | no | URL handle. |
product_type | string | no | Product type. |
collection_id | integer | no | Only products in this collection. Min 1. |
since_id | integer | no | Only products after this id. Min 1. |
fields | string | no | Comma-separated fields to return. |
page | integer | no | Page number, from 1. Min 1. |
limit | integer | no | Items per page (1-50, default 50). Min 1. Max 50. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
products | array of object | Products. |
products[].id | integer | Product id. |
products[].title | string | Product name. |
products[].handle | string | URL handle, generated from the title. |
products[].body_html | string | null | Description, HTML. |
products[].vendor | string | null | Brand or vendor. |
products[].product_type | string | null | Product type. |
products[].tags | string | null | Comma-separated tags. |
products[].published_at | string | null | When the product was published (ISO 8601); null when unpublished. |
products[].published_scope | string | null | Where it is published: web (Online Store), pos (Point of Sale) or global (both). |
products[].template_suffix | string | null | Suffix of the Liquid template of the page. |
products[].only_hide_from_list | boolean | Hidden from search and listing pages. |
products[].not_allow_promotion | boolean | Promotions and coupons do not apply. |
products[].options | array of object | Product options, e.g. Size and Color (up to 3). |
products[].options[].id | integer | Option id. |
products[].options[].product_id | integer | Product the option belongs to. |
products[].options[].name | string | Option name, e.g. Size or Color. |
products[].options[].position | integer | Position among the product's options. |
products[].variants | array of object | Variants of the product. |
products[].variants[].id | integer | Variant id. |
products[].variants[].product_id | integer | Product the variant belongs to. |
products[].variants[].title | string | Variant name, e.g. 'Đen / S'. |
products[].variants[].sku | string | null | Stock keeping unit. |
products[].variants[].barcode | string | null | Barcode, UPC or ISBN. |
products[].variants[].price | number | Price, VND. |
products[].variants[].compare_at_price | number | null | Price before discount, VND. |
products[].variants[].grams | number | Weight in grams. |
products[].variants[].option1 | string | null | Value of option 1, e.g. color. |
products[].variants[].option2 | string | null | Value of option 2, e.g. size; may be empty. |
products[].variants[].option3 | string | null | Value of option 3; may be empty. |
products[].variants[].position | integer | Position among the product's variants. |
products[].variants[].image_id | integer | null | Id of one of the product's images. The reference says string; its sample replies show an integer or null, which this follows. |
products[].variants[].inventory_management | string | null | 'haravan' when Haravan tracks stock for this variant, else null. |
products[].variants[].inventory_policy | string | 'deny' blocks orders when out of stock; 'continue' allows them. |
products[].variants[].inventory_quantity | integer | Items in stock. |
products[].variants[].fulfillment_service | string | null | Fulfillment service; null. |
products[].variants[].requires_shipping | boolean | Whether the customer needs a shipping address. |
products[].variants[].taxable | boolean | Whether tax is charged. |
products[].variants[].created_at | string | When it was created (ISO 8601). |
products[].variants[].updated_at | string | When it was last updated (ISO 8601). |
products[].images | array of object | Images of the product. |
products[].images[].id | integer | Image id. |
products[].images[].product_id | integer | Product the image belongs to. |
products[].images[].position | integer | Order among the product's images; 1 is the main image. |
products[].images[].src | string | URL of the image. |
products[].images[].filename | string | File name of the image; not sent by every endpoint. |
products[].images[].variant_ids | array of integer | null | Ids of the variants that show this image; null in the single-image reference sample. |
products[].images[].created_at | string | When it was created (ISO 8601). |
products[].images[].updated_at | string | When it was last updated (ISO 8601). |
products[].created_at | string | When it was created (ISO 8601). |
products[].updated_at | string | When it was last updated (ISO 8601). |
Get product — haravan.get_product
Get one product with its variants, prices, SKUs and images.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | com.read_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | yes | Haravan product id. Min 1. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
product | object | The product. |
product.id | integer | Product id. |
product.title | string | Product name. |
product.handle | string | URL handle, generated from the title. |
product.body_html | string | null | Description, HTML. |
product.vendor | string | null | Brand or vendor. |
product.product_type | string | null | Product type. |
product.tags | string | null | Comma-separated tags. |
product.published_at | string | null | When the product was published (ISO 8601); null when unpublished. |
product.published_scope | string | null | Where it is published: web (Online Store), pos (Point of Sale) or global (both). |
product.template_suffix | string | null | Suffix of the Liquid template of the page. |
product.only_hide_from_list | boolean | Hidden from search and listing pages. |
product.not_allow_promotion | boolean | Promotions and coupons do not apply. |
product.options | array of object | Product options, e.g. Size and Color (up to 3). |
product.options[].id | integer | Option id. |
product.options[].product_id | integer | Product the option belongs to. |
product.options[].name | string | Option name, e.g. Size or Color. |
product.options[].position | integer | Position among the product's options. |
product.variants | array of object | Variants of the product. |
product.variants[].id | integer | Variant id. |
product.variants[].product_id | integer | Product the variant belongs to. |
product.variants[].title | string | Variant name, e.g. 'Đen / S'. |
product.variants[].sku | string | null | Stock keeping unit. |
product.variants[].barcode | string | null | Barcode, UPC or ISBN. |
product.variants[].price | number | Price, VND. |
product.variants[].compare_at_price | number | null | Price before discount, VND. |
product.variants[].grams | number | Weight in grams. |
product.variants[].option1 | string | null | Value of option 1, e.g. color. |
product.variants[].option2 | string | null | Value of option 2, e.g. size; may be empty. |
product.variants[].option3 | string | null | Value of option 3; may be empty. |
product.variants[].position | integer | Position among the product's variants. |
product.variants[].image_id | integer | null | Id of one of the product's images. The reference says string; its sample replies show an integer or null, which this follows. |
product.variants[].inventory_management | string | null | 'haravan' when Haravan tracks stock for this variant, else null. |
product.variants[].inventory_policy | string | 'deny' blocks orders when out of stock; 'continue' allows them. |
product.variants[].inventory_quantity | integer | Items in stock. |
product.variants[].fulfillment_service | string | null | Fulfillment service; null. |
product.variants[].requires_shipping | boolean | Whether the customer needs a shipping address. |
product.variants[].taxable | boolean | Whether tax is charged. |
product.variants[].created_at | string | When it was created (ISO 8601). |
product.variants[].updated_at | string | When it was last updated (ISO 8601). |
product.images | array of object | Images of the product. |
product.images[].id | integer | Image id. |
product.images[].product_id | integer | Product the image belongs to. |
product.images[].position | integer | Order among the product's images; 1 is the main image. |
product.images[].src | string | URL of the image. |
product.images[].filename | string | File name of the image; not sent by every endpoint. |
product.images[].variant_ids | array of integer | null | Ids of the variants that show this image; null in the single-image reference sample. |
product.images[].created_at | string | When it was created (ISO 8601). |
product.images[].updated_at | string | When it was last updated (ISO 8601). |
product.created_at | string | When it was created (ISO 8601). |
product.updated_at | string | When it was last updated (ISO 8601). |
Create product — haravan.create_product
Create a product with its variants and images.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
product | object | yes | The product. Other Haravan product fields are also accepted. |
product.title | string | yes | Product name. |
product.body_html | string | no | Description, HTML. |
product.vendor | string | no | Brand or vendor. |
product.product_type | string | no | Product type. |
product.tags | string | no | Comma-separated tags. |
product.published | boolean | no | Visible on the store. |
product.variants | array of object | no | Variants: sku, price, option1..3. |
product.variants[].title | string | no | Variant name, e.g. 'Đỏ / M'. |
product.variants[].sku | string | no | Stock keeping unit. |
product.variants[].barcode | string | no | Barcode. |
product.variants[].price | number | no | Price, VND. |
product.variants[].compare_at_price | number | no | Price before discount, VND. |
product.variants[].option1 | string | no | Value of option 1, e.g. color. |
product.variants[].option2 | string | no | Value of option 2, e.g. size. |
product.variants[].option3 | string | no | Value of option 3. |
product.variants[].weight | number | no | Weight in grams. |
product.images | array of object | no | Images: {src} with an https URL. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
product | object | The product. |
product.id | integer | Product id. |
product.title | string | Product name. |
product.handle | string | URL handle, generated from the title. |
product.body_html | string | null | Description, HTML. |
product.vendor | string | null | Brand or vendor. |
product.product_type | string | null | Product type. |
product.tags | string | null | Comma-separated tags. |
product.published_at | string | null | When the product was published (ISO 8601); null when unpublished. |
product.published_scope | string | null | Where it is published: web (Online Store), pos (Point of Sale) or global (both). |
product.template_suffix | string | null | Suffix of the Liquid template of the page. |
product.only_hide_from_list | boolean | Hidden from search and listing pages. |
product.not_allow_promotion | boolean | Promotions and coupons do not apply. |
product.options | array of object | Product options, e.g. Size and Color (up to 3). |
product.options[].id | integer | Option id. |
product.options[].product_id | integer | Product the option belongs to. |
product.options[].name | string | Option name, e.g. Size or Color. |
product.options[].position | integer | Position among the product's options. |
product.variants | array of object | Variants of the product. |
product.variants[].id | integer | Variant id. |
product.variants[].product_id | integer | Product the variant belongs to. |
product.variants[].title | string | Variant name, e.g. 'Đen / S'. |
product.variants[].sku | string | null | Stock keeping unit. |
product.variants[].barcode | string | null | Barcode, UPC or ISBN. |
product.variants[].price | number | Price, VND. |
product.variants[].compare_at_price | number | null | Price before discount, VND. |
product.variants[].grams | number | Weight in grams. |
product.variants[].option1 | string | null | Value of option 1, e.g. color. |
product.variants[].option2 | string | null | Value of option 2, e.g. size; may be empty. |
product.variants[].option3 | string | null | Value of option 3; may be empty. |
product.variants[].position | integer | Position among the product's variants. |
product.variants[].image_id | integer | null | Id of one of the product's images. The reference says string; its sample replies show an integer or null, which this follows. |
product.variants[].inventory_management | string | null | 'haravan' when Haravan tracks stock for this variant, else null. |
product.variants[].inventory_policy | string | 'deny' blocks orders when out of stock; 'continue' allows them. |
product.variants[].inventory_quantity | integer | Items in stock. |
product.variants[].fulfillment_service | string | null | Fulfillment service; null. |
product.variants[].requires_shipping | boolean | Whether the customer needs a shipping address. |
product.variants[].taxable | boolean | Whether tax is charged. |
product.variants[].created_at | string | When it was created (ISO 8601). |
product.variants[].updated_at | string | When it was last updated (ISO 8601). |
product.images | array of object | Images of the product. |
product.images[].id | integer | Image id. |
product.images[].product_id | integer | Product the image belongs to. |
product.images[].position | integer | Order among the product's images; 1 is the main image. |
product.images[].src | string | URL of the image. |
product.images[].filename | string | File name of the image; not sent by every endpoint. |
product.images[].variant_ids | array of integer | null | Ids of the variants that show this image; null in the single-image reference sample. |
product.images[].created_at | string | When it was created (ISO 8601). |
product.images[].updated_at | string | When it was last updated (ISO 8601). |
product.created_at | string | When it was created (ISO 8601). |
product.updated_at | string | When it was last updated (ISO 8601). |
Update product — haravan.update_product
Update a product's name, description, vendor, type, tags or visibility.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | yes | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | yes | Haravan product id. Min 1. |
product | object | yes | Fields to change. |
product.title | string | no | Product name. |
product.body_html | string | no | Description, HTML. |
product.vendor | string | no | Brand or vendor. |
product.product_type | string | no | Product type. |
product.tags | string | no | Comma-separated tags. |
product.published | boolean | no | Visible on the store. |
product.variants | array of object | no | Variants: sku, price, option1..3. |
product.variants[].title | string | no | Variant name, e.g. 'Đỏ / M'. |
product.variants[].sku | string | no | Stock keeping unit. |
product.variants[].barcode | string | no | Barcode. |
product.variants[].price | number | no | Price, VND. |
product.variants[].compare_at_price | number | no | Price before discount, VND. |
product.variants[].option1 | string | no | Value of option 1, e.g. color. |
product.variants[].option2 | string | no | Value of option 2, e.g. size. |
product.variants[].option3 | string | no | Value of option 3. |
product.variants[].weight | number | no | Weight in grams. |
product.images | array of object | no | Images: {src} with an https URL. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
product | object | The product. |
product.id | integer | Product id. |
product.title | string | Product name. |
product.handle | string | URL handle, generated from the title. |
product.body_html | string | null | Description, HTML. |
product.vendor | string | null | Brand or vendor. |
product.product_type | string | null | Product type. |
product.tags | string | null | Comma-separated tags. |
product.published_at | string | null | When the product was published (ISO 8601); null when unpublished. |
product.published_scope | string | null | Where it is published: web (Online Store), pos (Point of Sale) or global (both). |
product.template_suffix | string | null | Suffix of the Liquid template of the page. |
product.only_hide_from_list | boolean | Hidden from search and listing pages. |
product.not_allow_promotion | boolean | Promotions and coupons do not apply. |
product.options | array of object | Product options, e.g. Size and Color (up to 3). |
product.options[].id | integer | Option id. |
product.options[].product_id | integer | Product the option belongs to. |
product.options[].name | string | Option name, e.g. Size or Color. |
product.options[].position | integer | Position among the product's options. |
product.variants | array of object | Variants of the product. |
product.variants[].id | integer | Variant id. |
product.variants[].product_id | integer | Product the variant belongs to. |
product.variants[].title | string | Variant name, e.g. 'Đen / S'. |
product.variants[].sku | string | null | Stock keeping unit. |
product.variants[].barcode | string | null | Barcode, UPC or ISBN. |
product.variants[].price | number | Price, VND. |
product.variants[].compare_at_price | number | null | Price before discount, VND. |
product.variants[].grams | number | Weight in grams. |
product.variants[].option1 | string | null | Value of option 1, e.g. color. |
product.variants[].option2 | string | null | Value of option 2, e.g. size; may be empty. |
product.variants[].option3 | string | null | Value of option 3; may be empty. |
product.variants[].position | integer | Position among the product's variants. |
product.variants[].image_id | integer | null | Id of one of the product's images. The reference says string; its sample replies show an integer or null, which this follows. |
product.variants[].inventory_management | string | null | 'haravan' when Haravan tracks stock for this variant, else null. |
product.variants[].inventory_policy | string | 'deny' blocks orders when out of stock; 'continue' allows them. |
product.variants[].inventory_quantity | integer | Items in stock. |
product.variants[].fulfillment_service | string | null | Fulfillment service; null. |
product.variants[].requires_shipping | boolean | Whether the customer needs a shipping address. |
product.variants[].taxable | boolean | Whether tax is charged. |
product.variants[].created_at | string | When it was created (ISO 8601). |
product.variants[].updated_at | string | When it was last updated (ISO 8601). |
product.images | array of object | Images of the product. |
product.images[].id | integer | Image id. |
product.images[].product_id | integer | Product the image belongs to. |
product.images[].position | integer | Order among the product's images; 1 is the main image. |
product.images[].src | string | URL of the image. |
product.images[].filename | string | File name of the image; not sent by every endpoint. |
product.images[].variant_ids | array of integer | null | Ids of the variants that show this image; null in the single-image reference sample. |
product.images[].created_at | string | When it was created (ISO 8601). |
product.images[].updated_at | string | When it was last updated (ISO 8601). |
product.created_at | string | When it was created (ISO 8601). |
product.updated_at | string | When it was last updated (ISO 8601). |
Delete product — haravan.delete_product
Delete a product and all its variants.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | yes | yes | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | yes | Haravan product id. Min 1. |
Extra fields: ignored.
Output
Returns an empty object.
Add product tags — haravan.add_product_tags
Add tags to a product; existing tags are kept.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | yes | Haravan product id. Min 1. |
tags | string | yes | Comma-separated tags, e.g. 'sale,new'. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
tags | string | null | Product tags after the change. |
Remove product tags — haravan.remove_product_tags
Remove tags from a product.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | yes | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | yes | Haravan product id. Min 1. |
tags | string | yes | Comma-separated tags, e.g. 'sale,new'. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
tags | string | null | Product tags after the change. |
List variants — haravan.list_variants
List the variants (sizes, colors) of a product with price and SKU.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | com.read_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | yes | Haravan product id. Min 1. |
page | integer | no | Page number, from 1. Min 1. |
limit | integer | no | Items per page (1-50, default 50). Min 1. Max 50. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
variants | array of object | Variants of the product. |
variants[].id | integer | Variant id. |
variants[].product_id | integer | Product the variant belongs to. |
variants[].title | string | Variant name, e.g. 'Đen / S'. |
variants[].sku | string | null | Stock keeping unit. |
variants[].barcode | string | null | Barcode, UPC or ISBN. |
variants[].price | number | Price, VND. |
variants[].compare_at_price | number | null | Price before discount, VND. |
variants[].grams | number | Weight in grams. |
variants[].option1 | string | null | Value of option 1, e.g. color. |
variants[].option2 | string | null | Value of option 2, e.g. size; may be empty. |
variants[].option3 | string | null | Value of option 3; may be empty. |
variants[].position | integer | Position among the product's variants. |
variants[].image_id | integer | null | Id of one of the product's images. The reference says string; its sample replies show an integer or null, which this follows. |
variants[].inventory_management | string | null | 'haravan' when Haravan tracks stock for this variant, else null. |
variants[].inventory_policy | string | 'deny' blocks orders when out of stock; 'continue' allows them. |
variants[].inventory_quantity | integer | Items in stock. |
variants[].fulfillment_service | string | null | Fulfillment service; null. |
variants[].requires_shipping | boolean | Whether the customer needs a shipping address. |
variants[].taxable | boolean | Whether tax is charged. |
variants[].created_at | string | When it was created (ISO 8601). |
variants[].updated_at | string | When it was last updated (ISO 8601). |
Get variant — haravan.get_variant
Get one variant with price, SKU, barcode and stock quantity.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | com.read_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
variant_id | integer | yes | Variant id. Min 1. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
variant | object | The variant. |
variant.id | integer | Variant id. |
variant.product_id | integer | Product the variant belongs to. |
variant.title | string | Variant name, e.g. 'Đen / S'. |
variant.sku | string | null | Stock keeping unit. |
variant.barcode | string | null | Barcode, UPC or ISBN. |
variant.price | number | Price, VND. |
variant.compare_at_price | number | null | Price before discount, VND. |
variant.grams | number | Weight in grams. |
variant.option1 | string | null | Value of option 1, e.g. color. |
variant.option2 | string | null | Value of option 2, e.g. size; may be empty. |
variant.option3 | string | null | Value of option 3; may be empty. |
variant.position | integer | Position among the product's variants. |
variant.image_id | integer | null | Id of one of the product's images. The reference says string; its sample replies show an integer or null, which this follows. |
variant.inventory_management | string | null | 'haravan' when Haravan tracks stock for this variant, else null. |
variant.inventory_policy | string | 'deny' blocks orders when out of stock; 'continue' allows them. |
variant.inventory_quantity | integer | Items in stock. |
variant.fulfillment_service | string | null | Fulfillment service; null. |
variant.requires_shipping | boolean | Whether the customer needs a shipping address. |
variant.taxable | boolean | Whether tax is charged. |
variant.created_at | string | When it was created (ISO 8601). |
variant.updated_at | string | When it was last updated (ISO 8601). |
Create variant — haravan.create_variant
Add a variant (e.g. a new size or color) to a product.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | yes | Haravan product id. Min 1. |
variant | object | yes | The variant. |
variant.title | string | no | Variant name, e.g. 'Đỏ / M'. |
variant.sku | string | no | Stock keeping unit. |
variant.barcode | string | no | Barcode. |
variant.price | number | no | Price, VND. |
variant.compare_at_price | number | no | Price before discount, VND. |
variant.option1 | string | no | Value of option 1, e.g. color. |
variant.option2 | string | no | Value of option 2, e.g. size. |
variant.option3 | string | no | Value of option 3. |
variant.weight | number | no | Weight in grams. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
variant | object | The variant. |
variant.id | integer | Variant id. |
variant.product_id | integer | Product the variant belongs to. |
variant.title | string | Variant name, e.g. 'Đen / S'. |
variant.sku | string | null | Stock keeping unit. |
variant.barcode | string | null | Barcode, UPC or ISBN. |
variant.price | number | Price, VND. |
variant.compare_at_price | number | null | Price before discount, VND. |
variant.grams | number | Weight in grams. |
variant.option1 | string | null | Value of option 1, e.g. color. |
variant.option2 | string | null | Value of option 2, e.g. size; may be empty. |
variant.option3 | string | null | Value of option 3; may be empty. |
variant.position | integer | Position among the product's variants. |
variant.image_id | integer | null | Id of one of the product's images. The reference says string; its sample replies show an integer or null, which this follows. |
variant.inventory_management | string | null | 'haravan' when Haravan tracks stock for this variant, else null. |
variant.inventory_policy | string | 'deny' blocks orders when out of stock; 'continue' allows them. |
variant.inventory_quantity | integer | Items in stock. |
variant.fulfillment_service | string | null | Fulfillment service; null. |
variant.requires_shipping | boolean | Whether the customer needs a shipping address. |
variant.taxable | boolean | Whether tax is charged. |
variant.created_at | string | When it was created (ISO 8601). |
variant.updated_at | string | When it was last updated (ISO 8601). |
Update variant — haravan.update_variant
Change a variant's price, SKU, barcode, options or weight.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | yes | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
variant_id | integer | yes | Variant id. Min 1. |
variant | object | yes | Fields to change. |
variant.title | string | no | Variant name, e.g. 'Đỏ / M'. |
variant.sku | string | no | Stock keeping unit. |
variant.barcode | string | no | Barcode. |
variant.price | number | no | Price, VND. |
variant.compare_at_price | number | no | Price before discount, VND. |
variant.option1 | string | no | Value of option 1, e.g. color. |
variant.option2 | string | no | Value of option 2, e.g. size. |
variant.option3 | string | no | Value of option 3. |
variant.weight | number | no | Weight in grams. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
variant | object | The variant. |
variant.id | integer | Variant id. |
variant.product_id | integer | Product the variant belongs to. |
variant.title | string | Variant name, e.g. 'Đen / S'. |
variant.sku | string | null | Stock keeping unit. |
variant.barcode | string | null | Barcode, UPC or ISBN. |
variant.price | number | Price, VND. |
variant.compare_at_price | number | null | Price before discount, VND. |
variant.grams | number | Weight in grams. |
variant.option1 | string | null | Value of option 1, e.g. color. |
variant.option2 | string | null | Value of option 2, e.g. size; may be empty. |
variant.option3 | string | null | Value of option 3; may be empty. |
variant.position | integer | Position among the product's variants. |
variant.image_id | integer | null | Id of one of the product's images. The reference says string; its sample replies show an integer or null, which this follows. |
variant.inventory_management | string | null | 'haravan' when Haravan tracks stock for this variant, else null. |
variant.inventory_policy | string | 'deny' blocks orders when out of stock; 'continue' allows them. |
variant.inventory_quantity | integer | Items in stock. |
variant.fulfillment_service | string | null | Fulfillment service; null. |
variant.requires_shipping | boolean | Whether the customer needs a shipping address. |
variant.taxable | boolean | Whether tax is charged. |
variant.created_at | string | When it was created (ISO 8601). |
variant.updated_at | string | When it was last updated (ISO 8601). |
Delete variant — haravan.delete_variant
Delete one variant of a product.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | yes | yes | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | yes | Haravan product id. Min 1. |
variant_id | integer | yes | Variant id. Min 1. |
Extra fields: ignored.
Output
Returns an empty object.
List product images — haravan.list_product_images
List the images of a product.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | com.read_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | yes | Haravan product id. Min 1. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
images | array of object | Images of the product. |
images[].id | integer | Image id. |
images[].product_id | integer | Product the image belongs to. |
images[].position | integer | Order among the product's images; 1 is the main image. |
images[].src | string | URL of the image. |
images[].filename | string | File name of the image; not sent by every endpoint. |
images[].variant_ids | array of integer | null | Ids of the variants that show this image; null in the single-image reference sample. |
images[].created_at | string | When it was created (ISO 8601). |
images[].updated_at | string | When it was last updated (ISO 8601). |
Add product image — haravan.add_product_image
Add an image to a product from a public https URL.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | yes | Haravan product id. Min 1. |
image | object | yes | The image. |
image.src | string | yes | Public https URL of the image. Pattern: ^https://. |
image.position | integer | no | Order among the images, from 1. |
image.variant_ids | array of integer | no | Variants that show this image. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
image | object | The image that was added. |
image.id | integer | Image id. |
image.product_id | integer | Product the image belongs to. |
image.position | integer | Order among the product's images; 1 is the main image. |
image.src | string | URL of the image. |
image.filename | string | File name of the image; not sent by every endpoint. |
image.variant_ids | array of integer | null | Ids of the variants that show this image; null in the single-image reference sample. |
image.created_at | string | When it was created (ISO 8601). |
image.updated_at | string | When it was last updated (ISO 8601). |
Delete product image — haravan.delete_product_image
Delete one image of a product.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | yes | yes | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | yes | Haravan product id. Min 1. |
image_id | integer | yes | Product image id. Min 1. |
Extra fields: ignored.
Output
Returns an empty object.
List collections — haravan.list_custom_collections
List manual product collections, optionally those holding one product.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | com.read_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | no | Only collections holding this product. Min 1. |
title | string | no | Exact collection name. |
page | integer | no | Page number, from 1. Min 1. |
limit | integer | no | Items per page (1-50, default 50). Min 1. Max 50. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
custom_collections | array of object | Manual collections. |
custom_collections[].id | integer | Collection id. |
custom_collections[].title | string | Collection name. |
custom_collections[].handle | string | URL handle. |
custom_collections[].body_html | string | null | Description, HTML. |
custom_collections[].image | object | null | Image of the collection; null when it has none. The reference types it as a string; its sample reply shows an object with src and created_at, which this follows. |
custom_collections[].image.src | string | null | URL of the image. |
custom_collections[].image.created_at | string | null | When the image was added (ISO 8601). |
custom_collections[].published_at | string | null | When it was published (ISO 8601); null when unpublished. |
custom_collections[].published_scope | string | null | Sales channels where it is visible, e.g. web or global. |
custom_collections[].sort_order | string | How products are ordered: alpha-asc, alpha-desc, best-selling, created, created-desc, manual, price-asc or price-desc. Sample replies also show underscore spellings such as alpha_asc. |
custom_collections[].template_suffix | string | null | Suffix of the Liquid template of the page. |
custom_collections[].products_count | integer | Number of products; only some replies include it. |
custom_collections[].updated_at | string | When it was last updated (ISO 8601). |
custom_collections[].published | boolean | Whether the collection is visible. |
Create collection — haravan.create_custom_collection
Create a manual product collection.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
custom_collection | object | yes | The collection. |
custom_collection.title | string | yes | Collection name. |
custom_collection.body_html | string | no | Description, HTML. |
custom_collection.published | boolean | no | Visible on the store. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
custom_collection | object | The collection. |
custom_collection.id | integer | Collection id. |
custom_collection.title | string | Collection name. |
custom_collection.handle | string | URL handle. |
custom_collection.body_html | string | null | Description, HTML. |
custom_collection.image | object | null | Image of the collection; null when it has none. The reference types it as a string; its sample reply shows an object with src and created_at, which this follows. |
custom_collection.image.src | string | null | URL of the image. |
custom_collection.image.created_at | string | null | When the image was added (ISO 8601). |
custom_collection.published_at | string | null | When it was published (ISO 8601); null when unpublished. |
custom_collection.published_scope | string | null | Sales channels where it is visible, e.g. web or global. |
custom_collection.sort_order | string | How products are ordered: alpha-asc, alpha-desc, best-selling, created, created-desc, manual, price-asc or price-desc. Sample replies also show underscore spellings such as alpha_asc. |
custom_collection.template_suffix | string | null | Suffix of the Liquid template of the page. |
custom_collection.products_count | integer | Number of products; only some replies include it. |
custom_collection.updated_at | string | When it was last updated (ISO 8601). |
custom_collection.published | boolean | Whether the collection is visible. |
Update collection — haravan.update_custom_collection
Rename or change the description or visibility of a collection.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | yes | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
collection_id | integer | yes | Custom collection id. Min 1. |
custom_collection | object | yes | Fields to change. |
custom_collection.title | string | no | Collection name. |
custom_collection.body_html | string | no | Description, HTML. |
custom_collection.published | boolean | no | Visible on the store. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
custom_collection | object | The collection. |
custom_collection.id | integer | Collection id. |
custom_collection.title | string | Collection name. |
custom_collection.handle | string | URL handle. |
custom_collection.body_html | string | null | Description, HTML. |
custom_collection.image | object | null | Image of the collection; null when it has none. The reference types it as a string; its sample reply shows an object with src and created_at, which this follows. |
custom_collection.image.src | string | null | URL of the image. |
custom_collection.image.created_at | string | null | When the image was added (ISO 8601). |
custom_collection.published_at | string | null | When it was published (ISO 8601); null when unpublished. |
custom_collection.published_scope | string | null | Sales channels where it is visible, e.g. web or global. |
custom_collection.sort_order | string | How products are ordered: alpha-asc, alpha-desc, best-selling, created, created-desc, manual, price-asc or price-desc. Sample replies also show underscore spellings such as alpha_asc. |
custom_collection.template_suffix | string | null | Suffix of the Liquid template of the page. |
custom_collection.products_count | integer | Number of products; only some replies include it. |
custom_collection.updated_at | string | When it was last updated (ISO 8601). |
custom_collection.published | boolean | Whether the collection is visible. |
Delete collection — haravan.delete_custom_collection
Delete a manual collection; its products are kept.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | yes | yes | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
collection_id | integer | yes | Custom collection id. Min 1. |
Extra fields: ignored.
Output
Returns an empty object.
List smart collections — haravan.list_smart_collections
List rule-based collections, optionally those holding one product.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | com.read_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | no | Only collections holding this product. Min 1. |
title | string | no | Exact collection name. |
page | integer | no | Page number, from 1. Min 1. |
limit | integer | no | Items per page (1-50, default 50). Min 1. Max 50. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
smart_collections | array of object | Rule-based collections. |
smart_collections[].id | integer | Collection id. |
smart_collections[].title | string | Collection name. |
smart_collections[].handle | string | URL handle. |
smart_collections[].body_html | string | null | Description, HTML. |
smart_collections[].image | object | null | Image of the collection; null when it has none. The reference types it as a string; its sample reply shows an object with src and created_at, which this follows. |
smart_collections[].image.src | string | null | URL of the image. |
smart_collections[].image.created_at | string | null | When the image was added (ISO 8601). |
smart_collections[].published_at | string | null | When it was published (ISO 8601); null when unpublished. |
smart_collections[].published_scope | string | null | Sales channels where it is visible, e.g. web or global. |
smart_collections[].sort_order | string | How products are ordered: alpha-asc, alpha-desc, best-selling, created, created-desc, manual, price-asc or price-desc. Sample replies also show underscore spellings such as alpha_asc. |
smart_collections[].template_suffix | string | null | Suffix of the Liquid template of the page. |
smart_collections[].products_count | integer | Number of products; only some replies include it. |
smart_collections[].updated_at | string | When it was last updated (ISO 8601). |
smart_collections[].disjunctive | boolean | False: a product must match all rules. True: matching one rule is enough. |
smart_collections[].rules | array of object | Rules that decide which products belong. The reference describes this as a string; its sample replies show a list, which this follows. |
smart_collections[].rules[].column | string | What is compared: title, type, vendor, tag, variant_price, variant_compare_at_price, variant_weight, variant_inventory or variant_title. |
smart_collections[].rules[].relation | string | How: equals, greater_than, less_than, starts_with, ends_with or contains. |
smart_collections[].rules[].condition | string | The value to compare with. |
Add product to collection — haravan.add_product_to_collection
Put a product into a manual collection.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
collect | object | yes | Product and collection. |
collect.product_id | integer | yes | Product id. |
collect.collection_id | integer | yes | Custom collection id. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
collect | object | The link; its id removes it later. |
collect.id | integer | Collect (link) id. |
collect.collection_id | integer | Custom collection id. |
collect.product_id | integer | Product id. |
collect.position | integer | Position of the product in a manually sorted collection. The reference says string and counts from 1; its sample replies show an integer, and the collects list sample shows 0 for the first product, which this follows. |
collect.sort_value | string | Position padded with zeros so it sorts as text. |
collect.featured | boolean | Whether the product is featured in the collection. |
collect.created_at | string | null | When it was created (ISO 8601); may be null. |
collect.updated_at | string | null | When it was last updated (ISO 8601); may be null. |
Remove product from collection — haravan.remove_product_from_collection
Remove a product from a manual collection by the link (collect) id.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | yes | com.write_products |
Input
| Field | Type | Required | Description |
|---|---|---|---|
collect_id | integer | yes | Collect (link) id. Min 1. |
Extra fields: ignored.
Output
Returns an empty object.