REST API v2.8

Manufacturers

Collection of manufacturers for a site.

Get Manufacturers

Endpoint

GET sites/{siteid}/manufacturers

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 manufacturer.

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 manufacturer.

Example

Request

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

Response

{ "totalcount": 2, "items": [ { "externalcompanyid": 1, "name": "Cornerstone", "description": "Furniture manufacturer", "address": "12 Main Street", "zip": "10310", "city": "Townsville", "state": "", "countryid": "se", "phone": "08-5000 93 00", "email": "sales@sitoo.com", "url1": "http:\/\/www.sitoo.se", "url2": "www.sitoo.se" }, { "externalcompanyid": 3, "name": "Knoxville", "description": "Sofa manufacturer", "address": "12 Main Street", "zip": "10310", "city": "Townsville", "state": "", "countryid": "se", "phone": "08-5000 93 00", "email": "sales@sitoo.com", "url1": "http:\/\/www.sitoo.se", "url2": "www.sitoo.se" } ] }

Batch Add Manufacturers

Endpoint

POST sites/{siteid}/manufacturers

Request body

See manufacturer for fields. Arrays are allowed.
Required fields:
name

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 manufacturerid if successful or a batch envelope if multiple manufacturers were added.

Example

Request

POST https://api.mysitoo.com/v2/accounts/1500/sites/1/manufacturers.json [ { "name": "Sitoo", "url1": "http:\/\/www.sitoo.com" }, { "name": "Example Inc.", "url1": "http:\/\/www.example.com" } ]

Response

[ { "statuscode": 200, "return": 5 }, { "statuscode": 200, "return": 6 } ]

Batch Update Manufacturers

Note that manufacturerid is named externalcompanyid in the manufacturer object.

Endpoint

PUT sites/{siteid}/manufacturers

Request body

See manufacturer for fields. Arrays are allowed.
Required fields:
externalcompanyid

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/manufacturers.json [ { "externalcompanyid": 1, "name": "Sitoo" }, { "externalcompanyid": 3, "name": "Example Inc." } ]

Response

[ { "statuscode": 200, "return": true }, { "statuscode": 200, "return": true } ]

Batch Delete Manufacturers

Note that manufacturerid is named externalcompanyid in the manufacturer object. See manufacturer for all fields.
Required fields:
externalcompanyid

Endpoint

DELETE sites/{siteid}/manufacturers

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 or a batch envelope if multiple manufacturers were deleted.

Example

Request

DELETE https://api.mysitoo.com/v2/accounts/1500/sites/1/manufacturers.json [ { "externalcompanyid": 3 } ]

Response

[ { "statuscode": 200, "return": true } ]

Get Manufacturer

Note that manufacturerid is named externalcompanyid in the manufacturer object.

Endpoint

GET sites/{siteid}/manufacturers/{externalcompanyid}

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 manufacturer.

Example

Request

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

Response

{ "externalcompanyid": 1, "name": "Sitoo", "description": "Furniture manufacturer", "address": "12 Main Street", "zip": "10310", "city": "Townsville", "state": "", "countryid": "se", "phone": "08-5000 93 00", "email": "sales@sitoo.com", "url1": "http:\/\/www.sitoo.se", "url2": "www.sitoo.se" }

Update Manufacturer

Note that manufacturerid is named externalcompanyid in the manufacturer object.

Endpoint

PUT sites/{siteid}/manufacturers/{externalcompanyid}

Request body

See manufacturer 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/manufacturers/5.json { "description": "POS meets eCommerce" }

Response

true

Delete Manufacturer

Note that manufacturerid is named externalcompanyid in the manufacturer object.

Endpoint

DELETE sites/{siteid}/manufacturers/{externalcompanyid}

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/manufacturers/5.json

Response

true