REST API v2.8

Price Lists

Collection of pricelists.

Get Price Lists

Endpoint

GET sites/{siteid}/pricelists

Parameters

start

The index of the item to start fromDefault: 0

num

The number of items returnedDefault: 10

fields

Comma separated list of fields to return. Use this to query only the fields you are using. Default is all fields in pricelist.

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns an envelope with items of type pricelist.

Example

Request

GET https://api.mysitoo.com/v2/accounts/1500/sites/1/pricelists.json?num=2

Response

{ "totalcount": 1, "items": [ { "pricelistid": 1, "pricelistname": "Default Price List", "pricelistdescription": "" } ] }

Add Price List

Endpoint

POST sites/{siteid}/pricelists

Request body

See pricelist for fields.
Required fields:
pricelistname

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns pricelistid if successful.

Example

Request

POST https://api.mysitoo.com/v2/accounts/1500/sites/1/pricelists.json { "pricelistname": "Resellers" }

Response

2

Get Price List

Endpoint

GET sites/{siteid}/pricelists/{pricelistid}

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns an item of type pricelist.

Example

Request

GET https://api.mysitoo.com/v2/accounts/1500/sites/1/pricelists/2.json

Response

{ "pricelistid": 2, "pricelistname": "Resellers", "pricelistdescription": "" }

Update Price List

Endpoint

PUT sites/{siteid}/pricelists/{pricelistid}

Request body

See pricelist for fields.

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns true if successful.

Example

Request

PUT https://api.mysitoo.com/v2/accounts/1500/sites/1/pricelists/2.json { "pricelistdescription": "Pricelist for Resellers" }

Response

true

Delete Price List

Endpoint

DELETE sites/{siteid}/pricelists/{pricelistid}

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns true if successful.

Example

Request

DELETE https://api.mysitoo.com/v2/accounts/1500/sites/1/pricelists/2.json

Response

true