# Content

The CDA (Content Delivery API) is a read-only API that delivers published resources to public visitors. This page covers how to read published *Content*, that is, each individual piece of real data created following the template called a *Content Type*. Because CDA delivers a snapshot from the time of publishing, drafts that have not yet been published in the content studio do not appear here.

CDA has only read (GET) endpoints; creating, editing, and publishing *Content* is the responsibility of [CMA Content](/api/reference/cma/content.md). For CDA's common behavior, such as authentication and the published delivery model (the published snapshot, `revision`, published-only visibility, and author exposure being dependent on `publishWithAuthor`), see the [CDA overview](/api/reference/cda.md). How values are resolved by `locale` is covered in [locale and fields](#locale-and-fields) below.

## Resource structure {#resource-structure}

The following is how CDA delivers, in a single read with `locale=en-US`, one published *Content* from the demo *Space* (the "Stainless Tumbler 500ml" product). Along with `sys` (system properties), it has `fields`, which holds the field values of the *Content Type* this *Content* follows.

```json
{
  "sys": {
    "id": "3trmXRM3RqbgSnifyg7PBUM8Ds0Xvw",
    "type": "Content",
    "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
    "contentType": { "sys": { "id": "3trmXRM3RqbgSnifyg7PAmlxvX4fGY", "type": "Refer", "targetType": "ContentType" } },
    "createdAt": "2026-06-17T16:58:56.660Z",
    "updatedAt": "2026-06-18T01:46:55.604Z",
    "revision": 3
  },
  "fields": {
    "price": 18000,
    "description": "Double-wall vacuum insulation keeps drinks hot or cold for hours. A roomy 500ml.",
    "photo": null,
    "productName": "Stainless Tumbler 500ml"
  }
}
```

Key properties:

- `sys.id`: The unique identifier of the *Content*. It goes into `{contentId}` in the single-read path.
- `sys.contentType`: A `Refer` pointing to the *Content Type* (template) this *Content* follows. Its `sys.id` is the identifier of that *Content Type*, and you can read which fields it has in [CDA Content Type](/api/reference/cda/content-type.md).
- `sys.revision`: The version at the time it was published. Because CDA does not carry the management `version`, `revision` is the only value that points to the published version.
- `fields`: An object keyed by the `apiName` of each field of the *Content Type*. The value is a single value resolved for the requested `locale` (not a locale map). In the example above, `photo` is `null` because no *Media* is linked.

## System properties (sys) {#system-properties-sys}

The `sys` of a published *Content* carries only properties for the published snapshot. `space`, `contentType`, `createdBy`, and `updatedBy` are in the `Refer` shape (`{ "sys": { "id", "type": "Refer", "targetType" } }`).

| Property | Type | Description |
|---|---|---|
| `id` | string | Unique resource identifier. |
| `type` | string | Resource kind. For a *Content* this is always `"Content"`. |
| `space` | Refer&lt;Space&gt; | The *Space* this *Content* belongs to. |
| `contentType` | Refer&lt;ContentType&gt; | The *Content Type* (template) this *Content* follows. |
| `createdAt` | string (date-time) | Creation time. |
| `updatedAt` | string (date-time) | Last update time. |
| `revision` | integer | The version at the time it was published. Each publish records the version at that moment here. |
| `createdBy` | Refer&lt;User&gt; | The user who created it. Included only when the `publishWithAuthor` of the *Content Type* this *Content* follows is on. |
| `updatedBy` | Refer&lt;User&gt; | The user who last updated it. Included only when `publishWithAuthor` is on. |

Because this is a published snapshot, the `version`, `status`, `publish`, and `archive` found in CMA's `sys` are not carried. `revision` is the only value that points to the published version.

## locale and fields {#locale-and-fields}

The `locale` query parameter chooses which language to receive. It behaves in three ways.

