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

# Deal stage state

> Current stage, time and SLA, checklist, stage tasks, what is missing to reach the next stage and the pending approval.



## OpenAPI

````yaml https://api.apyconnect.io/v1/openapi.json get /v1/deals/{id}/stage
openapi: 3.1.0
info:
  title: ApyConnect API
  version: 1.0.0
  description: >-
    ApyConnect public API. OAuth 2.0 authentication (client_credentials grant)
    with opaque Bearer tokens. Wrapped responses ({data, meta} / {object:'list',
    data, pagination, meta}); typed errors with trace_id; cursor pagination;
    snake_case throughout the JSON. Rate limit per Application.


    Best practices: send an `Idempotency-Key` header on writes to make retries
    safe (the same key replays the stored response for 24h; reusing a key with a
    different body returns 409). Use `?expand=contact` (and `expand=company` on
    deals) to embed related resources and save round-trips. Deprecated endpoints
    carry RFC 8594 `Deprecation`/`Sunset` headers. Inspect usage at `/v1/usage`
    and the write audit trail at `/v1/audit-logs`.
  contact:
    name: ApyConnect
    url: https://docs.apyconnect.io
servers:
  - url: https://api.apyconnect.io
    description: Production
security:
  - bearerAuth: []
tags:
  - name: OAuth
  - name: Contacts
  - name: Conversations
  - name: Messages
  - name: Channels
  - name: Inboxes
  - name: Campaigns
  - name: Analytics
  - name: Webhooks
  - name: Deals
  - name: Tasks
  - name: Companies
  - name: Tickets
  - name: Custom objects
    description: >-
      Objects each workspace defines (policies, vehicles, properties…) and their
      records. Address an object by its key (e.g. `policies`) or id.
  - name: Pipelines
    description: >-
      Stage rules: requirements, approvals, SLA. Moving forward checks the stage
      requirements; moving back or to a lost stage is never blocked.
  - name: Notes
  - name: Segments
  - name: Macros
  - name: Settings
  - name: Jobs
  - name: Observability
paths:
  /v1/deals/{id}/stage:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
    get:
      tags:
        - Pipelines
      summary: Deal stage state
      description: >-
        Current stage, time and SLA, checklist, stage tasks, what is missing to
        reach the next stage and the pending approval.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/StageState'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - data
                  - meta
        '401':
          description: authentication_error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: billing_error (workspace_suspended, insufficient_balance)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: permission_error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: not_found_error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: rate_limit_error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    StageState:
      type: object
      properties:
        object:
          type: string
          const: stage_state
        subject:
          type: object
          properties:
            type:
              type: string
            id:
              type: string
        pipeline:
          type: object
          properties:
            type:
              type: string
              enum:
                - pipeline
                - object
            id:
              type: string
        stage:
          type:
            - string
            - 'null'
        entered_at:
          type:
            - string
            - 'null'
          format: date-time
        sla_due_at:
          type:
            - string
            - 'null'
          format: date-time
        sla_breached:
          type: boolean
        next_stage:
          type:
            - object
            - 'null'
          properties:
            key:
              type: string
            label:
              type: string
            needs_approval:
              type: boolean
            missing:
              type: array
              items:
                $ref: '#/components/schemas/StageGap'
        checklist:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: string
              required:
                type: boolean
              done:
                type: boolean
              done_at:
                type:
                  - string
                  - 'null'
        tasks:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              title:
                type: string
              status:
                type: string
              required:
                type: boolean
              due_at:
                type:
                  - string
                  - 'null'
        pending_approval:
          oneOf:
            - $ref: '#/components/schemas/Approval'
            - type: 'null'
    Meta:
      type: object
      properties:
        request_id:
          type: string
      required:
        - request_id
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - billing_error
                - permission_error
                - rate_limit_error
                - not_found_error
                - conflict_error
                - api_error
            code:
              type: string
            message:
              type: string
            trace_id:
              type: string
            details: {}
          required:
            - type
            - code
            - message
            - trace_id
    StageGap:
      type: object
      properties:
        requirement_id:
          type: string
        kind:
          type: string
          enum:
            - field
            - association
            - tasks_done
            - checklist_done
            - condition
            - integration
            - attachment
            - client_approval
            - move
            - mover
        phase:
          type: string
          enum:
            - entry
            - exit
        stage:
          type: string
        label:
          type: string
        field:
          type: string
    Approval:
      type: object
      properties:
        object:
          type: string
          const: approval
        id:
          type: string
        subject:
          type: object
          properties:
            type:
              type: string
              enum:
                - deal
                - record
            id:
              type: string
        container:
          type: object
          properties:
            type:
              type: string
            id:
              type: string
            name:
              type: string
        from_stage:
          type:
            - string
            - 'null'
        to_stage:
          type: string
        to_stage_label:
          type: string
        status:
          type: string
          enum:
            - pending
            - approved
            - rejected
            - cancelled
            - expired
        mode:
          type: string
          enum:
            - any
            - all
            - quorum
            - sequential
        needed:
          type: integer
        current_step:
          type:
            - integer
            - 'null'
          description: 'Modo secuencial: paso actual (desde 1).'
        steps:
          type:
            - integer
            - 'null'
        escalated_at:
          type:
            - string
            - 'null'
          format: date-time
        reason:
          type:
            - string
            - 'null'
        requested_by:
          type:
            - string
            - 'null'
        approvers:
          type: array
          items:
            type: object
            properties:
              user_id:
                type: string
              name:
                type: string
              decision:
                type:
                  - string
                  - 'null'
                enum:
                  - approved
                  - rejected
                  - null
              note:
                type:
                  - string
                  - 'null'
              decided_at:
                type:
                  - string
                  - 'null'
        expires_at:
          type:
            - string
            - 'null'
        created_at:
          type: string
        decided_at:
          type:
            - string
            - 'null'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Opaque token issued by /oauth/token.

````

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