Subscription API - Get packages

Get packages

GET *base*/subscription/packages Authentication : API Key

Receive a list of all the active packages and their price in the provided pricelist.

Parameters

pricelist
string
required

Name of pricelist to list packages for.

Request example

GET <base>/subscription/packages?pricelist=SEK HTTP/1.1
Content-Type: application/x-www-form-urlencoded

Response

200 Content-type: application/json

packages
array
required

List of all packages in the selected currency.

id
int
required

ID of the package

name
string
optional

Name of the package

price
string
optional

Price amount for the package

currency
string
optional

Currency code for the package. SEK, USD, EUR, etc.

products
array
optional

Array of products inside the package.

id
int
optional

ID of the product

size
string
optional

Size name of the product selected in the package.

variant
string
optional

Variant name of the product selected in the package.

product
string
optional

Product name

Response examples

HTTP/1.1 200 OK
Content-type: application/json

{
  "packages": [
    {
      "id": 1,
      "name": "Super Package 5000",
      "price": "123.50",
      "currency": "SEK",
      "products": [
        {
          "id": "1",
          "size": "S",
          "variant": "Red",
          "product": "T-shirt"
        }
      ]
    },
    {
      "id": 2,
      "name": "Super Package 10000",
      "price": "246.50",
      "currency": "SEK",
      "products": [
        {
          "id": "1",
          "size": "L",
          "variant": "Red",
          "product": "T-shirt"
        }
      ]
    }
  ]
}