When creating a customer group category discount using the API it defaults to "products in this category and its subcategories". In the store control panel, this can be changed to either "products in this category only" or "products in this category and its subcategories". There are currently no settings to change this behavior with the API.
namestring
Name of the group.
Example: Wholesale
is_defaultboolean
Determines whether new customers are assigned to this group by default.
category_accessobject
discount_rules
One of:price listcategory, product, or sitewide
typestring
required
Allowed: price_list
price_list_idinteger
If a customer group is assigned to a price list,method and amount are not shown. type and price_list_id are returned.
Example: 3
is_group_for_guestsboolean
Describes whether the group is for guests. There can only be one customer group for guests at a time.
example
JSONcURLNode.jsPHPJava
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
⌄
⌄
⌄
⌄
{
"name": "Wholesale",
"is_default": false,
"category_access": {
"type": "all",
"categories": [
18,
19,
23,
34
]
},
"discount_rules": [
{
"type": "price_list",
"price_list_id": 3
}
],
"is_group_for_guests": true
}
Response
200207
Body
object | application/json
When creating a customer group category discount using the API it defaults to "products in this category and its subcategories". In the store control panel, this can be changed to either "products in this category only" or "products in this category and its subcategories". There are currently no settings to change this behavior with the API.
idinteger
ID of the customer group.
Example: 1
namestring
Name of the group.
Example: Wholesale
is_defaultboolean
Determines whether new customers are assigned to this group by default.
category_accessobject
discount_rules
One of:arrayarrayarrayarray
typestring
Allowed: price_list | all | category | product
methodstring
Allowed: percent | fixed | price
amountstring
A float that specifies the value applied to the price modified. (Float, Float as String, Integer)
Example: 5.0000
price_list_idinteger
If a customer group is assigned to a price list,method and amount are not shown. type and price_list_id are returned.
Example: 3
date_createdstring
Date on which the customer group was created.
Example: 2023-07-17 06:30:41
date_modifiedstring
Date on which the customer group was last modified.
Example: 2023-07-25 01:15:19
is_group_for_guestsboolean
Describes whether the group is for guests. There can only be one customer group for guests at a time.
When creating a customer group category discount using the API it defaults to "products in this category and its subcategories". In the store control panel, this can be changed to either "products in this category only" or "products in this category and its subcategories". There are currently no settings to change this behavior with the API.
idinteger
ID of the customer group.
Example: 1
namestring
Name of the group.
Example: Wholesale
is_defaultboolean
Determines whether new customers are assigned to this group by default.
category_accessobject
discount_rules
One of:arrayarrayarrayarray
typestring
Allowed: price_list | all | category | product
methodstring
Allowed: percent | fixed | price
amountstring
A float that specifies the value applied to the price modified. (Float, Float as String, Integer)
Example: 5.0000
price_list_idinteger
If a customer group is assigned to a price list,method and amount are not shown. type and price_list_id are returned.
Example: 3
date_createdstring
Date on which the customer group was created.
Example: 2023-07-17 06:30:41
date_modifiedstring
Date on which the customer group was last modified.
Example: 2023-07-25 01:15:19
is_group_for_guestsboolean
Describes whether the group is for guests. There can only be one customer group for guests at a time.
When creating a customer group category discount using the API it defaults to "products in this category and its subcategories". In the store control panel, this can be changed to either "products in this category only" or "products in this category and its subcategories". There are currently no settings to change this behavior with the API.
namestring
Name of the group.
Example: Wholesale
is_defaultboolean
Determines whether new customers are assigned to this group by default.
category_accessobject
discount_rules
One of:price listcategory, product, or sitewide
typestring
required
Allowed: price_list
price_list_idinteger
If a customer group is assigned to a price list,method and amount are not shown. type and price_list_id are returned.
Example: 3
is_group_for_guestsboolean
Describes whether the group is for guests. There can only be one customer group for guests at a time.
example
JSONcURLNode.jsPHPJava
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
⌄
⌄
⌄
⌄
{
"name": "Wholesale",
"is_default": false,
"category_access": {
"type": "all",
"categories": [
18,
19,
23,
34
]
},
"discount_rules": [
{
"type": "price_list",
"price_list_id": 3
}
],
"is_group_for_guests": true
}
Response
200207
Body
object | application/json
When creating a customer group category discount using the API it defaults to "products in this category and its subcategories". In the store control panel, this can be changed to either "products in this category only" or "products in this category and its subcategories". There are currently no settings to change this behavior with the API.
idinteger
ID of the customer group.
Example: 1
namestring
Name of the group.
Example: Wholesale
is_defaultboolean
Determines whether new customers are assigned to this group by default.
category_accessobject
discount_rules
One of:arrayarrayarrayarray
typestring
Allowed: price_list | all | category | product
methodstring
Allowed: percent | fixed | price
amountstring
A float that specifies the value applied to the price modified. (Float, Float as String, Integer)
Example: 5.0000
price_list_idinteger
If a customer group is assigned to a price list,method and amount are not shown. type and price_list_id are returned.
Example: 3
date_createdstring
Date on which the customer group was created.
Example: 2023-07-17 06:30:41
date_modifiedstring
Date on which the customer group was last modified.
Example: 2023-07-25 01:15:19
is_group_for_guestsboolean
Describes whether the group is for guests. There can only be one customer group for guests at a time.