> For the complete documentation index, see [llms.txt](https://docs.osmosworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.osmosworks.com/api-reference/staff-applications.md).

# Staff applications and requests

Base paths:

* `/api/v1/staff/requests`
* `/api/v1/staff/applications`

These endpoints are used by staff to review requests and manage applications.

## Requests

### Get a request

* **Method:** `GET`
* **Path:** `/api/v1/staff/requests/{requestId}`
* **Permission:** `request:read`

### Accept a request

* **Method:** `POST`
* **Path:** `/api/v1/staff/requests/{requestId}/accept`
* **Permission:** `request:review`

### Request body

```json
{
  "assigneeId": "a7b8c9d0-..."
}
```

`assigneeId` is optional. On success, an application is created and returned.

### Reject a request

* **Method:** `POST`
* **Path:** `/api/v1/staff/requests/{requestId}/reject`
* **Permission:** `request:review`

### Request body

```json
{
  "rejectionReason": "Missing required eligibility documents."
}
```

### Error cases

| HTTP status | Message                                                     | Cause                         |
| ----------- | ----------------------------------------------------------- | ----------------------------- |
| 409         | `This request must be submitted before it can be reviewed.` | Status is not `PENDING`.      |
| 409         | `This request has already been reviewed.`                   | Already accepted or rejected. |
| 400         | `A reason is required to reject a request.`                 | Rejection reason missing.     |

## Applications

### List applications

* **Method:** `GET`
* **Path:** `/api/v1/staff/applications?status=IN_PROGRESS&serviceId=c3d4e5f6-...&assigneeId=a7b8c9d0-...&page=0&size=20`
* **Permission:** `application:read`

The implementation uses only one filter at a time in this order: `status`, then `assigneeId`, then `serviceId`.

### Get an application

* **Method:** `GET`
* **Path:** `/api/v1/staff/applications/{applicationId}`
* **Permission:** `application:read`

### Update an answer

* **Method:** `PUT`
* **Path:** `/api/v1/staff/applications/{applicationId}/answers/{questionId}`
* **Permission:** `application:manage`

### Update a document

* **Method:** `PUT`
* **Path:** `/api/v1/staff/applications/{applicationId}/documents/{requirementId}`
* **Permission:** `application:manage`

### Edit party details

* **Method:** `PUT`
* **Path:** `/api/v1/staff/applications/{applicationId}/party`
* **Permission:** `application:manage`

### Complete a stage

* **Method:** `POST`
* **Path:** `/api/v1/staff/applications/{applicationId}/stages/{stageId}/complete`
* **Permission:** `application:manage`

Validates required answers and documents for the stage. For payment stages, verifies the linked invoice is `PAID`. Advances to the next visible stage or completes the application.

### Close an application

* **Method:** `POST`
* **Path:** `/api/v1/staff/applications/{applicationId}/close`
* **Permission:** `application:manage`

### Get edit history

* **Method:** `GET`
* **Path:** `/api/v1/staff/applications/{applicationId}/history`
* **Permission:** `application:read`

### Price preview

* **Method:** `POST`
* **Path:** `/api/v1/staff/applications/{applicationId}/price-preview`
* **Permission:** `application:read`

### Request body

```json
{
  "stageId": "b8c9d0e1-...",
  "answers": {
    "request.express_processing": true
  },
  "partyCount": 2
}
```

If `stageId` is omitted, the preview uses the current stage.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.osmosworks.com/api-reference/staff-applications.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
