Skip to main content
Command reference

codespar shop

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

1 min read
View MarkdownEdit on GitHub

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 has the rule, and Configuration has the exit codes and the shape of a failure.

codespar shop create-purchases

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

codespar shop create-purchases --input-file body.json
body.json
{
  "agent_id": "agt_0000000000000000",
  "merchant": "string",
  "items": [
    {
      "sku_id": "sku_0000000000000000",
      "quantity": 0
    }
  ],
  "payment_method": "card",
  "idempotency_key": "string"
}
optionwhat 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

codespar shop get-purchases

Where a purchase stands

codespar shop get-purchases [options] <id>
argumentwhat it is
<id>—
optionwhat 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

codespar shop instruments

A person's cards, masked

codespar shop instruments
optionwhat 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

codespar shop | CodeSpar