# Get campaign payout preview Returns a read-only payout preview for a campaign showing calculated payouts per participation based on metrics and a default payout formula, compared against available escrow balance. Only the campaign owner can view payout previews. This endpoint does not execute any payouts. Endpoint: GET /analytics/campaigns/{campaignId}/payout-preview Version: 0.1.0 Security: bearerAuth ## Path parameters: - `campaignId` (string, required) Unique identifier for the campaign Example: "campaign_abc123" ## Response 200 fields (application/json): - `campaignId` (string, required) Unique identifier for the campaign Example: "campaign_abc123" - `campaignCurrencyCode` (string, required) Currency code for the campaign Enum: "NGN", "USD" - `escrowAvailableAmountCents` (integer, required) Current available escrow balance in cents Example: 5000000 - `totalRequestedPayoutAmountCents` (integer, required) Total requested payout amount across all participations in cents Example: 3200000 - `shortfallAmountCents` (integer, required) Shortfall amount if escrow is insufficient (0 if escrow covers all payouts) - `participationPayoutList` (array, required) List of participation payout previews - `participationPayoutList.participationId` (string, required) Unique identifier for the participation Example: "participation_xyz789" - `participationPayoutList.influencerUserId` (string, required) Unique identifier for the influencer user Example: "user_123" - `participationPayoutList.externalMediaId` (string, required) External media ID from the latest snapshot Example: "abc123" - `participationPayoutList.impressions` (integer, required) Impressions from the latest snapshot Example: 2592 - `participationPayoutList.reach` (integer, required) Reach from the latest snapshot Example: 2023 - `participationPayoutList.likes` (integer, required) Likes from the latest snapshot Example: 192 - `participationPayoutList.comments` (integer, required) Comments from the latest snapshot Example: 112 - `participationPayoutList.saves` (integer, required) Saves from the latest snapshot Example: 24 - `participationPayoutList.shares` (integer, required) Shares from the latest snapshot Example: 5 - `participationPayoutList.lastMetricsSyncedAtTimestamp` (string,null, required) Last time metrics were synced for this participation Example: "2025-11-27T08:30:49.957Z" - `participationPayoutList.latestSnapshotFetchedAtTimestamp` (string, required) FetchedAtTimestamp of the latest snapshot Example: "2025-11-27T08:30:49.957Z" - `participationPayoutList.grossPayoutAmountCents` (integer, required) Calculated gross payout amount for this participation in cents Example: 80000 ## Response 401 fields (application/json): - `error` (string, required) Error code that identifies the type of error. This is a stable identifier that can be used for programmatic error handling. Common codes include: - NOT_FOUND - Resource not found - VALIDATION_ERROR - Input validation failed - PERMISSION_DENIED - User lacks permission for the action - CONFLICT - Request conflicts with current resource state - UNAUTHORIZED - Authentication required - INTERNAL_SERVER_ERROR - Unexpected server error Example: "VALIDATION_ERROR" - `message` (string, required) User-friendly error message that should always be displayed to end users. This message is designed to be clear, actionable, and free of technical details. This field is always present and contains the primary message for end users. Example: "The email address you entered is not valid. Please check the format and try again." - `technicalMessage` (string) Optional technical message for developers. Contains detailed information including IDs, error codes, and technical context. Only included when it differs from the user-friendly message field. When present, developers can use this for debugging while end users should see the message field. Example: "Campaign with ID campaign_123 not found" - `details` (object) Additional error details (optional). May contain structured information about the error, such as validation field errors or additional context. - `requestId` (string) Unique request identifier for tracing. Included in X-Request-ID header and can be used to correlate errors with server logs. Example: "550e8400-e29b-41d4-a716-446655440000" - `timestamp` (string, required) ISO 8601 timestamp when the error occurred Example: "2024-01-01T00:00:00Z" ## Response 403 fields (application/json): - `error` (string, required) Error code that identifies the type of error. This is a stable identifier that can be used for programmatic error handling. Common codes include: - NOT_FOUND - Resource not found - VALIDATION_ERROR - Input validation failed - PERMISSION_DENIED - User lacks permission for the action - CONFLICT - Request conflicts with current resource state - UNAUTHORIZED - Authentication required - INTERNAL_SERVER_ERROR - Unexpected server error Example: "VALIDATION_ERROR" - `message` (string, required) User-friendly error message that should always be displayed to end users. This message is designed to be clear, actionable, and free of technical details. This field is always present and contains the primary message for end users. Example: "The email address you entered is not valid. Please check the format and try again." - `technicalMessage` (string) Optional technical message for developers. Contains detailed information including IDs, error codes, and technical context. Only included when it differs from the user-friendly message field. When present, developers can use this for debugging while end users should see the message field. Example: "Campaign with ID campaign_123 not found" - `details` (object) Additional error details (optional). May contain structured information about the error, such as validation field errors or additional context. - `requestId` (string) Unique request identifier for tracing. Included in X-Request-ID header and can be used to correlate errors with server logs. Example: "550e8400-e29b-41d4-a716-446655440000" - `timestamp` (string, required) ISO 8601 timestamp when the error occurred Example: "2024-01-01T00:00:00Z" ## Response 404 fields (application/json): - `error` (string, required) Error code that identifies the type of error. This is a stable identifier that can be used for programmatic error handling. Common codes include: - NOT_FOUND - Resource not found - VALIDATION_ERROR - Input validation failed - PERMISSION_DENIED - User lacks permission for the action - CONFLICT - Request conflicts with current resource state - UNAUTHORIZED - Authentication required - INTERNAL_SERVER_ERROR - Unexpected server error Example: "VALIDATION_ERROR" - `message` (string, required) User-friendly error message that should always be displayed to end users. This message is designed to be clear, actionable, and free of technical details. This field is always present and contains the primary message for end users. Example: "The email address you entered is not valid. Please check the format and try again." - `technicalMessage` (string) Optional technical message for developers. Contains detailed information including IDs, error codes, and technical context. Only included when it differs from the user-friendly message field. When present, developers can use this for debugging while end users should see the message field. Example: "Campaign with ID campaign_123 not found" - `details` (object) Additional error details (optional). May contain structured information about the error, such as validation field errors or additional context. - `requestId` (string) Unique request identifier for tracing. Included in X-Request-ID header and can be used to correlate errors with server logs. Example: "550e8400-e29b-41d4-a716-446655440000" - `timestamp` (string, required) ISO 8601 timestamp when the error occurred Example: "2024-01-01T00:00:00Z" ## Response 503 fields (application/json): - `error` (string, required) Error code that identifies the type of error. This is a stable identifier that can be used for programmatic error handling. Common codes include: - NOT_FOUND - Resource not found - VALIDATION_ERROR - Input validation failed - PERMISSION_DENIED - User lacks permission for the action - CONFLICT - Request conflicts with current resource state - UNAUTHORIZED - Authentication required - INTERNAL_SERVER_ERROR - Unexpected server error Example: "VALIDATION_ERROR" - `message` (string, required) User-friendly error message that should always be displayed to end users. This message is designed to be clear, actionable, and free of technical details. This field is always present and contains the primary message for end users. Example: "The email address you entered is not valid. Please check the format and try again." - `technicalMessage` (string) Optional technical message for developers. Contains detailed information including IDs, error codes, and technical context. Only included when it differs from the user-friendly message field. When present, developers can use this for debugging while end users should see the message field. Example: "Campaign with ID campaign_123 not found" - `details` (object) Additional error details (optional). May contain structured information about the error, such as validation field errors or additional context. - `requestId` (string) Unique request identifier for tracing. Included in X-Request-ID header and can be used to correlate errors with server logs. Example: "550e8400-e29b-41d4-a716-446655440000" - `timestamp` (string, required) ISO 8601 timestamp when the error occurred Example: "2024-01-01T00:00:00Z"