Create, edit or delete a bundle

Group articles and catalog subscriptions in a bundle. The weekend example pairs one article with one choice, then renames the bundle while keeping both links.

TaskOperation
Create a weekend bundlePOST /api/v1/admin/bundles
Edit bundle settings or replace its contentsPUT /api/v1/admin/bundles/{id}
Delete a bundleDELETE /api/v1/admin/bundles/{id}

Context and ownership

Allowed roles: support, admin, partner; root is also permitted. Send the assigned token and publication key. readonly/manager and service accounts cannot write; full_access does not enable these routes. Keep calls in trusted server code. Caller activation, session and current publication-relationship restrictions apply.

InputLocation / typeMeaning
resourceRequired header, publication public-key stringSupplies publication context, including content-key resolution when items are sent.
tokenRequired header, existing eligible token stringADMIN_TOKEN in examples.
idPUT/DELETE path, digit stringKnown numeric bundle ID, not a content key, Plan ID or subscription ID.

Create uses the publication’s existing partner. Update/delete use caller-eligible partners across publications, cached for 180 seconds; root uses the same check. Missing/ineligible records share bundle_not_found. Body partner_id/resource_id cannot transfer ownership.

Choose content keys from the selected publication and subscription IDs from the intended publication/customer catalog. Confirm each choice with your existing records before sending. Bundle links describe configuration, rather than purchase eligibility or reader access.

Examples use fictional bundle 8101, article weekend-feature, subscription 3001 and Plan 5001 with eligible partner context and configured USD. Responses are illustrative. Requests use cURL, Node.js 18+ fetch in an ES module (.mjs), and Python 3 urllib. Set WALLKIT_API_BASE to scheme and host only, plus RESOURCE_KEY and ADMIN_TOKEN. Scenarios are independent; example.com is stored metadata. See shared errors.

Inputs and replacement behavior

Create and update both require title, price and currency, including a title-only edit. Send JSON with Content-Type: application/json.

Body fieldType / requirementMeaning and constraints
titleRequired text; maximum 128Bundle label. No automatic trimming or post-trim nonempty promise.
priceRequired; amount-filteredSupply an intended nonnegative numeric amount. POST validates numeric input; both calls apply the amount processing below.
currencyRequired configured codeValidated before uppercase assignment; do not assume arbitrary lowercase input is accepted.
itemsOptional nonnull objectInitial links on create; complete two-group replacement when supplied on update, as below.
items.content[]Array of objects with required keyKnown exact content key in the selected publication, not a numeric content ID. No creation/sync or availability check.
items.subscriptions[]Array of objects with required idKnown intended catalog subscription ID. Choose the intended publication/customer catalog record and confirm eligibility separately. This does not assign a reader membership.

Supplied update items replaces both groups. Send every article and subscription to keep. An empty object clears both. Omit items or send null to keep links during a scalar edit. After failure, inspect both groups before repeating.

Create sends a complete article/subscription pair; update omits items to keep them. description, updated_at, id, partner_id and resource_id are not assigned from the body.

price is filtered to float, then text. A decimal point in the filtered text triggers multiplication by 100, rounding and integer conversion; otherwise rounding occurs without multiplication. There is no universal input money unit or conversion. The example uses integer-form 500 and stored price 500. Child prices are not summed.

Some writes can remain after error or commit, and completed responses do not confirm every save/link. Inspect both groups before repeating. Events do not confirm downstream processing or access recalculation.

Create a weekend bundle with an article and subscription

POST /api/v1/admin/bundles

Create for the publication’s existing partner and add initial article/subscription links.

Before you call

Use the allowed context. Confirm weekend-feature exists here and subscription 3001 is intended. Send both groups. See replacement rules before later PUT requests.

Request and example

Pagination, filter and sort are ignored. The request creates Weekend bundle, not child records or reader memberships.

The excerpt shows full bundle/content and immediate Plan/child fields, with a partial general subscription. Conditional fields follow the linked definitions. Assume all references resolve.

