---
canonical: https://amplience.com/developers/docs/apis/content-management-reference/workflows-localization/
title: "Workflows and localization"
description: "API reference for workflow and localization endpoints. Covers workflow states, locale assignment, and localization group management."
audience: Developer
date_published: 2023-08-29
date_modified: 2026-06-16
---

# Workflows and localization

**Base URL:** `https://api.amplience.net/v2/content`

> **Note: Authorization and status codes**
> For authorization and status codes see the [API Reference overview](https://amplience.com/developers/docs/apis/content-management-reference/).

## Workflows

| Method | Endpoint | Summary |
|--------|----------|---------|
| `PATCH` | `/content-items/{contentItemId}/workflow` | [Assigning a workflow state](#assigning-a-workflow-state) |
| `POST` | `/hubs/{hubId}/workflow-states` | [Create workflow state](#create-workflow-state) |
| `GET` | `/hubs/{hubId}/workflow-states` | [List workflow states](#list-workflow-states) |
| `GET` | `/workflow-states/{workflowStateId}` | [Get workflow state](#get-workflow-state) |
| `PATCH` | `/workflow-states/{workflowStateId}` | [Update workflow state](#update-workflow-state) |

### Assigning a workflow state

`PATCH /content-items/{contentItemId}/workflow`

<small>`https://api.amplience.net/v2/content/content-items/{contentItemId}/workflow`</small>

Assign or unassign a Workflow State on a Content Item. To unassign the current workflow state, omit the `state` field or set it to `null`.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `contentItemId` | path | string | ✓ | Content Item ID<br/>Example: `00112233-4455-6677-8899-aabbccddeeff` |

**Request Body**

Content-Type: `application/json`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `version` | integer | ✓ | Current version of the content item |
| `state` | string |  | Workflow State ID. Omit or set to `null` to remove the current workflow state. |

<details>
<summary>Request example</summary>

```json
{
  "version": 1,
  "state": "00112233445566778899aabb"
}
```

</details>

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Content Item |

<details>
<summary>Response Example (200)</summary>

```json
{
  "id": "00112233-4455-6677-8899-aabbccddeeff",
  "contentRepositoryId": "00112233445566778899aabb",
  "body": {
    "_meta": {
      "name": "main-banner",
      "schema": "http://example.com/banner.json",
      "deliveryKey": "promo-page/main-banner"
    },
    "heading": "Buy more stuff!!",
    "link": "http://anyafinn.com/buymore?campaign=shouting"
  },
  "label": "Banner Ad Homepage",
  "folderId": "00112233445566778899aabb",
  "assignees": [
    "00112233445566778899aabb"
  ],
  "assignedDate": "2019-01-01T00:00:00.000Z",
  "locale": "en-GB",
  "version": 1,
  "createdBy": "00112233-4455-6677-8899-aabbccddeeff",
  "createdDate": "2019-01-01T00:00:00.000Z",
  "lastModifiedBy": "00112233-4455-6677-8899-aabbccddeeff",
  "lastModifiedDate": "2019-01-01T00:00:00.000Z",
  "lastPublishedDate": "2019-01-01T00:00:00.000Z",
  "lastPublishedVersion": 1,
  "lastUnpublishedDate": "2019-01-01T00:00:00.000Z",
  "lastUnpublishedVersion": 1,
  "publishingStatus": "NONE",
  "deliveryId": "00112233-4455-6677-8899-aabbccddeeff",
  "workflow": {
    "state": "00112233445566778899aabb"
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff"
    },
    "content-item": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff{?projection}",
      "templated": true
    },
    "planned": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/planned{?epoch,time}",
      "templated": true
    },
    "publish": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/publish"
    },
    "unpublish": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/unpublish"
    },
    "linked-content": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff{?projection}",
      "templated": true
    },
    "content-item-with-children": {
      "href": "https://api.amplience.net/v2/content/content-items/search/findByIdWithChildren?id=00112233-4455-6677-8899-aabbccddeeff"
    },
    "content-item-with-parents": {
      "href": "https://api.amplience.net/v2/content/content-items/search/findByIdWithParents?id=00112233-4455-6677-8899-aabbccddeeff"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff{?ignoreSchemaValidation}",
      "templated": true
    },
    "restore-version": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/restore"
    },
    "content-repository": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
    },
    "content-item-version": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/versions{/version}",
      "templated": true
    },
    "content-item-versions": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/versions{?page,size,sort}",
      "templated": true
    },
    "content-item-history": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/history{?page,size,sort}",
      "templated": true
    },
    "copy": {
      "href": "https://api.amplience.net/v2/content/content-repositories/{id}/content-items?sourceContentItemId=00112233-4455-6677-8899-aabbccddeeff",
      "templated": true
    },
    "unarchive": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/unarchive"
    },
    "archive": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/archive"
    },
    "set-delivery-key": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/delivery-key"
    },
    "set-locale": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/locale"
    },
    "create-localizations": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/localize"
    },
    "localizations": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/localizations{?page,size,sort}",
      "templated": true
    },
    "localization-jobs": {
      "href": "https://api.amplience.net/v2/content/localization-jobs/search/findByRootContentItem?id=00112233-4455-6677-8899-aabbccddeeff{&page,size,sort}",
      "templated": true
    },
    "edition-slot-associations": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/edition-slot-associations"
    },
    "edit-workflow": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/workflow"
    }
  }
}
```

</details>

### Create workflow state

`POST /hubs/{hubId}/workflow-states`

<small>`https://api.amplience.net/v2/content/hubs/{hubId}/workflow-states`</small>

You may create up to 100 workflow states per hub.

The `color` property is an RGB value representing the color which should be used to display the workflow state within Dynamic Content.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |

**Request Body**

Content-Type: `application/json`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `label` | string | ✓ | Label |
| `color` | string | ✓ | Color |

<details>
<summary>Request example</summary>

```json
{
  "label": "In Progress",
  "color": "rgb(255,0,0)"
}
```

</details>

**Responses**

| Status | Description |
|--------|-------------|
| 201 | Created Snapshot List |

<details>
<summary>Response Example (201)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "label": "In Progress",
  "color": "rgb(255,0,0)",
  "createdBy": "00112233-4455-6677-8899-aabbccddeeff",
  "createdDate": "2019-01-01T00:00:00.000Z",
  "lastModifiedBy": "00112233-4455-6677-8899-aabbccddeeff",
  "lastModifiedDate": "2019-01-01T00:00:00.000Z",
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/workflow-states/00112233445566778899aabb"
    },
    "workflow-state": {
      "href": "https://api.amplience.net/v2/content/workflow-states/00112233445566778899aabb"
    },
    "hub": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/workflow-states/00112233445566778899aabb"
    }
  }
}
```

</details>

### List workflow states

`GET /hubs/{hubId}/workflow-states`

<small>`https://api.amplience.net/v2/content/hubs/{hubId}/workflow-states`</small>

List all of the workflow stats for a hub.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `page` | query | integer |  | Page number<br/>Example: `0` |
| `size` | query | integer |  | Page size<br/>Example: `20` |
| `sort` | query | string |  | Sort paramter<br/>Example: `createdDate,asc` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Paginated Snapshot List |

<details>
<summary>Response Example (200)</summary>

```json
{
  "_embedded": {
    "workflow-state": [
      {
        "id": "00112233445566778899aabb",
        "label": "In Progress",
        "color": "rgb(255,0,0)",
        "createdBy": "00112233-4455-6677-8899-aabbccddeeff",
        "createdDate": "2019-01-01T00:00:00.000Z",
        "lastModifiedBy": "00112233-4455-6677-8899-aabbccddeeff",
        "lastModifiedDate": "2019-01-01T00:00:00.000Z",
        "_links": {
          "self": {
            "href": "https://api.amplience.net/v2/content/workflow-states/00112233445566778899aabb"
          },
          "workflow-state": {
            "href": "https://api.amplience.net/v2/content/workflow-states/00112233445566778899aabb"
          },
          "hub": {
            "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
          },
          "update": {
            "href": "https://api.amplience.net/v2/content/workflow-states/00112233445566778899aabb"
          }
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/workflow-states?page=0&size=20"
    },
    "first": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/workflow-states?page=0&size=20"
    },
    "last": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/workflow-states?page=0&size=20"
    }
  },
  "page": {
    "size": 20,
    "totalElements": 1,
    "totalPages": 1,
    "number": 0
  }
}
```

</details>

### Get workflow state

`GET /workflow-states/{workflowStateId}`

<small>`https://api.amplience.net/v2/content/workflow-states/{workflowStateId}`</small>

Returns the workflow state with the specified ID.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `workflowStateId` | path | string | ✓ | Workflow State ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Workflow State Response |

<details>
<summary>Response Example (200)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "label": "In Progress",
  "color": "rgb(255,0,0)",
  "createdBy": "00112233-4455-6677-8899-aabbccddeeff",
  "createdDate": "2019-01-01T00:00:00.000Z",
  "lastModifiedBy": "00112233-4455-6677-8899-aabbccddeeff",
  "lastModifiedDate": "2019-01-01T00:00:00.000Z",
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/workflow-states/00112233445566778899aabb"
    },
    "workflow-state": {
      "href": "https://api.amplience.net/v2/content/workflow-states/00112233445566778899aabb"
    },
    "hub": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/workflow-states/00112233445566778899aabb"
    }
  }
}
```

</details>

### Update workflow state

`PATCH /workflow-states/{workflowStateId}`

<small>`https://api.amplience.net/v2/content/workflow-states/{workflowStateId}`</small>

