---
search:
  tags:
    - Card catalog
    - GET
seo:
  description: >-
    Reads the latest reports of the configured pair at this shop… Reference for
    the GET /cards/{id}/demand-availability endpoint in the Toreca Cloud Partner
    API.
sidebar:
  label: Check stock and demand before setting pack slots
  badge: GET
title: Check stock and demand before setting pack slots
type: openapi-operation
---
Reads the latest reports of the configured pair at this shop for the exact grade. stock counts units either partner can hold, once each; yourStock counts units the caller can hold. In partners, yours marks the caller and a null generatedAt means no report yet. Urgent shortage is max(0, shippingRequested − stock); forecast shortage is max(0, shippingRequested + held + undrawn − stock). Already reserved slots do not add to either shortage. For new slots, add their number to undrawn when calculating the forecast. Any-card lines are excluded. hasUnassignedGradeDemand indicates additional outstanding demand naming this card whose grade is unspecified, unmatched or ambiguous; it is excluded from the counts.

`GET /cards/{id}/demand-availability`

**Responses**

- `200` — Check stock and demand before setting pack slots
- `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\`.
- `404` — \`not\_found\`

Response example, 200:

```json
{
  "cardId": "f16ba382-eb42-481a-b08f-c57bdc9aae24",
  "grade": "string",
  "stock": 0,
  "yourStock": 0,
  "total": {
    "shippingRequested": 0,
    "held": 0,
    "undrawn": 0,
    "reserved": 0
  },
  "partners": [
    {
      "shippingRequested": 0,
      "held": 0,
      "undrawn": 0,
      "reserved": 0,
      "name": "string",
      "yours": true,
      "generatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "hasUnassignedGradeDemand": true,
  "urgentShortage": 0,
  "forecastShortage": 0
}
```
