List Cost Codes
get
/public/v1/cost-codesReturns your organisation's cost codes, which allocate a shift's cost in payroll. Archived cost codes are returned too, carrying the date they were archived, so a code on an older support still resolves. Requires finance access.
filter[search]stringPartial match on the cost code name.
Example:TransportsortstringSort the results. Prefix with '-' for descending. One of: name.
Example:namepage[size]integerNumber of results per page. Minimum 1, maximum 100.
Default:25page[number]integerThe page number to retrieve. Use the
last_pagevalue from themetaresponse to determine the total number of pages available.Default:1
Response
200application/jsonPaginated set of CostCodeResource
dataobject[]required▶Show 3 child attributesHide child attributes
idstringrequiredExample:c1o2s3t4-c5o6-47d8-9e0f-1a2b3c4d5e6fnamestringrequiredExample:Community Accessarchived_atstring | nullrequired
metaobjectrequired▶Show 5 child attributesHide child attributes
current_pageintegerrequired≥ 1last_pageintegerrequired≥ 1per_pageintegerrequired≥ 0Number of items shown per page.
totalintegerrequired≥ 0Total number of items being paginated.
allowed_sortsstring[]requiredThe list of allowed sorts for this endpoint.
401Unauthenticated403Authorization error