API ReferenceapiaffiliatesPOST /v1/commissions/verify

POST /v1/commissions/verify

Service: affiliates · operationId: (none)

Verify commission accruals against expected totals

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "affiliate_id": {
      "type": "string",
      "minLength": 1
    },
    "period_start": {
      "type": "string",
      "format": "date-time"
    },
    "period_end": {
      "type": "string",
      "format": "date-time"
    },
    "expected_cents": {
      "type": "string",
      "description": "Expected total in cents as string"
    }
  },
  "required": [
    "affiliate_id",
    "period_start",
    "period_end",
    "expected_cents"
  ]
}

Responses

200 Verification result

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "affiliate_id": {
      "type": "string"
    },
    "period_start": {
      "type": "string"
    },
    "period_end": {
      "type": "string"
    },
    "expected_cents": {
      "type": "string"
    },
    "actual_cents": {
      "type": "string"
    },
    "commission_count": {
      "type": "integer"
    },
    "discrepancy_cents": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pass",
        "fail"
      ]
    },
    "verified_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "affiliate_id",
    "period_start",
    "period_end",
    "expected_cents",
    "actual_cents",
    "commission_count",
    "discrepancy_cents",
    "status",
    "verified_at"
  ]
}

400 Validation error

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://affiliates.platform.loop.health/v1/commissions/verify \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'