Pay Rules

Authentication: All endpoints require an Authorization: Bearer <access token> header.

Most endpoints require an X-Company-ID: <company_id> header to scope requests to a specific company. This is the recommended header for most API operations.

Some endpoints require an X-Location-ID: <location_id> header when the query doesn't accept a locationId parameter.

See Authentication for details on how to obtain and use these headers.

Query Pay Rules

GraphQL Query

query PayRules {
  payRules {
    id
    name
    description
    versions {
      id
      name
      description
      commencedAt
      modifiedAt
      modifiedBy {
        fullName
      }
    }
    modifiedAt
    modifiedBy {
      fullName
    }
    deletedAt
  }
}

Example Variables

{}

Example Response

{
  "data": {
    "payRules": [
      {
        "id": "541",
        "name": "Overtime",
        "description": "Apply overtime rate to grouped timesheets",
        "versions": [
          {
            "id": "522",
            "name": "Overtime v1",
            "description": null,
            "commencedAt": "2023-07-24",
            "modifiedAt": "2023-11-07T04:30:19.319Z",
            "modifiedBy": {
              "fullName": "Roubler Support"
            }
          }
        ],
        "modifiedAt": "2023-11-07T04:30:19.306Z",
        "modifiedBy": {
          "fullName": "Roubler Support"
        },
        "deletedAt": null
      },
      {
        "id": "538",
        "name": "Standard",
        "description": "Standard pay rules",
        "versions": [
          {
            "id": "521",
            "name": "Ordinary, overtime (8+) and weekend hours",
            "description": null,
            "commencedAt": "2021-01-01",
            "modifiedAt": "2023-11-07T04:30:19.324Z",
            "modifiedBy": {
              "fullName": "Roubler Support"
            }
          }
        ],
        "modifiedAt": "2023-11-07T04:30:19.304Z",
        "modifiedBy": {
          "fullName": "Roubler Support"
        },
        "deletedAt": null
      }
    ]
  }
}