POST /v1/payouts

Service: affiliates · operationId: (none)

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"
    }
  },
  "required": [
    "affiliate_id",
    "period_start",
    "period_end"
  ]
}

Responses

201 Payout created

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "affiliate_id": {
      "type": "string"
    },
    "amount_cents": {
      "type": "string"
    },
    "commission_count": {
      "type": "integer"
    },
    "period_start": {
      "type": "string"
    },
    "period_end": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "created_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "affiliate_id",
    "amount_cents",
    "commission_count",
    "period_start",
    "period_end",
    "status",
    "created_at"
  ]
}

400 Validation error or no commissions

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

404 Affiliate not found

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

Example

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