> For the complete documentation index, see [llms.txt](https://moonshine-labs.gitbook.io/solanaplay/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://moonshine-labs.gitbook.io/solanaplay/orders.md).

# Orders

### 1. Get all orders by platform Id

You will need to know how to get all orders by `platformId`, you will need to make a POST request to the `/orders/{platformId}` endpoint with your `platformId`. Make sure to fill in the required fields in the request body.

```http
POST /api/solanaplay/orders/platformId
```

Request body:

```json
{
  "platformId": "unique-platform-id"
}
```

\
Response examples:\
You will receive response 200(success) :

```json
[
  {
    "platformId": "platform-id",
    "itemId": "item-id",
    "playerId": "player-id",
    "quantity": 1,
    "payToken": "So11111111111111111111111111111111111111112",
    "tokenName": "token-name",
    "qrRefId": "qr-reference-id",
    "playerRefId": "player-reference-id",
    "itemRefId": "item-reference-id",
    "itemPlatId": "item-platform-id",
    "playerPlatformId": "player-platform-id",
    "platCustPub": "platform-customer-public-key",
    "payAmount": 0,
    "price": 0,
    "label": "label-text",
    "description": "item-description",
    "icon": "http://example.com",
    "link": "http://example.com",
    "createdUTC": 0,
    "account": "account-id",
    "orderUTC": 0,
    "blockheight": 0,
    "encodedWt": "encoded-wt",
    "originalReference": "original-reference",
    "lastModified": "2019-08-24T14:15:22Z",
    "tx": "transaction-data",
    "txUTC": 0,
    "txSignature": "transaction-signature",
    "txLookupUTC": 0
  }
]

```

Or a default message error:

```json
{
  "error": {
    "code": 0,
    "message": "error-message"
  }
}
```

If successful you will receive a `platformId`, `itemId`, and `playerId` in the response. If in the event of an error a default message will occur.&#x20;


---

# 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 dynamically by asking a question.

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

```
GET https://moonshine-labs.gitbook.io/solanaplay/orders.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
