List All Wholesale Products

This API handles fetching wholesale and non-wholesale products.

Method

Endpoint

GET

/wp-json/wholesale/v1/products

Query Parameters

Required

Type

Description

uid

no

int

The user ID.

wholesale_role

no

string

The wholesale role key.

return_wholesale_products

no

boolean

Return only products with wholesale price. This parameter is dependent on the wholesale_role parameter. Default value is false.

show_categories

no

boolean

Whether show or hide wc categories property from the response. The prop is hidden by default using this api.

show_meta_data

no

boolean

Whether show or hide wc meta_data property from the response. The prop is hidden by default using this api.

Note:

  • If you need to filter the results based on the per-user wholesale discount override setting, you need to specify the user ID via uid query parameter.

Last updated