การยืนยันตัวตน
ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ agency.time.log หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404
ปลายทางนี้ไม่ต้องใช้รหัสองค์กร คีย์ของคุณระบุองค์กรที่เป็นเจ้าของอยู่แล้ว และการตอบกลับจะถูกจำกัดขอบเขตไว้เฉพาะองค์กรนั้น
ทดลองใช้เลย
แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ
curl -X POST https://api.zinndigital.com/v1/agency/time/entries \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "project_id": <string>, "work_date": <string>, "minutes": <integer> }'เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API
รายละเอียด
`minutes` is an integer, 1..1440. Requires `agency.time.log` for your own time, or `agency.time.manage` to pass `user_id` and log on somebody else's behalf. If this client's billing schedule is *"invoice straight away"*, logging arms it and starts the billing workflow immediately — the invoice is raised in seconds rather than at the next sweep, without the invoicing call ever sitting in this request.
เนื้อหาคำขอ
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
project_id | string | ใช่ | — |
task_id | string | ไม่ใช่ | — |
work_date | string | ใช่ | — |
minutes | integer | ใช่ | — |
description | string | ไม่ใช่ | — |
billable | boolean | ไม่ใช่ | — |
user_id | string | ไม่ใช่ | Log on somebody else's behalf. Requires `agency.time.manage`; without it a caller may only log their own time. |
การตอบกลับ
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
id | string | ใช่ | — |
user_id | string | ไม่ใช่ | — |
project_id | string | ใช่ | — |
project_name | string | ไม่ใช่ | — |
task_id | string | ไม่ใช่ | — |
task_name | string | ไม่ใช่ | — |
client_id | string | ไม่ใช่ | — |
work_date | string | ใช่ | — |
minutes | integer | ใช่ | ⛔ An INTEGER of minutes. There is no `hours` field on this API: an hours-as-float duration re-enters the money through the rate and no rounding point can recover it. |
duration_label | string | ใช่ | Presentational only — never multiplied by anything. |
description | string | ไม่ใช่ | — |
billable | boolean | ใช่ | — |
billing_run_id | string | ไม่ใช่ | The run that invoiced this entry. `null` means it is still outstanding. |
billed_rate_minor_per_hour | integer | ไม่ใช่ | — |
billed_amount_minor | integer | ไม่ใช่ | What was actually charged, frozen at billing time so the document can be re-derived years later even if every rate card has since changed. |
billed_currency | string | ไม่ใช่ | — |
billed_under_fixed_price | boolean | ไม่ใช่ | TRUE when these minutes were rolled into a task's FIXED price rather than charged by the hour. `billed_amount_minor` is then 0 and that zero is correct — read this flag, not the… |
rate_minor_per_hour | integer | ไม่ใช่ | The rate that WOULD apply, resolved against this entry's own `work_date`, for an entry not yet billed. ⛔ `null` means **unpriced**, not free: work with no rate card is never inv… |
rate_scope | string<task, project, client, org> | ไม่ใช่ | Which rate card won, so a surprising invoice can be explained. |
rate_kind | string<hourly, fixed> | ไม่ใช่ | — |
created_at | string | ใช่ | — |
ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้
401 · 403 · 422