Skip to main content

Update Product variant

Version: 1.0

This API will help you create or update a product card.

Authenticated access scopes: social.write_bot

Request URI

  • POST https://apis.harasocial.com/social/bot/product_card/variant.json

Example Request

curl -X 'POST' \
'https://apis.harasocial.com/social/bot/product_card/variant.json' \
-H 'accept: */*' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json-patch+json' \
-d '{
"product_id": 10000560113,
"product_variant_id": 101672579,
"name": "updated name",
"image_url": "https://product.haravan.com/product_url.jpg",
"variant_title": "XL / Xanh",
"product_buyer_url": "https://shop.haravan.com/products/product_path",
"price": 210000
}'

Properties


product_id: long?

"product_id": 10040782473

Product Id


product_variant_id: long?

"product_variant_id": 142032358

Product variant Id


name: string

"name": "Variant A"

Name of product


image_url: string

"image_url": "{product_variant_image_url}"

Image url of product


variant_title: string

"variant_title": "XSS"

Product variant title


product_buyer_url: string

"product_buyer_url": "{product_buyer_url}"

The url of product on web


price: decimal?

"price": 769000

Price of product variant


Response

A successful API request returns a JSON string containing information of product variants which were used by product card type in chat bot.

Example

{
"data": {
"product_id": 10040782473,
"product_variant_id": 142032358,
"name": "Variant A",
"image_url": "{product_variant_image_url}",
"variant_title": "XSS",
"product_buyer_url": "{product_buyer_url}",
"price": 769000,
"updated_time": "2022-08-19T08:03:40.463Z"
},
"has_error": false,
"error_code": null,
"error_message": null
}

Properties


data: Product Card Variant Object

Variant's info. See Product Card Variant Object below.


has_error: bool

True if the request does not meet requirement or validation


error_code: string

The error code information


error_message: string

The error message information


Product Card Variant Object


product_id: long?

"product_id": 10040782473

Product Id


product_variant_id: long?

"product_variant_id": 142032358

Product variant Id


name: string

"name": "Variant A"

Name of product


image_url: string

"image_url": "{product_variant_image_url}"

Image url of product


variant_title: string

"variant_title": "XSS"

Product variant title


product_buyer_url: string

"product_buyer_url": "{product_buyer_url}"

The url of product on web


price: decimal?

"price": 769000

Price of product variant


updated_time: datetime

"updated_time": "2022-08-19T08:03:40.459Z"

Indicate last updated time of this product card