This article lists the ToolWatch API requests for manufacturers: Create, Retrieve, and Retrieve List. Every request needs an authorization token. To get one, see ToolWatch API: Authorization.
Create
Request
URI
https://api.{cluster}.toolwatch.net/manufacturersHttp Method
POST
Headers
Authorization: {token}
Request Body
Field | Type | Required | Description |
Number | string | Yes | Manufacturer number. Max 25 characters. |
Name | string | Yes | Manufacturer name. Max 50 characters. |
Phone | string | No | Manufacturer phone. |
Fax | string | No | Manufacturer fax. |
Url | string | No | Manufacturer URL. |
Response
201 Created
The response header contains the URI for the newly created manufacturer.
Location: https://api.{cluster}.toolwatch.net/manufacturers/{id}400 Bad Request
Triggered when field level validation fails.
Response body will contain validation message
[
{
"PropertyName": "Number",
"Message": "Please provide a manufacturer number.",
"AttemptedValue": ""
}
]
Retrieve
Request
URI
https://api.{cluster}.toolwatch.net/manufacturers/{id}Allowable querystring parameters
Parameter | Description |
columns | Comma-separated list of properties to return. |
Http Method
GET
Headers
Authorization: {token}
Request Body
Not allowed for GET
Response
200 Ok
By default every property is returned. Use the columns querystring parameter to limit the response to specific properties.
Field | Type | Description |
Id | guid | Unique identifier. |
Number | string | Manufacturer number. |
Name | string | Manufacturer name. |
Phone | string | Manufacturer phone. |
Fax | string | Manufacturer fax. |
Url | string | Manufacturer URL. |
Example response body:
{
"Id": "{id}",
"Number": "Manufacturer Number",
"Name": "Manufacturer Name",
"Phone": "1234567890",
"Fax": "1234567890",
"Url": "https://example.com"
}404 Not Found
Triggered when id parameter is not a valid guid or no matching record was found.
Response body will contain error message
{id} is not a valid manufacturer id.Retrieve List
Request
URI
https://api.{cluster}.toolwatch.net/manufacturersAllowable querystring parameters
Parameter | Description |
columns | Comma-separated list of properties to return. |
number | Filter by manufacturer number. |
Http Method
GET
Headers
Authorization: {token}
Request Body
Not allowed for GET
Response
200 Ok
By default every property is returned. Use the columns querystring parameter to limit the response to specific properties.
Field | Type | Description |
Id | guid | Unique identifier. |
Number | string | Manufacturer number. |
Name | string | Manufacturer name. |
Phone | string | Manufacturer phone. |
Fax | string | Manufacturer fax. |
Url | string | Manufacturer URL. |
Example response body:
[
{
"Id": "849197e3-6cc4-4150-ae71-3f2fc1fbc53d",
"Number": "Manufacturer Number 1",
"Name": "Manufacturer Name 1",
"Phone": "1234567890",
"Fax": "1234567890",
"Url": "https://example.com"
},
{
"Id": "cc09dbb0-6cc4-4150-ae71-3f2fc1fbc53d",
"Number": "Manufacturer Number 2",
"Name": "Manufacturer Name 2",
"Phone": "1234567890",
"Fax": "1234567890",
"Url": "https://example.com"
}
]
404 Not Found
Triggered when field parameters in querystring are not allowed.
Response body will contain error message
{"Message":"Criteria is invalid","Type":"Exception"}