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

# Get one operation

> One submission or provider read with its current status, attempts, next attempt date, provider reference, and the reason it stopped if it did.



## OpenAPI

````yaml /api-reference/specs/integrations.json get /operations/{operationId}
openapi: 3.0.1
info:
  title: Integrations Service
  description: Integrations API for FlowPayroll
  version: v1
servers:
  - url: https://api.sandbox.flowpayroll.ai/v1/integrations
security:
  - X-Auth-Token: []
tags:
  - name: Providers
    description: >-
      The providers Flow Payroll can send to, what each can do, and the sign-in
      details it needs.
  - name: Connections
    description: >-
      Your organisation's provider accounts: create one, save its sign-in
      details, test it, pause it, disconnect it or remove it.
  - name: Scheme links
    description: >-
      Which pension scheme sends through which connection. Linking is the
      opt-in: nothing is sent for a scheme until it is linked.
  - name: Activity
    description: >-
      Every submission to a provider and every read from it, with status,
      attempts and the provider reference. Retry what failed, cancel what has
      not gone yet.
  - name: Provider data
    description: >-
      How fresh the data read from the provider is, and how to refresh it on
      demand.
  - name: Initial import
    description: >-
      Read everything the provider already holds for the employer, so Flow
      Payroll starts in step with it.
paths:
  /operations/{operationId}:
    get:
      tags:
        - Activity
      summary: Get one operation
      description: >-
        One submission or provider read with its current status, attempts, next
        attempt date, provider reference, and the reason it stopped if it did.
      operationId: GetOperation
      parameters:
        - name: operationId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationResponseResponseBody'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectResponseBody'
components:
  schemas:
    OperationResponseResponseBody:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/OperationResponseContentResponse'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    ObjectResponseBody:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/ObjectContentResponse'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    MessageWithTokenResponse:
      type: object
      properties:
        text:
          type: string
        token:
          type: string
        tokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
      additionalProperties: false
    OperationResponseContentResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/OperationResponse'
        metadata:
          $ref: '#/components/schemas/ContentMetadataResponse'
      additionalProperties: false
    ValidationIssue:
      type: object
      properties:
        field:
          type: string
        reason:
          type: string
        reasonToken:
          type: string
        reasonTokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
      additionalProperties: false
    ObjectContentResponse:
      type: object
      properties:
        data:
          nullable: true
        metadata:
          $ref: '#/components/schemas/ContentMetadataResponse'
      additionalProperties: false
    ValidationIssueArgument:
      type: object
      properties:
        name:
          type: string
        value:
          nullable: true
      additionalProperties: false
    OperationResponse:
      type: object
      properties:
        id:
          type: string
        organisationId:
          type: string
        connectionId:
          type: string
        providerSlug:
          type: string
        operationType:
          type: string
        status:
          enum:
            - None
            - Pending
            - AwaitingProvider
            - Succeeded
            - Failed
            - NeedsAttention
            - Cancelled
          type: string
        attempts:
          type: integer
          format: int32
        nextAttemptDate:
          type: string
          description: >-
            When we next TRY THE PROVIDER AGAIN, because we could not reach it.
            Distinct from `nextCheckDate`: that one is asking a provider that
            already has the submission whether it is done, this one is trying to
            hand it over at all.


            The gaps widen deliberately — the first after 5 seconds, each wait
            about half again longer than the last, none longer than 30 minutes —
            because hammering a provider that is down achieves nothing. After
            `maxAttempts` the operation stops and waits for a person (status
            NeedsAttention), which is roughly 2.7 hours from the first failure.
            Read `attempts` with `maxAttempts` to show how much road is left
            rather than only when the next try is.
          nullable: true
        providerReference:
          type: string
          nullable: true
        lastErrorToken:
          type: string
          description: >-
            Stable, provider-agnostic reason code. Branch on this rather than on
            the accompanying message, which is default English intended for
            display and may be reworded. Use the token as an i18n lookup key.


            - `provider_rate_limited`: The provider asked us to slow down.
            Sending carries on automatically in a few minutes.

            - `provider_authentication_failed`: The provider rejected the
            sign-in details. Re-enter them on the connection, then try again.

            - `provider_validation_failed`: The provider rejected the submission
            because some of the details did not pass its checks.

            - `submission_incomplete`: Nothing was sent: some details the
            provider needs are missing. Fix the ones listed, then send again.

            - `provider_unavailable`: The provider could not be reached. It is
            retried automatically.

            - `connection_not_callable`: This connection is not ready to use.
            Finish connecting it, then test it, before sending.

            - `connection_circuit_open`: Sending is paused after repeated
            failures from the provider, and starts again automatically in about
            ten minutes.

            - `provider_account_locked`: The provider has locked this account.
            Sign in to the provider directly to unlock it, then test the
            connection.

            - `provider_partial_failure`: The provider accepted some of the
            workers and rejected the rest.

            - `provider_capability_unsupported`: The connected provider does not
            support this kind of submission.

            - `provider_circuit_open`: The provider is not responding for anyone
            right now. Sending is paused and starts again automatically once it
            recovers.

            - `provider_result_overdue`: The provider accepted this but has not
            returned a result in two days. Check it with the provider, then
            retry or cancel.

            - `provider_call_failed`: The provider did not complete the request.


            Treat an unrecognised token as a generic failure: the list grows.
          nullable: true
        requestedByService:
          type: string
        completedDate:
          type: string
          nullable: true
        createdDate:
          type: string
        updatedDate:
          type: string
        expectedReadyDate:
          type: string
          description: >-
            When the PROVIDER said it would be done, in its own words (NEST
            sends this as X-EXP-TAT). Null when it gave no estimate.


            Show it, but do not wait it out or count it as a deadline: providers
            pad heavily, and NEST has quoted three hours on work it finished in
            five minutes. Its purpose is to let somebody tell a slow provider
            from a stuck one.
          nullable: true
        nextCheckDate:
          type: string
          description: >-
            When WE next ask the provider for a result. Always set while the
            provider owes us one; null once it does not.


            This is the moment the record can next change, so it is what a
            waiting screen should count down to. Checks start soon after the
            submission and step back as one genuinely takes longer: the first
            after 5 seconds, each wait about half again longer than the last,
            none longer than 5 minutes. Read this field each time rather than
            assuming a fixed interval. The ladder applies whether or not the
            provider gave an estimate; an estimate can only bring a check
            forward, never push it back.


            Deliberately distinct from `expectedReadyDate`: that one is the
            provider's claim about itself, this one is our schedule.
          nullable: true
        maxAttempts:
          type: integer
          format: int32
        lastErrorMessage:
          type: string
          nullable: true
        importType:
          type: string
          nullable: true
        lane:
          enum:
            - None
            - Interactive
            - Background
          type: string
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ProviderIssueResponse'
          nullable: true
        issueCount:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    ContentMetadataResponse:
      type: object
      properties:
        dateFormat:
          type: string
        dateTimeFormat:
          type: string
        paginationToken:
          type: string
          nullable: true
      additionalProperties: false
    ProviderIssueResponse:
      type: object
      properties:
        reference:
          type: string
          nullable: true
        code:
          type: string
          nullable: true
        message:
          type: string
        noActionNeeded:
          type: boolean
      additionalProperties: false
  securitySchemes:
    X-Auth-Token:
      type: apiKey
      description: FlowPayroll JWT (raw token, no Bearer prefix)
      name: X-Auth-Token
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.