Service Catalog API
Endpoints Overview
| Method | Path | Description |
| GET | /prod/api/catalog/items | List catalog items |
| GET | /prod/api/catalog/items/:id | Get catalog item with form schema |
| POST | /prod/api/catalog/items/:id/request | Submit a catalog request |
| GET | /prod/api/catalog/categories | List categories |
| GET | /prod/api/catalog/approvals | List pending approvals for caller |
| POST | /prod/api/catalog/approvals/:id/approve | Approve a request item |
| POST | /prod/api/catalog/approvals/:id/reject | Reject a request item |
List Catalog Items
curl -H "Authorization: Bearer $TOKEN" "https://your-instance.stackflow-tech.com/prod/api/catalog/items?category=hardware&active=true&limit=50"
{
"data": [
{
"id": "cat_item_laptop_pro",
"name": "MacBook Pro 16" M4",
"category": "hardware",
"short_description": "Apple MacBook Pro 16-inch with M4 chip",
"price": 2499.00,
"currency": "USD",
"fulfillment_days": 5,
"active": true,
"requires_approval": true
}
],
"total": 42,
"page": 1,
"limit": 50
}
Get Catalog Item
curl -H "Authorization: Bearer $TOKEN" https://your-instance.stackflow-tech.com/prod/api/catalog/items/cat_item_vpn_access
{
"id": "cat_item_vpn_access",
"name": "VPN Access Request",
"category": "access",
"form_schema": {
"fields": [
{"name": "vpn_region", "type": "select", "label": "VPN Region", "options": ["us-east-1","eu-west-1","ap-southeast-1"], "required": true},
{"name": "access_level", "type": "select", "label": "Access Level", "options": ["standard","privileged"], "required": true},
{"name": "justification", "type": "textarea", "label": "Business Justification", "required": true, "min_length": 20}
]
},
"approval_policy": {
"stages": [
{"approver_type": "manager", "sla_hours": 48},
{"approver_type": "security_team", "condition": "access_level == privileged", "sla_hours": 24}
]
},
"fulfillment_group": "IT Security",
"fulfillment_days": 1
}
Submit Catalog Request
curl -X POST https://your-instance.stackflow-tech.com/prod/api/catalog/items/cat_item_vpn_access/request -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{
"requested_for": "contractor@example.com",
"variables": {
"vpn_region": "us-east-1",
"access_level": "standard",
"justification": "Contractor needs VPN access to complete Q3 project work"
}
}'
Manage Approvals
# List pending approvals for current user
curl -H "Authorization: Bearer $TOKEN" https://your-instance.stackflow-tech.com/prod/api/catalog/approvals?state=pending
# Approve a request item
curl -X POST https://your-instance.stackflow-tech.com/prod/api/catalog/approvals/appr_001/approve -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"comments": "Approved - contractor onboarding confirmed"}'
# Reject a request item
curl -X POST https://your-instance.stackflow-tech.com/prod/api/catalog/approvals/appr_001/reject -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"comments": "Rejected - access level not justified for this role"}'
Field Reference
| Field | Type | Description |
id | string | Catalog item identifier |
name | string | Display name |
category | string | hardware, software, access, service, other |
form_schema | object | JSON schema for request form fields |
approval_policy | object | Multi-stage approval configuration |
price | decimal | Item price (0 if free) |
fulfillment_days | integer | Expected fulfillment time in business days |