Update the workflow state

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `workflowStateId` | path | string | ✓ | Workflow State ID<br/>Example: `00112233445566778899aabb` |

**Request Body**

Content-Type: `application/json`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `label` | string |  | Label |
| `color` | string |  | Color |

<details>
<summary>Request example</summary>

```json
{
  "label": "Updated State",
  "color": "rgb(255,255,255)"
}
```

</details>

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Updated Workflow State Response |

<details>
<summary>Response Example (200)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "label": "Updated State",
  "color": "rgb(255,255,255)",
  "createdBy": "00112233-4455-6677-8899-aabbccddeeff",
  "createdDate": "2019-01-01T00:00:00.000Z",
  "lastModifiedBy": "00112233-4455-6677-8899-aabbccddeeff",
  "lastModifiedDate": "2019-01-01T00:00:00.000Z",
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/workflow-states/00112233445566778899aabb"
    },
    "workflow-state": {
      "href": "https://api.amplience.net/v2/content/workflow-states/00112233445566778899aabb"
    },
    "hub": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/workflow-states/00112233445566778899aabb"
    }
  }
}
```

</details>

## Localization

| Method | Endpoint | Summary |
|--------|----------|---------|
| `POST` | `/content-items/{contentItemId}/locale` | [Assigning locales to content items](#assigning-locales-to-content-items) |
| `GET` | `/content-items/{contentItemId}/localizations` | [Listing the localizations of a content item](#listing-the-localizations-of-a-content-item) |
| `PATCH` | `/content-repositories/{contentRepositoryId}`<br/>`/item-locales` | [Assigning locales to content repository](#assigning-locales-to-content-repository) |
| `POST` | `/content-repositories/{contentRepositoryId}`<br/>`/localization-group` | [Updating a content repository localization group](#updating-a-content-repository-localization-group) |
| `GET` | `/content-repositories/{contentRepositoryId}`<br/>`/localization-group/locales` | [Get content repository localization group locales](#get-content-repository-localization-group-locales) |
| `GET` | `/localization-jobs/search/findByRootContentItem/{id}` | [Localization jobs](#localization-jobs) |

### Assigning locales to content items

`POST /content-items/{contentItemId}/locale`

<small>`https://api.amplience.net/v2/content/content-items/{contentItemId}/locale`</small>

