Shipping Option Types API Routes

Shipping option types define a group of shipping options with shared shipping characterstics. For example, you may have "Standard" and "Express" shipping option types. These API routes allow admins to manage shipping option types.

GET /admin/shipping-option-types#

List Shipping Option Types

Retrieve a list of shipping option types. The shipping option types can be filtered by fields such as id. The shipping option types can also be sorted or paginated.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Query parameters

fieldsstringOptional
Comma-separated fields that should be included in the returned data. if a field is prefixed with + it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.
offsetnumberOptional
The number of items to skip when retrieving a list.
limitnumberOptional
Limit the number of items returned in the list.
orderstringOptional
The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with -.
with_deletedbooleanOptional
Whether to include deleted records in the result.
qstringOptional
Search query to apply on the shipping option type's searchable properties.
idstring | string[]Optional
Filter by a shipping option type's ID.
labelstring | string[]Optional
Filter by a shipping option type's label.
codestring | string[]Optional
Filter by a shipping option type's code.
created_atobjectOptional
Filter by a shipping option type's creation date. Accepts the filter operators.
updated_atobjectOptional
Filter by a shipping option type's update date. Accepts the filter operators.
deleted_atobjectOptional
Filter by a shipping option type's deletion date. Accepts the filter operators.
$andobject[]Optional
Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
$orobject[]Optional
Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
descriptionstring | string[]Optional
Filter by a shipping option type's description.

Request examples

Responses

200 OK

limitnumber
The maximum number of items returned.
offsetnumber
The number of items skipped before returning the results.
countnumber
The total number of items.
estimate_countnumberOptional
The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
shipping_option_typesobject[]
The list of shipping option types.

400, 401, 404, 409, 422, 500: an error response is returned.


POST /admin/shipping-option-types#

Create Shipping Option Type

Create a shipping option type.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Query parameters

fieldsstringOptional
Comma-separated fields that should be included in the returned data. if a field is prefixed with + it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.

Request body (application/json)

labelstring
The type's label.
descriptionstringOptional
The type's description.
codestring
The type's code.

Request examples

Responses

200 OK

shipping_option_typeobject
The shipping option's details.

400, 401, 404, 409, 422, 500: an error response is returned.

Emitted events

  • shipping-option-type.created: Emitted when shipping option types are created.

GET /admin/shipping-option-types/{id}#

Get a Shipping Option Type

Retrieve a shipping option type by its ID. You can expand the shipping option type's relations or select the fields that should be returned.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Path parameters

idstring
The shipping option type's ID.

Query parameters

fieldsstringOptional
Comma-separated fields that should be included in the returned data. if a field is prefixed with + it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.

Request examples

Responses

200 OK

shipping_option_typeobject
The shipping option's details.

400, 401, 404, 409, 422, 500: an error response is returned.


POST /admin/shipping-option-types/{id}#

Update a Shipping Option Type

Update a shipping option type's details.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Path parameters

idstring
The shipping option type's ID.

Query parameters

fieldsstringOptional
Comma-separated fields that should be included in the returned data. if a field is prefixed with + it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.

Request body (application/json)

codestringOptional
The shipping option type's code.
descriptionstringOptional
The shipping option type's description.
labelstringOptional
The shipping option type's label.

Request examples

Responses

200 OK

shipping_option_typeobject
The shipping option's details.

400, 401, 404, 409, 422, 500: an error response is returned.

Emitted events

  • shipping-option-type.updated: Emitted when shipping option types are updated.

DELETE /admin/shipping-option-types/{id}#

Delete a Shipping Option Type

Delete a shipping option type.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Path parameters

idstring
The shipping option type's ID.

Request examples

Responses

200 OK

idstring
The shipping option type's ID.
objectstring
The name of the deleted object.

Default: "shipping_option_type"

deletedboolean
Whether the Shipping Option Type was deleted.

400, 401, 404, 409, 422, 500: an error response is returned.

Emitted events

  • shipping-option-type.deleted: Emitted when shipping option types are deleted.
Found a problem with this page?Report Issue
Edited Nov 14·Edit this page