v2026.1 Open Portal ↗
On this page

Requests & RITM API

Endpoints Overview

MethodPathDescription
GET/prod/api/requestsList service requests
GET/prod/api/requests/:idGet service request
POST/prod/api/requestsSubmit new service request
PATCH/prod/api/requests/:idUpdate request
GET/prod/api/requests/:id/itemsList RITM items on request
GET/prod/api/ritm/:idGet single RITM item
PATCH/prod/api/ritm/:idUpdate RITM item state
POST/prod/api/ritm/:id/approveApprove RITM (approver role)
POST/prod/api/ritm/:id/rejectReject RITM (approver role)

List Requests

curl -H "Authorization: Bearer $TOKEN"   "https://your-instance.stackflow-tech.com/prod/api/requests?state=pending_approval&limit=25"

Get Request

{
  "id": "REQ0000789",
  "catalog_item_id": "cat_item_laptop_pro",
  "short_description": "Request for MacBook Pro 16" M4",
  "state": "pending_approval",
  "requested_by": "bob.jones@example.com",
  "requested_for": "bob.jones@example.com",
  "items": [
    {"id": "RITM0001001", "catalog_item": "MacBook Pro 16 M4", "quantity": 1, "state": "pending_approval"}
  ],
  "approvals": [
    {"approver": "manager@example.com", "state": "pending", "due_at": "2026-05-21T17:00:00Z"}
  ],
  "created_at": "2026-05-19T10:00:00Z"
}

Submit Service Request

curl -X POST   https://your-instance.stackflow-tech.com/prod/api/requests   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{
    "catalog_item_id": "cat_item_vpn_access",
    "requested_for": "newuser@example.com",
    "variables": {
      "vpn_region": "us-east-1",
      "access_level": "standard",
      "justification": "Remote work from home office"
    }
  }'

RITM Items

Each service request can have one or more RITM (Request Item) records, one per catalog item ordered. RITM items are fulfilled independently and may have different assignment groups and approval chains.

# Get a specific RITM
curl -H "Authorization: Bearer $TOKEN"   https://your-instance.stackflow-tech.com/prod/api/ritm/RITM0001001

# Update RITM state (fulfiller)
curl -X PATCH   https://your-instance.stackflow-tech.com/prod/api/ritm/RITM0001001   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{"state": "in_fulfillment", "work_note": "Ordered from vendor, ETA 3 business days"}'

Approval State Machine

RITM States:
  pending_approval → approved → in_fulfillment → fulfilled → closed
  pending_approval → rejected → cancelled
  in_fulfillment → on_hold → in_fulfillment
  in_fulfillment → cancelled

Approval workflow (multi-stage):
  Stage 1: Direct manager approval (auto-assigned based on org chart)
  Stage 2: Department head (if cost > $1000)
  Stage 3: Finance approval (if cost > $5000)
  
  Each stage has a configurable SLA (default: 48 hours per stage)

Field Reference

FieldTypeDescription
catalog_item_idstringService catalog item ID (required)
requested_forstringEmail of user the request is for
variablesobjectCatalog item form variables (key-value)
stateenumdraft, submitted, pending_approval, approved, in_fulfillment, fulfilled, closed, cancelled, rejected
approvalsarrayApproval chain with approver, state, due_at