Product Groups (VAT)

Add Product Group

post /sites/{siteid}/productgroups
PARAMETERS
siteid
integer
path
REQUIRED
REQUEST BODY
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
200Returns vatid
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Get Product Groups

get /sites/{siteid}/productgroups
PARAMETERS
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
RETURNS

Returns an envelope with items of type productgroup.

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
200Returns an envelope with items of type productgroup.
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Get Product Group

get /sites/{siteid}/productgroups/{vatid}
PARAMETERS
siteid
integer
path
REQUIRED
vatid
integer
path
REQUIRED
RETURNS

Returns an item of type productgroup.

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
200Returns an item of type productgroup.
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Update Product Group

put /sites/{siteid}/productgroups/{vatid}
PARAMETERS
siteid
integer
path
REQUIRED
vatid
integer
path
REQUIRED
REQUEST BODY
puthttps://api.mysitoo.com/v2/accounts/1500/sites/1/productgroups/7.json
{
"value": 14
}
RESPONSE JSON
true
HTTP Status Code Summary
200Returns true
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal 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
200Returns true
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Objects

productgroup
object

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%).

productgrouptype

The type of the product group.

productgroupname
string
REQUIRED

The name of the product group.

comment
string

Internal comment.

productgrouptype
integer

  • 10 Product
  • 20 Service
  • 30 GiftCard