Product Groups (VAT)
Add Product Group
post /sites/{siteid}/productgroupsPARAMETERS
siteid
integer
path
REQUIRED
REQUEST BODY
object
posthttps://api.mysitoo.com/v2/accounts/1500/sites/1/productgroups.json
{ "value": 0, "productgrouptype": 30, "productgroupname": "Gift Card"}
RESPONSE JSON
7
HTTP Status Code Summary | |
---|---|
200 | Returns vatid |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Get Product Groups
get /sites/{siteid}/productgroupsPARAMETERS
siteid
integer
path
REQUIRED
start
integer
query
The index of the item to start from
Default: 0
num
integer
query
The number of items returned
Default: 10
fields
array (string)
query
Comma separated list of fields to return. Use this to query only the fields you are using. Default is all fields in productgroup.
Example: /sites/{siteid}/productgroups?fields=vatid,productgroupname,value
gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/productgroups.json
RESPONSE JSON
{ "totalcount": 4, "items": [ { "vatid": 2, "value": 25, "productgrouptype": 10, "productgroupname": "Common Goods", "comment": "Default Sales Tax" }, { "vatid": 3, "value": 6, "productgrouptype": 10, "productgroupname": "Books", "comment": "" }, { "vatid": 5, "value": 0, "productgrouptype": 30, "productgroupname": "Gift Cards", "comment": "" }, { "vatid": 6, "value": 25, "productgrouptype": 20, "productgroupname": "Consulting", "comment": "" } ]}
HTTP Status Code Summary | |
---|---|
200 | Returns an envelope with items of type productgroup. |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Get Product Group
get /sites/{siteid}/productgroups/{vatid}PARAMETERS
siteid
integer
path
REQUIRED
vatid
integer
path
REQUIRED
gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/productgroups/2.json
RESPONSE JSON
{ "vatid": 2, "value": 25, "productgrouptype": 10, "productgroupname": "Common Goods", "comment": "Default Sales Tax"}
HTTP Status Code Summary | |
---|---|
200 | Returns an item of type productgroup. |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Update Product Group
put /sites/{siteid}/productgroups/{vatid}PARAMETERS
siteid
integer
path
REQUIRED
vatid
integer
path
REQUIRED
REQUEST BODY
object
puthttps://api.mysitoo.com/v2/accounts/1500/sites/1/productgroups/7.json
{ "value": 14}
RESPONSE JSON
true
HTTP Status Code Summary | |
---|---|
200 | Returns true |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Delete Product Group
delete /sites/{siteid}/productgroups/{vatid}PARAMETERS
siteid
integer
path
REQUIRED
vatid
integer
path
REQUIRED
deletehttps://api.mysitoo.com/v2/accounts/1500/sites/1/productgroups/7.json
RESPONSE JSON
true
HTTP Status Code Summary | |
---|---|
200 | Returns true |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Objects
productgroupobject
A product group contains the VAT and type for a product.
PROPERTIES
vatid
integer
READ ONLY
The ID of the product group (vatid).
value
number
VAT percentage (eg. 25 = 25%).
The type of the product group.
productgroupname
string
REQUIRED
The name of the product group.
comment
string
Internal comment.
productgrouptypeinteger
10
Product20
Service30
GiftCard