---
search:
  tags:
    - Inventory
    - PUT
seo:
  description: >-
    Send, per card and quality, the prizes won that have no unit assigned yet,…
    Reference for the PUT /inventory/demand endpoint in the Toreca Cloud Partner
    API.
sidebar:
  label: Send oripa demand
  badge: PUT
title: Send oripa demand
type: openapi-operation
---
Send, per card and quality, the prizes won that have no unit assigned yet, the slots left in packs on sale, and how fast they are being won. The shop uses this to decide what to stock and boost. Stock does not change. Do not send customer information.

Each call replaces the connection's whole demand: lines left out are removed, and an empty list clears it. It replaces only when `generatedAt` is newer than the stored one, returning `{ "applied": true, "lines": count }`; when it is the same or older nothing changes and it returns `{ "applied": false }`. A `generatedAt` more than 5 minutes ahead of the server clock is `422 invalid_generated_at`.

Besides inventory:read, this needs the operation's scope and the approving member's inventory.write permission.

`PUT /inventory/demand`

**Request body** (`application/json`, required)

- `generatedAt` (string<date-time>, required) — When the partner worked out the demand
- `lines` (object[], required)

Request body example:

```json
{
  "generatedAt": "2019-08-24T14:15:22Z",
  "lines": [
    {
      "key": "string",
      "cardId": "f16ba382-eb42-481a-b08f-c57bdc9aae24",
      "label": "string",
      "criteria": "string",
      "rule": {
        "kind": "card",
        "gameId": "3f0eee32-8eac-4668-9b38-e3e5dc21d607",
        "languageCode": "string",
        "rarities": [
          "string"
        ],
        "setIds": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ]
      },
      "partnerCode": "string",
      "quality": {
        "kind": "raw",
        "condition": "mint"
      },
      "shippingRequested": 0,
      "held": 0,
      "undrawn": 0,
      "reserved": 0,
      "wins7d": 0,
      "wins30d": 0,
      "oldestRequestAt": "2019-08-24T14:15:22Z",
      "request": {
        "quantity": 1,
        "note": "string",
        "requestedAt": "2019-08-24T14:15:22Z"
      }
    }
  ]
}
```

**Responses**

- `200` — Accepted
- `400` — \`invalid\_request\`: a parameter is invalid.
- `401` — \`invalid\_token\`: the token is missing, expired, or for another resource.
- `403` — One of \`insufficient\_scope\`, \`connection\_revoked\`, \`client\_disabled\` or \`forbidden\`.
- `422` — \`invalid\_generated\_at\`: \`generatedAt\` is more than 5 minutes ahead of the server clock.

Response example, 200:

```json
{
  "applied": true,
  "lines": 0
}
```
