Does B2BKing Have a REST API? WP and WooCommerce APIs

A common question is whether B2BKing has an API that can be used to manipulate data such as product prices, visibility, dynamic rules, etc. Here's what you should know:

All B2BKing data is saved as standard WordPress or WooCommerce data and can therefore be accessed through the regular WP and WooCommerce APIs.

Because of this, B2BKing does not have its own API, as everything can already be done with existing APIs.

For example:

  • Custom fields such as the VAT number are saved as user metadata and can be accessed, edited, and created using the WP API.
  • Users can be created or set as B2B users using the WP API.
  • Dynamic rules are posts, and their configuration is stored as post metadata — therefore, rules can be modified through the WP REST API as well. We have a guide here: Creating a Rule via REST API.
  • Pricing such as group prices or tiered prices is stored as product/post metadata and can be edited with either the WooCommerce API or the WP API.

API References:

Powered by BetterDocs