Skip to main content

Service levels API (v0)

Download OpenAPI specification:Download

Represents service levels for routing configuration at NewStore.

Important: This endpoint should be used once you have initialized the new version of the configuration through the Routing Ruleset API.

List service levels

Retrieves all the service levels configurations for your business.

Authorizations:
newStoreAccessToken

Responses

Response samples

Content type
application/json
{
  • "2_DAY": {
    },
  • "GROUND": {
    }
}

Set service levels

Updates all the service levels configurations for your business.

Authorizations:
newStoreAccessToken
Request Body schema: application/json
pattern property
object (Service level)

Service level config

currency_code
required
string = 3 characters

Currency in the ISO 4217 Alpha-3-character format https://www.iso.org/iso-4217-currency-codes.html.

delivery_time
required
string

User friendly description of amount of time needed to deliver.

delivery_time_after_cutoff_hour
required
string

User friendly description of amount of time needed to deliver.

display_name
required
string

Customer-facing name of the service level (known as 'shipping option' to the consumer). This value is displayed in the NewStore Apps.

price
required
number >= 0

Value charged to deliver.

remorse_period
required
number [ 2 .. 3000 ]

The number of seconds the order will stay in on-hold state before it is processed further by the fulfillment part. This is a period during which the order can be manually cancelled.

tax_code
required
string

The identifier for the tax applied.

Responses

Request samples

Content type
application/json
{
  • "2_DAY": {
    },
  • "GROUND": {
    }
}

Response samples

Content type
application/json
{
  • "fulfillment_config_uri": "fulfillment_config/revisions/1",
  • "service_levels": {
    }
}

Patch service levels

Patch list of shipping levels configurations for your business with the given JSONPatch.

Authorizations:
newStoreAccessToken
Request Body schema: application/json
Array
One of
path
required
string

A JSON Pointer path.

op
required
string
Enum: "add" "replace" "test"

The operation to perform.

value
required
any

The value to add, replace or test.

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "fulfillment_config_uri": "fulfillment_config/revisions/1",
  • "service_levels": {
    }
}

Get service level

Retrieves the service level by its identifier.

Authorizations:
newStoreAccessToken
path Parameters
id
required
string

The ID of the service level. To retrieve the ID, use the List service levels method.

Responses

Response samples

Content type
application/json
{
  • "2_DAY": {
    }
}