> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simplifi.work/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an activity

> Returns details about a single activity by its ID.



## OpenAPI

````yaml /simplifi_openapi.json get /activities/{activity_id}
openapi: 3.0.3
info:
  title: Simplifi API
  version: 1.0.0
  description: Workforce management API
  termsOfService: >-
    https://apps.staffsync.co.nz/static/StaffSyncUserTermsOfService.pdf?openexternal=true
  contact:
    name: Simplifi
    email: support@simplifi.work
    url: https://simplifi.work
servers:
  - url: https://{base_url}/api/v1
    description: Simplifi API Server
    variables:
      base_url:
        description: Your Simplifi instance base URL
        default: example.com
security:
  - BearerAuth: []
externalDocs:
  url: https://docs.simplifi.work/authentication
  description: The Simplifi API Documentation
paths:
  /activities/{activity_id}:
    get:
      tags:
        - Activities
      summary: Get an activity
      description: Returns details about a single activity by its ID.
      operationId: getActivity
      parameters:
        - name: activity_id
          in: path
          description: The unique identifier of the activity to retrieve
          required: true
          schema:
            type: string
            example: '2760_182'
      responses:
        '200':
          description: Activity details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Activity'
              example:
                id: '2760_182'
                costCentre: ''
                isBreak: false
                isPaid: true
                name: Annual Leave
                payRollCodes:
                  - id: '4630_116'
                    code: Annual Leave
                    payRollProvider: DataPay
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    Activity:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the activity
          example: '2760_182'
        costCentre:
          type: string
          description: >-
            The cost centre associated with the activity. Empty string if not
            assigned.
          example: ''
        isBreak:
          type: boolean
          description: Whether this activity is classified as a break
          example: false
        isPaid:
          type: boolean
          description: Whether this activity is paid
          example: true
        name:
          type: string
          description: The display name of the activity
          example: Annual Leave
        payRollCodes:
          type: array
          description: A list of payroll codes associated with this activity
          items:
            $ref: '#/components/schemas/PayRollCode'
    PayRollCode:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the payroll code
          example: '4630_116'
        code:
          type: string
          description: The payroll code label
          example: Annual Leave
        payRollProvider:
          type: string
          description: The name of the payroll provider this code belongs to
          example: DataPay
  responses:
    BadRequest:
      description: Bad Request - malformed request syntax or invalid parameters
    Unauthorized:
      description: Unauthorized - missing or invalid token
    Forbidden:
      description: Forbidden - valid token but insufficient permissions
    NotFound:
      description: Not Found - the requested resource does not exist
    Conflict:
      description: Conflict - the request conflicts with the current state of the resource
    UnprocessableEntity:
      description: >-
        Unprocessable Entity - the request was well-formed but contains semantic
        errors
    TooManyRequests:
      description: Too Many Requests - rate limit exceeded
    InternalServerError:
      description: Internal Server Error
    BadGateway:
      description: Bad Gateway - upstream service failed
    ServiceUnavailable:
      description: Service Unavailable
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Access token obtained from /oauth/token. Pass as Authorization: Bearer
        {token}

````