Skip to main content

REST API

Upcoming

This REST API reference is upcoming. Routes, parameters, and wire error codes may change before the public release.

Using the API​

Fluid Checkout PRO and its Address Book feature expose REST routes under the fluid-checkout/v1 namespace. Each endpoint page lists the route, parameters, wire error codes (fc_api_*), and optional hand-written examples.

Validation failures use those wire codes. The error message may include WooCommerce or store-specific text, but the stable identifier for clients is the wire code.

Authentication​

Requests require a logged-in WordPress user.

  • Same site (browser or admin tools): cookie authentication plus the WordPress REST nonce (X-WP-Nonce).
  • Server-to-server: Application Passwords or another supported WordPress REST authentication method.

Unauthenticated requests return fc_api_forbidden. See the WordPress REST API handbook for authentication details.

Namespace: fluid-checkout/v1. Base URL pattern: {'{'}site{'}'}/wp-json/fluid-checkout/v1.

Permissions​

Requests require a logged-in WordPress user. Omit user_id to use the current user's data, or pass user_id to target another account when the caller can edit that user (edit_user capability). Unauthenticated requests return fc_api_forbidden. An invalid user_id returns fc_api_user_not_found.

Response shape​

  • HTTP 200 with { "data": { ... } } when the handler returns a payload.
  • HTTP 200 with { "success": true } when there is no payload (for example DELETE).
  • Failures return WordPress REST error JSON from WP_Error (code, message, data.status). Wire codes use the fc_api_* prefix.

Endpoints​

Address Book​

REST API endpoint: Address Book (fluid-checkout/v1/address-book). Routes intentionally ignore FC_AddressBook_AddressBook::is_feature_enabled(). The API stays available when the storefront feature is disabled so address book data can be prepared first. POST /address-book creates an entry via FC_AddressBook_AddressBook::add_new_address_book_entry(). Any address_id in the body is ignored; the feature class always assigns a new id. POST /address-book/{address_id} replaces the stored entry with the request body. Clients must send the full address entry (same fields as create), not a partial patch.

Error codes​

Wire error codes (fc_api_*) for this plugin are listed on the REST API errors page.