Calls
Product
create_category
5 min
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 false true 261,79,84false unhandled content type false unhandled content type unhandled content type unhandled content type false unhandled content type false unhandled content type unhandled content type unhandled content type false unhandled content type false unhandled content type unhandled content type unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type 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 api admin\@regpacks com" \\ 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 } }import requests import json status endpoint = https //www regpack com/reg/api2/products/ headers = { "content type" "application/json", "accept" "application/json", "api id" "15263", "api user" "api admin\@regpacks com", "api token" "cd2e514f 7gab 3cde 62fg 51abcd4e7362", } payload = { "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 } } create category json = json dumps(payload) create category response = requests post(url=product endpoint, data=create category json, headers=headers, timeout=10) response { 'success' true, 'doc' { 'cat id' 251125, 'msg' 'category created successfully', 'msg type' 'success' } }