curl "${WALLKIT_API_BASE}/api/v1/admin/bundles" \
  -X POST \
  -H "resource: ${RESOURCE_KEY}" \
  -H "token: ${ADMIN_TOKEN}" \
  -H "Content-Type: application/json" \
  --data '{"title":"Weekend bundle","price":500,"currency":"USD","items":{"content":[{"key":"weekend-feature"}],"subscriptions":[{"id":3001}]}}'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/bundles`);
const response = await fetch(url, {
  method: "POST",
  headers: {"resource": process.env.RESOURCE_KEY, "token": process.env.ADMIN_TOKEN, "Content-Type": "application/json"},
  body: JSON.stringify({"title": "Weekend bundle", "price": 500, "currency": "USD", "items": {"content": [{"key": "weekend-feature"}], "subscriptions": [{"id": 3001}]}})
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError

url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/bundles"
body = json.dumps({'title': 'Weekend bundle', 'price': 500, 'currency': 'USD', 'items': {'content': [{'key': 'weekend-feature'}], 'subscriptions': [{'id': 3001}]}}).encode("utf-8")
request = Request(
    url,
    data=body,
    headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"], "Content-Type": "application/json"},
    method="POST"
)
try:
    with urlopen(request) as response:
        print(response.status, json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))

HTTP 201 response excerpt:

{
  "id": 8101,
  "title": "Weekend bundle",
  "price": 500,
  "currency": "USD",
  "created_at": "2026-11-03 12:00:00",
  "items": {
    "content": [
      {
        "key": "weekend-feature",
        "title": "Weekend feature",
        "description": "Illustrative article metadata.",
        "price": 0,
        "currency": "USD",
        "extra": {},
        "link": "https://example.com/articles/weekend-feature",
        "created_at": "2026-11-03 12:00:00",
        "updated_at": "2026-11-03 12:00:00",
        "published_at": null,
        "images": [],
        "is_payable_content": false
      }
    ],
    "subscriptions": [
      {
        "id": 3001,
        "title": "Weekend subscription",
        "plan_id": 5001,
        "price": 500,
        "currency": "USD",
        "period": "1 month",
        "active": true,
        "private": false,
        "public": true,
        "next_subscription": null,
        "downgrade_subscription": null,
        "plan": {
          "id": 5001,
          "title": "Weekend Plan",
          "slug": "weekend-plan",
          "description": "Illustrative configuration.",
          "full_access": false,
          "predictive_paywall": false,
          "predictive_percents": 0,
          "can_own_teams": false,
          "priority": 1,
          "private": false,
          "active": true,
          "extra": {},
          "public": true,
          "subscriptions": [
            {
              "id": 3001,
              "title": "Weekend subscription",
              "price": 500,
              "currency": "USD",
              "period": "1 month"
            }
          ]
        }
      }
    ]
  }
}

Alternative: The selected-publication article is missing

HTTP 412 response:

{
  "error": "content_not_found",
  "error_description": "Content not found",
  "req_guid": "synthetic-request-reference"
}

The content key was not found during item processing. A bundle may already have been saved; inspect it before repeating.

Recovery and next task

HTTP statusAPI code / shapeCauseNext action
406incorrect_data / Body must be json formatMissing JSON or a value treated as empty by the API.Send the intended JSON object.
409invalid_title, invalid_price or invalid_currency / validator messageRequired scalar validation fails.Correct the reported field and configured currency.
406invalid_content_key / Parameter key in content requiredContent entry has no key field.Supply the intended plain publication content key; inspect state if processing began.
412content_not_found / Content not foundNo content matches the supplied key/current publication.Check the known stored key and publication, then inspect persisted bundle state.
406 / 412invalid_subscription_id / Parameter key in subscription required; subscription_not_found / Subscription not foundMissing id field or missing catalog subscription. The first message literally says key.Supply the intended subscription id and independently verify ownership; inspect prior writes before retrying.
406 / 412 / variesadd_content_fail, add_subscription_fail, exception / message, or other failureLink/save/event/response failure after possible writes.Retain diagnostics and inspect both stored groups before resubmitting.

Read the bundle to inspect saved links.

Edit the weekend bundle

PUT /api/v1/admin/bundles/{id}

Edit a bundle in caller-eligible partner scope, not just the header publication. Resend title, price and currency. Supplied items replaces both groups; the example omits it to retain them.

Request and example

Send the allowed context and numeric ID, with all three scalar fields. Pagination, filter and sort are ignored. Zero has no separate action error; nondigit routes do not guarantee this JSON format.

Assume the bundle has the example’s article/subscription pair. Rename while resending price/currency and omitting items. For replacement, send complete groups in the create format, not a partial patch.

Use the same expanded field meanings. Success is 201, not 200, even for update.

curl "${WALLKIT_API_BASE}/api/v1/admin/bundles/8101" \
  -X PUT \
  -H "resource: ${RESOURCE_KEY}" \
  -H "token: ${ADMIN_TOKEN}" \
  -H "Content-Type: application/json" \
  --data '{"title":"Weekend reading bundle","price":500,"currency":"USD"}'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/bundles/8101`);
