create_category
This call creates a product category. The arguments that would be included in the doc are described below:
Basic parameters
Name | Type | Required | Description |
|---|---|---|---|
action | string | true | create_category |
group_id | integer | true | This designates which project the action should be applied towards |
doc | array | true | See doc parameters below |
General Doc Parameters
Name | Type | Required | Description |
|---|---|---|---|
category_name | string | true | The name for the category visible to users |
category_top_remark | string | false | A brief description at the top of the category visible to users |
category_bottom_remark | string | false | A brief description at the bottom of the category visible to users |
category_quota_ordered | integer | false | The amount of products within a category that a user can order. The default has no limit. |
interchange_category | boolean | false | True if only a single product in the category should be able to be orderered. Default is False. |
mandatory_category | boolean | false | True if a product needs to be ordered from that category in order for the form to be marked complete. Default is False. |
Example
Create a new category
This is an example which would create a new category.
Call
curl -X POST "https://www.regpack.com/reg/api2/products/" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Api-Id: 15263" \
-H "Api-user: [email protected]" \
-H "Api-Token: cd2e514f-7gab-3cde-62fg-51abcd4e7362" \
-d '{
"action": "create_category",
"group_id": 100909072,
"doc": {
"category_name": "Fall Performances",
"category_top_remark": "Fall Performances are below",
"category_bottom_remark": "Please note that if you must miss an event, tickets are only transferable to future performances",
"category_quota_ordered": 12,
"interchange_category": False,
"mandatory_category": False
}
}Response
{
'success': true,
'doc': {
'cat_id': 251125,
'msg': 'Category created successfully',
'msg_type': 'success'
}
}