Skip to content
Hoursmith Docs
APIReferenceTeam payouts

Approve a draft bill

Approve a draft bill. Finalize a DRAFT: assigns its TB- number, freezes lines and identities, and locks the billed time. Approval does not pay. Re-approving an approved bill changes nothing. Owner/Admin only (Managers and Members receive 403 before any record lookup); Agency plan (`teamPayouts`, 402 with requiredPlan agency otherwise). Requires the `write` scope. Requires an Idempotency-Key. Money values are exact decimal strings; dates are ISO calendar dates.

POST
/team-payouts/bills/{id}/approve

Authorization

BearerAuth
AuthorizationBearer <token>

Personal Access Token. Mint at Settings → API. Token shape: hsk_<env>_<prefix12>_<secret32>.

In: header

Path Parameters

id*string

Header Parameters

Idempotency-Key*string

Caller-generated UUID/ULID. Same key + same body replays the original response; the key also derives the durable operation identity, so a retried payment, reversal or draft is never applied twice.

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

application/json

curl -X POST "https://example.com/team-payouts/bills/497f6eca-6276-4993-bfeb-53cbbbba6f08/approve" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "expectedRevision": 1  }'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "number": "string",    "status": "DRAFT",    "paymentStatus": "UNPAID",    "revision": 0,    "payeeId": "79417842-2e1e-4110-a361-89b9f39b36ed",    "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",    "payeeName": "string",    "currency": "string",    "subtotal": "string",    "adjustmentTotal": "string",    "total": "string",    "amountPaid": "string",    "remaining": "string",    "serviceFrom": "2019-08-24",    "serviceTo": "2019-08-24",    "issueDate": "2019-08-24",    "dueDate": "2019-08-24",    "lineGroupBy": "itemized",    "note": "string",    "lineCount": 0,    "timeEntryCount": 0,    "totalSeconds": 0,    "totalHours": "string",    "approvedAt": "2019-08-24T14:15:22Z",    "voidReason": "string",    "deletedAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "payments": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "paidDate": "2019-08-24",        "amount": "string",        "currency": "string",        "settledAmount": "string",        "reversedAt": "2019-08-24T14:15:22Z"      }    ],    "draftSources": {      "payeeId": "79417842-2e1e-4110-a361-89b9f39b36ed",      "currency": "string",      "serviceFrom": "2019-08-24",      "serviceTo": "2019-08-24",      "timeEntryIds": [        "88e2079a-754b-4802-8e04-5e86496fedc2"      ],      "nonbillableTimeEntryIds": [        "98b923b1-d24d-4c10-a446-705627eced82"      ],      "fixedAgreementIds": [        "47027305-58a9-4e47-bfdc-3e6fd86b69c6"      ],      "adjustments": [        {          "kind": "BONUS",          "description": "string",          "amount": "string",          "quantity": "string",          "unitPrice": "string",          "correctionBillId": "58b60bd1-ffcd-4f41-b990-29e4c3d54169",          "creditId": "ab154ac2-8f85-4580-8849-80b7ce246d18"        }      ]    },    "links": {      "app": "string",      "payee": "string"    }  },  "warnings": [    "string"  ]}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
Was this page helpful?