Chuyển tới nội dung chính

Tra cứu trạng thái đồng bộ danh mục

API này cho phép tra cứu kết quả đồng bộ danh mục sau khi gọi API Đồng bộ hàng loạt danh mục.

HTTP request

  • URL: /api/personalize/v1/partner/sync/portfolio/batch/status
  • Method: GET
  • Content Type: None
  • Response Type: application/json

Tham số header

HeaderMô tảKiểu dữ liệuBắt buộc
X-Api-KeyKhóa duy nhất.string

Tham Số Truy Vấn (Query Parameters)

Tên Tham SốKiểu Dữ LiệuBắt buộcMô Tả
batchIdstringkhôngID của batch. Không truyền = lấy tất cả.
recvWindowstringkhôngThời gian chấp nhận (ms), default: 5000
timestampstringUnix timestamp (milliseconds).
signaturestringHMAC-SHA256 signature.

Phản Hồi (Response)

Response Mẫu

{
"status": 200,
"message": "Success",
"data": {
"totalCount": 17,
"successCount": 13,
"failedCount": 4,
"successes": [
{
"batchId": "8c8974a0-e516-4a6c-92b3-7d2db780b18b",
"userId": "USERFULLFLOW",
"portfolioId": 937,
"status": true,
"message": "Success"
},
{
"batchId": "7c224639-8523-4931-b458-a6e31b4e65c3",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "187a4376-6359-4dd8-9415-e3b0235be32a",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "f3838f80-9a5f-478b-b1a1-e03192d282a1",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "118892eb-c8ec-495d-9bf9-d7c45576744e",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "118892eb-c8ec-495d-9bf9-d7c45576744e",
"userId": "1400",
"portfolioId": 842,
"status": true,
"message": "Success"
},
{
"batchId": "da0d40c1-46b7-4008-8399-20b30d7791db",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "da0d40c1-46b7-4008-8399-20b30d7791db",
"userId": "1400",
"portfolioId": 842,
"status": true,
"message": "Success"
},
{
"batchId": "61abe41b-d4d4-4c03-87f3-30313e9776e2",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "61abe41b-d4d4-4c03-87f3-30313e9776e2",
"userId": "1400",
"portfolioId": 842,
"status": true,
"message": "Success"
},
{
"batchId": "bb363314-18f1-4441-af77-85295d7a5389",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "94f7108b-916b-498f-990b-56ad875471a0",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "94f7108b-916b-498f-990b-56ad875471a0",
"userId": "1400",
"portfolioId": 842,
"status": true,
"message": "Success"
}
],
"failures": [
{
"batchId": "8c8974a0-e516-4a6c-92b3-7d2db780b18b",
"userId": "USER0015",
"status": false,
"message": "holding[0].totalQty: totalQty phải >= 0; holding[0].costPrice: costPrice phải >= 0; holding[0].tradableQty: tradableQty phải >= 0"
},
{
"batchId": "7c224639-8523-4931-b458-a6e31b4e65c3",
"userId": "1400",
"portfolioId": 842,
"status": false,
"message": "holding[0].totalQty: totalQty phải >= 0; holding[0].costPrice: costPrice phải >= 0; holding[0].tradableQty: tradableQty phải >= 0"
},
{
"batchId": "187a4376-6359-4dd8-9415-e3b0235be32a",
"userId": "1400",
"portfolioId": 842,
"status": false,
"message": "holding[0].tradableQty: tradableQty phải >= 0; holding[0].totalQty: totalQty phải >= 0; holding[0].costPrice: costPrice phải >= 0"
},
{
"batchId": "f3838f80-9a5f-478b-b1a1-e03192d282a1",
"userId": "1400",
"portfolioId": 842,
"status": false,
"message": "holding[0].tradableQty: tradableQty phải >= 0; holding[0].costPrice: costPrice phải >= 0; holding[0].totalQty: totalQty phải >= 0"
}
]
}
}

Chi Tiết Tham Số Response

