Haravan — Sản phẩm
Danh sách sản phẩm (List products) — haravan.list_products
List or find products by SKU, barcode, vendor, type or collection.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | com.read_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
sku | SKU | string | không | Exact SKU. |
barcode | Mã vạch | string | không | Exact barcode. |
vendor | Nhà cung cấp | string | không | Vendor or brand. |
handle | Đường dẫn | string | không | URL handle. |
product_type | Loại sản phẩm | string | không | Product type. |
collection_id | Nhóm | integer | không | Only products in this collection. Min 1. |
since_id | Sau mã sản phẩm | integer | không | Only products after this id. Min 1. |
fields | Trường trả về | string | không | Comma-separated fields to return. |
page | Trang | integer | không | Page number, from 1. Min 1. |
limit | Số kết quả mỗi trang | integer | không | Items per page (1-50, default 50). Min 1. Max 50. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
products | Danh sách sản phẩm | 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). |
Xem sản phẩm (Get product) — haravan.get_product
Get one product with its variants, prices, SKUs and images.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | com.read_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
product_id | Mã sản phẩm | integer | có | Haravan product id. Min 1. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
product | Sản phẩm | 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). |
Tạo sản phẩm (Create product) — haravan.create_product
Create a product with its variants and images.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | không | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
product | Sản phẩm | object | có | The product. Other Haravan product fields are also accepted. |
product.title | string | có | Product name. | |
product.body_html | string | không | Description, HTML. | |
product.vendor | string | không | Brand or vendor. | |
product.product_type | string | không | Product type. | |
product.tags | string | không | Comma-separated tags. | |
product.published | boolean | không | Visible on the store. | |
product.variants | array of object | không | Variants: sku, price, option1..3. | |
product.variants[].title | string | không | Variant name, e.g. 'Đỏ / M'. | |
product.variants[].sku | string | không | Stock keeping unit. | |
product.variants[].barcode | string | không | Barcode. | |
product.variants[].price | number | không | Price, VND. | |
product.variants[].compare_at_price | number | không | Price before discount, VND. | |
product.variants[].option1 | string | không | Value of option 1, e.g. color. | |
product.variants[].option2 | string | không | Value of option 2, e.g. size. | |
product.variants[].option3 | string | không | Value of option 3. | |
product.variants[].weight | number | không | Weight in grams. | |
product.images | array of object | không | Images: {src} with an https URL. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
product | Sản phẩm | 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). |
Cập nhật sản phẩm (Update product) — haravan.update_product
Update a product's name, description, vendor, type, tags or visibility.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | có | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
product_id | Mã sản phẩm | integer | có | Haravan product id. Min 1. |
product | Thông tin cập nhật | object | có | Fields to change. |
product.title | string | không | Product name. | |
product.body_html | string | không | Description, HTML. | |
product.vendor | string | không | Brand or vendor. | |
product.product_type | string | không | Product type. | |
product.tags | string | không | Comma-separated tags. | |
product.published | boolean | không | Visible on the store. | |
product.variants | array of object | không | Variants: sku, price, option1..3. | |
product.variants[].title | string | không | Variant name, e.g. 'Đỏ / M'. | |
product.variants[].sku | string | không | Stock keeping unit. | |
product.variants[].barcode | string | không | Barcode. | |
product.variants[].price | number | không | Price, VND. | |
product.variants[].compare_at_price | number | không | Price before discount, VND. | |
product.variants[].option1 | string | không | Value of option 1, e.g. color. | |
product.variants[].option2 | string | không | Value of option 2, e.g. size. | |
product.variants[].option3 | string | không | Value of option 3. | |
product.variants[].weight | number | không | Weight in grams. | |
product.images | array of object | không | Images: {src} with an https URL. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
product | Sản phẩm | 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). |
Xoá sản phẩm (Delete product) — haravan.delete_product
Delete a product and all its variants.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | có | có | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
product_id | Mã sản phẩm | integer | có | Haravan product id. Min 1. |
Field thêm: bỏ qua.
Output
Trả về object rỗng.
Thêm thẻ sản phẩm (Add product tags) — haravan.add_product_tags
Add tags to a product; existing tags are kept.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | không | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
product_id | Mã sản phẩm | integer | có | Haravan product id. Min 1. |
tags | Thẻ | string | có | Comma-separated tags, e.g. 'sale,new'. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
tags | Thẻ | string | null | Product tags after the change. |
Xoá thẻ sản phẩm (Remove product tags) — haravan.remove_product_tags
Remove tags from a product.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | có | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
product_id | Mã sản phẩm | integer | có | Haravan product id. Min 1. |
tags | Thẻ | string | có | Comma-separated tags, e.g. 'sale,new'. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
tags | Thẻ | string | null | Product tags after the change. |
Danh sách biến thể (List variants) — haravan.list_variants
List the variants (sizes, colors) of a product with price and SKU.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | com.read_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
product_id | Mã sản phẩm | integer | có | Haravan product id. Min 1. |
page | Trang | integer | không | Page number, from 1. Min 1. |
limit | Số kết quả mỗi trang | integer | không | Items per page (1-50, default 50). Min 1. Max 50. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
variants | Danh sách biến thể | 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). |
Xem biến thể (Get variant) — haravan.get_variant
Get one variant with price, SKU, barcode and stock quantity.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | com.read_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
variant_id | Mã biến thể | integer | có | Variant id. Min 1. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
variant | Biến thể | 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). |
Tạo biến thể (Create variant) — haravan.create_variant
Add a variant (e.g. a new size or color) to a product.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | không | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
product_id | Mã sản phẩm | integer | có | Haravan product id. Min 1. |
variant | Biến thể | object | có | The variant. |
variant.title | string | không | Variant name, e.g. 'Đỏ / M'. | |
variant.sku | string | không | Stock keeping unit. | |
variant.barcode | string | không | Barcode. | |
variant.price | number | không | Price, VND. | |
variant.compare_at_price | number | không | Price before discount, VND. | |
variant.option1 | string | không | Value of option 1, e.g. color. | |
variant.option2 | string | không | Value of option 2, e.g. size. | |
variant.option3 | string | không | Value of option 3. | |
variant.weight | number | không | Weight in grams. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
variant | Biến thể | 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). |
Cập nhật biến thể (Update variant) — haravan.update_variant
Change a variant's price, SKU, barcode, options or weight.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | có | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
variant_id | Mã biến thể | integer | có | Variant id. Min 1. |
variant | Thông tin cập nhật | object | có | Fields to change. |
variant.title | string | không | Variant name, e.g. 'Đỏ / M'. | |
variant.sku | string | không | Stock keeping unit. | |
variant.barcode | string | không | Barcode. | |
variant.price | number | không | Price, VND. | |
variant.compare_at_price | number | không | Price before discount, VND. | |
variant.option1 | string | không | Value of option 1, e.g. color. | |
variant.option2 | string | không | Value of option 2, e.g. size. | |
variant.option3 | string | không | Value of option 3. | |
variant.weight | number | không | Weight in grams. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
variant | Biến thể | 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). |
Xoá biến thể (Delete variant) — haravan.delete_variant
Delete one variant of a product.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | có | có | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
product_id | Mã sản phẩm | integer | có | Haravan product id. Min 1. |
variant_id | Mã biến thể | integer | có | Variant id. Min 1. |
Field thêm: bỏ qua.
Output
Trả về object rỗng.
Danh sách ảnh sản phẩm (List product images) — haravan.list_product_images
List the images of a product.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | com.read_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
product_id | Mã sản phẩm | integer | có | Haravan product id. Min 1. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
images | Danh sách ảnh | 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). |
Thêm ảnh sản phẩm (Add product image) — haravan.add_product_image
Add an image to a product from a public https URL.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | không | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
product_id | Mã sản phẩm | integer | có | Haravan product id. Min 1. |
image | Ảnh | object | có | The image. |
image.src | string | có | Public https URL of the image. Pattern: ^https://. | |
image.position | integer | không | Order among the images, from 1. | |
image.variant_ids | array of integer | không | Variants that show this image. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
image | Ảnh | 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). |
Xoá ảnh sản phẩm (Delete product image) — haravan.delete_product_image
Delete one image of a product.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | có | có | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
product_id | Mã sản phẩm | integer | có | Haravan product id. Min 1. |
image_id | Mã ảnh | integer | có | Product image id. Min 1. |
Field thêm: bỏ qua.
Output
Trả về object rỗng.
Danh sách nhóm sản phẩm (List collections) — haravan.list_custom_collections
List manual product collections, optionally those holding one product.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | com.read_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
product_id | Sản phẩm | integer | không | Only collections holding this product. Min 1. |
title | Tên nhóm | string | không | Exact collection name. |
page | Trang | integer | không | Page number, from 1. Min 1. |
limit | Số kết quả mỗi trang | integer | không | Items per page (1-50, default 50). Min 1. Max 50. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
custom_collections | Danh sách nhóm | 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. |
Tạo nhóm sản phẩm (Create collection) — haravan.create_custom_collection
Create a manual product collection.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | không | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
custom_collection | Nhóm sản phẩm | object | có | The collection. |
custom_collection.title | string | có | Collection name. | |
custom_collection.body_html | string | không | Description, HTML. | |
custom_collection.published | boolean | không | Visible on the store. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
custom_collection | Nhóm sản phẩm | 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. |
Cập nhật nhóm sản phẩm (Update collection) — haravan.update_custom_collection
Rename or change the description or visibility of a collection.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | có | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
collection_id | Mã nhóm sản phẩm | integer | có | Custom collection id. Min 1. |
custom_collection | Thông tin cập nhật | object | có | Fields to change. |
custom_collection.title | string | không | Collection name. | |
custom_collection.body_html | string | không | Description, HTML. | |
custom_collection.published | boolean | không | Visible on the store. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
custom_collection | Nhóm sản phẩm | 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. |
Xoá nhóm sản phẩm (Delete collection) — haravan.delete_custom_collection
Delete a manual collection; its products are kept.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | có | có | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
collection_id | Mã nhóm sản phẩm | integer | có | Custom collection id. Min 1. |
Field thêm: bỏ qua.
Output
Trả về object rỗng.
Danh sách nhóm sản phẩm tự động (List smart collections) — haravan.list_smart_collections
List rule-based collections, optionally those holding one product.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | com.read_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
product_id | Sản phẩm | integer | không | Only collections holding this product. Min 1. |
title | Tên nhóm | string | không | Exact collection name. |
page | Trang | integer | không | Page number, from 1. Min 1. |
limit | Số kết quả mỗi trang | integer | không | Items per page (1-50, default 50). Min 1. Max 50. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
smart_collections | Danh sách nhóm | 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. |
Thêm sản phẩm vào nhóm (Add product to collection) — haravan.add_product_to_collection
Put a product into a manual collection.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | không | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
collect | Liên kết | object | có | Product and collection. |
collect.product_id | integer | có | Product id. | |
collect.collection_id | integer | có | Custom collection id. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
collect | Liên kết | 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. |
Bỏ sản phẩm khỏi nhóm (Remove product from collection) — haravan.remove_product_from_collection
Remove a product from a manual collection by the link (collect) id.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | có | com.write_products |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
collect_id | Mã liên kết | integer | có | Collect (link) id. Min 1. |
Field thêm: bỏ qua.
Output
Trả về object rỗng.