Daily employee allocations
Employee tips
Write daily employee tip allocations using integer minor units. Integrations need tips:read and tips:write; received-total imports and corrections separately require tips:totals:write. Pass locationId in the query and omit staff/tenant context headers.
Read the current day, import its net received total from saved payment receipts, or reconcile a verified total when receipts are missing. Then post the complete employee allocation set. Use staffUserId from the employee directory to identify each employee. Omitted employees receive zero; allocations and total corrections cannot exceed or undercut the saved received amounts, including concurrent writes.
Mutations require the current expectedVersion and a unique UUID requestId. Retry uncertain writes with the exact same body and ID. Saved allocations feed existing labor reports and Team responses without changing receipts or submitting payroll.
Amounts are integer minor units in the tenant currency. Location UUIDs, codes and mapped operational IDs resolve to one saved day. Staff require location-scoped tip review/approval permissions. Integrations use a tpk_live_ bearer API credential with tips:read, tips:write or tips:totals:write and allowed locations. API-key requests must pass locationId in the query and omit all x-tenant and x-location context headers. Read version first; mutations require expectedVersion and a unique requestId. Exact retries return the original response; changed content or stale versions return 409. Saved allocations replace employee tips for the whole location/day in reports and Team; raw receipt/time-card fields remain source evidence.
Authorization
bearerAuth In: header
Query Parameters
1 <= lengthHeader Parameters
Selects the tenant by id. When both tenant headers are omitted, the server falls back to the configured default tenant slug.
Selects the tenant by slug. Use this when you know the tenant slug instead of the tenant id.
Adds a location scope to the request for location-aware reads, writes, and audit entries.
Test-only Hexclave provider identifier used with x-auth-user-id when trusted identity headers are explicitly enabled. Production clients must use a Hexclave bearer token.
Value in
- "hexclave"
Temporary auth subject used to resolve the acting staff user through the staff auth identity mapping.
Response Body
application/json
curl -X GET "https://example.com/labor/tips/v1/employees" \ -H "x-tenant-id: tenant-local" \ -H "x-tenant-slug: trellis-local" \ -H "x-location-id: loc-tasting-room" \ -H "x-auth-provider: hexclave" \ -H "x-auth-user-id: user_abc123"{ "employees": [ { "staffUserId": "string", "displayName": "string", "employeeNumber": "string" } ]}Amounts are integer minor units in the tenant currency. Location UUIDs, codes and mapped operational IDs resolve to one saved day. Staff require location-scoped tip review/approval permissions. Integrations use a tpk_live_ bearer API credential with tips:read, tips:write or tips:totals:write and allowed locations. API-key requests must pass locationId in the query and omit all x-tenant and x-location context headers. Read version first; mutations require expectedVersion and a unique requestId. Exact retries return the original response; changed content or stale versions return 409. Saved allocations replace employee tips for the whole location/day in reports and Team; raw receipt/time-card fields remain source evidence.
Authorization
bearerAuth In: header
Path Parameters
dateQuery Parameters
1 <= lengthHeader Parameters
Selects the tenant by id. When both tenant headers are omitted, the server falls back to the configured default tenant slug.
Selects the tenant by slug. Use this when you know the tenant slug instead of the tenant id.
Adds a location scope to the request for location-aware reads, writes, and audit entries.
Test-only Hexclave provider identifier used with x-auth-user-id when trusted identity headers are explicitly enabled. Production clients must use a Hexclave bearer token.
Value in
- "hexclave"
Temporary auth subject used to resolve the acting staff user through the staff auth identity mapping.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/labor/tips/v1/days/2019-08-24" \ -H "x-tenant-id: tenant-local" \ -H "x-tenant-slug: trellis-local" \ -H "x-location-id: loc-tasting-room" \ -H "x-auth-provider: hexclave" \ -H "x-auth-user-id: user_abc123"{ "locationId": "string", "businessDate": "2019-08-24", "currency": "string", "version": 0, "received": { "cashMinor": 0, "nonCashMinor": 0 }, "source": "string", "sourceReference": "string", "allocations": [ { "staffUserId": "57cf9248-57f9-4ad0-ba1d-0edada45daae", "cashMinor": 0, "nonCashMinor": 0 } ], "allocated": { "cashMinor": 0, "nonCashMinor": 0 }, "unallocated": { "cashMinor": 0, "nonCashMinor": 0 }, "allocationsSaved": true, "updatedAt": "string"}Amounts are integer minor units in the tenant currency. Location UUIDs, codes and mapped operational IDs resolve to one saved day. Staff require location-scoped tip review/approval permissions. Integrations use a tpk_live_ bearer API credential with tips:read, tips:write or tips:totals:write and allowed locations. API-key requests must pass locationId in the query and omit all x-tenant and x-location context headers. Read version first; mutations require expectedVersion and a unique requestId. Exact retries return the original response; changed content or stale versions return 409. Saved allocations replace employee tips for the whole location/day in reports and Team; raw receipt/time-card fields remain source evidence.
Authorization
bearerAuth In: header
Path Parameters
dateQuery Parameters
1 <= lengthHeader Parameters
Selects the tenant by id. When both tenant headers are omitted, the server falls back to the configured default tenant slug.
Selects the tenant by slug. Use this when you know the tenant slug instead of the tenant id.
Adds a location scope to the request for location-aware reads, writes, and audit entries.
Test-only Hexclave provider identifier used with x-auth-user-id when trusted identity headers are explicitly enabled. Production clients must use a Hexclave bearer token.
Value in
- "hexclave"
Temporary auth subject used to resolve the acting staff user through the staff auth identity mapping.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/labor/tips/v1/days/2019-08-24/received" \ -H "x-tenant-id: tenant-local" \ -H "x-tenant-slug: trellis-local" \ -H "x-location-id: loc-tasting-room" \ -H "x-auth-provider: hexclave" \ -H "x-auth-user-id: user_abc123" \ -H "Content-Type: application/json" \ -d '{ "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6", "expectedVersion": 0, "received": { "cashMinor": 0, "nonCashMinor": 0 }, "source": "reconciled", "sourceReference": "string" }'{ "locationId": "string", "businessDate": "2019-08-24", "currency": "string", "version": 0, "received": { "cashMinor": 0, "nonCashMinor": 0 }, "source": "string", "sourceReference": "string", "allocations": [ { "staffUserId": "57cf9248-57f9-4ad0-ba1d-0edada45daae", "cashMinor": 0, "nonCashMinor": 0 } ], "allocated": { "cashMinor": 0, "nonCashMinor": 0 }, "unallocated": { "cashMinor": 0, "nonCashMinor": 0 }, "allocationsSaved": true, "updatedAt": "string"}Amounts are integer minor units in the tenant currency. Location UUIDs, codes and mapped operational IDs resolve to one saved day. Staff require location-scoped tip review/approval permissions. Integrations use a tpk_live_ bearer API credential with tips:read, tips:write or tips:totals:write and allowed locations. API-key requests must pass locationId in the query and omit all x-tenant and x-location context headers. Read version first; mutations require expectedVersion and a unique requestId. Exact retries return the original response; changed content or stale versions return 409. Saved allocations replace employee tips for the whole location/day in reports and Team; raw receipt/time-card fields remain source evidence.
Authorization
bearerAuth In: header
Path Parameters
dateQuery Parameters
1 <= lengthHeader Parameters
Selects the tenant by id. When both tenant headers are omitted, the server falls back to the configured default tenant slug.
Selects the tenant by slug. Use this when you know the tenant slug instead of the tenant id.
Adds a location scope to the request for location-aware reads, writes, and audit entries.
Test-only Hexclave provider identifier used with x-auth-user-id when trusted identity headers are explicitly enabled. Production clients must use a Hexclave bearer token.
Value in
- "hexclave"
Temporary auth subject used to resolve the acting staff user through the staff auth identity mapping.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/labor/tips/v1/days/2019-08-24/received/import" \ -H "x-tenant-id: tenant-local" \ -H "x-tenant-slug: trellis-local" \ -H "x-location-id: loc-tasting-room" \ -H "x-auth-provider: hexclave" \ -H "x-auth-user-id: user_abc123" \ -H "Content-Type: application/json" \ -d '{ "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6", "expectedVersion": 0 }'{ "locationId": "string", "businessDate": "2019-08-24", "currency": "string", "version": 0, "received": { "cashMinor": 0, "nonCashMinor": 0 }, "source": "string", "sourceReference": "string", "allocations": [ { "staffUserId": "57cf9248-57f9-4ad0-ba1d-0edada45daae", "cashMinor": 0, "nonCashMinor": 0 } ], "allocated": { "cashMinor": 0, "nonCashMinor": 0 }, "unallocated": { "cashMinor": 0, "nonCashMinor": 0 }, "allocationsSaved": true, "updatedAt": "string"}Amounts are integer minor units in the tenant currency. Location UUIDs, codes and mapped operational IDs resolve to one saved day. Staff require location-scoped tip review/approval permissions. Integrations use a tpk_live_ bearer API credential with tips:read, tips:write or tips:totals:write and allowed locations. API-key requests must pass locationId in the query and omit all x-tenant and x-location context headers. Read version first; mutations require expectedVersion and a unique requestId. Exact retries return the original response; changed content or stale versions return 409. Saved allocations replace employee tips for the whole location/day in reports and Team; raw receipt/time-card fields remain source evidence.
Authorization
bearerAuth In: header
Path Parameters
dateQuery Parameters
1 <= lengthHeader Parameters
Selects the tenant by id. When both tenant headers are omitted, the server falls back to the configured default tenant slug.
Selects the tenant by slug. Use this when you know the tenant slug instead of the tenant id.
Adds a location scope to the request for location-aware reads, writes, and audit entries.
Test-only Hexclave provider identifier used with x-auth-user-id when trusted identity headers are explicitly enabled. Production clients must use a Hexclave bearer token.
Value in
- "hexclave"
Temporary auth subject used to resolve the acting staff user through the staff auth identity mapping.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/labor/tips/v1/days/2019-08-24/allocations" \ -H "x-tenant-id: tenant-local" \ -H "x-tenant-slug: trellis-local" \ -H "x-location-id: loc-tasting-room" \ -H "x-auth-provider: hexclave" \ -H "x-auth-user-id: user_abc123" \ -H "Content-Type: application/json" \ -d '{ "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6", "expectedVersion": 0, "allocations": [ { "staffUserId": "57cf9248-57f9-4ad0-ba1d-0edada45daae", "cashMinor": 0, "nonCashMinor": 0 } ] }'{ "locationId": "string", "businessDate": "2019-08-24", "currency": "string", "version": 0, "received": { "cashMinor": 0, "nonCashMinor": 0 }, "source": "string", "sourceReference": "string", "allocations": [ { "staffUserId": "57cf9248-57f9-4ad0-ba1d-0edada45daae", "cashMinor": 0, "nonCashMinor": 0 } ], "allocated": { "cashMinor": 0, "nonCashMinor": 0 }, "unallocated": { "cashMinor": 0, "nonCashMinor": 0 }, "allocationsSaved": true, "updatedAt": "string"}