API ReferenceapiaffiliatesPOST /v1/admin/payouts/{id}/approve

POST /v1/admin/payouts/\{id\}/approve

Service: affiliates · operationId: (none)

Approve a payout for execution. Audit-logged via auditMiddleware.

Required scopes

(no scope declared — review service config)

Path parameters

  • id (string) required

Responses

200 Payout approved

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "affiliate_id": {
      "type": "string"
    },
    "currency": {
      "type": "string"
    },
    "gross_amount_cents": {
      "type": "string"
    },
    "reversal_amount_cents": {
      "type": "string"
    },
    "amount_cents": {
      "type": "string"
    },
    "recovery_owed_cents": {
      "type": "string"
    },
    "commission_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "commission_count": {
      "type": "integer"
    },
    "period_start": {
      "type": "string"
    },
    "period_end": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "approved_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "approved_by": {
      "type": [
        "string",
        "null"
      ]
    },
    "paid_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "external_ref": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "affiliate_id",
    "currency",
    "gross_amount_cents",
    "reversal_amount_cents",
    "amount_cents",
    "recovery_owed_cents",
    "commission_ids",
    "commission_count",
    "period_start",
    "period_end",
    "status",
    "approved_at",
    "approved_by",
    "paid_at",
    "external_ref",
    "created_at"
  ]
}

404 Payout not found

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

Example

curl -X POST https://affiliates.platform.loop.health/v1/admin/payouts/{id}/approve \
  -H "Authorization: Bearer $ACCESS_TOKEN"