Skip to content

ulams vouchers

Generated from front/cli (ulams schema)

Create Voucher.

Kind: write. Stability: stable. MCP tool: vouchers_create. Scopes: commerce:write.

Endpoints: POST /api/admin/vouchers.

Flag Type Required Description
--active array
--active-from unknown active_from
--active-to unknown active_to
--amount integer yes amount
--code string yes code
--exclude-promotions array
--excluded-categories array
--excluded-products array
--id integer id
--included-categories array
--included-products array
--limit-per-user integer limit_per_user
--limit-usage integer limit_usage
--max-cart-price integer max_cart_price
--min-cart-price integer min_cart_price
--name string name
--type string yes type
--users array
Terminal window
# Create Voucher
ulams vouchers create --amount text --code text --type text --json
Input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"active": {
"type": "array",
"items": {
"type": "boolean"
}
},
"active_from": {
"description": "active_from"
},
"active_to": {
"description": "active_to"
},
"amount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "amount"
},
"code": {
"type": "string",
"description": "code"
},
"exclude_promotions": {
"type": "array",
"items": {
"type": "boolean"
}
},
"excluded_categories": {
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"excluded_products": {
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"id": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "id"
},
"included_categories": {
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"included_products": {
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"limit_per_user": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "limit_per_user"
},
"limit_usage": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "limit_usage"
},
"max_cart_price": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "max_cart_price"
},
"min_cart_price": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "min_cart_price"
},
"name": {
"type": "string",
"description": "name"
},
"type": {
"type": "string",
"description": "type"
},
"users": {
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
}
},
"required": [
"amount",
"code",
"type"
],
"additionalProperties": {}
}

Delete Voucher.

Kind: destructive (idempotent). Stability: stable. MCP tool: vouchers_delete. Scopes: commerce:write.

Endpoints: DELETE /api/admin/vouchers/{id}.

Flag Type Required Description
--id (positional) integer yes id of Voucher
Terminal window
# Delete Voucher
ulams vouchers delete 1 --json
Input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "id of Voucher"
}
},
"required": [
"id"
],
"additionalProperties": {}
}

Read Voucher.

Kind: read (idempotent). Stability: stable. MCP tool: vouchers_get. Scopes: commerce:read.

Endpoints: GET /api/admin/vouchers/{id}.

Flag Type Required Description
--id (positional) integer yes id of Voucher
Terminal window
# Read Voucher
ulams vouchers get 1 --json
Input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "id of Voucher"
}
},
"required": [
"id"
],
"additionalProperties": {}
}

Get a listing of the Vouchers.

Kind: read (idempotent). Stability: stable. MCP tool: vouchers_list. Scopes: commerce:read.

Endpoints: GET /api/admin/vouchers.

Flag Type Required Description
--page number Pagination Page Number
--per-page number Pagination Per Page
Terminal window
# Get a listing of the Vouchers
ulams vouchers list --json
Input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"page": {
"type": "number",
"description": "Pagination Page Number"
},
"per_page": {
"type": "number",
"description": "Pagination Per Page"
}
},
"additionalProperties": {}
}

Update Voucher.

Kind: write. Stability: stable. MCP tool: vouchers_update. Scopes: commerce:write.

Endpoints: PATCH /api/admin/vouchers/{id}.

Flag Type Required Description
--id (positional) integer yes id of Voucher
--active array
--active-from unknown active_from
--active-to unknown active_to
--amount integer amount
--code string code
--exclude-promotions array
--excluded-categories array
--excluded-products array
--included-categories array
--included-products array
--limit-per-user integer limit_per_user
--limit-usage integer limit_usage
--max-cart-price integer max_cart_price
--min-cart-price integer min_cart_price
--name string name
--type string type
--users array
Terminal window
# Update Voucher
ulams vouchers update 1 --json
Input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "id of Voucher"
},
"active": {
"type": "array",
"items": {
"type": "boolean"
}
},
"active_from": {
"description": "active_from"
},
"active_to": {
"description": "active_to"
},
"amount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "amount"
},
"code": {
"type": "string",
"description": "code"
},
"exclude_promotions": {
"type": "array",
"items": {
"type": "boolean"
}
},
"excluded_categories": {
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"excluded_products": {
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"included_categories": {
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"included_products": {
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"limit_per_user": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "limit_per_user"
},
"limit_usage": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "limit_usage"
},
"max_cart_price": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "max_cart_price"
},
"min_cart_price": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "min_cart_price"
},
"name": {
"type": "string",
"description": "name"
},
"type": {
"type": "string",
"description": "type"
},
"users": {
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
}
},
"required": [
"id"
],
"additionalProperties": {}
}