Assign a locale to a Content Item

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `contentItemId` | path | string | ✓ | Content Item ID<br/>Example: `00112233-4455-6677-8899-aabbccddeeff` |

**Request Body**

Content-Type: `application/json`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `locale` | string | ✓ | Locale |
| `version` | number | ✓ | Version |

<details>
<summary>Request example</summary>

```json
{
  "locale": "en-GB",
  "version": 1
}
```

</details>

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Assign Content Item Locale response |

<details>
<summary>Response Example (200)</summary>

```json
{
  "id": "00112233-4455-6677-8899-aabbccddeeff",
  "contentRepositoryId": "00112233445566778899aabb",
  "body": {
    "_meta": {
      "name": "main-banner",
      "schema": "http://example.com/banner.json"
    },
    "heading": "Buy more stuff!!",
    "link": "http://anyafinn.com/buymore?campaign=shouting"
  },
  "label": "Banner Ad Homepage",
  "folderId": "00112233445566778899aabb",
  "assignees": [
    "00112233445566778899aabb"
  ],
  "assignedDate": "2019-01-01T00:00:00.000Z",
  "locale": "en-GB",
  "version": 1,
  "createdBy": "00112233-4455-6677-8899-aabbccddeeff",
  "createdDate": "2019-01-01T00:00:00.000Z",
  "lastModifiedBy": "00112233-4455-6677-8899-aabbccddeeff",
  "lastModifiedDate": "2019-01-01T00:00:00.000Z",
  "lastPublishedDate": "2019-01-01T00:00:00.000Z",
  "lastPublishedVersion": 1,
  "lastUnpublishedDate": "2019-01-01T00:00:00.000Z",
  "lastUnpublishedVersion": 1,
  "publishingStatus": "NONE",
  "deliveryId": "00112233-4455-6677-8899-aabbccddeeff",
  "workflow": {
    "state": "00112233445566778899aabb"
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff"
    },
    "content-item": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff{?projection}",
      "templated": true
    },
    "planned": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/planned{?epoch,time}",
      "templated": true
    },
    "publish": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/publish"
    },
    "unpublish": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/unpublish"
    },
    "linked-content": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff{?projection}",
      "templated": true
    },
    "content-item-with-children": {
      "href": "https://api.amplience.net/v2/content/content-items/search/findByIdWithChildren?id=00112233-4455-6677-8899-aabbccddeeff"
    },
    "content-item-with-parents": {
      "href": "https://api.amplience.net/v2/content/content-items/search/findByIdWithParents?id=00112233-4455-6677-8899-aabbccddeeff"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff{?ignoreSchemaValidation}",
      "templated": true
    },
    "restore-version": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/restore"
    },
    "content-repository": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
    },
    "content-item-version": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/versions{/version}",
      "templated": true
    },
    "content-item-versions": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/versions{?page,size,sort}",
      "templated": true
    },
    "content-item-history": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/history{?page,size,sort}",
      "templated": true
    },
    "copy": {
      "href": "https://api.amplience.net/v2/content/content-repositories/{id}/content-items?sourceContentItemId=00112233-4455-6677-8899-aabbccddeeff",
      "templated": true
    },
    "unarchive": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/unarchive"
    },
    "archive": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/archive"
    },
    "set-delivery-key": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/delivery-key"
    },
    "set-locale": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/locale"
    },
    "create-localizations": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/localize"
    },
    "localizations": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/localizations{?page,size,sort}",
      "templated": true
    },
    "localization-jobs": {
      "href": "https://api.amplience.net/v2/content/localization-jobs/search/findByRootContentItem?id=00112233-4455-6677-8899-aabbccddeeff{&page,size,sort}",
      "templated": true
    },
    "edition-slot-associations": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/edition-slot-associations"
    },
    "edit-workflow": {
      "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/workflow"
    }
  }
}
```

