Cách thức cập nhật đơn hàng tự động

API update conversion and conversion status

Update conversion status using method POST

POST https://<host-name>/api/v1/rest/:campaign_id/update-conversion-status

Path Parameters

Name
Type
Description

campaign_id

number

Campaign Id

Headers

Name
Type
Description

x-at-user-access-token

string

Campaign Token

Request Body

Name
Type
Description

conversion_id

string

Conversion id

status

string

in pre_approved || rejected

reason

string

Reason rejected or approved

{
    "status": "success",
    "data": {
        "status": "success",
        "data": {
            "conversion_id": "5f6082a96c906f054417fe11",
            "order_id": "f6505eb9943f44c3a6f1ba576c2c50c1",
            "conversion_parts": [
                {
                    "sku": "SKU001",
                    "name": "Product_01",
                    "url": null,
                    "quantity": 1,
                    "currency": "VND",
                    "commission": {
                        "amount": 500000,
                        "currency": "VND"
                    },
                    "status": "pre_approved",
                    "reason": "Khach hang khen ngoi",
                    "id": "1",
                    "price": 700000,
                    "discount": 0,
                    "sale_amount": 700000,
                    "calculate_by": "FIXED",
                    "calculate_by_id": null,
                    "category_name": "Cat_01",
                    "category_id": "CAT001"
                }
            ]
        },
        "message": "Success",
        "code": 0
    }
}

Update conversion status using method GET

GET https://<host-name>/v1/rest/:campaign_id/update-conversion-status

Path Parameters

Name
Type
Description

campaign_id

number

Campaign Id

Query Parameters

Name
Type
Description

conversion_id

string

Conversion id

status

string

in pre_approved || rejected

reason

string

Reason rejected of approved

Headers

Name
Type
Description

x-at-user-access-token

string

Campaign Token

{
    "status": "success",
    "data": {
        "status": "success",
        "data": {
            "conversion_id": "5f6082a96c906f054417fe11",
            "order_id": "f6505eb9943f44c3a6f1ba576c2c50c1",
            "conversion_parts": [
                {
                    "sku": "SKU001",
                    "name": "Product_01",
                    "url": null,
                    "quantity": 1,
                    "currency": "VND",
                    "commission": {
                        "amount": 500000,
                        "currency": "VND"
                    },
                    "status": "pre_approved",
                    "reason": "Khach hang khen ngoi",
                    "id": "1",
                    "price": 700000,
                    "discount": 0,
                    "sale_amount": 700000,
                    "calculate_by": "FIXED",
                    "calculate_by_id": null,
                    "category_name": "Cat_01",
                    "category_id": "CAT001"
                }
            ]
        },
        "message": "Success",
        "code": 0
    }
}

Update conversion part status

GET https://<host-name>/api/v1/:campaign_id/update-conversion-part-status

Path Parameters

Name
Type
Description

campaign_id

number

ID chiến dịch

Query Parameters

Name
Type
Description

reason

string

Reason approved or rejected

product_sku

string

SKU product item (sku of conversion part)

status

string

Status product item (status of conversion part) in (pre_approved, rejected)

conversion_id

string

ID đơn hàng

Headers

Name
Type
Description

x-at-user-access-token

string

Campaign Token

Last updated

Was this helpful?