# Distribution

This documentation outlines a set of API endpoints for managing and interacting with TRADE's Queue, including distribution management and status.

## POST /Distribution/Start

> Starts data distribution for a package.

```json
{"openapi":"3.0.1","info":{"title":"Customers","version":"v1.0"},"servers":[{"url":"https://stm-api.lsports.eu","variables":{"host":{"default":"https://stm-api.lsports.eu"}}}],"paths":{"/Distribution/Start":{"post":{"tags":["Distribution"],"summary":"Starts data distribution for a package.","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/UpdateDistributionPackageRequestDto"}},"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDistributionPackageRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateDistributionPackageRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateDistributionPackageRequestDto"}}}},"responses":{"200":{"description":"Success"}}}}},"components":{"schemas":{"UpdateDistributionPackageRequestDto":{"required":["packageId","password","userName"],"type":"object","properties":{"packageId":{"type":"integer","format":"int32"},"userName":{"minLength":1,"type":"string"},"password":{"minLength":1,"type":"string"}},"additionalProperties":false}}}}
```

{% openapi src="/files/3w5dHwrwFOSnZMBdkdBE" path="/Distribution/Start" method="post" %}
[stm-customers-api (12).yaml](https://2846470291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftv77Uhe1UsyYNAhnfDk8%2Fuploads%2Fgit-blob-dce7736b6774a337c1090c2b5f3461f2735161c2%2Fstm-customers-api%20\(12\).yaml?alt=media)
{% endopenapi %}

## POST /Distribution/Stop

> Stops data distribution for a package.

```json
{"openapi":"3.0.1","info":{"title":"Customers","version":"v1.0"},"servers":[{"url":"https://stm-api.lsports.eu","variables":{"host":{"default":"https://stm-api.lsports.eu"}}}],"paths":{"/Distribution/Stop":{"post":{"tags":["Distribution"],"summary":"Stops data distribution for a package.","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/UpdateDistributionPackageRequestDto"}},"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDistributionPackageRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateDistributionPackageRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateDistributionPackageRequestDto"}}}},"responses":{"200":{"description":"Success","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/UpdateDistributionPackageResponseDtoStandardResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDistributionPackageResponseDtoStandardResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateDistributionPackageResponseDtoStandardResponse"}}}}}}}},"components":{"schemas":{"UpdateDistributionPackageRequestDto":{"required":["packageId","password","userName"],"type":"object","properties":{"packageId":{"type":"integer","format":"int32"},"userName":{"minLength":1,"type":"string"},"password":{"minLength":1,"type":"string"}},"additionalProperties":false},"UpdateDistributionPackageResponseDtoStandardResponse":{"type":"object","properties":{"header":{"$ref":"#/components/schemas/ResponseHeader"},"body":{"$ref":"#/components/schemas/UpdateDistributionPackageResponseDto"}},"additionalProperties":false},"ResponseHeader":{"type":"object","properties":{"httpStatusCode":{"type":"integer","format":"int32"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ResponseError"},"nullable":true}},"additionalProperties":false},"ResponseError":{"type":"object","properties":{"message":{"type":"string","nullable":true}},"additionalProperties":false},"UpdateDistributionPackageResponseDto":{"type":"object","properties":{"message":{"type":"string","nullable":true}},"additionalProperties":false}}}}
```

{% openapi src="/files/3w5dHwrwFOSnZMBdkdBE" path="/Distribution/Stop" method="post" %}
[stm-customers-api (12).yaml](https://2846470291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftv77Uhe1UsyYNAhnfDk8%2Fuploads%2Fgit-blob-dce7736b6774a337c1090c2b5f3461f2735161c2%2Fstm-customers-api%20\(12\).yaml?alt=media)
{% endopenapi %}

## POST /Package/GetDistributionStatus

> See that status of messages distribution.

```json
{"openapi":"3.0.1","info":{"title":"Customers","version":"v1.0"},"servers":[{"url":"https://stm-api.lsports.eu","variables":{"host":{"default":"https://stm-api.lsports.eu"}}}],"paths":{"/Package/GetDistributionStatus":{"post":{"tags":["Package"],"summary":"See that status of messages distribution.","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/GetDistributionStatusRequestDto"}},"application/json":{"schema":{"$ref":"#/components/schemas/GetDistributionStatusRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/GetDistributionStatusRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/GetDistributionStatusRequestDto"}}}},"responses":{"200":{"description":"Success","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/GetDistributionStatusResponseDtoStandardResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/GetDistributionStatusResponseDtoStandardResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/GetDistributionStatusResponseDtoStandardResponse"}}}}}}}},"components":{"schemas":{"GetDistributionStatusRequestDto":{"required":["packageId","password","userName"],"type":"object","properties":{"packageId":{"type":"integer","format":"int32"},"userName":{"minLength":1,"type":"string"},"password":{"minLength":1,"type":"string"}},"additionalProperties":false},"GetDistributionStatusResponseDtoStandardResponse":{"type":"object","properties":{"header":{"$ref":"#/components/schemas/ResponseHeader"},"body":{"$ref":"#/components/schemas/GetDistributionStatusResponseDto"}},"additionalProperties":false},"ResponseHeader":{"type":"object","properties":{"httpStatusCode":{"type":"integer","format":"int32"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ResponseError"},"nullable":true}},"additionalProperties":false},"ResponseError":{"type":"object","properties":{"message":{"type":"string","nullable":true}},"additionalProperties":false},"GetDistributionStatusResponseDto":{"type":"object","properties":{"isDistributionOn":{"type":"boolean"},"consumers":{"type":"array","items":{"type":"string"},"nullable":true},"numberMessagesInQueue":{"type":"integer","format":"int64"},"messagesPerSecond":{"type":"number","format":"double"}},"additionalProperties":false}}}}
```

{% openapi src="/files/3w5dHwrwFOSnZMBdkdBE" path="/Package/GetDistributionStatus" method="post" %}
[stm-customers-api (12).yaml](https://2846470291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftv77Uhe1UsyYNAhnfDk8%2Fuploads%2Fgit-blob-dce7736b6774a337c1090c2b5f3461f2735161c2%2Fstm-customers-api%20\(12\).yaml?alt=media)
{% endopenapi %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lsports.eu/u/trade/integration/apis/distribution.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
