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.
catalog-order
Order a catalog item via the Service Catalog API.
sn catalog-order <item_sys_id> [--vars '{...}'] [--quantity N] [--for <user_sys_id>] [--json] Order a catalog item via the Service Catalog API.
Arguments
| Name | Required | Description |
|---|---|---|
| item_sys_id | Yes | sys_id of the catalog item (sc_cat_item table). |
Flags
| Flag | Default | Description |
|---|---|---|
| --vars | — | JSON object of variable name/value pairs. |
| --quantity | 1 | Number of items to order. |
| --for | — | sys_id of the user to order on behalf of. |
| --json | — | Output 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.