Tên Thuộc TínhKiểu Dữ LiệuMô Tả
statusnumberMã trạng thái HTTP
messagestringThông báo kết quả
dataobjectDữ liệu trả về
data.batchIdstringID batch (null khi không truyền batchId)
data.totalCountnumberTổng số bản ghi
data.successCountnumberSố user sync thành công
data.failedCountnumberSố user sync thất bại
data.successesarrayDanh sách user sync thành công (status=true)
data.failuresarrayDanh sách user sync thất bại (status=false)

Cấu trúc phần tử successes / failures

Tên Thuộc TínhKiểu Dữ LiệuMô Tả
batchIdstringID batch.
userIdstringID user từ hệ thống đối tác.
portfolioIdnumberID danh mục.
statusboolean- true: thành công
- false: thất bại
messagestringThông báo kết quả.

CREDENTIALS

* Timestamp và Signature sẽ được tự động tạo khi gọi API

RESPONSE200

{
"status": 200,
"message": "Success",
"data": {
"totalCount": 17,
"successCount": 13,
"failedCount": 4,
"successes": [
{
"batchId": "8c8974a0-e516-4a6c-92b3-7d2db780b18b",
"userId": "USERFULLFLOW",
"portfolioId": 937,
"status": true,
"message": "Success"
},
{
"batchId": "7c224639-8523-4931-b458-a6e31b4e65c3",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "187a4376-6359-4dd8-9415-e3b0235be32a",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "f3838f80-9a5f-478b-b1a1-e03192d282a1",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "118892eb-c8ec-495d-9bf9-d7c45576744e",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "118892eb-c8ec-495d-9bf9-d7c45576744e",
"userId": "1400",
"portfolioId": 842,
"status": true,
"message": "Success"
},
{
"batchId": "da0d40c1-46b7-4008-8399-20b30d7791db",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "da0d40c1-46b7-4008-8399-20b30d7791db",
"userId": "1400",
"portfolioId": 842,
"status": true,
"message": "Success"
},
{
"batchId": "61abe41b-d4d4-4c03-87f3-30313e9776e2",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "61abe41b-d4d4-4c03-87f3-30313e9776e2",
"userId": "1400",
"portfolioId": 842,
"status": true,
"message": "Success"
},
{
"batchId": "bb363314-18f1-4441-af77-85295d7a5389",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "94f7108b-916b-498f-990b-56ad875471a0",
"userId": "1401",
"portfolioId": 843,
"status": true,
"message": "Success"
},
{
"batchId": "94f7108b-916b-498f-990b-56ad875471a0",
"userId": "1400",
"portfolioId": 842,
"status": true,
"message": "Success"
}
],
"failures": [
{
"batchId": "8c8974a0-e516-4a6c-92b3-7d2db780b18b",
"userId": "USER0015",
"status": false,
"message": "holding[0].totalQty: totalQty phải >= 0; holding[0].costPrice: costPrice phải >= 0; holding[0].tradableQty: tradableQty phải >= 0"
},
{
"batchId": "7c224639-8523-4931-b458-a6e31b4e65c3",
"userId": "1400",
"portfolioId": 842,
"status": false,
"message": "holding[0].totalQty: totalQty phải >= 0; holding[0].costPrice: costPrice phải >= 0; holding[0].tradableQty: tradableQty phải >= 0"
},
{
"batchId": "187a4376-6359-4dd8-9415-e3b0235be32a",
"userId": "1400",
"portfolioId": 842,
"status": false,
"message": "holding[0].tradableQty: tradableQty phải >= 0; holding[0].totalQty: totalQty phải >= 0; holding[0].costPrice: costPrice phải >= 0"
},
{
"batchId": "f3838f80-9a5f-478b-b1a1-e03192d282a1",
"userId": "1400",
"portfolioId": 842,
"status": false,
"message": "holding[0].tradableQty: tradableQty phải >= 0; holding[0].costPrice: costPrice phải >= 0; holding[0].totalQty: totalQty phải >= 0"
}
]
}
}