GET
/
admin
/
shipping-options
import Medusa from "@medusajs/js-sdk"

export const sdk = new Medusa({
  baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
  debug: import.meta.env.DEV,
  auth: {
    type: "session",
  },
})

sdk.admin.shippingOption.list()
.then(({ shipping_options, count, limit, offset }) => {
  console.log(shipping_options)
})
{
"limit": 123,
"offset": 123,
"count": 123,
"shipping_options": [
{}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

fields
string

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.

offset
number

The number of items to skip when retrieving a list.

limit
number

Limit the number of items returned in the list.

order
string

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 -.

id

Filter by a shipping option ID.

q
string

Search term to filter the shipping option's searchable properties.

service_zone_id

Filter by a service zone's ID to retrieve its associated shipping options.

shipping_profile_id

Filter by a shipping profile's ID to retrieve its associated shipping options.

provider_id

Filter by a fulfillment provider's ID to retrieve its associated shipping options.

shipping_option_type_id

Filter by a shipping option type's ID to retrieve its associated shipping options.

created_at
object

Filter by a shipping option's creation date.

updated_at
object

Filter by a shipping option's update date.

deleted_at
object

Filter by a shipping option's deletion date.

stock_location_id

Filter by a location ID to retrieve its associated shipping option.

is_return
boolean

Filter by whether the shipping option is used for returns.

admin_only
boolean

Filter by whether the shipping option is used by admin users only.

with_deleted
boolean

Whether to include deleted records in the result.

Response

200
application/json

OK

The paginated list of shipping options.