</details>

### Listing the localizations of a content item

`GET /content-items/{contentItemId}/localizations`

<small>`https://api.amplience.net/v2/content/content-items/{contentItemId}/localizations`</small>

Once a Content Item has been localized into one or more desired locales, you will be able to see the list of all localizations by following the "localizations" HAL link.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `contentItemId` | path | string | ✓ | Content Item ID<br/>Example: `00112233-4455-6677-8899-aabbccddeeff` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Content Item response |

<details>
<summary>Response Example (200)</summary>

```json
{
  "_embedded": {
    "content-items": [
      {
        "id": "00112233445566778899aabb",
        "locale": "en",
        "createdBy": "00112233-4455-6677-8899-aabbccddeeff",
        "createdDate": "2019-01-01T00:00:00.000Z",
        "_links": {
          "content-item": {
            "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff"
          }
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/..."
    }
  },
  "page": {
    "size": 20,
    "totalElements": 1,
    "totalPages": 1,
    "number": 0
  }
}
```

</details>

### Assigning locales to content repository

`PATCH /content-repositories/{contentRepositoryId}/item-locales`

<small>`https://api.amplience.net/v2/content/content-repositories/{contentRepositoryId}/item-locales`</small>

In order to organise your localized content into separate repositories you can assign a set locales to a Content Repository. You may want to do this in order to give different teams different permissions to create or edit content based on locale.

Assigning locales to a Content Repository has 2 effects. Firstly, you will only be able to assign locales to Content Items which match those assigned to the repository. Secondly, when localizing a content graph, the newly created Content Items will be created in the appropriate Content Repository which match the desired locale.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `contentRepositoryId` | path | string | ✓ | Content Repository ID<br/>Example: `00112233445566778899aabb` |

