> 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/works/platform/architecture/low-level-design/services/schedule-of-rates-archive.md).

# Schedule of Rates (archive)

This page describes the low level design for the SOR and rates services

## Overview

Schedule of rates are defined by the state to provide detailed specifications for materials, labour, machinery etc..Rates are also defined at the state level but can be customized at the ULB level. This service provides a way to create/update/search for SORs and add rates to the SORs.

## API Specifications

### API Contract Link

{% file src="/files/JqbtEuwTFYc0eBAGkEhw" %}

### APIs

{% openapi src="/files/JqbtEuwTFYc0eBAGkEhw" path="/sor/v1/\_create" method="post" %}
[sor-rates-1.0.0.yaml](https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/yKyjf2TY8P5sXfRsT3C6/sor-rates-1.0.0.yaml)
{% endopenapi %}

{% openapi src="/files/JqbtEuwTFYc0eBAGkEhw" path="/sor/v1/\_update" method="post" %}
[sor-rates-1.0.0.yaml](https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/yKyjf2TY8P5sXfRsT3C6/sor-rates-1.0.0.yaml)
{% endopenapi %}

{% openapi src="/files/JqbtEuwTFYc0eBAGkEhw" path="/sor/v1/\_search" method="post" %}
[sor-rates-1.0.0.yaml](https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/yKyjf2TY8P5sXfRsT3C6/sor-rates-1.0.0.yaml)
{% endopenapi %}

{% openapi src="/files/JqbtEuwTFYc0eBAGkEhw" path="/sor/rate/v1/\_create" method="post" %}
[sor-rates-1.0.0.yaml](https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/yKyjf2TY8P5sXfRsT3C6/sor-rates-1.0.0.yaml)
{% endopenapi %}

{% openapi src="/files/JqbtEuwTFYc0eBAGkEhw" path="/sor/rate/v1/\_update" method="post" %}
[sor-rates-1.0.0.yaml](https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/yKyjf2TY8P5sXfRsT3C6/sor-rates-1.0.0.yaml)
{% endopenapi %}

{% openapi src="/files/JqbtEuwTFYc0eBAGkEhw" path="/sor/rate/v1/\_search" method="post" %}
[sor-rates-1.0.0.yaml](https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/yKyjf2TY8P5sXfRsT3C6/sor-rates-1.0.0.yaml)
{% endopenapi %}

## Data Model&#x20;

### DB Schema Diagram

<figure><img src="https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/73IX0s6jXLtsv6tghDpa/SOR.png" alt=""><figcaption></figcaption></figure>

### Web Sequence Diagrams

#### SOR APIs

{% tabs %}
{% tab title="SOR Create" %}

<figure><img src="https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/rcLm0oVgaUSwlT2Qh4mo/SORServiceCreateSORAPI.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/ImMQ01VQ3SfeQ8tusXwM/SORServiceCreateSORAPIValidation.png" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="SOR Update" %}

<figure><img src="https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/soHGBExOxOWEFx1y55Ta/SORServiceUpdateSORAPI.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/dz9OcrIp1TDDeI8xOQzp/SORServiceUpdateSORAPIValidation.png" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="SOR Search" %}

<figure><img src="https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/bwOjIOYi44JdMpLTsVSA/SORServiceSearchSORAPI.png" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

#### Rates

{% tabs %}
{% tab title="Create Rates" %}

<figure><img src="https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/h0tSwBlKv3eXq8n7ZrxO/SORServiceCreateRateAPI.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/0qZ7kL9Ds9SWPeQXH5sz/SORServiceCreateRateAPIValidation.png" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Update Rates" %}

<figure><img src="https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/gycCpcXJZX8U0g4gMxSD/SORServiceUpdateRateAPI.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/MsdFWl3KqXRSAZhDTtgf/SORServiceUpdateRateAPIValidation.png" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Search Rates" %}

<figure><img src="https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/svBApHFgdQho2ZSfhwuJ/SORServiceSearchRateAPI.png" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### Master Data Types

The following masters need to be created as part of this module:

* SOR Type
* SOR Subtype
* Unit of measurement


---

# 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/works/platform/architecture/low-level-design/services/schedule-of-rates-archive.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.
