Health check endpoints
Varmply Backend API (0.1.0)
Varmply API – MVP backend for campaigns, wallets, authentication, and influencer participation.
Description of the campaign
Objective type for the campaign
Campaign start date (optional)
- Mock serverhttps://docs-staging.varmply.com/_mock/openapi/campaigns
- Local development serverhttp://localhost:3000/campaigns
- Staging environmenthttps://api-staging.varmply.com/campaigns
- Production environmenthttps://api.varmply.com/campaigns
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs-staging.varmply.com/_mock/openapi/campaigns \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"campaignTitle": "Summer Product Launch",
"campaignDescription": "Promote our new summer product line to increase brand awareness",
"campaignObjectiveType": "CAMPAIGN_OBJECTIVE_AWARENESS",
"campaignCurrencyCode": "NGN",
"targetBudgetAmountCents": 1000000,
"campaignStartDateTimestamp": "2024-06-01T00:00:00Z",
"campaignEndDateTimestamp": "2024-08-31T23:59:59Z"
}'Campaign created successfully
Description of the campaign
Objective type for the campaign
Currency code for the campaign
Target budget in cents (null if no target set)
Current lifecycle status of the campaign
Campaign start date (null if not set)
Campaign end date (null if not set)
When the campaign was completed (null if not yet completed)
When the campaign was created
Unique identifier for the associated campaign
Currency code for the escrow
Current balance in the escrow account (cents)
Total amount funded into the escrow (cents)
Total amount released from the escrow (cents)
Total amount refunded from the escrow (cents)
When the escrow was created
{ "campaign": { "campaignId": "campaign_abc123", "ownerUserId": "user_123", "campaignTitle": "Summer Product Launch", "campaignDescription": "Promote our new summer product line to increase brand awareness", "campaignObjectiveType": "CAMPAIGN_OBJECTIVE_AWARENESS", "campaignCurrencyCode": "NGN", "targetBudgetAmountCents": 1000000, "campaignLifeCycleStatus": "CAMPAIGN_DRAFT", "campaignStartDateTimestamp": "2024-06-01T00:00:00Z", "campaignEndDateTimestamp": "2024-08-31T23:59:59Z", "createdAtTimestamp": "2024-01-01T00:00:00Z", "lastUpdatedAtTimestamp": "2024-01-01T00:00:00Z" }, "campaignEscrow": { "escrowId": "escrow_xyz789", "campaignId": "campaign_abc123", "escrowCurrencyCode": "NGN", "currentEscrowBalanceAmountCents": 0, "totalFundedAmountCents": 0, "totalReleasedAmountCents": 0, "totalRefundedAmountCents": 0, "createdAtTimestamp": "2024-01-01T00:00:00Z", "lastUpdatedAtTimestamp": "2024-01-01T00:00:00Z" } }
- Mock serverhttps://docs-staging.varmply.com/_mock/openapi/campaigns/{campaignId}
- Local development serverhttp://localhost:3000/campaigns/{campaignId}
- Staging environmenthttps://api-staging.varmply.com/campaigns/{campaignId}
- Production environmenthttps://api.varmply.com/campaigns/{campaignId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs-staging.varmply.com/_mock/openapi/campaigns/campaign_abc123 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Campaign retrieved successfully
Description of the campaign
Objective type for the campaign
Currency code for the campaign
Target budget in cents (null if no target set)
Current lifecycle status of the campaign
Campaign start date (null if not set)
Campaign end date (null if not set)
When the campaign was completed (null if not yet completed)
When the campaign was created
Unique identifier for the associated campaign
Currency code for the escrow
Current balance in the escrow account (cents)
Total amount funded into the escrow (cents)
Total amount released from the escrow (cents)
Total amount refunded from the escrow (cents)
When the escrow was created
{ "campaign": { "campaignId": "campaign_abc123", "ownerUserId": "user_123", "campaignTitle": "Summer Product Launch", "campaignDescription": "Promote our new summer product line to increase brand awareness", "campaignObjectiveType": "CAMPAIGN_OBJECTIVE_AWARENESS", "campaignCurrencyCode": "NGN", "targetBudgetAmountCents": 1000000, "campaignLifeCycleStatus": "CAMPAIGN_ACTIVE", "campaignStartDateTimestamp": "2024-06-01T00:00:00Z", "campaignEndDateTimestamp": "2024-08-31T23:59:59Z", "createdAtTimestamp": "2024-01-01T00:00:00Z", "lastUpdatedAtTimestamp": "2024-01-01T00:00:00Z" }, "campaignEscrow": { "escrowId": "escrow_xyz789", "campaignId": "campaign_abc123", "escrowCurrencyCode": "NGN", "currentEscrowBalanceAmountCents": 500000, "totalFundedAmountCents": 500000, "totalReleasedAmountCents": 0, "totalRefundedAmountCents": 0, "createdAtTimestamp": "2024-01-01T00:00:00Z", "lastUpdatedAtTimestamp": "2024-01-01T12:00:00Z" } }
- Mock serverhttps://docs-staging.varmply.com/_mock/openapi/campaigns/{campaignId}/summary
- Local development serverhttp://localhost:3000/campaigns/{campaignId}/summary
- Staging environmenthttps://api-staging.varmply.com/campaigns/{campaignId}/summary
- Production environmenthttps://api.varmply.com/campaigns/{campaignId}/summary
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs-staging.varmply.com/_mock/openapi/campaigns/campaign_abc123/summary \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Campaign analytics summary retrieved successfully
Description of the campaign
Objective type for the campaign
Currency code for the campaign
Target budget in cents (null if no target set)
Current lifecycle status of the campaign
Campaign start date (null if not set)
Campaign end date (null if not set)
When the campaign was completed (null if not yet completed)
When the campaign was created
Total amount paid out to influencers (cents)
Total platform fees collected (cents)
Current lifecycle status of the campaign
{ "campaign": { "campaignId": "campaign_abc123", "ownerUserId": "user_123", "campaignTitle": "Summer Product Launch", "campaignDescription": "Promote our new summer product line to increase brand awareness", "campaignObjectiveType": "CAMPAIGN_OBJECTIVE_AWARENESS", "campaignCurrencyCode": "NGN", "targetBudgetAmountCents": 1000000, "campaignLifeCycleStatus": "CAMPAIGN_ACTIVE", "campaignStartDateTimestamp": "2024-06-01T00:00:00Z", "campaignEndDateTimestamp": "2024-08-31T23:59:59Z", "completedAtTimestamp": null, "createdAtTimestamp": "2024-01-01T00:00:00Z", "lastUpdatedAtTimestamp": "2024-01-01T00:00:00Z" }, "escrowSummary": { "funded": 500000, "released": 300000, "refunded": 0, "currentBalance": 200000 }, "participationCounts": { "total": 10, "active": 7, "completed": 3 }, "submissionCounts": { "total": 15, "approved": 8, "rejected": 2, "pending": 5 }, "payoutSummary": { "totalInfluencerPayout": 250000, "totalPlatformFee": 50000, "payoutCount": 5 }, "lifecycle": { "status": "CAMPAIGN_ACTIVE", "completedAtTimestamp": null } }
Request
Retrieve campaign ledger transaction events as an activity feed, showing all financial transactions related to a campaign in chronological order (newest first). Returns 200 OK on success, 404 if campaign not found. Supports optional limit query parameter (default 50). Requires a valid JWT access token.
- Mock serverhttps://docs-staging.varmply.com/_mock/openapi/campaigns/{campaignId}/ledger
- Local development serverhttp://localhost:3000/campaigns/{campaignId}/ledger
- Staging environmenthttps://api-staging.varmply.com/campaigns/{campaignId}/ledger
- Production environmenthttps://api.varmply.com/campaigns/{campaignId}/ledger
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs-staging.varmply.com/_mock/openapi/campaigns/campaign_abc123/ledger?limit=50' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Campaign ledger events retrieved successfully
When the transaction occurred
Type of ledger transaction
Ledger lines with negative amounts (sources)
Type of ledger account
Reference identifier for the account (user ID, campaign ID, or PLATFORM_WALLET)
Ledger lines with positive amounts (destinations)
Type of ledger account
Reference identifier for the account (user ID, campaign ID, or PLATFORM_WALLET)
[ { "transactionId": "ledger_tx_abc123", "occurredAtTimestamp": "2024-01-15T10:30:00Z", "transactionType": "LEDGER_ENTRY_TRANSACTION_TYPE_INFLUENCER_PAYOUT_GROSS", "description": "Influencer payout", "totalAmountCents": 10000, "currencyCode": "NGN", "fromAccounts": [ … ], "toAccounts": [ … ] }, { "transactionId": "ledger_tx_def456", "occurredAtTimestamp": "2024-01-10T08:00:00Z", "transactionType": "LEDGER_ENTRY_TRANSACTION_TYPE_ESCROW_FUNDING", "description": "Escrow funded", "totalAmountCents": 50000, "currencyCode": "NGN", "fromAccounts": [ … ], "toAccounts": [ … ] } ]
Request
Retrieve time-series timeline data for a campaign with daily buckets showing cumulative payouts, escrow balance, participation counts, and approved submission counts over time. Returns 200 OK on success, 404 if campaign not found. Supports optional limitDays query parameter to limit the number of days returned. Requires a valid JWT access token.
- Mock serverhttps://docs-staging.varmply.com/_mock/openapi/campaigns/{campaignId}/timeline
- Local development serverhttp://localhost:3000/campaigns/{campaignId}/timeline
- Staging environmenthttps://api-staging.varmply.com/campaigns/{campaignId}/timeline
- Production environmenthttps://api.varmply.com/campaigns/{campaignId}/timeline
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs-staging.varmply.com/_mock/openapi/campaigns/campaign_abc123/timeline?limitDays=30' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Campaign timeline retrieved successfully
Timeline data points, one per day
Date of the bucket in YYYY-MM-DD format
Start of the bucket (00:00:00)
End of the bucket (23:59:59.999)
Cumulative total of all payouts up to this bucket
Remaining escrow balance at the end of this bucket
Cumulative total of participations up to this bucket
{ "campaignId": "campaign_abc123", "bucketGranularity": "DAY", "points": [ { … }, { … }, { … } ] }
- Mock serverhttps://docs-staging.varmply.com/_mock/openapi/campaigns/{campaignId}/fund
- Local development serverhttp://localhost:3000/campaigns/{campaignId}/fund
- Staging environmenthttps://api-staging.varmply.com/campaigns/{campaignId}/fund
- Production environmenthttps://api.varmply.com/campaigns/{campaignId}/fund
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs-staging.varmply.com/_mock/openapi/campaigns/campaign_abc123/fund \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"fundingAmountCents": 500000,
"walletCurrencyCode": "NGN"
}'Campaign funded successfully
Description of the campaign
Objective type for the campaign
Currency code for the campaign
Target budget in cents (null if no target set)
Current lifecycle status of the campaign
Campaign start date (null if not set)
Campaign end date (null if not set)
When the campaign was completed (null if not yet completed)
When the campaign was created
Unique identifier for the associated campaign
Currency code for the escrow
Current balance in the escrow account (cents)
Total amount funded into the escrow (cents)
Total amount released from the escrow (cents)
Total amount refunded from the escrow (cents)
When the escrow was created
{ "campaign": { "campaignId": "campaign_abc123", "ownerUserId": "user_123", "campaignTitle": "Summer Product Launch", "campaignDescription": "Promote our new summer product line", "campaignObjectiveType": "CAMPAIGN_OBJECTIVE_AWARENESS", "campaignCurrencyCode": "NGN", "targetBudgetAmountCents": 1000000, "campaignLifeCycleStatus": "CAMPAIGN_ACTIVE", "campaignStartDateTimestamp": "2024-06-01T00:00:00Z", "campaignEndDateTimestamp": "2024-08-31T23:59:59Z", "completedAtTimestamp": null, "createdAtTimestamp": "2024-01-01T00:00:00Z", "lastUpdatedAtTimestamp": "2024-01-01T00:00:00Z" }, "campaignEscrow": { "escrowId": "escrow_xyz789", "campaignId": "campaign_abc123", "escrowCurrencyCode": "NGN", "currentEscrowBalanceAmountCents": 500000, "totalFundedAmountCents": 500000, "totalReleasedAmountCents": 0, "totalRefundedAmountCents": 0, "createdAtTimestamp": "2024-01-01T00:00:00Z", "lastUpdatedAtTimestamp": "2024-01-01T12:00:00Z" } }
Request
Finalize a campaign if completion conditions are met. Only the campaign owner can finalize their campaign. Completion requires either: campaign endDate has passed OR escrow balance is zero. Returns 200 OK with updated campaign on success, 400 if not eligible. Requires a valid JWT access token.
- Mock serverhttps://docs-staging.varmply.com/_mock/openapi/campaigns/{campaignId}/finalize
- Local development serverhttp://localhost:3000/campaigns/{campaignId}/finalize
- Staging environmenthttps://api-staging.varmply.com/campaigns/{campaignId}/finalize
- Production environmenthttps://api.varmply.com/campaigns/{campaignId}/finalize
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs-staging.varmply.com/_mock/openapi/campaigns/campaign_abc123/finalize \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Campaign finalized successfully
Description of the campaign
Objective type for the campaign
Currency code for the campaign
Target budget in cents (null if no target set)
Current lifecycle status of the campaign
Campaign start date (null if not set)
Campaign end date (null if not set)
When the campaign was completed (null if not yet completed)
When the campaign was created
Unique identifier for the associated campaign
Currency code for the escrow
Current balance in the escrow account (cents)
Total amount funded into the escrow (cents)
Total amount released from the escrow (cents)
Total amount refunded from the escrow (cents)
When the escrow was created
{ "campaign": { "campaignId": "campaign_abc123", "ownerUserId": "user_123", "campaignTitle": "Summer Product Launch", "campaignDescription": "Promote our new summer product line to increase brand awareness", "campaignObjectiveType": "CAMPAIGN_OBJECTIVE_AWARENESS", "campaignCurrencyCode": "NGN", "targetBudgetAmountCents": 1000000, "campaignLifeCycleStatus": "CAMPAIGN_COMPLETED_WITH_REFUND", "campaignStartDateTimestamp": "2024-06-01T00:00:00Z", "campaignEndDateTimestamp": "2024-08-31T23:59:59Z", "completedAtTimestamp": "2024-09-01T00:00:00Z", "createdAtTimestamp": "2024-01-01T00:00:00Z", "lastUpdatedAtTimestamp": "2024-09-01T00:00:00Z" }, "campaignEscrow": { "escrowId": "escrow_xyz789", "campaignId": "campaign_abc123", "escrowCurrencyCode": "NGN", "currentEscrowBalanceAmountCents": 0, "totalFundedAmountCents": 500000, "totalReleasedAmountCents": 300000, "totalRefundedAmountCents": 200000, "createdAtTimestamp": "2024-01-01T00:00:00Z", "lastUpdatedAtTimestamp": "2024-09-01T00:00:00Z" } }