Skip to main content
GET
/
account
/
subscriptions
/
{subscriptionId}
Get a subscription
curl --request GET \
  --url https://api.marzipan.co/v1/account/subscriptions/{subscriptionId} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.marzipan.co/v1/account/subscriptions/{subscriptionId}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.marzipan.co/v1/account/subscriptions/{subscriptionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.marzipan.co/v1/account/subscriptions/{subscriptionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.marzipan.co/v1/account/subscriptions/{subscriptionId}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.marzipan.co/v1/account/subscriptions/{subscriptionId}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.marzipan.co/v1/account/subscriptions/{subscriptionId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "id": "1224f9ef-8caf-4564-9474-023f95819949",
  "subscriptionType": "picknmix",
  "email": "customer@example.com",
  "name": "Discovery Club",
  "quantity": 1,
  "status": "active",
  "createdAt": "07/10/2024",
  "options": {},
  "availableItems": [
    {
      "id": "084b80ef-d16d-4531-a25f-40b7ff4c744b",
      "name": "House Red",
      "sku": "WINE-RED-01",
      "defaultQty": 1,
      "minQty": 0,
      "maxQty": 6,
      "sortOrder": 1,
      "price": "£9.99",
      "status": "active",
      "image": {
        "url": "https://cdn.marzipan.co/images/house-red.jpg"
      }
    }
  ],
  "pickAndMixItems": [
    {
      "id": "084b80ef-d16d-4531-a25f-40b7ff4c744b",
      "name": "House Red",
      "sku": "WINE-RED-01",
      "quantity": 2,
      "image": {
        "url": "https://cdn.marzipan.co/images/house-red.jpg"
      }
    }
  ],
  "batchedShipments": false,
  "upcomingShipments": [
    {
      "id": "c2b0f3d1-1111-2222-3333-444455556666",
      "name": "January Shipment",
      "items": [],
      "status": "scheduled",
      "nextBillingDate": null,
      "processingDate": "01/02/2026",
      "shippingDate": "03/02/2026",
      "deliveryDate": "04/02/2026"
    }
  ],
  "currentPeriodStart": "07/10/2025",
  "currentPeriodEnd": "07/01/2026",
  "expiresAt": "07/10/2030",
  "billingInterval": 3,
  "billingIntervalFriendly": "every 3 months",
  "nextBillingDate": "07/01/2026",
  "upcomingAdditionalItems": [],
  "hasProcessingShipment": false,
  "price": {
    "friendly": "£9.99",
    "raw": 9.99
  },
  "preferredDeliveryOption": "delivery",
  "preferredDeliveryAddress": {
    "id": "aa11bb22-cc33-dd44-ee55-ff6677889900",
    "line1": "1 High Street",
    "city": "London",
    "postcode": "SW1A 1AA"
  },
  "defaultPaymentMethod": {
    "cardType": "visa",
    "cardLast4": "4242",
    "cardExpMonth": 12,
    "cardExpYear": 2028
  },
  "paymentProvider": "stripe",
  "paymentProviders": {
    "stripe": {
      "publishableKey": "pk_live_xxx",
      "accountId": "acct_xxx",
      "currency": "gbp"
    }
  }
}
{
"message": "Unauthenticated."
}
{
"message": "Subscription not found"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is the account token returned from the Login endpoint.

Path Parameters

subscriptionId
string<uuid>
required

Subscription ID

Response

Success

Full detail of a customer subscription.

id
string<uuid>

Subscription ID

subscriptionType
enum<string>

Type of subscription

Available options:
variable,
picknmix
email
string

Customer email address

name
string

Subscription / product name

quantity
integer

Subscription quantity

status
string

Subscription status

createdAt
string

Creation date (DD/MM/YYYY) or relative time if today

options
object

Subscription options

availableItems
object[]

Available pick & mix items. Only present for picknmix subscriptions

pickAndMixItems
object[]

Currently selected pick & mix items. Only present for picknmix subscriptions

batchedShipments
boolean

Whether shipments are batched

upcomingShipments
object[]

Upcoming (non-skipped) scheduled shipments

currentPeriodStart
string

Current billing period start (DD/MM/YYYY)

currentPeriodEnd
string

Current billing period end (DD/MM/YYYY)

expiresAt
string

Subscription end date (DD/MM/YYYY)

billingInterval
integer

Billing interval in months

billingIntervalFriendly
string

Human-friendly billing interval

nextBillingDate
string | null

Next billing date (DD/MM/YYYY)

upcomingAdditionalItems
object[] | null

Additional one-off items on the next shipment

hasProcessingShipment
boolean

Whether a shipment is currently being processed

failedRenewal
object | null

Present only when an active subscription's last renewal failed

price
object
preferredDeliveryOption
enum<string> | null

Preferred shipping option

Available options:
pickup,
delivery
preferredDeliveryAddress
object | null

Preferred delivery address

preferredPickupLocation
object | null

Preferred pickup location

defaultPaymentMethod
object | null

Default payment method for the subscription

paymentProvider
string

Payment provider for the default payment method

paymentProviders
object

Configuration for each payment provider enabled on the tenant (stripe, paypal, payfast)