---
title: "Get wait states for an instance"
method: GET
path: "/v1/workflows/instances/{id}/wait_states"
tags: ["Instances"]
---

# Get wait states for an instance

`GET /v1/workflows/instances/{id}/wait_states`

## Request

- Base URL: `https://api.paymongo.com`
- URL: `https://api.paymongo.com/v1/workflows/instances/{id}/wait_states`
- Auth: HTTP basic

Returns the wait_event steps currently pending on a workflow instance.

## Path parameters

- `id` string, required

## Headers

- `Organization-Id` string, required

## Response `200`

Wait states

- WaitStatesResponse
  - `data` WaitStateDTO[]
    - `definition_path` string: Position of the wait_event step in the workflow definition, such as "2", "2.steps.0" or "0.then.1". A wait state recorded before positions were stored shows its step_index
    - `description` string
    - `event_name` string
    - `instance_id` string
    - `iteration` integer: 0-based loop iteration that ran the wait_event step; null when the step did not run inside a loop
    - `status` string
    - `step_index` integer
    - `timeout_at` string

## Other responses

- `400`: Bad Request
- `401`: authentication_failed, missing_authorization_header, unsupported_auth_method or jwt_signature_invalid when the credential is missing, malformed or rejected; accountid_identity_required when a superuser or service-to-service caller sends the Account-ID header
- `404`: Not Found
- `500`: Internal Server Error
- `502`: accountid_relationship_lookup_failed or accountid_account_lookup_failed when an upstream service does not answer
- `503`: upstream_unavailable when an upstream service does not answer
- `504`: service_timeout when the request exceeds its deadline

---

[API](https://skmtc.dev/paymongo/apis/workflow.md) - [All operations](https://skmtc.dev/paymongo/apis/workflow/llms.txt) - [OpenAPI document](https://skmtc.dev/paymongo/apis/workflow/revisions/859719cfffa2?raw)
