Content Management API
The Item API is in phase and is not yet available to users. You can contact the Product-Live team at contact@product-live.com if you want more details and get an early access.
Takeaway
The content management API allows to interact with the Product-Live platform to perfom various operations on your data. Our API is a classic REST API that uses JSON as data format. We provide an online documentation of our API and an OpenAPI specification. We also provide a Typescript SDK (more languages to come) to speed up the development of your integration.
Before going further
We recommend that you have familiarized yourself with the document on how to connect Product-Live to your systems.
Overview
Product-Live offers a series of APIs that enable developers to leverage the full potential of the Product-Live platform. This API is a classic REST API that uses JSON as data format. An online documentation of this API is available here.
Requirements for using Product-Live Data Factory APIs
- An active Product-Live account
- A valid API key
API scopes and permissions
To date, an API key allow its owner to perform any action on the Data Factory platform.
Authentication
Authentication is the process of identifying the user who is making the request. Authorization, on the other hand, is the process of granting access to a certain type of resource. The Data Factory APIs enable you to perform any action on the Data Factory platform on your account.
Product-Live uses API Key
authentication strategy. To generate or manage your API key, go to Product-Live Settings > API. An API key may be revoked at any time by its owner.
Authenticate an API request
To authenticate an API request, you should provide your API key in the HTTP X-Api-Key header. For example to simply fetch a job execution:
bash
curl 'https://api.product-live.com/v1/items/[item id]' -H 'X-Api-Key: <token>'
1
ts
import axios from 'axios';
const itemId = '[item id]';
const apiKey = '<token>';
const url = `https://api.product-live.com/v1/items/${itemId}`;
axios.get(url, {
headers: {
'X-Api-Key': apiKey,
},
})
.then(response => {
// Handle the response here
console.log(response.data);
})
.catch(error => {
// Handle errors here
console.error(error);
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
ts
import { createConfiguration, ServerConfiguration, JobExecutionApi } from '@product-live/api-sdk';
export async function main(): Promise<void> {
const itemId = 'item id';
const configuration = createConfiguration({
baseServer: new ServerConfiguration(process.env.API_BASE_PATH || '', {}),
authMethods: {
ApiKeyAuthHeader: process.env.API_ACCESS_TOKEN
}
});
const itemApi = new ItemApi(configuration);
const item = await itemApi.getItemById(itemId);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
javascript
const fetch = require('node-fetch');
const url = 'https://api.product-live.com/v1/items/[item id]';
const token = '<token>';
fetch(url, {
method: 'GET',
headers: {
'X-Api-Key': token
}
})
.then(response => response.json())
.then(data => {
// Process the response data
console.log(data);
})
.catch(error => {
// Handle any errors
console.error('Error:', error);
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Note that it is also possible to pass the API key within the query string using the api_key
parameter. For example:
bash
curl 'https://api-next.product-live.com/v1/items/[item id]?api_key=<api_key>'
1
Versioning
API versioning enables Product-Live to evolve its platform consistently, while providing third-party developers with a reliable roadmap for feature enhancements and deprecations.
To stay informed about upcoming API modifications, we recommend following our Release Notes. Product-Live ensures full backward compatibility of its API within a major version.
Rate limits
Product-Live APIs are subject to rate limiting. The default rate limit for all Product-Live APIs is 50 requests per minute. However, some limitations may apply to specific endpoints. The rate limit is applied to the API key making the requests.
In addition to the rate limit per minute, the following limits apply:
- Maximun request per second: 5 requests per second.
- Maximun request per month: 40,000 requests per month.
When the rate limit is exceeded, the API may return a 429 Too Many Requests
status code.
For large-scale applications
If you need a higher rate limit, our team can help you. Please contact us for more information.
Pagination
The API supports pagination for all endpoints that return a list of entities.
Query parameters
Parameter | Type | Description | Default | Required |
---|---|---|---|---|
page | integer | The page number to retrieve. Starts at 0. | 0 | false |
size | integer | The number of items per page. The maximum value is 1000. | 20 | false |
Example
bash
curl --request GET \
--url 'https://api.product-live.com/v1/items?page=1&size=5' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <REDACTED>'
1
2
3
4
2
3
4
HTTP response codes
The API uses standard HTTP status codes to indicate the success or failure of a request. The following table lists the most common status and error codes to indicate the specific error that occurred.
TIP
Specific error codes to certain endpoints are listed in the documentation for that endpoint.
Status code | Error Code | Description |
---|---|---|
200 | OK. The request was successful. | |
201 | Created. The request was successful and a new resource was created. | |
400 | BAD_REQUEST | Bad request. The request was unacceptable, often due to missing a required parameter. See error code below. |
401 | UNAUTHENTICATED | Unauthorized. The provided API key is invalid. |
403 | Forbidden. The provided API key does not have the required permissions. | |
404 | NOT_FOUND | Not found. The requested resource does not exist. |
429 | RATE_LIMIT | Too many requests. The rate limit has been exceeded. |
ALREADY_EXISTS | A resource with this id already exists. | |
5xx | Internal server error. |
json
{
"date": "Thu Aug 10 2023 12:00:00 GMT+0000 (Coordinated Universal Time)",
"code": "BAD_REQUEST",
"message": "Missing property 'name'",
"httpStatusCode": 400
}
1
2
3
4
5
6
2
3
4
5
6
Date and time format
The format used is always the ISO 8601 format.
ISO 8601 is an international standard covering the worldwide exchange and communication of date- and time-related data. The standard aims to provide a well-defined, unambiguous method of representing calendar dates and times in worldwide communications, especially to avoid misinterpreting numeric dates and times when such data is transferred between countries with different conventions for writing numeric dates and times.