---
title: "Reads the access requirements of many resources at once."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sherpo.io/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sherpo merchant API › product

`POST /v1/stores/{store}/access_requirements/query`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `product:read`

## Path parameters

- `store` (`listResourceAccess.path.store`; string, required) — The store's id.

## Request body

_Required._

- `resources` (`listResourceAccess.resources`; array<object>, required)
  - `kind` (`listResourceAccess.resources.kind`; string, required)
    - one of `"product"`, `"entry"`, `"download"`, `"quiz"`, `"attachment"`, `"page"`
  - `id` (`listResourceAccess.resources.id`; string, required)
    - minLength 1; maxLength 512

## Example request

```json
{
  "resources": [
    {
      "kind": "product",
      "id": "string"
    }
  ]
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/access_requirements/query' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "resources": [
    {
      "kind": "product",
      "id": "string"
    }
  ]
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/access_requirements/query';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({resources: [{kind: 'product', id: 'string'}]})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/access_requirements/query"

payload = { "resources": [
        {
            "kind": "product",
            "id": "string"
        }
    ] }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Reads the access requirements of many resources at once.

#### Example

```json
[
  {
    "resource": {
      "kind": "string",
      "id": "string"
    },
    "requirements": [
      {
        "resource": {
          "kind": "string",
          "id": "string"
        },
        "channel": "string",
        "tier_id": "string",
        "closed": true
      }
    ]
  }
]
```

- `resource` (`listResourceAccess.response.200.resource`; object, required)
  - `kind` (`listResourceAccess.response.200.resource.kind`; string, required)
  - `id` (`listResourceAccess.response.200.resource.id`; string, required)
    - minLength 1; maxLength 512
- `requirements` (`listResourceAccess.response.200.requirements`; array<object>, required)
  - `resource` (`listResourceAccess.response.200.requirements.resource`; object, required)
    - `kind` (`listResourceAccess.response.200.requirements.resource.kind`; string, required)
    - `id` (`listResourceAccess.response.200.requirements.resource.id`; string, required)
  - `channel` (`listResourceAccess.response.200.requirements.channel`; string, required)
  - `tier_id` (`listResourceAccess.response.200.requirements.tier_id`; any of, required)
    - any of: `string`, `null`
  - `closed` (`listResourceAccess.response.200.requirements.closed`; boolean, required)

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`listResourceAccess.response.default.type`; string, required)
  - format `uri`
- `title` (`listResourceAccess.response.default.title`; string, required)
- `status` (`listResourceAccess.response.default.status`; integer, required)
- `detail` (`listResourceAccess.response.default.detail`; string, required)
- `code` (`listResourceAccess.response.default.code`; string, optional)
- `context` (`listResourceAccess.response.default.context`; object, optional)
- `reached_core` (`listResourceAccess.response.default.reached_core`; boolean, optional)
- `core_answer` (`listResourceAccess.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/list-resource-access/index.md
