---
title: "codespar shop"
description: "Shop (delegated purchases): propose one, read where it stands, list a person's masked cards"
---

Shop (delegated purchases): propose one, read where it stands, list a person's masked cards

3 commands in `@codespar/cli 0.20.0`.

Each one prints what its operation answered. [What a command prints](/docs/cli/reference#what-a-command-prints) has the rule, and [Configuration](/docs/cli/config#what-a-script-gets-when-a-command-fails) has the exit codes and the shape of a failure.

### `codespar shop create-purchases`

Propose a purchase at a supported store (never an order)

```bash
codespar shop create-purchases --input-file body.json
```

```json title="body.json"
{
  "agent_id": "agt_0000000000000000",
  "merchant": "string",
  "items": [
    {
      "sku_id": "sku_0000000000000000",
      "quantity": 0
    }
  ],
  "payment_method": "card",
  "idempotency_key": "string"
}
```

| option | what it does |
|---|---|
| `-q, --query <key=value>` | Query parameter (repeatable) (default: []) |
| `--timeout <ms>` | Per-request timeout in milliseconds |
| `-i, --input <json>` | Request body as a JSON string |
| `-f, --input-file <path>` | Request body from a JSON file |

`POST /v1/shop/agent/purchases` · [parameters, responses and refusals](/docs/api/reference/shop#post-v1shopagentpurchases)

### `codespar shop get-purchases`

Where a purchase stands

```bash
codespar shop get-purchases [options] <id>
```

| argument | what it is |
|---|---|
| `<id>` | — |

| option | what it does |
|---|---|
| `-q, --query <key=value>` | Query parameter (repeatable) (default: []) |
| `--timeout <ms>` | Per-request timeout in milliseconds |

`GET /v1/shop/agent/purchases/{id}` · [parameters, responses and refusals](/docs/api/reference/shop#get-v1shopagentpurchasesid)

### `codespar shop instruments`

A person's cards, masked

```bash
codespar shop instruments
```

| option | what it does |
|---|---|
| `-q, --query <key=value>` | Query parameter (repeatable) (default: []) |
| `--timeout <ms>` | Per-request timeout in milliseconds |

`GET /v1/shop/agent/instruments` · [parameters, responses and refusals](/docs/api/reference/shop#get-v1shopagentinstruments)
