> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/platform/build/core-services/service-request.md).

# Service Request

## Overview

Service request allows users to define a service and then create a service against service definitions. A service definition can be a survey or a checklist which the users might want to define and a service against the service definition can be a response against the survey or a filled-out checklist.

## Pre-requisites

1. Prior knowledge of Java/J2EE
2. Prior knowledge of SpringBoot
3. Prior knowledge of PostgreSQL
4. Prior knowledge of REST APIs and related concepts like path parameters, headers, JSON etc.

## Key Functionalities

Users can -

1. Create and search service definitions.
2. Create and search services.

## API Details

1. `/service-request/service/definition/v1/_create` - Takes RequestInfo and ServiceDefinition in request body. ServiceDefinition has all the parameters related to the service definition being created.\\
2. `/service-request/service/definition/v1/_search` - Allows searching of existing service definitions. Takes RequestInfo, ServiceDefinitionCriteria and Pagination objects in the request body.\\
3. `/service-request/service/v1/_create` - Takes RequestInfo and Service in the request body. Service has all the parameters related to the service being created against a particular ServiceDefinition.\\
4. `/service-request/service/v1/_search` - Allows searching of existing services created against service definitions. Takes RequestInfo, ServiceCriteria and Pagination objects in the request body.

Detailed API payloads for interacting with Service Request for all four endpoints can be found in the following collection - [Service Request Collection](https://api.postman.com/collections/12892142-f7bf3d00-6eed-4efc-8cbe-66dd22833f8e?access_key=PMAT-01GST3SNZDFX2CZ5GW0A69M91K)

### Play around with the API's : [DIGIT-Playground](https://digit-api.apidog.io/doc-507201)

### Swagger Documentation

The link to the swagger documentation can be found below - [Service Request Contract](https://editor.swagger.io/?url=https://raw.githubusercontent.com/egovernments/DIGIT-OSS/health-checklist-final/core-services/service-request/src/main/resources/service-request-contract.yaml)


---

# 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.digit.org/platform/build/core-services/service-request.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.
