---
title: "Retrieve application state for an SBI, grant code and version"
method: GET
path: "/state"
tags: ["State"]
---

# Retrieve application state for an SBI, grant code and version

`GET /state`

## Query parameters

- `sbi` string, required
- `grantCode` string, required
- `grantVersion` union, required
  - string
  - integer

## Response `200`

The stored state document

- StateDocument — The full stored state document, including its identifiers, version fields and audit timestamps, with the arbitrary state under `state`.
  - `_id` string — MongoDB document identifier
  - `sbi` string, required
  - `grantCode` string, required
  - `grantVersion` string, required
  - `pinnedMajor` integer
  - `major` integer
  - `minor` integer
  - `patch` integer
  - `state` StateObject, required — Arbitrary state object stored by the service
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

## Other responses

- `400` — Validation error
- `404` — No state found for the given identifiers
- `500` — Failed to retrieve state

---

[API](https://skmtc.dev/defra/apis/grants-ui-backend-api.md) · [All operations](https://skmtc.dev/defra/apis/grants-ui-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/defra/grants-ui-backend-api/revisions/09665d03cacb/schema)
