Skip to main content

ToolWatch API: List Visibility

ToolWatch API requests to create, list, and delete list visibility, with URIs, headers, fields, and example responses.

This article lists the ToolWatch API requests for list visibility: Create, Retrieve List, and Delete. Every request needs an authorization token. To get one, see ToolWatch API: Authorization.

Create

Request

URI

https://api.{cluster}.toolwatch.net/visibility/{list type}

List Types

  • CostCenters

  • CostCodes

  • Customers

  • Departments

  • Employees

  • Entities

  • Jobs

  • Locations

  • ServiceClasses

  • ShippingMethods

  • Vendors

Http Method

POST

Headers

Authorization: {token}

Request Body

A JSON array of visibility entries. Each entry has the following fields:

Field

Type

Required

Description

ListItemId

guid

Yes

Id of the list item to make visible.

StockLocationId

guid

Yes

Id of the stock location the item is visible at.

[
{
"ListItemId": "{guid}",
"StockLocationId": "{guid}"
}
]

Response

200 Ok

400 Bad Request

Triggered when the list type is missing or invalid, or the message body contains no entries.

Response body will contain error message

No items received in message body

401 Unauthorized

Triggered when the Authorization token is missing or invalid.


Retrieve List

Request

URI

https://api.{cluster}.toolwatch.net/visibility/{list type}

List Types

  • CostCenters

  • CostCodes

  • Customers

  • Departments

  • Employees

  • Entities

  • Jobs

  • Locations

  • ServiceClasses

  • ShippingMethods

  • Vendors

Allowable querystring parameters

Parameter

Description

stocklocationid

Optional. Filter to a single stock location id (guid).

listitemid

Optional. Filter to a single list item id (guid).

Http Method

GET

Headers

Authorization: {token}

Request Body

Not allowed for GET

Response

200 Ok

Field

Type

Description

ListItemId

guid

Id of the visible list item.

StockLocationId

guid

Id of the stock location the item is visible at.

Example response body:

[
{
"ListItemId": "{guid}",
"StockLocationId": "{guid}"
}
]

400 Bad Request

Triggered when the list type is missing or invalid. The response body is empty.

401 Unauthorized

Triggered when the Authorization token is missing or invalid.


Delete

Request

URI

https://api.{cluster}.toolwatch.net/visibility/{list type}

List Types

  • CostCenters

  • CostCodes

  • Customers

  • Departments

  • Employees

  • Entities

  • Jobs

  • Locations

  • ServiceClasses

  • ShippingMethods

  • Vendors

Http Method

DELETE

Headers

Authorization: {token}

Request Body

A JSON array of visibility entries to remove. Each entry has the following fields:

Field

Type

Required

Description

ListItemId

guid

Yes

Id of the list item to hide.

StockLocationId

guid

Yes

Id of the stock location the item is hidden at.

[
{
"ListItemId": "{guid}",
"StockLocationId": "{guid}"
}
]

Response

200 Ok

400 Bad Request

Triggered when the list type is missing or invalid, or no entries were received in the message body. The response body is empty.

401 Unauthorized

Triggered when the Authorization token is missing or invalid.

Did this answer your question?