Skip to main content
GET
/
admin
/
price-lists
/
{id}
/
prices
JS SDK
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.priceList.prices("plist_123")
.then(({ prices }) => {
  console.log(prices)
})
{
  "limit": 123,
  "offset": 123,
  "count": 123,
  "prices": [
    {
      "id": "<string>",
      "title": "<string>",
      "currency_code": "usd",
      "amount": 123,
      "raw_amount": {},
      "min_quantity": 123,
      "max_quantity": 123,
      "price_set_id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "deleted_at": "2023-11-07T05:31:56Z"
    }
  ],
  "estimate_count": 123
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

The ID of the price list to retrieve prices from.

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.

Response

OK

The list of prices.

limit
number
required

The maximum number of prices returned.

offset
number
required

The number of items skipped before retrieving the prices.

count
number
required

The total number of prices.

prices
object[]
required

The list of prices.

estimate_count
number

The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.