Content items
The content item contains the data, which aligns with the data model and is structured according to a content type. You can use query attributes with content items. Before you start working with content items, you must authenticate.
The base URL for creating and editing content items is https://content-api.sitecorecloud.io/
. For a full list of fields, parameters, and technical limitations, see the data model. For guidance on API syntax, see Syntax.
Get a list of content items
Use this method to retrieve a list of content items. If you don't specify any filtering parameters, you will retrieve all available content items.
GET {Base URL}/api/content/v1/items/
You can exclude all custom fields from the response by appending view=excludeCustomFields
. If you do this, the retrieved list only includes the NAME, CONTENT TYPE, UPDATED BY, UPDATED ON, and STATUS values for each item.
Request
This code sample returns all content items and sorts the results by name.
GET {Base URL}/api/content/v1/items?pageNumber=1&pageSize=3&sortBy=name
Example of an ID query:
GET {Base URL}/api/content/v1/items?id=MR60hv5QGkupyb2NNRJRmA|whxmR9vzrUeVoT-umLxuNQ|MR60hv5QGkupyb2NNRJRcF
Example of a search query:
GET {Base URL}/api/content/v1/items?pageNumber=1&pageSize=10&search=hotel
Example of a sortBy query:
GET {Base URL}/api/content/v1/items?pageNumber=1&pageSize=10&sortBy=system.updatedAt
Response
{
"totalCount": 19,
"pageSize": 3,
"pageNumber": 1,
"data": [
{
"id": "ym7Y0VTKf0u1FS9EnKiL2Q",
"name": "ad1",
"fields": {
"industry": {
"value": "",
"type": "ShortText"
},
"shortDescription": {
"value": "",
"type": "LongText"
},
"description": {
"value": {},
"type": "RichText"
},
"relatedItemsTitle": {
"value": "",
"type": "ShortText"
},
"relatedItemsDescription": {
"value": {},
"type": "RichText"
},
"vacationType": {
"value": [],
"type": "Select"
},
"relatedItems": {
"value": [],
"type": "Reference"
},
"localCopies": {
"value": [],
"type": "Reference"
},
"heroImage": {
"value": [],
"type": "Media"
}
},
"system": {
"contentType": {
"type": "Link",
"relatedType": "ContentType",
"id": "destination",
"uri": "https://content.sitecorecloud.io//api/content/v1/types/destination"
},
"lastPublishProgress": {
"type": "Unpublish",
"status": "Completed",
"triggeredBy": {
"type": "Link",
"relatedType": "User",
"id": "suzie.q@sitecore.com",
"uri": "https://content.sitecorecloud.io//api/content/v1/users/suzie.q@sitecore.com"
},
"triggeredAt": "2023-06-11T11:38:59.5685421Z"
},
"type": "Content",
"version": "KqWFO0f6MCKxQysKsCpbISg7+JCJzq0kzMMdeUQO7ks=",
"status": "Draft",
"createdBy": {
"type": "Link",
"relatedType": "User",
"id": "",
"uri": "https://content.sitecorecloud.io//api/content/v1/users/"
},
"createdAt": "2023-06-08T13:15:07.3386906Z",
"updatedBy": {
"type": "Link",
"relatedType": "User",
"id": "",
"uri": "https://content.sitecorecloud.io//api/content/v1/users/"
},
"updatedAt": "2023-06-11T11:40:01.5851979Z",
"publishedBy": null,
"publishedAt": null
}
},
{
"id": "comfortInn",
"name": "Comfort-Inn",
"fields": {
"industry": {
"value": "travel",
"type": "ShortText"
},
"shortDescription": {
"value": "This newly refurbished, modern style hotel offers an excellent standard of accommodation in a quiet and fashionable environment. In addition to the trendy look of the space, great importance has been given to the quality of sleep and comfort by investing in the highest standard of mattress, bed linen, and pillows.",
"type": "LongText"
},
"description": {
"value": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "The comfort inn is conveniently located in Larnaca City Centre, Cyprus. The hotel is centrally located and therefore provides easy access to all the local activities and attractions by foot. It is surrounded by a wide variety of restaurants, cafes, bars, and nightclubs as well as Larnaca’s shopping center."
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "This newly refurbished, modern style hotel in Larnaca offers an excellent standard of accommodation in a quiet and fashionable environment, yet at an affordable price. In addition to the trendy look of the space, great importance has been given to quality and comfort of the guest, as well as a sense of luxury. The hotel offers free WiFi in all rooms and public areas, as well as free parking facilities close to the hotel."
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Whether you are in Larnaca, Cyprus on holiday or on a business trip, to start your day the hotel offers an endless selection of hot and cold breakfast buffets, presented under the strictest standards of hygiene. Meeting room facilities and a business centre corner are also available."
}
]
}
]
},
"type": "RichText"
},
"pricePerNight": {
"value": 60,
"type": "Integer"
},
"ratingstars": {
"value": 2,
"type": "Integer"
},
"amenities": {
"value": [],
"type": "Select"
},
"roomType": {
"value": [],
"type": "Select"
},
"relatedItems": {
"value": [
{
"type": "Link",
"relatedType": "Content",
"id": "vietnam",
"uri": "https://content.sitecorecloud.io//api/content/v1/items/vietnam"
},
{
"type": "Link",
"relatedType": "Content",
"id": "vietnamMalaysia",
"uri": "https://content.sitecorecloud.io//api/content/v1/items/vietnamMalaysia"
},
{
"type": "Link",
"relatedType": "Content",
"id": "thailandIndonesia",
"uri": "https://content.sitecorecloud.io//api/content/v1/items/thailandIndonesia"
}
],
"type": "Reference"
},
"heroImage": {
"value": [
{
"type": "Link",
"relatedType": "Media",
"id": "travelComfortInn",
"uri": "https://content.sitecorecloud.io//api/content/v1/media/travelComfortInn"
}
],
"type": "Media"
}
},
"system": {
"contentType": {
"type": "Link",
"relatedType": "ContentType",
"id": "hotels",
"uri": "https://content.sitecorecloud.io//api/content/v1/types/hotels"
},
"lastPublishProgress": {
"type": "Publish",
"status": "Completed",
"triggeredBy": {
"type": "Link",
"relatedType": "User",
"id": "suzie.q@sitecore.com",
"uri": "https://content.sitecorecloud.io//api/content/v1/users/suzie.q@sitecore.com"
},
"triggeredAt": "2023-06-12T18:13:39.6147687Z"
},
"type": "Content",
"version": "3klQAB3AQvpe7HRcOb6AqXMzCjSgh3QgMWIOFb9ej1k=",
"status": "Published",
"createdBy": {
"type": "Link",
"relatedType": "User",
"id": "",
"uri": "https://content.sitecorecloud.io//api/content/v1/users/"
},
"createdAt": "2023-06-08T13:15:03.1436748Z",
"updatedBy": {
"type": "Link",
"relatedType": "User",
"id": "suzie.q@sitecore.com",
"uri": "https://content.sitecorecloud.io//api/content/v1/users/suzie.q@sitecore.com"
},
"updatedAt": "2023-06-12T18:14:40.7287617Z",
"publishedBy": {
"type": "Link",
"relatedType": "User",
"id": "suzie.q@sitecore.com",
"uri": "https://content.sitecorecloud.io//api/content/v1/users/suzie.q@sitecore.com"
},
"publishedAt": "2023-06-12T18:14:40.7278759Z"
}
},
{
"id": "destinationLanding",
"name": "Destination landing",
"fields": {
"industry": {
"value": "travel",
"type": "ShortText"
},
"heroTitle": {
"value": "Explore the world with ONEDERLUST",
"type": "ShortText"
},
"section": {
"value": [
{
"type": "Link",
"relatedType": "Content",
"id": "destinationsSection",
"uri": "https://content.sitecorecloud.io//api/content/v1/items/destinationsSection"
}
],
"type": "Reference"
},
"menuItems": {
"value": [],
"type": "Reference"
},
"logo": {
"value": [
{
"type": "Link",
"relatedType": "Media",
"id": "travelLandingLogo",
"uri": "https://content.sitecorecloud.io//api/content/v1/media/travelLandingLogo"
}
],
"type": "Media"
},
"heroImage": {
"value": [
{
"type": "Link",
"relatedType": "Media",
"id": "travelLandingHero",
"uri": "https://content.sitecorecloud.io//api/content/v1/media/travelLandingHero"
}
],
"type": "Media"
}
},
"system": {
"contentType": {
"type": "Link",
"relatedType": "ContentType",
"id": "landingPage",
"uri": "https://content.sitecorecloud.io//api/content/v1/types/landingPage"
},
"lastPublishProgress": {
"type": "Publish",
"status": "Completed",
"triggeredBy": {
"type": "Link",
"relatedType": "User",
"id": "",
"uri": "https://content.sitecorecloud.io//api/content/v1/users/"
},
"triggeredAt": "2023-06-08T13:16:02.1039452Z"
},
"type": "Content",
"version": "8VdkWT7c7RItdpYRJcei0fMJNDwOWqSZTA+eXjBYC38=",
"status": "Published",
"createdBy": {
"type": "Link",
"relatedType": "User",
"id": "",
"uri": "https://content.sitecorecloud.io//api/content/v1/users/"
},
"createdAt": "2023-06-08T13:15:49.6214156Z",
"updatedBy": {
"type": "Link",
"relatedType": "User",
"id": "",
"uri": "https://content.sitecorecloud.io//api/content/v1/users/"
},
"updatedAt": "2023-06-08T13:16:58.5431924Z",
"publishedBy": null,
"publishedAt": "2023-06-08T13:16:58.5426867Z"
}
}
]
}
Get a content item using the ID
Use this method to retrieve a content item with a specific ID. For a list of content item IDs, run the GET api/content/v1/types method or open the content item details page.
GET {Base URL}/api/content/v1/items/{contentItemId}
Request
This code sample returns a content item with the ID of luxuryInn:
GET {Base URL}/api/content/v1/items/luxuryInn
Response
{
"id": "luxuryInn",
"name": "Luxury-Inn",
"fields": {
"industry": {
"value": "travel",
"type": "ShortText"
},
"shortDescription": {
"value": "The first choice for the rich and famous, the Luxury-Inn is renowned for its large and lavish breakfasts.",
"type": "LongText"
},
"description": {
"value": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "As a strong contender for the grandest hotel, Luxury-Inn boasts a rich history and stunning décor combined with first rate amenities. This establishment originally opened its doors in 1913 and although the amenities have been modernised over the years, much of the imposing and regal style has been preserved. The spa is the perfect place to unwind in style as it comes complete with an infinity edged swimming pool, a steam room, and a sauna. There are 42 different suites to choose from, with the 320 square metre Royal Suite being the grandest of them all."
}
]
}
]
},
"type": "RichText"
},
"pricePerNight": {
"value": 100,
"type": "Integer"
},
"ratingstars": {
"value": 4,
"type": "Integer"
},
"amenities": {
"value": [
{
"id": "airConditioning"
},
{
"id": "restaurant"
},
{
"id": "wifi"
}
],
"type": "Select"
},
"roomType": {
"value": [],
"type": "Select"
},
"relatedItems": {
"value": [
{
"type": "Link",
"relatedType": "Content",
"id": "japan",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/items/japan"
}
],
"type": "Reference"
},
"heroImage": {
"value": [
{
"type": "Link",
"relatedType": "Media",
"id": "travelLuxuryInn",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/media/travelLuxuryInn"
}
],
"type": "Media"
}
},
"system": {
"contentType": {
"type": "Link",
"relatedType": "ContentType",
"id": "hotels",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/types/hotels"
},
"lastPublishProgress": {
"type": "Publish",
"status": "Completed",
"triggeredBy": {
"type": "Link",
"relatedType": "User",
"id": "suzie.q@sitecore.com",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/users/suzie.q@sitecore.com"
},
"triggeredAt": "2023-06-11T11:30:19.665558Z"
},
"type": "Content",
"version": "/uGX6R8wjjowSKD7RJJjpjgqJXnPdFc++ZVA8S42znw=",
"status": "Published",
"createdBy": {
"type": "Link",
"relatedType": "User",
"id": "",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/users/"
},
"createdAt": "2023-06-08T13:15:03.6540984Z",
"updatedBy": {
"type": "Link",
"relatedType": "User",
"id": "suzie.q@sitecore.com",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/users/suzie.q@sitecore.com"
},
"updatedAt": "2023-06-11T11:31:21.8717726Z",
"publishedBy": {
"type": "Link",
"relatedType": "User",
"id": "suzie.q@sitecore.com",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/users/suzie.q@sitecore.com"
},
"publishedAt": "2023-06-11T11:31:21.8704096Z"
}
}
Create a content item
Use this method to create a content item.
POST {Base URL}/api/content/v1/items
Request
This code sample creates content using the Destination content type.
POST {Base URL}/api/content/v1/items
The request includes the following request body:
{
"id": "canada",
"name": "Canada",
"fields": {
"industry": {
"value": "travel",
"type": "ShortText"
},
"shortDescription": {
"value": "Canada features black-blue lakes, numerous rivers, majestic western mountains, rolling central plains, and forested eastern valleys. The Canadian Shield, a hilly region of lakes and swamps, stretches across northern Canada and has some of the oldest rocks on Earth.",
"type": "LongText"
},
"description": {
"value": null,
"type": "RichText"
},
"relatedItemsTitle": {
"value": "Related items",
"type": "ShortText"
},
"relatedItemsDescription": {
"value": null,
"type": "RichText"
},
"vacationType": {
"value": [],
"type": "Select"
},
"relatedItems": {
"value": [
{
"type": "Link",
"relatedType": "Content",
"id": "comfortInn",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/items/comfortInn"
}
],
"type": "Reference"
},
"localCopies": {
"value": [],
"type": "Reference"
},
"heroImage": {
"value": [
{
"type": "Link",
"relatedType": "Media",
"id": "YbIHocEQV0OlBiWX9nUauA",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/media/YbIHocEQV0OlBiWX9nUauA"
}
],
"type": "Media"
}
},
}
Response
{
"id": "6oOI7VsND0GAv1y8sHl2UQ",
"name": "Episode #21",
"fields": {
"podcastName": {
"value": "Wonderful wonderful",
"type": "ShortText"
},
"episodeName": {
"value": "It's a wonderful day.",
"type": "LongText"
},
"description": {
"value": "Join me for a whirlwind tour of all the wonderful East Coast music.",
"type": "ShortText"
},
"presenter": {
"value": [
{
"type": "Link",
"relatedType": "Content",
"id": "U1PvFl6Jgky2igTAPKS3LA",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/items/U1PvFl6Jgky2igTAPKS3LA"
}
],
"type": "Reference"
},
"coverPhoto": {
"value": [
{
"type": "Link",
"relatedType": "Media",
"id": "W1neLaYAxkiIu25rue8T7g",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/media/W1neLaYAxkiIu25rue8T7g"
}
],
"type": "Media"
}
},
"system": {
"contentType": {
"type": "Link",
"relatedType": "ContentType",
"id": "podcast",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/types/podcast"
},
"lastPublishProgress": null,
"type": "Content",
"version": "qeQg1b83WcpK+nel+1dWFrvxGHB14kzDzWwBWaIwu0A=",
"status": "Draft",
"createdBy": {
"type": "Link",
"relatedType": "User",
"id": "user@email.com",
"uri": "http://content-api.sitecorecloud.io/api/users/user@email.com"
},
"createdAt": "2022-12-08T14:28:56.8836651Z",
"updatedBy": {
"type": "Link",
"relatedType": "User",
"id": "user@email.com",
"uri": "http://content-api.sitecorecloud.io/api/users/user@email.com"
},
"updatedAt": "2022-12-08T14:28:56.8836651Z",
"publishedBy": null,
"publishedAt": null
}
}
Update a content item
Use this method to update a content item. You can, for example, add or modify content, delete existing content, or change properties associated with the content (such as a taxonomy or its values).
The Update method does not merge content; rather, it fully replaces the existing content using the body of the request. For this reason, your request must include the new version of all the content, including your updates and any data you want to retain. Anything not included in your request will be replaced.
PUT {Base URL}/api/content/v1/items/{contentItemId}
Request
This code sample updates the description of the content item with the ID luxuryInn. It also removes the Restaurant value for the Amenities taxonomy, and adds the Wheelchair accessible value instead.
PUT {Base URL}/api/content/v1/items/luxuryinn
{
"id": "luxuryInn",
"name": "Luxury-Inn",
"fields": {
"industry": {
"value": "travel",
"type": "ShortText"
},
"shortDescription": {
"value": "The first choice for the rich and famous, the Luxury-Inn is renowned for its beautifully decorated rooms and its large and lavish breakfasts.",
"type": "LongText"
},
"description": {
"value": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "As a strong contender for the grandest hotel, Luxury-Inn boasts a rich history and stunning décor combined with first rate amenities. This establishment originally opened its doors in 1913 and although the amenities have been modernised over the years, much of the imposing and regal style has been preserved. The spa is the perfect place to unwind in style as it comes complete with an infinity edged swimming pool, a team room and a sauna. There are 42 different suites to choose from, which the 320 square metre Royal Suite being the grandest of them all."
}
]
}
]
},
"type": "RichText"
},
"pricePerNight": {
"value": 100,
"type": "Integer"
},
"ratingstars": {
"value": 4,
"type": "Integer"
},
"amenities": {
"value": [
{
"id": "airConditioning"
},
{
"id": "WheelchairAccessible"
},
{
"id": "wifi"
}
],
"type": "Select"
},
"roomType": {
"value": [],
"type": "Select"
},
"relatedItems": {
"value": [
{
"type": "Link",
"relatedType": "Content",
"id": "japan",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/items/japan"
}
],
"type": "Reference"
},
"heroImage": {
"value": [
{
"type": "Link",
"relatedType": "Media",
"id": "travelLuxuryInn",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/media/travelLuxuryInn"
}
],
"type": "Media"
}
},
"system": {
"contentType": {
"type": "Link",
"relatedType": "ContentType",
"id": "hotels",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/types/hotels"
},
"lastPublishProgress": {
"type": "Publish",
"status": "Completed",
"triggeredBy": {
"type": "Link",
"relatedType": "User",
"id": "jake.b@sitecore.com",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/users/jake.b@sitecore.com"
},
"triggeredAt": "2023-06-11T11:30:19.665558Z"
},
"type": "Content",
"version": "/uGX6R8wjjowSKD7RJJjpjgqJXnPdFc++ZVA8S42znw=",
"status": "Published",
"createdBy": {
"type": "Link",
"relatedType": "User",
"id": "",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/users/"
},
"createdAt": "2023-06-08T13:15:03.6540984Z",
"updatedBy": {
"type": "Link",
"relatedType": "User",
"id": "jake.b@sitecore.com",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/users/jake.b@sitecore.com"
},
"updatedAt": "2023-06-11T11:31:21.8717726Z",
"publishedBy": {
"type": "Link",
"relatedType": "User",
"id": "jake.b@sitecore.com",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/users/jake.b@sitecore.com"
},
"publishedAt": "2023-06-11T11:31:21.8704096Z"
}
}
Response
{
"id": "luxuryInn",
"name": "Luxury-Inn",
"fields": {
"industry": {
"value": "travel",
"type": "ShortText"
},
"shortDescription": {
"value": "The first choice for the rich and famous, the Luxury-Inn is renowned for its beautifully decorated rooms and its large and lavish breakfasts.",
"type": "LongText"
},
"description": {
"value": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "As a strong contender for the grandest hotel, Luxury-Inn boasts a rich history and stunning décor combined with first rate amenities. This establishment originally opened its doors in 1913 and although the amenities have been modernised over the years, much of the imposing and regal style has been preserved. The spa is the perfect place to unwind in style as it comes complete with an infinity edged swimming pool, a team room and a sauna. There are 42 different suites to choose from, which the 320 square metre Royal Suite being the grandest of them all."
}
]
}
]
},
"type": "RichText"
},
"pricePerNight": {
"value": 100,
"type": "Integer"
},
"ratingstars": {
"value": 4,
"type": "Integer"
},
"amenities": {
"value": [
{
"id": "airConditioning"
},
{
"id": "wifi"
},
{
"id": "wheelchairAccessible"
}
],
"type": "Select"
},
"roomType": {
"value": [],
"type": "Select"
},
"relatedItems": {
"value": [
{
"type": "Link",
"relatedType": "Content",
"id": "japan",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/items/japan"
}
],
"type": "Reference"
},
"heroImage": {
"value": [
{
"type": "Link",
"relatedType": "Media",
"id": "travelLuxuryInn",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/media/travelLuxuryInn"
}
],
"type": "Media"
}
},
"system": {
"contentType": {
"type": "Link",
"relatedType": "ContentType",
"id": "hotels",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/types/hotels"
},
"lastPublishProgress": {
"type": "Publish",
"status": "Completed",
"triggeredBy": {
"type": "Link",
"relatedType": "User",
"id": "jake.b@sitecore.com",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/users/jake.b@sitecore.com"
},
"triggeredAt": "2023-06-11T11:30:19.665558Z"
},
"type": "Content",
"version": "RNTrHbTnFmOzpquNdHT6aWhA5aiM7qsbRJgH6P1MfEE=",
"status": "Changed",
"createdBy": {
"type": "Link",
"relatedType": "User",
"id": "",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/users/"
},
"createdAt": "2023-06-08T13:15:03.6540984Z",
"updatedBy": {
"type": "Link",
"relatedType": "User",
"id": "jake.b@sitecore.com",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/users/jake.b@sitecore.com"
},
"updatedAt": "2023-06-26T12:42:43.2593601Z",
"publishedBy": {
"type": "Link",
"relatedType": "User",
"id": "jake.b@sitecore.com",
"uri": "http://content-api.sitecorecloud.io/api/content/v1/users/jake.b@sitecore.com"
},
"publishedAt": "2023-06-11T11:31:21.8704096Z"
}
}
Get all references to a content item
Use this method to get a list of all content items that reference a specific content item.
Request
This code sample retrieves all the items that reference the content item with the ID luxuryInn.
GET {Base URL}/api/content/v1/items?linkedTo=luxuryInn
Response
"totalCount": 2,
"pageSize": 20,
"pageNumber": 1,
"data": [
{
"id": "IEW5JzzlNkGNNc_vxBjM8A",
"name": "Ireland",
"fields": {
"relatedItems": {
"value": [
{
"type": "Link",
"relatedType": "Content",
"id": "luxuryInn",
"uri": "http://content-api.sitecore.cloud.io/api/content/v1/items/luxuryInn"
}
],
"type": "Reference"
},
"heroImage": {
"value": [
{
"type": "Link",
"relatedType": "Media",
"id": "cGT8G_hVhEC4WuRv39cQmw",
"uri": "http://content-api.sitecore.cloud.io/api/content/v1/media/cGT8G_hVhEC4WuRv39cQmw"
}
],
"type": "Media"
}
},
"system": {
"contentType": {
"type": "Link",
"relatedType": "ContentType",
"id": "SampleArticle",
"uri": "http://content-api.sitecore.cloud.io/api/content/v1/types/SampleArticle"
},
"lastPublishProgress": null,
"type": "Content",
"version": "Ivj63kkmkIY7Kl1JbFok+669uYX1UoJ9SD98YdMMXM4=",
"status": "Draft",
"createdBy": {
"type": "Link",
"relatedType": "User",
"id": "bijou.deglise@sitecore.com",
"uri": "http://content-api.sitecore.cloud.io/api/content/v1/users/bijou.deglise@sitecore.com"
},
"createdAt": "2023-07-26T13:05:10.1464875Z",
"updatedBy": {
"type": "Link",
"relatedType": "User",
"id": "bijou.deglise@sitecore.com",
"uri": "http://content-api.sitecore.cloud.io/api/content/v1/users/bijou.deglise@sitecore.com"
},
"updatedAt": "2023-07-26T13:05:10.1464875Z",
"publishedBy": null,
"publishedAt": null
}
},
{
"id": "japan2weeks",
"name": "Japan for 2 weeks",
"fields": {
"industry": {
"value": "travel",
"type": "ShortText"
},
"shortDescription": {
"value": "",
"type": "LongText"
},
"details": {
"value": {
"type": "doc",
"content": [
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Day 1-5: Tokyo (including day trip to Mt Fuji)"
}
]
}
]
},
{
"type": "listItem",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Day 6-10: Kyoto"
}
]
}
]
},
{
"type": "listItem",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Day 10-12: Hiroshima (including a day trip to Miyajima)"
}
]
}
]
},
{
"type": "listItem",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Day 12-14: Osaka (including a day trip to Nara)"
}
]
}
]
},
{
"type": "listItem",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Transit back to Tokyo"
}
]
}
]
}
]
}
]
},
"type": "RichText"
},
"relatedDestinations": {
"value": [
{
"type": "Link",
"relatedType": "Content",
"id": "japan",
"uri": "http://content-api.sitecore.cloud.io/api/content/v1/items/japan"
},
{
"type": "Link",
"relatedType": "Content",
"id": "luxuryInn",
"uri": "http://content-api.sitecore.cloud.io/api/content/v1/items/luxuryInn"
}
],
"type": "Reference"
},
"hotels": {
"value": [],
"type": "Reference"
},
"tourImages": {
"value": [
{
"type": "Link",
"relatedType": "Media",
"id": "travelJapan2Weeks",
"uri": "http://content-api.sitecore.cloud.io/api/content/v1/media/travelJapan2Weeks"
}
],
"type": "Media"
}
},
"system": {
"contentType": {
"type": "Link",
"relatedType": "ContentType",
"id": "tour",
"uri": "http://content-api.sitecore.cloud.io/api/content/v1/types/tour"
},
"lastPublishProgress": {
"type": "Publish",
"status": "Completed",
"triggeredBy": {
"type": "Link",
"relatedType": "User",
"id": "",
"uri": "http://content-api.sitecore.cloud.io/api/content/v1/users/"
},
"triggeredAt": "2023-06-08T13:15:57.740435Z"
},
"type": "Content",
"version": "BSwoT/0nGN9Es4QkkI6Rfphu+2TdazEhlW73w4e7QwU=",
"status": "Published",
"createdBy": {
"type": "Link",
"relatedType": "User",
"id": "",
"uri": "http://content-api.sitecore.cloud.io/api/content/v1/users/"
},
"createdAt": "2023-06-08T13:15:09.534254Z",
"updatedBy": {
"type": "Link",
"relatedType": "User",
"id": "",
"uri": "http://content-api.sitecore.cloud.io/api/content/v1/users/"
},
"updatedAt": "2023-06-08T13:16:58.5088749Z",
"publishedBy": null,
"publishedAt": "2023-06-08T13:16:58.5083302Z"
}
}
]
}
Delete a content item
Use this method to delete a content item with a specific ID. If the content item is published, you must unpublish it first.
DELETE {Base URL}/api/content/v1/items/{contentItemId}
Request
This code sample deletes a content item with the ID a16GWyfJiEO-pXkecaCFdQ.
DELETE {Base URL}/api/content/v1/items/a16GWyfJiEO-pXkecaCFdQ
Publish a content item
Use this method to publish a content item with a specific ID.
POST {Base URL}/api/content/v1/items/{contentItemId}
Request
This code sample publishes a content item with the ID a16GWyfJiEO-pXkecaCFdQ.
POST {Base URL}/api/content/v1/items/a16GWyfJiEO-pXkecaCFdQ
Unpublish a content item
Use this method to unpublish a content item with a specific ID.
DELETE {Base URL}/api/content/v1/items/{contentItemId}/publish
Request
This code sample publishes a content item with the ID a16GWyfJiEO-pXkecaCFdQ.
DELETE {Base URL}/api/content/v1/items/a16GWyfJiEO-pXkecaCFdQ/publish