const response = await fetch(url, {
  method: "PUT",
  headers: {"resource": process.env.RESOURCE_KEY, "token": process.env.ADMIN_TOKEN, "Content-Type": "application/json"},
  body: JSON.stringify({"title": "Weekend reading bundle", "price": 500, "currency": "USD"})
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError

url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/bundles/8101"
body = json.dumps({'title': 'Weekend reading bundle', 'price': 500, 'currency': 'USD'}).encode("utf-8")
request = Request(
    url,
    data=body,
    headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"], "Content-Type": "application/json"},
    method="PUT"
)
try:
    with urlopen(request) as response:
        print(response.status, json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))

HTTP 201 response excerpt:

{
  "id": 8101,
  "title": "Weekend reading bundle",
  "price": 500,
  "currency": "USD",
  "created_at": "2026-11-03 12:00:00",
  "items": {
    "content": [
      {
        "key": "weekend-feature",
        "title": "Weekend feature",
        "description": "Illustrative article metadata.",
        "price": 0,
        "currency": "USD",
        "extra": {},
        "link": "https://example.com/articles/weekend-feature",
        "created_at": "2026-11-03 12:00:00",
        "updated_at": "2026-11-03 12:00:00",
        "published_at": null,
        "images": [],
        "is_payable_content": false
      }
    ],
    "subscriptions": [
      {
        "id": 3001,
        "title": "Weekend subscription",
        "plan_id": 5001,
        "price": 500,
        "currency": "USD",
        "period": "1 month",
        "active": true,
        "private": false,
        "public": true,
        "next_subscription": null,
        "downgrade_subscription": null,
        "plan": {
          "id": 5001,
          "title": "Weekend Plan",
          "slug": "weekend-plan",
          "description": "Illustrative configuration.",
          "full_access": false,
          "predictive_paywall": false,
          "predictive_percents": 0,
          "can_own_teams": false,
          "priority": 1,
          "private": false,
          "active": true,
          "extra": {},
          "public": true,
          "subscriptions": [
            {
              "id": 3001,
              "title": "Weekend subscription",
              "price": 500,
              "currency": "USD",
              "period": "1 month"
            }
          ]
        }
      }
    ]
  }
}

Alternative: Missing or ineligible bundle

HTTP 404 response:

{
  "error": "bundle_not_found",
  "error_description": "Bundle not found",
  "req_guid": "synthetic-request-reference"
}

Missing and partner-ineligible bundles share this result. Root uses the same check.

Recovery and next task

HTTP statusAPI code / shapeCauseNext action
404bundle_not_found / Bundle not foundMissing ID or ineligible partner configuration.Check the known bundle/context with the integration operator; do not infer global absence.
406incorrect_data / Body must be json formatMissing JSON or a value treated as empty by the API.Send the intended JSON object.
409invalid_title, invalid_price or invalid_currency / validation messageA required scalar field fails its applicable validation.Include all three fields with intended amount/configured currency.
406 / 412Item-specific codes described for createSupplied items is invalid or a referenced record/link fails after replacement may begin.Inspect both groups and rebuild the complete intended set only after resolving the error.
412 / variesexception / message or unnormalized runtime/transport failureWrite/refresh/event/response-format failure, possibly after commit.Keep diagnostics and inspect persisted configuration before retrying; no rollback or unchanged-state guarantee.

Read saved links, including after failed replacement.

Delete a bundle

DELETE /api/v1/admin/bundles/{id}

Delete the bundle while retaining its referenced articles/subscriptions. Depending on deployed database rules, content, subscription, promo and user-bundle links can also be removed. Review shared uses and paid-user/history dependencies before removal. Inspect remaining links afterward, and manage reader memberships, refunds and access through their separate workflows.

Request and example

Send the allowed context and intended numeric ID. The partner check still applies. Body, pagination, filter and sort are ignored. A failed request can leave changes; inspect before repeating.

Assume the fictional bundle exists and database constraints allow deletion.

curl "${WALLKIT_API_BASE}/api/v1/admin/bundles/8101" \
  -X DELETE \
  -H "resource: ${RESOURCE_KEY}" \
  -H "token: ${ADMIN_TOKEN}"
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/bundles/8101`);
const response = await fetch(url, {
  method: "DELETE",
  headers: {"resource": process.env.RESOURCE_KEY, "token": process.env.ADMIN_TOKEN}
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError

url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/bundles/8101"
request = Request(
    url,
    headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"]},
    method="DELETE"
)
try:
    with urlopen(request) as response:
        print(response.status, json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))

HTTP 200 response:

{
  "result": true
}
FieldType / presenceMeaning
resultBoolean; addedModel delete result. False is possible, unlike taxonomy/term deletion's fixed reply. It is not a complete cleanup, cancellation/refund or downstream-completion report.

Alternative: Missing or ineligible bundle

HTTP 404 response:

{
  "error": "bundle_not_found",
  "error_description": "Bundle not found",
  "req_guid": "synthetic-request-reference"
}

A repeated delete can return not found instead of success.

Recovery and next task

HTTP statusAPI code / shapeCauseNext action
404bundle_not_found / Bundle not foundMissing ID or caller's partner check fails.Inspect the known bundle/context without inferring global absence.
200result:falseModel delete returned false.Inspect stored state and available diagnostics before another action.
Varies / no guaranteed JSONSnapshot, constraint, event, runtime or transport failureError formats can vary, and a failure can follow deletion.Retain diagnostics and inspect record/links before retrying; no safe repetition or full cascade promise.

Browse bundles for remaining configuration. Reader and payment state need separate checks.

Read the expanded bundle

Create and update both return HTTP 201 with an expanded bundle at the top level, without a list wrapper. Promotion-linked bundles have fewer fields.

Returned field/objectType / presenceMeaning
idInteger; presentBundle ID.
titleStored text / nullable; presentDisplay label.
priceInteger; presentStored amount with unspecified units; not calculated from children.
currencyStored string / nullable; presentCurrency code.
created_atStored timestamp; presentCreation time, timezone unspecified. No updated_at or update-time confirmation.
itemsObject; presentcontent[] and subscriptions[], including empty arrays.
items.content[]Array; present12 content fields and image meanings, without numeric ID, taxonomy, VAT or content_type.
items.subscriptions[]Array; presentGeneral subscription with expanded immediate Plan:14 fields and lightweight id,title,price,currency,period children. Admin timestamps/country_vat stay conditional. Next/downgrade keep compact Plans and nesting limits.

description, updated_at, partner_id, resource_id and VAT are absent from the bundle. Linked records can belong to other publications. Subscriptions and Plans can be inactive or private; content shows stored metadata and its publication timestamp. Order and uniqueness are unspecified; dangling links can fail instead of being skipped. No purchase or access decision is returned.

Full diagram

Use the arrow keys to scroll. Escape closes this view.

Search documentation

Enter at least 2 characters.

    ↑ ↓ move through results · Enter opens · Escape closes