**Request Body**

Content-Type: `application/json`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `itemLocales` | array | ✓ | Item locales |

<details>
<summary>Request example</summary>

```json
{
  "itemLocales": [
    "en",
    "fr"
  ]
}
```

</details>

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Content Repository |

<details>
<summary>Response Example (200)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "name": "inspiration",
  "label": "inspiration",
  "status": "ACTIVE",
  "features": [
    "slots"
  ],
  "type": "CONTENT",
  "contentTypes": [
    {
      "hubContentTypeId": "00112233445566778899aabb",
      "contentTypeUri": "http://example.com/content-type.json"
    }
  ],
  "itemLocales": [
    "en_US"
  ],
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
    },
    "content-repository": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
    },
    "delete": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
    },
    "hub": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
    },
    "create-content-item": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-items{?ignoreSchemaValidation}",
      "templated": true
    },
    "search-content-items": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/content-items/find{?page,projection,query,size,sort}",
      "templated": true
    },
    "facet-content-items": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/content-items/facet{?page,projection,query,size,sort}",
      "templated": true
    },
    "content-items": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-items{?folderId,page,projection,size,sort,status}",
      "templated": true
    },
    "share": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/share"
    },
    "assign-content-type": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-types"
    },
    "unassign-content-type": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-types/{id}",
      "templated": true
    },
    "folders": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/folders{?page,size,sort}",
      "templated": true
    },
    "create-folder": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/folders"
    },
    "features": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/features?feature={feature}",
      "templated": true
    },
    "update-content-items": {
      "href": "https://api.amplience.net/v2/content/content-items"
    },
    "set-item-locales": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/item-locales"
    },
    "join-localization-group": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/localization-group"
    },
    "localization-group-locales": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/localization-group/locales"
    }
  }
}
```

</details>

### Updating a content repository localization group

`POST /content-repositories/{contentRepositoryId}/localization-group`

<small>`https://api.amplience.net/v2/content/content-repositories/{contentRepositoryId}/localization-group`</small>

The following API allows you to make 2 or more Content Repositories part of the same "group". The new repository will leave it’s current group and join the group of the target repository. To do this, follow the "join-localization-group" HAL link from the target repository and specify the new repository in the body.

For example, lets say you have 3 Content Repositories, Repo1 has no locales assigned, Repo2 and Repo3 are both members of the same group and are assigned locales ["en-GB", "en-US"] and ["fr-FR"] respectively. The following example shows localizing en-GB content into fr-FR. A1 signifies that item A exists in Repo1.

![Localize from en-GB to fr-FR](https://cdn.media.amplience.net/i/ampproduct/ve-localization-group-lm?w=1880&fmt=png&)

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `contentRepositoryId` | path | string | ✓ | Content Repository ID<br/>Example: `00112233445566778899aabb` |

**Request Body**

Content-Type: `application/json`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `newRepositoryId` | string | ✓ | New Content Repository ID |

<details>
<summary>Request example</summary>

```json
{
  "newRepositoryId": "00112233445566778899aabb"
}
```

</details>

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Content Repository |

<details>
<summary>Response Example (200)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "name": "inspiration",
  "label": "inspiration",
  "status": "ACTIVE",
  "features": [
    "slots"
  ],
  "type": "CONTENT",
  "contentTypes": [
    {
      "hubContentTypeId": "00112233445566778899aabb",
      "contentTypeUri": "http://example.com/content-type.json"
    }
  ],
  "itemLocales": [
    "en_US"
  ],
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
    },
    "content-repository": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
    },
    "delete": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
    },
    "hub": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
    },
    "create-content-item": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-items{?ignoreSchemaValidation}",
      "templated": true
    },
    "search-content-items": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/content-items/find{?page,projection,query,size,sort}",
      "templated": true
    },
    "facet-content-items": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/content-items/facet{?page,projection,query,size,sort}",
      "templated": true
    },
    "content-items": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-items{?folderId,page,projection,size,sort,status}",
      "templated": true
    },
    "share": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/share"
    },
    "assign-content-type": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-types"
    },
    "unassign-content-type": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-types/{id}",
      "templated": true
    },
    "folders": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/folders{?page,size,sort}",
      "templated": true
    },
    "create-folder": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/folders"
    },
    "features": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/features?feature={feature}",
      "templated": true
    },
    "update-content-items": {
      "href": "https://api.amplience.net/v2/content/content-items"
    },
    "set-item-locales": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/item-locales"
    },
    "join-localization-group": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/localization-group"
    },
    "localization-group-locales": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/localization-group/locales"
    }
  }
}
```

</details>

### Get content repository localization group locales

`GET /content-repositories/{contentRepositoryId}/localization-group/locales`

<small>`https://api.amplience.net/v2/content/content-repositories/{contentRepositoryId}/localization-group/locales`</small>

