บันทึกสแนปช็อตรายงาน
ส่งเมตริกด้านการดำเนินงานและการเงินของสถานที่ในช่วงเวลาที่กำหนด
พารามิเตอร์
-
snapshots
arrayจำเป็นอาร์เรย์ของออบเจ็กต์ Report Snapshot ที่จะบันทึก สูงสุด 25 รายการต่อคำขอ แต่ละรายการต้องมี
facility_id(จำเป็นหากไม่ใช้linking_identifier) หรือlinking_identifier(จำเป็นหากไม่ใช้facility_id)
ค่าที่ส่งคืน
ส่งคืนข้อความสั้น ๆ ที่ยืนยันการดำเนินการซิงค์
คำขอ
curl -X POST https://partner-api.performancehub.co/partner/v1/report-snapshots \
-u sk_live_YOUR_PARTNER_SECRET_KEY: \
-H "Content-Type: application/json" \
-d '{
"snapshots": [
{
"facility_id": "550e8400-e29b-41d4-a716-446655440000",
// "linking_identifier": "branch_downtown", // If using linking identifier
"start_date": "2025-01-01",
"end_date": "2025-01-31",
"metrics": {
"members": {
"active": 1200,
"new": 45,
"cancelled": 12
},
"revenue": {
"total_payments": 289000.00,
"currency": "AUD"
}
}
}
]
}'
การตอบกลับ
{
"message": "Report snapshot sync successful."
}