---
canonical: https://amplience.com/developers/docs/apis/content-delivery/legacy-content-delivery/
title: Legacy Content Delivery API
description: Reference for the original Amplience Content Delivery API (v1), now superseded by the HTTP Content Delivery API and GraphQL Content Delivery API.
audience: Developer
image: https://cdn.media.amplience.net/i/ampproduct/legacy-content-delivery-1?w=1200&h=630
image_width: 1200
image_height: 630
date_published: 2024-03-26
date_modified: 2025-07-28
---

# Legacy Content Delivery API

> **Note:** The functionality of the original Content Delivery API has been superseded by the next generation [HTTP Content Delivery](https://amplience.com/developers/docs/apis/content-delivery/content-delivery-overview/) and [GraphQL Content Delivery](https://amplience.com/developers/docs/apis/content-delivery-graphql/overview/) APIs. These APIs offer features such as retrieving content by key as well as ID, improved performance and filtering content by content type and individual properties.

The original Content Delivery API is used to retrieve content from Dynamic Content in JSON format. This content can then be consumed by a website, app or e-commerce system. Both slots and individual content items are stored as JSON content and retrieved using their unique ID.

The Content Delivery API allows you to access content via a simple HTTP GET request, which returns the content in JSON-LD format. The API can be used to retrieve both published and unpublished content. For unpublished content, the production domain `cdn.c1.amplience.net` is replaced by a [virtual staging environment](https://amplience.com/developers/docs/dev-tools/guides-tutorials/virtual-staging/virtual-staging-dynamic-content/#dynamic-content-and-virtual-staging) (VSE) domain with the rest of the query remaining unchanged.

## Request

The Delivery API can be accessed using the URL

```html
https://cdn.c1.amplience.net/cms/content/query?
```

suffixed with the a URL encoded query of the following form (where `id` is the unique identifier of the content to be retrieved):

```
{"sys.iri": "{id}"}
```

### Example request

An example delivery URL to retrieve a single item with the content ID `38a0e0a1-efad-4e04-be1e-10a042f02354` is shown below. It is unencoded for reference, but should be encoded when included in a request.

```html
https://cdn.c1.amplience.net/cms/content/query?query={"sys.iri":"http://content.cms.amplience.com/38a0e0a1-efad-4e04-be1e-10a042f02354"}&scope=tree&store=ampproduct&fullBodyObject=true
```

Here is an example AJAX / jQuery client-side Javascript code for a fully formed content query:

```javascript
$.ajax({url:"https://cdn.c1.amplience.net/cms/content/query?query=%7B%22sys.iri%22%3A%22http%3A%2F%2Fcontent.cms.amplience.com%2F38a0e0a1-efad-4e04-be1e-10a042f02354%22%7D&scope=tree&store=ampproduct&fullBodyObject=true",
success: function(data){ }
```

### Parameters

**store** is the endpoint for your published content. If you are consuming unpublished content within a [virtual staging environment](https://amplience.com/developers/docs/dev-tools/guides-tutorials/virtual-staging/virtual-staging-dynamic-content/#dynamic-content-and-virtual-staging), then you can just specify `store=store` because the VSE will contain the rules that define where content is retrieved from.

**scope** specifies the objects that are returned by the API:

| scope    | description                      |
| -------- | -------------------------------- |
| **tree** | Returns the full dependency tree |
| **root** | Returns only the root object     |

If no value is specified, then scope will be set to 'tree'.

**fullBodyObject** indicates whether to return the full body of each content object or just the @id's. Defaults to true if omitted

## Retrieving multiple items

Note that whereas the example above uses `"sys.iri":"iri"` to query a single content item, it is possible instead to use the MongoDB syntax `"$in"` operator to query a list of IDs:

```json
{
  "sys.iri": {
    "$in": [
      "http://content.cms.amplience.com/{{id}}",
      "http://content.cms.amplience.com/{{id2}}"
    ]
  }
}
```

An example delivery URL to retrieve multiple items is shown below. It is unencoded for reference, but should be encoded when included in a request.

```html
https://cdn.c1.amplience.net/cms/content/query?query={"sys.iri": {"$in":
["http://content.cms.amplience.com/1e34f5b3-1d3b-4489-a3b3-2206934fa0a4",
"http://content.cms.amplience.com/5af7cf73-1616-409a-b8d4-7f68de0d307b"]}}&scope=tree&store=ampproduct
```

## Finding the content/ slot ID

You can find the id of a particular content item or slot from the [content item properties pane](https://amplience.com/developers/docs/user-guides/produce-content/create/#content-item-properties) on the content form. Open up the item and click the "i" icon at the top right of the window to show the properties pane. The content item ID (1) is shown in the "Content delivery" section, together with the URL (2) used to retrieve the content.

![Finding the content or slot id from content properties](https://cdn.media.amplience.net/i/ampproduct/legacy-content-delivery-1?w=1880&fmt=png 'Finding the content or slot id from content properties')

The query to return the contents of this slot is shown below (decoded for reference):

```html
https://cdn.c1.amplience.net/cms/content/query?query={"sys.iri":"http://content.cms.amplience.com/1f0fe60d-7b4b-4a39-a757-a1b221944443"}&scope=tree&store=ampproduct&fullBodyObject=true
```

This query will return the content in JSON Linked Data (JSON-LD) format as a content graph.

The JSON-LD is shown below.

```json
{
  "@context": "http://context.system.cms.amplience.com/v0.0/api",
  "@type": "QueryResult",
  "result": [
    {
      "@id": "http://content.cms.amplience.com/1f0fe60d-7b4b-4a39-a757-a1b221944443"
    }
  ],
  "@graph": [
    {
      "_meta": {
        "schema": "https://s3-eu-west-1.amazonaws.com/amp-product/tutorials/dynamiccontenttutorials/bannerslot.json",
        "name": "home-page-banner-slot"
      },
      "bannerslot": {
        "@id": "http://content.cms.amplience.com/38a0e0a1-efad-4e04-be1e-10a042f02354",
        "@type": "https://s3-eu-west-1.amazonaws.com/amp-product/tutorials/dynamiccontenttutorials/tutorialbanner.json"
      },
      "@type": "https://s3-eu-west-1.amazonaws.com/amp-product/tutorials/dynamiccontenttutorials/bannerslot.json",
      "@id": "http://content.cms.amplience.com/1f0fe60d-7b4b-4a39-a757-a1b221944443"
    },
    {
      "_meta": {
        "schema": "https://s3-eu-west-1.amazonaws.com/amp-product/tutorials/dynamiccontenttutorials/tutorialbanner.json",
        "name": "spring-sale-banner"
      },
      "calltoactiontext": "Find out more",
      "background": {
        "@id": "http://image.cms.amplience.com/500118e2-a788-4b89-89bd-b4c8b0373091"
      },
      "calltoactionurl": "https://www.anyafinnstore.com/springsale",
      "strapline": "Bank holiday sale coming soon",
      "headline": "Get ready to update your wardrobe!",
      "@type": "https://s3-eu-west-1.amazonaws.com/amp-product/tutorials/dynamiccontenttutorials/tutorialbanner.json",
      "@id": "http://content.cms.amplience.com/38a0e0a1-efad-4e04-be1e-10a042f02354"
    },
    {
      "_meta": {
        "schema": "http://bigcontent.io/cms/schema/v1/core#/definitions/image-link"
      },
      "id": "500118e2-a788-4b89-89bd-b4c8b0373091",
      "name": "orange_dress",
      "endpoint": "ampproduct",
      "defaultHost": "cdn.media.amplience.net",
      "@id": "http://image.cms.amplience.com/500118e2-a788-4b89-89bd-b4c8b0373091",
      "mediaType": "image"
    }
  ]
}
```

## The inline content method

### SDK

The [CMS JavaScript SDK](https://github.com/amplience/cms-javascript-sdk) includes an `inlineContent` method on the amp namespace which flattens the JSON-LD content returned by the Delivery API into a content graph.

Here's some example JavaScript code for calling `inlineContent`. In the code shown below, `content` is the JSON-LD content:

```javascript
// Node.js
const amp = require('cms-javascript-sdk');
amp.inlineContent({{content}});
```

```
// Browser
<script type="text/javascript" src="cms-javascript-sdk.min.js"></script>
<script type="text/javascript">
  amp.inlineContent({{content}});
</script>
```

### Example

The following code retrieves some content from Dynamic Content using the Delivery API and converts the returned JSON-LD into a content tree, logging the result to the console.

```javascript
const url =
  'https://cdn.c1.amplience.net/cms/content/query?query=%7B%22sys.iri%22%3A%22http%3A%2F%2Fcontent.cms.amplience.com%2F1f0fe60d-7b4b-4a39-a757-a1b221944443%22%7D&scope=tree&store=ampproduct&fullBodyObject=true';
$.ajax({
  url: url,
  success: data => {
    // use the SDK to inline the content from the graphs.
    const inlineResult = amp.inlineContent(data);
    if (inlineResult && inlineResult[0]) {
      // log out the text from the inline content
      console.log(inlineResult[0].text);
    }
  },
});
```

The output of the inline method is shown below. The JSON content is now organised into a content tree, so it can be combined with a handlebars template (or a template using another templating technology) and converted to HTML format to be rendered by a front end website or app or e-commerce system.

```json
{
  "@id": "http://content.cms.amplience.com/1f0fe60d-7b4b-4a39-a757-a1b221944443",
  "_meta": {
    "schema": "https://s3-eu-west-1.amazonaws.com/amp-product/tutorials/dynamiccontenttutorials/bannerslot.json",
    "name": "home-page-banner-slot"
  },
  "bannerslot": {
    "@id": "http://content.cms.amplience.com/38a0e0a1-efad-4e04-be1e-10a042f02354",
    "@type": "https://s3-eu-west-1.amazonaws.com/amp-product/tutorials/dynamiccontenttutorials/tutorialbanner.json",
    "_meta": {
      "schema": "https://s3-eu-west-1.amazonaws.com/amp-product/tutorials/dynamiccontenttutorials/tutorialbanner.json",
      "name": "spring-sale-banner"
    },
    "calltoactiontext": "Find out more",
    "background": {
      "@id": "http://image.cms.amplience.com/500118e2-a788-4b89-89bd-b4c8b0373091",
      "_meta": {
        "schema": "http://bigcontent.io/cms/schema/v1/core#/definitions/image-link"
      },
      "id": "500118e2-a788-4b89-89bd-b4c8b0373091",
      "name": "orange_dress",
      "endpoint": "ampproduct",
      "defaultHost": "cdn.media.amplience.net",
      "mediaType": "image"
    },
    "calltoactionurl": "https://www.anyafinnstore.com/springsale",
    "strapline": "Bank holiday sale coming soon",
    "headline": "Get ready to update your wardrobe!"
  },
  "@type": "https://s3-eu-west-1.amazonaws.com/amp-product/tutorials/dynamiccontenttutorials/bannerslot.json"
}
```

## Usage notes

Virtual staging environments should not be used to serve published, production content. If we notice excessive traffic from your VSE it will automatically be rate limited and may be disabled by our operations team. Therefore please ensure that all your production code uses the production domain of `cdn.c1.amplience.net `to serve content to your live environment and the appropriate media domains such as `cdn.media.amplience.net `to serve published media.

## Related pages

[HTTP Content Delivery API](https://amplience.com/developers/docs/apis/content-delivery/content-delivery-overview/)

[GraphQL Content Delivery API](https://amplience.com/developers/docs/apis/content-delivery-graphql/overview/)
