sndev.io / docs

catalog-order

Order a catalog item via the Service Catalog API.

The catalog-order command submits a catalog item order using the ServiceNow Service Catalog API (/api/sn_sc/servicecatalog/items/{id}/order_now). Returns the REQ number and sys_id. Use --vars to pass variable values, --for to order on behalf of another user.
sn catalog-order <item_sys_id> [--vars '{...}'] [--quantity N] [--for <user_sys_id>] [--json]

Order a catalog item via the Service Catalog API.

Arguments

NameRequiredDescription
item_sys_idYessys_id of the catalog item (sc_cat_item table).

Flags

FlagDefaultDescription
--varsJSON object of variable name/value pairs.
--quantity1Number of items to order.
--forsys_id of the user to order on behalf of.
--jsonOutput full result as JSON.

Examples

sn catalog-order 04b7e94b4f7b4200086eeed18110c7fd --vars '{"acrobat":"true"}'
REQ0010006 (7836ad4a8384c310d3cfe5d0deaad30d)
sn catalog-order 04b7e94b4f7b4200086eeed18110c7fd --json
{
"requestNumber": "REQ0010006",
"requestId": "7836ad4a...",
"sysId": "7836ad4a...",
"table": "sc_request"
}
This command creates real records (REQ, RITM) on the instance. Each invocation creates a new request — it is not idempotent. Use catalog-vars first to discover available variables.