> 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/customer-requests.md).

# Customer requests

Base path: `/api/v1/customer/requests`

These endpoints are used by customers to create and manage service requests. They require a customer or tenant session.

## Create a request

Creates a draft request for a published service.

* **Method:** `POST`
* **Path:** `/api/v1/customer/requests/{serviceId}`
* **Permission:** `request:create`

### Response

```json
{
  "status": "Success",
  "message": "Request created successfully.",
  "data": {
    "id": "e5f6a7b8-...",
    "reference": "REQ-000001",
    "serviceId": "c3d4e5f6-...",
    "serviceName": "Family Visa Assistance",
    "status": "DRAFT",
    "questions": [...],
    "requirements": [...],
    "answers": [],
    "documents": []
  }
}
```

### Error cases

| HTTP status | Message                                            | Cause                                 |
| ----------- | -------------------------------------------------- | ------------------------------------- |
| 409         | `Service is not available for new requests.`       | Service not published or archived.    |
| 409         | `An open request already exists for this service.` | Customer already has an open request. |

## Update an answer

* **Method:** `PUT`
* **Path:** `/api/v1/customer/requests/{requestId}/answers/{questionId}`
* **Permission:** `request:create`

### Request body

```json
{
  "value": "Nigeria"
}
```

For multiple choice:

```json
{
  "value": ["Nigeria", "Ghana"]
}
```

For boolean:

```json
{
  "value": true
}
```

## Update a document

* **Method:** `PUT`
* **Path:** `/api/v1/customer/requests/{requestId}/documents/{requirementId}`
* **Permission:** `request:create`

### Request body

```json
{
  "fileObjectId": "f6a7b8c9-..."
}
```

The file object must have status `UPLOADED`.

## Submit a request

* **Method:** `POST`
* **Path:** `/api/v1/customer/requests/{requestId}/submit`
* **Permission:** `request:create`

Validates that all visible required questions have answers and all visible required documents are uploaded. On success, status becomes `PENDING`.

### Error cases

| HTTP status | Message                                       | Cause                  |
| ----------- | --------------------------------------------- | ---------------------- |
| 409         | `This request can no longer be edited.`       | Not in `DRAFT` status. |
| 400         | `Some required questions still need answers.` | Missing answers.       |
| 400         | `Some required documents are still missing.`  | Missing documents.     |

## Get a request

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

## List my requests

* **Method:** `GET`
* **Path:** `/api/v1/customer/requests?page=0&size=20&sort=createdAt,desc`
* **Permission:** `request:read`

## Customer applications

After a request is accepted, customers interact with the resulting application.

Base path: `/api/v1/customer/applications`

### List my applications

* **Method:** `GET`
* **Path:** `/api/v1/customer/applications`
* **Permission:** `application:read`

### Get an application

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

### Update an answer

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

### Update a document

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

### Edit party details

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

```json
{
  "parties": [
    {
      "name": "Chinua Traveller",
      "email": "chinua@example.com",
      "phone": "+2348000000000",
      "details": {
        "date_of_birth": "1990-01-15",
        "nationality": "Nigeria"
      }
    }
  ]
}
```


---

# 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/customer-requests.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.
