PlandalfDocsSign inStart free trial

API and webhooks

Offers

An offer is a checkout. List them to get each one's slug, the value plandalf.present() and data-plandalf-present take, and the prices it can sell. Offers are created and designed in the dashboard; see Create a checkout.

Example

curl "https://admin.plandalf.dev/api/v1/offers?status=published" \
  -H "Authorization: Bearer $PLANDALF_API_KEY"
{
  "data": [
    {
      "id": "8Di1dEf1LTe",
      "slug": "gold-membership-8Di1dEf1LTe",
      "name": "Gold membership",
      "status": "published",
      "test_mode": false,
      "checkout_url": "https://admin.plandalf.dev/o/gold-membership-8Di1dEf1LTe",
      "price_lookup_keys": ["gold-monthly", "gold-yearly"],
      "price_ids": [1, 2]
    }
  ]
}

The list holds your 200 most recent offers, newest first. status is draft, published or archived. Each offer lists the price_ids and price_lookup_keys it sells, so to find the checkout for one of your synced prices, look for its lookup key there. checkout_url is the checkout's hosted link.

Endpoint

List offers

GET /api/v1/offers

The organization's 200 most recent offers, newest first, each with every price it can sell. slug is what plandalf.present() and data-plandalf-present take. Use price_lookup_keys or price_ids to find the offers that sell one of your synced prices.

Parameters

NameInTypeWhat it is
status optionalquery"draft" | "published" | "archived"
curl https://admin.plandalf.dev/api/v1/offers \
  -H "Authorization: Bearer $PLANDALF_API_KEY"

Response

{
  "data": [
    {
      "id": "string",
      "slug": "string",
      "name": "string",
      "status": "string",
      "test_mode": true,
      "checkout_url": "string",
      "price_lookup_keys": [
        "string"
      ],
      "price_ids": [
        0
      ]
    }
  ]
}

Errors

StatusWhen
401The API key or OAuth token is missing or invalid.
422The request failed validation; errors lists the problems by field.