Content metadata

Read an existing item’s description with this call. To decide whether to serve it, follow the access walkthrough; metadata alone does not grant permission.

Get content metadata

GET /api/v1/content/{key}

Read the selected resource’s content description and taxonomy metadata. This call does not evaluate entitlement or record an allowed view; use the access-check operation to decide whether to serve it.

Before you call

Use a content key from your publishing integration or existing metadata record. The item must exist in the selected resource. No member token or access decision is required for this metadata read. Use the API base and resource public key already supplied for your integration; these pages do not issue credentials.

Request

GET with no request body or request Content-Type requirement. Response media type is JSON. Permits guest access with the context described above. See credential transport.

NameLocationTypeRequirement / defaultMeaning and constraint
resourceheaderstringrequired contextPublic resource key; not the secret.
keypathstringyesContent key, trimmed; URL-encode as one path segment.

Result

HTTP 200 JSON.

Field / projectionType / presenceMeaning
itempublic content detailUse the field definitions. Taxonomies are keyed groups with a single terms object; this is not the all-terms projection.

Example: get content metadata

Find article-1001’s metadata in the publication. Topic/music shows how this detail response returns one term per taxonomy group. Supply the sample configuration and runtimes. These three requests are equivalent.

cURL

curl "${WALLKIT_API_BASE}/api/v1/content/article-1001" \
  -H "resource: ${RESOURCE_KEY}"

JavaScript

// Node.js 18+; built-in fetch. Supply existing integration configuration.
async function main() {
  const url = new URL("/api/v1/content/article-1001", process.env.WALLKIT_API_BASE);
  const headers = { resource: process.env.RESOURCE_KEY };
  const response = await fetch(url, { method: "GET", headers });
  const body = await response.json();
  console.log(response.status, body);
}
main().catch(console.error);

Python

# Python 3; standard library only.
import json
import os
from urllib.error import HTTPError
from urllib.parse import urlencode, urljoin
from urllib.request import Request, urlopen

url = urljoin(os.environ["WALLKIT_API_BASE"], "/api/v1/content/article-1001")
headers = {"resource": os.environ["RESOURCE_KEY"]}
request = Request(url, headers=headers, method="GET")
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 excerpt:

{
  "item": {
    "id": 1001,
    "key": "article-1001",
    "title": "An introduction to synthesis",
    "price": 0,
    "currency": "USD",
    "is_payable_content": false,
    "content_type": "article",
    "taxonomies": {
      "topic": {
        "key": "topic",
        "title": "Topic",
        "terms": {
          "key": "music",
          "title": "Music"
        }
      }
    }
  }
}

Alternate result

HTTP 404: article-1001 is not registered in the selected resource. Check the publisher-provided key and resource. Use sync-and-check only when your integration intends to create the missing record.

Response excerpt:

{
  "error": "incorrect_content_key",
  "error_description": "Content not exist",
  "req_guid": "example-request"
}

Recovery

HTTP statusAPI code / responseCauseNext action
404resource_not_existsRequired resource is missing or unknown.Check the resource public key and selected integration context with the administrator.
404incorrect_resource_keyResource context is invalid for the selected resource.Check the resource public key and selected integration context with the administrator.
404incorrect_content_keyEmpty key or content does not exist in this resource.Check the publisher-provided content key in this resource. Use sync-and-check only for intended, enabled creation.

Common identity/configuration errors explain applicable session failures. Follow this operation’s exceptions rather than assuming every call uses the same envelope.

Next task

Check this visitor’s access before serving the item. Metadata does not establish permission.

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