Calls
Product
edit_category
5min
this call edits a product category the arguments that would be included in the doc are described below basic parameters name type required description action string true edit 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 id integer true the id of the category you'd like to edit these can be found in the top right of the edit window when editing a product in the backend of the system category top remark string false a brief description at the top of the category visible to users an empty string will remove the existing remark category bottom remark string false a brief description at the bottom of the category visible to users an empty string will remove the existing remark 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 edit an existing category this is an example which would edit an existing 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", "group id" 100909072, "doc" { "base product type" 1, "product name" "the village vanguard presents bill evans trio", "product price" "10", "product activity start date" "1961 06 21", "product activity end date" "1961 06 21", "product short remarks" "this event will be recorded for later release" } }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 id" 251125, "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" 6, "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 updated successfully', 'msg type' 'success' } }