REST API Reference
Ignition Crowdfunding registers a REST API under the igcf/v1 namespace. All endpoints follow the WordPress REST API conventions.
Authentication
Section titled “Authentication”Public endpoints (campaign listing, single campaign view, settings) require no authentication. Write operations require authentication via:
- Cookie + nonce — The built-in method used by
wp.apiFetchon the frontend. The nonce is automatically included when scripts declarewp-api-fetchas a dependency. - Application Passwords — For external integrations. See WordPress Application Passwords.
Schema discovery
Section titled “Schema discovery”GET /wp-json/igcf/v1Returns all registered routes and their schemas.
Campaigns
Section titled “Campaigns”Base route: /igcf/v1/campaigns
List campaigns
Section titled “List campaigns”GET /igcf/v1/campaignsPermission: Public. Unauthenticated requests see only public statuses (igcf_active, igcf_preview, igcf_ended). Authenticated users with edit_others_igcf_campaigns can query all statuses.
Query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
integer |
1 |
Current page of the collection. |
per_page |
integer |
10 |
Maximum number of items per page (max 100). |
search |
string |
— | Search term to filter campaigns. |
status |
string|array |
— | Limit to one or more statuses. |
category |
integer |
— | Limit to a campaign category term ID. |
tag |
integer |
— | Limit to a campaign tag term ID. |
featured |
boolean |
— | Limit to featured or non-featured campaigns. |
funding_model |
string |
— | flexible or fixed. |
author |
integer |
— | Limit to campaigns by a specific user ID. |
orderby |
string |
date |
One of: date, modified, title, relevance, id, include, menu_order. |
order |
string |
desc |
asc or desc. |
Filterable: The WP_Query args can be modified with the igcf_rest_campaigns_query_args filter.
Get a campaign
Section titled “Get a campaign”GET /igcf/v1/campaigns/{id}Permission: Public statuses are visible to all. Non-public statuses require the campaign author or edit_others_igcf_campaigns.
| Parameter | Type | Description |
|---|---|---|
id |
integer |
Campaign ID. |
context |
string |
view (default) or edit. Edit context includes raw field values. |
Create a campaign
Section titled “Create a campaign”POST /igcf/v1/campaignsPermission: edit_igcf_campaigns capability (Campaign Creator or Administrator).
Optional top-level fields:
| Field | Type | Default | Description |
|---|---|---|---|
is_test |
boolean |
false |
When true, the campaign is promoted to the igcf_test status with the [TEST] title prefix. Requires edit_others_igcf_campaigns — non-admin callers receive WP_Error('igcf_test_capability', …). Edit context only. |
Update a campaign
Section titled “Update a campaign”PUT/PATCH /igcf/v1/campaigns/{id}Permission: Campaign author with edit_igcf_campaigns, or edit_others_igcf_campaigns.
Delete a campaign
Section titled “Delete a campaign”DELETE /igcf/v1/campaigns/{id}Permission: delete_igcf_campaign (post-level capability).
| Parameter | Type | Default | Description |
|---|---|---|---|
force |
boolean |
false |
Bypass trash and permanently delete. |
Set the focal point
Section titled “Set the focal point”POST /igcf/v1/campaigns/{id}/focal-pointPUT /igcf/v1/campaigns/{id}/focal-pointPersist a focal point on the supplied attachment and regenerate its sized variants (hero, card, thumb, and any theme-registered sizes that are hard-cropped). The attachment ID is sent explicitly because the client may know the just-uploaded ID before the campaign form is saved (the campaign’s _thumbnail_id may still reference the previous image).
Permission: Same as updating the parent campaign — edit_igcf_campaign post-level capability — plus a check on the image itself. The caller must have uploaded the image, or have edit_others_igcf_campaigns and the image must belong to this campaign: its featured image, an image attached to it, or a starter image. Otherwise the request is refused with igcf_focal_cannot_edit_attachment (401 or 403). This stops someone who moderates campaigns from re-cropping an arbitrary image in the media library.
| Parameter | Type | Required | Description |
|---|---|---|---|
attachment_id |
integer |
Yes | Attachment post ID whose focal point is being set. Must be a valid attachment. |
focal_x |
number |
Yes | Horizontal focal point as a 0–100 percentage. |
focal_y |
number |
Yes | Vertical focal point as a 0–100 percentage. |
The focal point is stored on the attachment as _igcf_focal_x / _igcf_focal_y post meta. Sized variants are regenerated in place — no new attachments are created. If the attachment file is missing or regeneration fails, a WP_Error is returned.
Campaign schema
Section titled “Campaign schema”| Field | Type | Contexts | Writable | Description |
|---|---|---|---|---|
id |
integer |
view, edit, embed | No | Unique identifier. |
title |
object |
view, edit, embed | Yes | { raw, rendered } — raw available in edit context only. |
content |
object |
view, edit | Yes | { raw, rendered } — raw available in edit context only. |
excerpt |
object |
view, edit, embed | Yes | { raw, rendered } — raw available in edit context only. |
status |
string |
view, edit | Yes | Campaign status slug. |
status_label |
string |
view, edit | No | Human-readable status label. |
author |
integer |
view, edit, embed | Yes | Author user ID. |
date |
string |
view, edit, embed | No | Publish date (RFC 3339). |
modified |
string |
view, edit | No | Last modified date (RFC 3339). |
link |
string |
view, edit, embed | No | Permalink URL. |
meta |
object |
view, edit | Yes | See meta fields below. |
categories |
integer[] |
view, edit | Yes | Campaign category term IDs. |
tags |
integer[] |
view, edit | Yes | Campaign tag term IDs. |
featured_image |
object |
view, edit, embed | Yes | { id, url } — send { id } to set, url is read-only. |
Meta fields:
| Field | Type | Description |
|---|---|---|
meta.goal |
number |
Funding goal amount. |
meta.funding_model |
string |
flexible or fixed. |
meta.start_date |
string |
Start date (Y-m-d). |
meta.end_date |
string |
End date (Y-m-d). |
meta.featured |
boolean |
Whether the campaign is featured. |
meta.video_url |
string |
Campaign video URL (YouTube, Vimeo, or other WordPress oEmbed provider). Must be a valid embeddable URL. |
Campaign Updates
Section titled “Campaign Updates”Base route: /igcf/v1/campaigns/{campaign_id}/updates
Updates are nested under their parent campaign.
List updates
Section titled “List updates”GET /igcf/v1/campaigns/{campaign_id}/updatesPermission: Public. Published updates are visible to all. Non-published updates require the campaign author or edit_others_igcf_updates.
Query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
integer |
1 |
Current page. |
per_page |
integer |
10 |
Items per page (max 100). |
status |
string |
— | Filter by status: publish, pending, draft, igcf_rejected. The pending and igcf_rejected update statuses only occur when Ignition Platform Mode is active; a direct-mode install publishes updates immediately. |
orderby |
string |
date |
One of: date, title, modified. |
order |
string |
desc |
asc or desc. |
Get an update
Section titled “Get an update”GET /igcf/v1/campaigns/{campaign_id}/updates/{id}Permission: Published updates are public. Non-published require the author or edit_others_igcf_updates.
Create an update
Section titled “Create an update”POST /igcf/v1/campaigns/{campaign_id}/updatesPermission: Campaign author or edit_others_igcf_updates.
Update an update
Section titled “Update an update”PUT/PATCH /igcf/v1/campaigns/{campaign_id}/updates/{id}Permission: Update author or edit_others_igcf_updates.
Delete an update
Section titled “Delete an update”DELETE /igcf/v1/campaigns/{campaign_id}/updates/{id}Permission: Author with delete_igcf_updates, or delete_others_igcf_updates. Always permanently deletes (no trash).
Update schema
Section titled “Update schema”| Field | Type | Contexts | Writable | Description |
|---|---|---|---|---|
id |
integer |
view, edit | No | Unique identifier. |
title |
string |
view, edit | Yes | Update title (required on create). |
content |
string |
view, edit | Yes | Update content (HTML). |
status |
string |
view, edit | No | Status slug. |
status_label |
string |
view, edit | No | Human-readable status label. |
author |
integer |
view, edit | No | Author user ID. |
date |
string |
view, edit | No | Created date (RFC 3339). |
modified |
string |
view, edit | No | Last modified date (RFC 3339). |
campaign_id |
integer |
view, edit | No | Parent campaign ID. |
featured_image |
object |
view, edit | Yes | { id, url } — send { id } or integer to set, url is read-only. |
Pledges
Section titled “Pledges”Base route: /igcf/v1/campaigns/{campaign_id}/pledges
Pledges are nested under their parent campaign. Pledges are immutable once created (no PUT/PATCH) and cannot be hard-deleted.
List pledges
Section titled “List pledges”GET /igcf/v1/campaigns/{campaign_id}/pledgesPermission: Must be logged in. Admins (igcf_manage_all_pledges) and the campaign author see all pledges. Other authenticated users see only their own pledges for the campaign.
Query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
integer |
1 |
Current page of the collection. |
per_page |
integer |
20 |
Maximum number of items per page (max 100). |
status |
string |
— | Limit to a specific status: pending, succeeded, canceled. |
orderby |
string |
created_at |
One of: created_at, amount. |
order |
string |
desc |
asc or desc. |
Pagination headers:
| Header | Description |
|---|---|
X-WP-Total |
Total number of matching pledges. |
X-WP-TotalPages |
Total number of pages. |
Create a pledge
Section titled “Create a pledge”POST /igcf/v1/campaigns/{campaign_id}/pledgesPermission: Must be logged in with igcf_create_pledge capability. The campaign must be in igcf_active status.
Body parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
amount |
integer |
Yes | Pledge amount in minor units (e.g., 2500 for $25.00). Must be a positive integer. |
payment_method |
string |
No | Payment method identifier (defaults to offline). |
Returns: 201 Created with the pledge object.
Get a pledge
Section titled “Get a pledge”GET /igcf/v1/campaigns/{campaign_id}/pledges/{id}Permission: Must be logged in. Admins (igcf_manage_all_pledges) and the campaign author can view any pledge. Backers can view their own pledges.
Pledge schema
Section titled “Pledge schema”| Field | Type | Contexts | Writable | Description |
|---|---|---|---|---|
id |
integer |
view, edit | No | Unique identifier. |
campaign_id |
integer |
view, edit | No | The ID of the parent campaign. |
backer_id |
integer |
view, edit | No | The ID of the backer who made the pledge. |
amount |
integer |
view, edit | Yes | The pledge amount in minor units (e.g., cents). Required on create. |
currency |
string |
view, edit | No | Three-letter currency code. |
payment_method |
string |
view, edit | Yes | Payment method identifier. |
status |
string |
view, edit | No | The pledge lifecycle status slug: pending, succeeded, or canceled. |
status_label |
string |
view, edit | No | Human-readable status label. |
displayed_status |
string |
view, edit | No | The render-time status that folds in refunds: pending, succeeded, canceled, partial_refund, or refunded. |
net |
integer |
view, edit | No | The pledge’s net contribution in minor units — succeeded attempts minus succeeded refunds. |
is_full_refund |
boolean |
view, edit | No | Whether the pledge has been fully refunded. |
latest_attempt |
object|null |
view, edit | No | The most recent payment attempt: { id, status, payment_method, amount, processed_at }, or null. |
refund_summary |
object |
view, edit | No | { count, succeeded_total } — the number of refunds across the pledge’s attempts and the succeeded refund total in minor units. |
created_at |
string |
view, edit | No | Creation date in RFC 3339 format. |
updated_at |
string |
view, edit | No | Last update date in RFC 3339 format. |
is_anonymous |
boolean |
view, edit | No | Whether the backer appears as “Anonymous” on the backer list. |
Payment Attempts
Section titled “Payment Attempts”Base route: /igcf/v1/pledges/{pledge_id}/payment-attempts
A payment attempt is one try at collecting money for a pledge. Attempts are read-only over REST — they are created and transitioned through the abilities and service layer, not via POST/PATCH.
List payment attempts
Section titled “List payment attempts”GET /igcf/v1/pledges/{pledge_id}/payment-attemptsGET /igcf/v1/pledges/{pledge_id}/payment-attempts/{id}Permission: Same as the parent pledge — admins (igcf_manage_all_pledges) and the campaign author see all; the backer sees their own.
Payment attempt schema
Section titled “Payment attempt schema”| Field | Type | Description |
|---|---|---|
id |
integer |
Unique identifier. |
pledge_id |
integer |
The parent pledge. |
amount |
integer |
Transaction amount in minor units (may exceed the pledge amount under fee recovery). |
currency |
string |
Three-letter currency code. |
payment_method |
string |
Method used for this attempt. |
status |
string |
pending, succeeded, or failed. |
status_label |
string |
Human-readable status label. |
failure_code |
string|null |
Failure code when the attempt failed. |
failure_message |
string|null |
Human-readable failure detail. |
gateway_reference |
string|null |
Gateway-issued reference (e.g. pi_xxx). |
processed_at |
string|null |
When the attempt was processed (RFC 3339). |
created_at |
string |
Creation date (RFC 3339). |
updated_at |
string |
Last update date (RFC 3339). |
Refunds
Section titled “Refunds”Base route: /igcf/v1/payment-attempts/{payment_attempt_id}/refunds
A refund is money flowing back against a succeeded payment attempt. Refunds are read-only over REST — they are created through the igcf/issue-refund ability and the service layer.
List refunds
Section titled “List refunds”GET /igcf/v1/payment-attempts/{payment_attempt_id}/refundsGET /igcf/v1/payment-attempts/{payment_attempt_id}/refunds/{id}Permission: Admins (igcf_manage_all_pledges) and the campaign author see all; the backer sees refunds on their own pledges.
Refund schema
Section titled “Refund schema”| Field | Type | Description |
|---|---|---|
id |
integer |
Unique identifier. |
payment_attempt_id |
integer |
The parent payment attempt. |
amount |
integer |
Refund amount in minor units (may be less than the attempt amount for a partial refund). |
currency |
string |
Three-letter currency code. |
status |
string |
pending, succeeded, or failed. |
status_label |
string |
Human-readable status label. |
reason |
string|null |
Refund reason. |
failure_code |
string|null |
Failure code when the refund failed. |
gateway_reference |
string|null |
Gateway-issued reference. |
processed_at |
string|null |
When the refund was processed (RFC 3339). |
created_at |
string |
Creation date (RFC 3339). |
updated_at |
string |
Last update date (RFC 3339). |
Backers
Section titled “Backers”Base route: /igcf/v1/campaigns/{campaign_id}/backers
Public endpoint returning backer display data for a campaign. Returns an empty array if the backer list is disabled in settings — the setting applies to every requester, including campaign authors and moderators.
List backers
Section titled “List backers”GET /igcf/v1/campaigns/{campaign_id}/backersPermission: Public for campaigns in a public status (igcf_preview, igcf_active, igcf_ended). On non-public campaigns, only the campaign author or users with edit_others_igcf_campaigns can list backers; all other requests receive a 404 (igcf_rest_campaign_not_found) so the campaign’s existence is not revealed.
Query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
integer |
1 |
Current page of the collection (min 1). |
per_page |
integer |
10 |
Maximum number of items per page (min 1, max 50). |
Pagination headers:
| Header | Description |
|---|---|
X-WP-Total |
Total number of matching backers. |
X-WP-TotalPages |
Total number of pages. |
Backer schema
Section titled “Backer schema”| Field | Type | Description |
|---|---|---|
display_name |
string |
Backer name, or “Anonymous” if hidden. |
amount |
integer |
Pledge amount in minor units. |
currency |
string |
Three-letter currency code. |
display_amount |
string |
Formatted amount with currency symbol. |
date |
string |
Pledge date (Y-m-d H:i:s). |
is_anonymous |
boolean |
Whether the backer chose to remain anonymous. |
Reward Levels
Section titled “Reward Levels”Base route: /igcf/v1/campaigns/{campaign_id}/reward-levels
Reward levels are nested under their parent campaign.
List reward levels
Section titled “List reward levels”GET /igcf/v1/campaigns/{campaign_id}/reward-levelsPermission: Public. Returns active reward levels by default.
Query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
include_inactive |
boolean |
false |
Include deactivated reward levels (requires campaign author or edit_others_igcf_campaigns). |
Get a reward level
Section titled “Get a reward level”GET /igcf/v1/campaigns/{campaign_id}/reward-levels/{id}Permission: Public for active levels. Inactive levels require the campaign author or edit_others_igcf_campaigns.
Create a reward level
Section titled “Create a reward level”POST /igcf/v1/campaigns/{campaign_id}/reward-levelsPermission: Campaign author with edit_igcf_reward_levels, or edit_others_igcf_reward_levels.
Update a reward level
Section titled “Update a reward level”PUT/PATCH /igcf/v1/campaigns/{campaign_id}/reward-levels/{id}Permission: Campaign author with edit_igcf_reward_levels, or edit_others_igcf_reward_levels.
Field locking: After a campaign leaves Draft status, only title, description, image_id, and active are editable. The fields amount, quantity_limit, one_per_backer, and requires_shipping are locked to protect existing backers. Use the igcf_reward_level_editable_fields filter to customize which fields are editable.
Delete a reward level
Section titled “Delete a reward level”DELETE /igcf/v1/campaigns/{campaign_id}/reward-levels/{id}Permission: Campaign author with delete_igcf_reward_levels, or delete_others_igcf_reward_levels.
Deletion is only allowed if the reward level has zero non-canceled pledges. If the level has pledges, the response returns a 400 error suggesting deactivation (set active to false via PUT) instead.
Reorder reward levels
Section titled “Reorder reward levels”POST /igcf/v1/campaigns/{campaign_id}/reward-levels/reorderPermission: Campaign author with edit_igcf_reward_levels, or edit_others_igcf_reward_levels.
Body parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
order |
integer[] |
Yes | Ordered array of reward level IDs. |
Reward level schema
Section titled “Reward level schema”| Field | Type | Contexts | Writable | Description |
|---|---|---|---|---|
id |
integer |
view, edit | No | Unique identifier. |
title |
string |
view, edit | Yes | Reward level title (required on create). |
description |
string |
view, edit | Yes | Reward level description (HTML). |
amount |
integer |
view, edit | Yes | Minimum pledge amount in minor units (required on create). Locked after campaign leaves draft. |
quantity_limit |
integer |
view, edit | Yes | Maximum number of claims (0 = unlimited). Locked after campaign leaves draft. |
quantity_claimed |
integer |
view, edit | No | Number of non-canceled pledges claiming this tier. |
one_per_backer |
boolean |
view, edit | Yes | Whether each backer can claim this tier only once. Locked after campaign leaves draft. |
requires_shipping |
boolean |
view, edit | Yes | Whether backers pledging for this tier must provide a shipping address at checkout. Defaults to false. Locked after campaign leaves draft. |
active |
boolean |
view, edit | Yes | Whether the reward level is active and visible (default true). |
menu_order |
integer |
view, edit | No | Display order (managed via the reorder endpoint). |
campaign_id |
integer |
view, edit | No | Parent campaign ID. |
featured_image |
object |
view, edit | No | { id, url } — read-only. To set, use image_id. |
image_id |
integer |
edit | Yes | Attachment ID for the featured image (write-only). |
Settings
Section titled “Settings”GET /igcf/v1/settingsPermission: Public (read-only).
Returns current plugin settings useful for frontend rendering and integrations.
| Field | Type | Description |
|---|---|---|
moderation_enabled |
boolean |
Whether campaign moderation is enabled. Always false on a direct-mode core install; Ignition Platform Mode flips it on when its moderation feature is active. |
backer_list_enabled |
boolean |
Whether the backer list is shown on campaign pages. |
guest_checkout_enabled |
boolean |
Whether guest checkout is enabled. |
auth_page_url |
string|null |
URL of the authentication page. |
dashboard_page_url |
string|null |
URL of the dashboard page. |
checkout_page_url |
string|null |
URL of the checkout page. |
currency |
string |
Currency code (e.g., USD). |
currency_config |
object |
Currency configuration: { code, symbol, exponent, position }. |
suggested_amounts |
integer[] |
Suggested pledge amounts in minor units (e.g., cents). |
pledge_min_amount |
integer|null |
Minimum pledge amount in minor units, or null if no minimum. |
pledge_max_amount |
integer|null |
Maximum pledge amount in minor units, or null if no maximum. |
payment_instructions |
string|null |
Offline payment instructions HTML with placeholder tokens. Only included for authenticated requests. |
terms_page_url |
string|null |
URL of the configured terms and conditions page. |
privacy_page_url |
string|null |
URL of the WordPress privacy policy page. |
terms_acceptance_required |
boolean |
Whether terms acceptance is currently required (terms page is configured and published). |