v1

latestOpenAPI 3.0.32026-07-24614422630.2 KB
Approvals

Get complete approval history for an order

Returns comprehensive approval workflow history including all submission attempts and approver activity.

Important: This endpoint returns ONLY approval domain data with user IDs and comment IDs as references. To get full details:

  • User details: Call GET /users with user IDs from this response
  • Order details: Call GET /orders/{orderId}
  • Comment messages: Call GET /orders/{orderId}/comments

The response includes:

  • All submission attempts (if order was rejected and resubmitted)
  • All workflows triggered for each submission
  • Detailed approval states with approver user IDs (not names)
  • Summary statistics across all attempts
get/orders/{orderId}/approvalHistory

Path parameters

orderIdstring required

ID of the order to retrieve approval history for

Response

Successfully retrieved approval history

orderIdstring required

Order ID reference

orderStatus'DRAFT' | 'SUBMITTED' | 'APPROVED' | 'EXECUTED' | 'EXPIRED' required

Status of the order

currentAttemptinteger required

Current approval attempt number

Example response

{
  "orderId": "ORD-9FB8TW8",
  "orderStatus": "APPROVED",
  "currentAttempt": 2,
  "currentSubmission": {
    "attemptNumber": 1,
    "submittedAt": 1762509000,
    "submittedBy": "kaitlyn.underwood@company.com",
    "submitterNote": "End of quarter deal",
    "status": "FULLY_APPROVED",
    "fullyApprovedAt": 1762509000,
    "rejectedAt": 1762509000,
    "totalApprovalTime": 5400,
    "workflows": [
      {
        "workflowId": "APRV-D4P10",
        "workflowName": "Discount > 10% and <= 25%",
        "smartApprovalEnabled": true,
        "status": "APPROVED",
        "triggeredAt": 1762509000,
        "completedAt": 1762509000,
        "totalDuration": 5400,
        "approvers": [
          {
            "level": 1,
            "approver": "sumit.subskribe@company.com",
            "status": "APPROVED",
            "assignedAt": 1762509000,
            "respondedAt": 1762509000,
            "duration": 2700,
            "originalApprovalAt": 1762509000
          }
        ]
      }
    ]
  },
  "approvalHistory": [
    {
      "attemptNumber": 1,
      "submittedAt": 1762509000,
      "submittedBy": "kaitlyn.underwood@company.com",
      "submitterNote": "End of quarter deal",
      "status": "FULLY_APPROVED",
      "fullyApprovedAt": 1762509000,
      "rejectedAt": 1762509000,
      "totalApprovalTime": 5400,
      "workflows": [
        {
          "workflowId": "APRV-D4P10",
          "workflowName": "Discount > 10% and <= 25%",
          "smartApprovalEnabled": true,
          "status": "APPROVED",
          "triggeredAt": 1762509000,
          "completedAt": 1762509000,
          "totalDuration": 5400,
          "approvers": [
            {
              "level": 1,
              "approver": "sumit.subskribe@company.com",
              "status": "APPROVED",
              "assignedAt": 1762509000,
              "respondedAt": 1762509000,
              "duration": 2700,
              "originalApprovalAt": 1762509000
            }
          ]
        }
      ]
    }
  ],
  "summary": {
    "totalAttempts": 2,
    "firstSubmittedAt": 1762509000,
    "lastUpdatedAt": 1762514400,
    "totalTimeSeconds": 23400,
    "totalWorkflows": 2
  }
}