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

# Get a sync request by ID

> Returns a single sync request made by your app. Poll this until status is 'completed' or 'failed'. Requires the re-synced resource's read scope.



## OpenAPI

````yaml /openapi-v4.json get /sync-requests/{id}
openapi: 3.0.0
info:
  title: Max AI Public API
  description: API for third-party marketplace apps
  version: '4.0'
  contact: {}
servers:
  - url: https://api.maxcare.ai/v4
security: []
tags: []
paths:
  /sync-requests/{id}:
    get:
      tags:
        - Sync Requests
      summary: Get a sync request by ID
      description: >-
        Returns a single sync request made by your app. Poll this until status
        is 'completed' or 'failed'. Requires the re-synced resource's read
        scope.
      operationId: SyncRequestsPublicController_getSyncRequest
      parameters:
        - name: id
          required: true
          in: path
          description: Sync request ID
          schema:
            type: string
        - name: X-Organization-Id
          in: header
          required: true
          schema:
            type: string
          description: Target clinic organization ID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSyncRequestSuccessResponseV3'
        '400':
          description: Missing or invalid request parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiBadRequestResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiUnauthorizedResponse'
        '403':
          description: Insufficient scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiForbiddenResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiNotFoundResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiRateLimitResponse'
      security:
        - api-key: []
components:
  schemas:
    GetSyncRequestSuccessResponseV3:
      type: object
      properties:
        code:
          type: string
          description: Response code
          example: success
        data:
          $ref: '#/components/schemas/ExternalSyncRequestResponseV3'
      required:
        - code
        - data
    PublicApiBadRequestResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: bad_request
        message:
          type: string
          description: Human-readable error message
          example: '''id'' must be a valid UUID'
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiUnauthorizedResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: unauthorized
        message:
          type: string
          description: Human-readable error message
          example: Invalid or missing API key
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiForbiddenResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: forbidden
        message:
          type: string
          description: Human-readable error message
          example: Insufficient scope
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiNotFoundResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: not_found
        message:
          type: string
          description: Human-readable error message
          example: Resource not found
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiRateLimitResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: rate_limit_exceeded
        message:
          type: string
          description: Human-readable error message
          example: Rate limit exceeded. Maximum 1000 requests per 60 seconds.
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    ExternalSyncRequestResponseV3:
      type: object
      properties:
        id:
          type: string
          description: Sync request unique identifier
          example: srq_c1d2e3f456784abc9def0123456789ab
        resourceType:
          type: string
          description: Kind of resource being re-synced
          enum:
            - claim
            - bill
            - patient
            - note
            - appointment
          example: claim
        resourceId:
          type: string
          description: The resource being re-synced
          example: clm_a1b2c3d456784abc9def0123456789ab
        status:
          type: string
          description: Request lifecycle status. Poll until 'completed' or 'failed'.
          enum:
            - queued
            - completed
            - failed
          example: queued
        errorKind:
          type: string
          description: >-
            Why a failed request failed, as a closed marker: `child_run_failed`
            (a sync run failed or was interrupted), `cancelled_before_start`
            (the sync runs were discarded while still queued — usually because
            an equivalent sync already held the lane — so nothing this request
            dispatched ran: it costs no daily-cap slot, but still holds the
            cooldown — 5 minutes, or 30 per connector for an appointment), or
            `stale` (no terminal outcome inside the 30-minute watch window).
            Null unless status is 'failed'. A request that could not be started
            at all never reaches this field: it is refused synchronously with a
            4xx or 502 and no request id, so there is nothing to poll.
          nullable: true
          example: null
        resourceUpdatedAt:
          type: string
          description: >-
            The resource's own change stamp as it stood when this request was
            accepted, so you can tell whether the re-sync changed anything:
            re-read the resource and compare. It is the SAME field that
            resource's endpoint returns — `updatedAt` for claim, bill, note and
            patient; `lastSyncedAt` for appointment, which exposes that instead.
            Note it moves only when the data actually CHANGED, so it is not a
            completion signal: use the request's own `status` (or the completion
            webhook) for that. **Returned only on the 202 that creates the
            request** — it is a property of the resource at request time, is not
            stored, and is always null on GET.
          nullable: true
          example: '2026-08-09T12:00:00.000Z'
        requestedAt:
          type: string
          description: When the re-sync was requested
          example: '2026-08-09T12:00:00.000Z'
        completedAt:
          type: string
          description: When the request reached a terminal state
          nullable: true
          example: null
      required:
        - id
        - resourceType
        - resourceId
        - status
        - errorKind
        - resourceUpdatedAt
        - requestedAt
        - completedAt
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Marketplace API key

````