Create Service Level

Beta
POST/v1/operations/carriers/{carrier_id}/service-levels

Idempotent with Idempotency-Key header. Learn more

Adds a shipping service level to a carrier.

Use this for self-managed carriers, or to add a service a connected carrier does not publish. Service levels created here are never removed by a later sync of the carrier's services.

Permissions requiredValues:carriers:create
The role behind your API key or agent must grant every one of these permissions.
carrier_idstring

The carrier that will offer this service level.

include[]optional arrayenumValues:ownerowner.account

Sub-objects to expand in the response. When omitted, sub-objects are returned as null.

namestring

Human-readable name for the service level, shown to customers at checkout when the service level is visible.

codestring

Carrier-specific code identifying this service level (e.g. fedex_ground).

Must be unique among the carrier's service levels, and is returned as the service level's service_level_token.

customer_portal_visibilityoptional stringenumValues:visiblehidden

Whether customers can see and select this service level at checkout in the customer portal. Defaults to visible.

is_defaultboolean

Whether this becomes the carrier's default service level, pre-selected when the carrier is chosen.

Each carrier has at most one default; setting this to true clears the carrier's existing default.

default_transit_daysoptional integer

Business days this service typically takes in transit, used to work an order's ship-by date back from a promised delivery date.

A fallback: when a carrier can rate the lane, the transit it quotes is used instead. Leave unset for carriers that can be rated, and set it for those that cannot (freight, will-call), where it is the only transit the system will have.

idstring

Service level ID.

objectstringenumValues:service_level

Resource type identifier.

namestring

Human-readable name for the service level, shown to customers at checkout when the service level is visible.

service_level_tokenstring

Carrier-specific code identifying this service level (e.g. fedex_ground, ups_next_day_air).

For service levels synced from a connected carrier this is the carrier's own token, which is what rate shopping and label purchase are keyed on; for service levels you create yourself it is the code you supplied.

customer_portal_visibilitystringenumValues:visiblehidden

Whether customers can see and select this service level at checkout in the customer portal.

is_defaultboolean

Whether this is the carrier's default service level, pre-selected when the carrier is chosen.

Each carrier has at most one default; setting a new default clears the previous one. A default service level cannot be deleted until another service level takes its place or the flag is cleared.

default_transit_daysintegernullable

Business days this service typically takes in transit, used to work an order's ship-by date back from a promised delivery date.

A fallback for lanes the carrier has not quoted. Null means transit is unknown for this service rather than instant, so a ship-by date falls back to the promised delivery date itself.

ownerownerExpandablenullable

Provenance of this service level.

System-owned service levels are platform-provided defaults that cannot be updated or deleted; account-owned service levels are custom to your account.

objectstringenumValues:owner

Resource type identifier.

typestringenumValues:systemaccount

Where this resource came from.

  • system: a platform-provided default shared across all accounts; not editable.
  • account: created and owned by a specific account; the account field identifies which.
accountaccountExpandablenullable

The account that owns this resource.

Present only when type is account; system-owned resources have no owning account.

idstring

Account ID.

objectstringenumValues:account

Resource type identifier.

namestring

The account's display name.

default_billing_addressaddressnullable

The address billed by default on orders for this account.

Always returned as null in this endpoint.
default_shipping_addressaddressnullable

The address shipped to by default on orders for this account.

Always returned as null in this endpoint.
brandingaccount_brandingnullable

Customer-facing branding for the account, such as the logo, support contacts, and social links.

Always returned as null in this endpoint.
portalaccount_portalnullable

The account's customer portal settings, including the portal URL slug.

Always returned as null in this endpoint.
created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

Responses

201

Successful response for Create Service Level