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.22.2.

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 prp_0000000000000000
argumentwhat it is
<id>The purchase proposal id (prp_...), from POST /v1/shop/agent/purchases.
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 -q owner=string
argumentwhat it is
-q owner=<owner>Required. The person whose masked cards the assistant may reference.
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