Appearance
Features supported
- Support asynchronous invocation: NO
- Supports paging: YES
- Field selection: NO
- Supplemental data: YES
PagingSupplemental Data
curl --request GET \
--url 'https://api.fareclock.com/costcodes?id=123&search=example&active=active' \
--header 'Authorization: Token YOUR_API_KEY' \
--header 'Accept: application/json'Query String
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | No | Numeric ID of the cost code |
search | string | No | Case-insensitive full text search of cost code name |
active | string | No | Allowed values: active or inactive |
{
"results": [
{
"id": 10,
"name": "Regular Construction",
"active": true,
"payrollId": "CC-REG",
"allowLabels": ["device:all", "user:all", "work:all"],
"labels": [],
"created": "2020-06-02T09:00:00.000Z",
"modified": "2020-06-02T09:00:00.000Z"
}
]
}curl --request POST \
--url 'https://api.fareclock.com/costcodes' \
--header 'Authorization: Token YOUR_API_KEY' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"name": "Regular Construction",
"active": true,
"payrollId": "CC-REG",
"allowLabels": [
"device:all",
"user:all",
"work:all"
]
}'{
"name": "Regular Construction",
"active": true,
"payrollId": "CC-REG",
"allowLabels": ["device:all", "user:all", "work:all"]
}{
"results": [
{
"id": 10,
"name": "Regular Construction",
"active": true,
"payrollId": "CC-REG",
"allowLabels": ["device:all", "user:all", "work:all"],
"labels": [],
"created": "2020-06-02T09:00:00.000Z",
"modified": "2020-06-02T09:00:00.000Z"
}
]
}curl --request GET \
--url 'https://api.fareclock.com/costcodes/123' \
--header 'Authorization: Token YOUR_API_KEY' \
--header 'Accept: application/json'Path
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Numeric ID of the cost code |
{
"results": [
{
"id": 10,
"name": "Regular Construction",
"active": true,
"payrollId": "CC-REG",
"allowLabels": ["device:all", "user:all", "work:all"],
"labels": [],
"created": "2020-06-02T09:00:00.000Z",
"modified": "2020-06-02T09:00:00.000Z"
}
]
}curl --request PUT \
--url 'https://api.fareclock.com/costcodes/123' \
--header 'Authorization: Token YOUR_API_KEY' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"name": "Regular Construction",
"active": true,
"payrollId": "CC-REG",
"allowLabels": [
"device:all",
"user:all",
"work:all"
]
}'Path
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Numeric ID of the cost code |
{
"name": "Regular Construction",
"active": true,
"payrollId": "CC-REG",
"allowLabels": ["device:all", "user:all", "work:all"]
}{
"results": [
{
"id": 10,
"name": "Regular Construction",
"active": true,
"payrollId": "CC-REG",
"allowLabels": ["device:all", "user:all", "work:all"],
"labels": [],
"created": "2020-06-02T09:00:00.000Z",
"modified": "2020-06-02T09:00:00.000Z"
}
]
}