List of all supported item locales in a Content Repository localization group.
This request can be made using the ID of any repository in the localization group.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `contentRepositoryId` | path | string | ✓ | Content Repository ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Content Repository |

<details>
<summary>Response Example (200)</summary>

```json
{
  "locales": [
    "en",
    "fr"
  ],
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/localization-group/locales"
    }
  }
}
```

</details>

### Localization jobs

`GET /localization-jobs/search/findByRootContentItem/{id}`

<small>`https://api.amplience.net/v2/content/localization-jobs/search/findByRootContentItem/{id}`</small>

Content item localization is performed asynchronously - the request to localize a content item graph creates a Localization Job which will be completed at some point in the future. It is possible to track the status of these jobs.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `contentItemId` | path | string | ✓ | Content Item ID<br/>Example: `00112233-4455-6677-8899-aabbccddeeff` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Localization Jobs response |

<details>
<summary>Response Example (200)</summary>

```json
{
  "_embedded": {
    "localization-jobs": [
      {
        "status": "IN_PROGRESS",
        "rootContentItem": {
          "label": "l10n",
          "locale": "en-GB",
          "id": "00112233-4455-6677-8899-aabbccddeeff"
        },
        "requestedLocale": [
          "fr-FR",
          "de-DE"
        ],
        "createdBy": "00112233-4455-6677-8899-aabbccddeeff",
        "createdDate": "2019-01-01T00:00:00.000Z",
        "_links": {
          "content-root": {
            "href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff"
          },
          "findByRootContentItem": {
            "href": "https://api.amplience.net/v2/content/localization-jobs/search/findByRootContentItem?id=00112233-4455-6677-8899-aabbccddeeff{&page,size,sort}",
            "templated": true
          }
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/..."
    }
  },
  "page": {
    "size": 20,
    "totalElements": 1,
    "totalPages": 1,
    "number": 0
  }
}
```

</details>

## Locale labels

| Method | Endpoint | Summary |
|--------|----------|---------|
| `GET` | `/hubs/{hubId}/locale-labels` | [Read local labels](#read-local-labels) |
| `PUT` | `/hubs/{hubId}/locale-labels` | [Manage locale labels](#manage-locale-labels) |

### Read local labels

`GET /hubs/{hubId}/locale-labels`

<small>`https://api.amplience.net/v2/content/hubs/{hubId}/locale-labels`</small>

Get a list of locals and labels

**Responses**

| Status | Description |
|--------|-------------|
| 200 |  |

<details>
<summary>Response Example (200)</summary>

```json
{
  "localeLabels": [
    {
      "locale": "en-gb",
      "label": "england"
    }
  ],
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/locale-labels"
    },
    "local-labels": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/locale-labels"
    },
    "manage": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/locale-labels"
    },
    "hub": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
    }
  }
}
```

</details>

### Manage locale labels

`PUT /hubs/{hubId}/locale-labels`

<small>`https://api.amplience.net/v2/content/hubs/{hubId}/locale-labels`</small>

**Request Body**

Content-Type: `application/json`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `localeLabels` | array |  | An Array of objects containing a Locale and Label property |

<details>
<summary>Request example</summary>

```json
{
  "localeLabels": [
    {
      "locale": "en-gb",
      "label": "england"
    }
  ]
}
```

</details>

**Responses**

| Status | Description |
|--------|-------------|
| 200 |  |

<details>
<summary>Response Example (200)</summary>

```json
{
  "localeLabels": [
    {
      "locale": "en-gb",
      "label": "england"
    }
  ],
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/locale-labels"
    },
    "local-labels": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/locale-labels"
    },
    "manage": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/locale-labels"
    },
    "hub": {
      "href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
    }
  }
}
```

</details>