- Given a **code** such as `locale=ko-KR`, `fields` comes back as a single value for that locale. Unlike CMA, which returns a map holding every per-locale value such as `fields.productName.en-US`, CDA picks the value for the one requested locale and places it directly in `fields.productName`. If there is no value and the *Fallback* does not reach one either, that field becomes `null` (in the [Resource structure](#resource-structure) above, `photo` is `null` because no *Media* is linked).
- **Omitted**, it returns the same way for the *Space*'s default *Locale*.
- Given **`locale=*`**, it does not pick a single language and returns the map holding all per-locale values (`fields.productName.en-US`) as is, like CMA.

When you receive a single language by code or by omission, the response carries an `x-weegloo-locale` header that reports the locale actually used (it is absent when `locale=*`). Per-locale value selection and fallback rules are covered in [Localization (concept)](/getting-started/core-concepts/content/localization.md).

## API {#api}

The base URL for the four endpoints below is `https://cda.weegloo.com/v1`, and a Bearer token that authenticates against CDA is required in the `Authorization` header. All four endpoints take the `locale` query parameter (see [locale and fields](#locale-and-fields) above). The first two endpoints target the published *Content* of the entire *Space*, and the last two target only the *Content* belonging to a specific *Content Type*.

When you filter or sort the first two endpoints (the *Space*-wide flat list) by `fields.*`, you must also scope them with `sys.contentType.sys.id={contentTypeId}` — a bare `contentType={contentTypeId}` does not substitute for it. The last two endpoints already carry the *Content Type* in the path, so they do not need it.

```api-endpoint
{
  "title": "List published Content",
  "method": "GET",
  "path": "/spaces/{spaceId}/contents",
  "description": "Reads the list of published Content in a Space, page by page. Only published items are included; unpublished Content is not.",
  "responseStatus": 200,
  "baseUrl": "https://cda.weegloo.com/v1",
  "pathParameterSchema": {
    "spaceId": { "type": "string", "description": "The sys.id of the Space", "required": true }
  },
  "queryParameterSchema": {
    "locale": { "type": "string", "description": "Language to receive. A code (e.g. en-US) returns values for that locale, omitting it uses the default Locale, and * returns the full locale map." },
    "limit": { "type": "integer", "description": "Number of items to return per page (1-100)", "default": 15 },
    "skip": { "type": "integer", "description": "Number of items to skip", "default": 0 },
    "next": { "type": "string", "description": "Next page cursor (the value obtained from links.next in the previous response)" },
    "prev": { "type": "string", "description": "Previous page cursor (the value obtained from links.prev in the previous response)" },
    "order": { "type": "string", "description": "Sort criteria. Comma-separated for multi-level sorting (e.g. sys.createdAt,sys.id)", "default": "sys.createdAt,sys.id" },
    "include": { "type": "integer", "description": "Related-resource inclusion level. 0=default, 1=related resources, 2=nested relations, 3=full", "default": 0 },
    "select": { "type": "string", "description": "Fields to include (sys.id,sys.createdAt) or exclude (-sys.id). Do not mix include and exclude." }
  },
  "additionalQueryParams": true,
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (CDA authentication; usually a DeliveryAccessToken)" }
  },
  "responseExample": {
    "sys": { "type": "TotalPageResponse" },
    "limit": 15,
    "totalCount": 1,
    "items": [
      {
        "sys": {
          "id": "3trmXRM3RqbgSnifyg7PBUM8Ds0Xvw",
          "type": "Content",
          "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
          "contentType": { "sys": { "id": "3trmXRM3RqbgSnifyg7PAmlxvX4fGY", "type": "Refer", "targetType": "ContentType" } },
          "createdAt": "2026-06-17T16:58:56.660Z",
          "updatedAt": "2026-06-18T01:46:55.604Z",
          "revision": 3
        },
        "fields": {
          "price": 18000,
          "description": "Double-wall vacuum insulation keeps drinks hot or cold for hours. A roomy 500ml.",
          "photo": null,
          "productName": "Stainless Tumbler 500ml"
        }
      }
    ],
    "links": { "self": "/v1/spaces/tcq4V2Xb/contents?locale=en-US" }
  }
}
```

```api-endpoint
{
  "title": "Read a single published Content",
  "method": "GET",
  "path": "/spaces/{spaceId}/contents/{contentId}",
  "description": "Reads one published Content by sys.id. Unpublished Content is not delivered.",
  "responseStatus": 200,
  "baseUrl": "https://cda.weegloo.com/v1",
  "pathParameterSchema": {
    "spaceId": { "type": "string", "description": "The sys.id of the Space", "required": true },
    "contentId": { "type": "string", "description": "The sys.id of the Content", "required": true }
  },
  "queryParameterSchema": {
    "locale": { "type": "string", "description": "Language to receive. A code (e.g. en-US) returns values for that locale, omitting it uses the default Locale, and * returns the full locale map." },
    "include": { "type": "integer", "description": "Related-resource inclusion level. 0=default, 1=related resources, 2=nested relations, 3=full", "default": 0 }
  },
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (CDA authentication; usually a DeliveryAccessToken)" }
  },
  "responseExample": {
    "sys": {
      "id": "3trmXRM3RqbgSnifyg7PBUM8Ds0Xvw",
      "type": "Content",
      "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
      "contentType": { "sys": { "id": "3trmXRM3RqbgSnifyg7PAmlxvX4fGY", "type": "Refer", "targetType": "ContentType" } },
      "createdAt": "2026-06-17T16:58:56.660Z",
      "updatedAt": "2026-06-18T01:46:55.604Z",
      "revision": 3
    },
    "fields": {
      "price": 18000,
      "description": "Double-wall vacuum insulation keeps drinks hot or cold for hours. A roomy 500ml.",
      "photo": null,
      "productName": "Stainless Tumbler 500ml"
    }
  }
}
```

```api-endpoint
{
  "title": "List published Content by Content Type",
  "method": "GET",
  "path": "/spaces/{spaceId}/content-types/{contentTypeId}/contents",
  "description": "Reads the list of published Content that follows a specific Content Type, page by page. Only published items are included.",
  "responseStatus": 200,
  "baseUrl": "https://cda.weegloo.com/v1",
  "pathParameterSchema": {
    "spaceId": { "type": "string", "description": "The sys.id of the Space", "required": true },
    "contentTypeId": { "type": "string", "description": "The sys.id of the Content Type", "required": true }
  },
  "queryParameterSchema": {
    "locale": { "type": "string", "description": "Language to receive. A code (e.g. en-US) returns values for that locale, omitting it uses the default Locale, and * returns the full locale map." },
    "limit": { "type": "integer", "description": "Number of items to return per page (1-100)", "default": 15 },
    "skip": { "type": "integer", "description": "Number of items to skip", "default": 0 },
    "next": { "type": "string", "description": "Next page cursor (the value obtained from links.next in the previous response)" },
    "prev": { "type": "string", "description": "Previous page cursor (the value obtained from links.prev in the previous response)" },
    "order": { "type": "string", "description": "Sort criteria. Comma-separated for multi-level sorting (e.g. sys.createdAt,sys.id)", "default": "sys.createdAt,sys.id" },
    "include": { "type": "integer", "description": "Related-resource inclusion level. 0=default, 1=related resources, 2=nested relations, 3=full", "default": 0 },
    "select": { "type": "string", "description": "Fields to include (sys.id,sys.createdAt) or exclude (-sys.id). Do not mix include and exclude." }
  },
  "additionalQueryParams": true,
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (CDA authentication; usually a DeliveryAccessToken)" }
  },
  "responseExample": {
    "sys": { "type": "TotalPageResponse" },
    "limit": 15,
    "totalCount": 1,
    "items": [
      {
        "sys": {
          "id": "3trmXRM3RqbgSnifyg7PBUM8Ds0Xvw",
          "type": "Content",
          "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
          "contentType": { "sys": { "id": "3trmXRM3RqbgSnifyg7PAmlxvX4fGY", "type": "Refer", "targetType": "ContentType" } },
          "createdAt": "2026-06-17T16:58:56.660Z",
          "updatedAt": "2026-06-18T01:46:55.604Z",
          "revision": 3
        },
        "fields": {
          "price": 18000,
          "description": "Double-wall vacuum insulation keeps drinks hot or cold for hours. A roomy 500ml.",
          "photo": null,
          "productName": "Stainless Tumbler 500ml"
        }
      }
    ],
    "links": { "self": "/v1/spaces/tcq4V2Xb/content-types/3trmXRM3RqbgSnifyg7PAmlxvX4fGY/contents?locale=en-US" }
  }
}
```

```api-endpoint
{
  "title": "Read a single published Content by Content Type",
  "method": "GET",
  "path": "/spaces/{spaceId}/content-types/{contentTypeId}/contents/{contentId}",
  "description": "Reads one published Content belonging to a specific Content Type by sys.id. Unpublished Content is not delivered.",
  "responseStatus": 200,
  "baseUrl": "https://cda.weegloo.com/v1",
  "pathParameterSchema": {
    "spaceId": { "type": "string", "description": "The sys.id of the Space", "required": true },
    "contentTypeId": { "type": "string", "description": "The sys.id of the Content Type", "required": true },
    "contentId": { "type": "string", "description": "The sys.id of the Content", "required": true }
  },
  "queryParameterSchema": {
    "locale": { "type": "string", "description": "Language to receive. A code (e.g. en-US) returns values for that locale, omitting it uses the default Locale, and * returns the full locale map." },
    "include": { "type": "integer", "description": "Related-resource inclusion level. 0=default, 1=related resources, 2=nested relations, 3=full", "default": 0 }
  },
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (CDA authentication; usually a DeliveryAccessToken)" }
  },
  "responseExample": {
    "sys": {
      "id": "3trmXRM3RqbgSnifyg7PBUM8Ds0Xvw",
      "type": "Content",
      "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
      "contentType": { "sys": { "id": "3trmXRM3RqbgSnifyg7PAmlxvX4fGY", "type": "Refer", "targetType": "ContentType" } },
      "createdAt": "2026-06-17T16:58:56.660Z",
      "updatedAt": "2026-06-18T01:46:55.604Z",
      "revision": 3
    },
    "fields": {
      "price": 18000,
      "description": "Double-wall vacuum insulation keeps drinks hot or cold for hours. A roomy 500ml.",
      "photo": null,
      "productName": "Stainless Tumbler 500ml"
    }
  }
}
```

## Related documents {#related-documents}

- [CDA Content Type](/api/reference/cda/content-type.md): The published template this Content follows.
- [CDA Media](/api/reference/cda/media.md): The published file assets that Content references.
- [CMA Content](/api/reference/cma/content.md): The management API for creating and editing Content.
- [Localization (concept)](/getting-started/core-concepts/content/localization.md): locale and fallback behavior.
