Skip to main content

ToolWatch API: Shipping Methods

ToolWatch API requests to create, retrieve, and list shipping methods, with URIs, headers, fields, and example responses.

This article lists the ToolWatch API requests for shipping methods: 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/shippingmethods

Http Method

POST

Headers

Authorization: {token}

Request Body

Field

Type

Required

Description

Number

string

Yes

Shipping method number. Max 50 characters.

Description

string

Yes

Shipping method description. Max 50 characters.

Response

201 Created

The response header contains the URI for the newly created shipping method.

Location: https://api.{cluster}.toolwatch.net/shippingmethods/{id}

400 Bad Request

Triggered when field level validation fails.

Response body will contain validation message

[
{
"PropertyName": "Number",
"Message": "Please provide a shipping method number.",
"AttemptedValue": ""
}
]

Retrieve

Request

URI

https://api.{cluster}.toolwatch.net/shippingmethods/{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

Shipping method number.

Description

string

Shipping method description.

Example response body:

{
"Id": "{id}",
"Number": "Shipping Method Number",
"Description": "Shipping Method"
}

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 shipping method id.

Retrieve List

Request

URI

https://api.{cluster}.toolwatch.net/shippingmethods

Allowable querystring parameters

Parameter

Description

columns

Comma-separated list of properties to return.

number

Filter by shipping method 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

Shipping method number.

Description

string

Shipping method description.

Example response body:

[
{
"Id": "849197e3-6cc4-4150-ae71-3f2fc1fbc53d",
"Number": "Shipping Method Number 1",
"Description": "Shipping Method 1"
},
{
"Id": "cc09dbb0-6cc4-4150-ae71-3f2fc1fbc53d",
"Number": "Shipping Method Number 2",
"Description": "Shipping Method 2"
}
]

404 Not Found

Triggered when field parameters in querystring are not allowed.

Response body will contain error message

{"Message":"Criteria is invalid","Type":"Exception"}
Did this answer your question?