Table of Contents
- Introduction
- Authentication
- Base URL
-
Endpoints
- Get All Price Lists
- Get Price List by ID
- Create a Price List
- Update a Price List
1. Introduction
The Price List APIs allows developers to create, retrieve, and manage custom price lists and pricing rules in WordPress. This API is useful for implementing wholesale pricing, role-based discounts, and country-specific pricing logic.2. Authentication
Mechanism: Basic Authentication using a WordPress Application Password. Header format:- Log into WordPress Admin.
- Go to Users → Profile (your user).
- Scroll to Application Passwords.
- Enter a descriptive name and click Add New Application Password.
- Copy and securely store the generated password (shown once).
3. Base URL
Production Base URL:4. Endpoints
4.1 Get All Price Lists
Description: Retrieves a list of all price lists existing in wp-admin.4.2 Get Price List by ID
Description: Retrieves a the details of a specific pricelist from wp-admin.id(integer, required): The ID of the price list.
4.3 Create a New Price List
Description: Creates a new price list rule in WordPress Admin. The rule defines custom pricing that will be applied to specific user segments such as individual customers, user roles, companies, or countries.Field Reference
| Field Name | Type | Description | Example | | --- | --- | --- | --- | | title | string | The name of the price list | “Summer Discount 2025” | | aio_price_list_rules | object | Container for pricing rules |{ ... }
|
aio_price_list_rules Fields
|
Field Name
|
Type
|
Description
|
Possible Values
|
| --- | --- | --- | --- |
|
price_type
|
string
|
Defines pricing method
|
new_price, percentage_discount
|
|
bulk_price_enabled
|
string (0/1)
|
Enable bulk pricing
|
0, 1
“0” (disabled), “1” (enabled)
|
|
bulk_price_value
|
number/string
|
Bulk price value per item
|
numeric value
|
|
enable_individual_customers
|
string (0/1)
|
Restrict to specific customers
|
0, 1
“0” (disabled), “1” (enabled)
|
|
customers.toggle
|
string
|
Mode of customer selection
|
all, specific
“all” = all customers”specific” = only selected customer IDs | | customers.specific | array | List of WordPress user IDs [if toggle = “specific” ] | IDs | | enable_user_roles | string (0/1) | Restrict by role |
0, 1
|
|
user_roles.toggle
|
string
|
Mode of role selection
|
all, specific
|
|
user_roles.specific
|
array
|
List of WP role names
|
role names
|
|
enable_countries
|
string (0/1)
|
Restrict by country
|
0, 1
|
|
countries.toggle
|
string
|
Mode of country selection
|
all, specific
|
|
countries.specific
|
array
|
List of ISO 2-letter codes
|
codes
|
|
aio_new_price
|
object
|
Product-specific prices
|
productID: price
|
|
quantity_rules
|
object
|
Quantity-based discounts
|
productID: array
|
|
status
|
string
|
Defines the publication state of the price list rule at the time of creation or update
|
“publish” , “draft”
|
4.4 Update a Price List
Description: Use this endpoint to update an existing price list rule in WordPress Admin. The request body follows the same structure as Create a Price List, allowing you to modify pricing details, customer or role assignments, and country-specific rules.id(integer, required): The ID of the price list to be updated.
Field Reference
| Field Name | Type | Description | Example | | --- | --- | --- | --- | | title | string | The name of the price list | “Summer Discount 2025” | | aio_price_list_rules | object | Container for pricing rules |{ ... }
|
aio_price_list_rules Fields
|
Field Name
|
Type
|
Description
|
Possible Values
|
| --- | --- | --- | --- |
|
price_type
|
string
|
Defines pricing method
|
new_price, percentage_discount
|
|
bulk_price_enabled
|
string (0/1)
|
Enable bulk pricing
|
0, 1
“0” (disabled), “1” (enabled)
|
|
bulk_price_value
|
number/string
|
Bulk price value per item
|
numeric value
|
|
enable_individual_customers
|
string (0/1)
|
Restrict to specific customers
|
0, 1
“0” (disabled), “1” (enabled)
|
|
customers.toggle
|
string
|
Mode of customer selection
|
all, specific
“all” = all customers”specific” = only selected customer IDs | | customers.specific | array | List of WordPress user IDs [if toggle = “specific” ] | IDs | | enable_user_roles | string (0/1) | Restrict by role |
0, 1
|
|
user_roles.toggle
|
string
|
Mode of role selection
|
all, specific
|
|
user_roles.specific
|
array
|
List of WP role names
|
role names
|
|
enable_countries
|
string (0/1)
|
Restrict by country
|
0, 1
|
|
countries.toggle
|
string
|
Mode of country selection
|
all, specific
|
|
countries.specific
|
array
|
List of ISO 2-letter codes
|
codes
|
|
aio_new_price
|
object
|
Product-specific prices
|
productID: price
|
|
quantity_rules
|
object
|
Quantity-based discounts
|
productID: array
|
|
status
|
string
|
Defines the publication state of the price list rule at the time of creation or update
|
“publish” , “draft”
|