Introduction

Cernel allows generations for sites configured through Products Feeds throught the Public API hosted on:

All endpoints documented below are relative to the above. Use of endpoints assumes that the site has been configured for a user from platform.cernel.ai.

Authentication

The API uses Token-based authentication, and all requests must include the ‘Authorization’ header

The token can be obtained by contacting mfe@cernel.ai and is issued per-user.

Example token:

application/json

application/json

Authorization': Token 5172cd49ebea46a4bd3b9282624694d7a0e32591

Authorization': Token 5172cd49ebea46a4bd3b9282624694d7a0e32591

Rate limits

Rate limits are applied per domain and returns HTTP 429 responses when exceeded.

Each domain can have a maximum of 1000 concurrent products or 100 concurrent categories queued

The system limits the following endpoints to 10 requests/m.

POST

/products

POST

/categories

The system limits the following endpoints to 1 request/s.

GET

/jobs/<str:job_id>

Endpoints

Product updates

Request body

Products use the <g:id> Google Product Feed identifier to identify products

Response body

The request returns the state of the queued job and the corresponding UUID4 job id that is a global and unique identifier used to fetch resource

Webhooks

Webhooks are supported through configurations by contacting mfe@cernel.ai. Upon job completion the webhook returns data to the webhook URL.

Endpoint

POST

/products

Request samples

Payload:

application/json

application/json

{

"domain": "https://cernel.shop.dk
"products": [
{
"number": "3131a"
},
{
"number": "a6718-hg"
}
]
}

{

"domain": "https://cernel.shop.dk
"products": [
{
"number": "3131a"
},
{
"number": "a6718-hg"
}
]
}

Response samples

Status 202:

application/json

application/json

{
"status": "queued"
"job_id": "163f99d4-e53f-4d07-9051-97d298c7306f"
}

{
"status": "queued"
"job_id": "163f99d4-e53f-4d07-9051-97d298c7306f"
}

Status 4xx:

application/json

application/json

{
"status": "failure"
"job_id": "163f99d4-e53f-4d07-9051-97d298c7306f"
}

{
"status": "failure"
"job_id": "163f99d4-e53f-4d07-9051-97d298c7306f"
}

Webhook

application/json

application/json

[
{
"id": "3131a",
"name": "Kaffemaskiner",
"language": "Danish",
"short_description": "<p>Short description</p>",
"description": "<p>Long description</p>",
"meta_title": "Meta title content",
"meta_description": "Meta description content",
"alt_text": "Alt text content",
"status": "SUCCESS",
"report": <h2>Category generation Report</h2>

<p>Generation specifics</p>
},
{
"id": "a6718-hg",
"name": "Rens og Pleje",
"language": "Danish",
"short_description": "<p>Short description</p>",
"description": "<p>Long description</p>",
"meta_title": "Meta title content",
"meta_description": "Meta description content",
"alt_text": "Alt text content",
"status": "SUCCESS",
"report": "<h2>Category generation Report</h2>

<p>Generation specifics</p>"
},
]

[
{
"id": "3131a",
"name": "Kaffemaskiner",
"language": "Danish",
"short_description": "<p>Short description</p>",
"description": "<p>Long description</p>",
"meta_title": "Meta title content",
"meta_description": "Meta description content",
"alt_text": "Alt text content",
"status": "SUCCESS",
"report": <h2>Category generation Report</h2>

<p>Generation specifics</p>
},
{
"id": "a6718-hg",
"name": "Rens og Pleje",
"language": "Danish",
"short_description": "<p>Short description</p>",
"description": "<p>Long description</p>",
"meta_title": "Meta title content",
"meta_description": "Meta description content",
"alt_text": "Alt text content",
"status": "SUCCESS",
"report": "<h2>Category generation Report</h2>

<p>Generation specifics</p>"
},
]

Product Updates From Data

Request body

Products use the <g:id> Google Product Feed identifier to identify products

Response body

The request returns the state of the queued job and the corresponding UUID4 job id that is a global and unique identifier used to fetch resource

Webhooks

Webhooks are supported through configurations by contacting mfe@cernel.ai. Upon job completion the webhook returns data to the webhook URL.

Endpoint

POST

/products/<str:number>

Request samples

Payload:

application/json

application/json

{
"domain": "https://cernel.shop.dk
"product":
{
"name": "IN||ZYM Protein Isolate - Vanilje (750 g)",
"image_url": "https://cdn.cernel.shop.dk/public/media/1789/93790_p.png",
"gtin": "5711815061203",
"brand": "IN||ZYM",
"category": "Slank & Fitness",
"url": "https://cernel.shop.dk/in-zym-protein-isolate-vanilje-750-g",
"availability": "in_stock",
}
}

{
"domain": "https://cernel.shop.dk
"product":
{
"name": "IN||ZYM Protein Isolate - Vanilje (750 g)",
"image_url": "https://cdn.cernel.shop.dk/public/media/1789/93790_p.png",
"gtin": "5711815061203",
"brand": "IN||ZYM",
"category": "Slank & Fitness",
"url": "https://cernel.shop.dk/in-zym-protein-isolate-vanilje-750-g",
"availability": "in_stock",
}
}

Response samples

Status 202:

application/json

application/json

{
"status": "queued"
"job_id": "163f99d4-e53f-4d07-9051-97d298c7306f"
}

{
"status": "queued"
"job_id": "163f99d4-e53f-4d07-9051-97d298c7306f"
}

Status 4xx:

application/json

application/json

{
"status": "failure"
"job_id": "163f99d4-e53f-4d07-9051-97d298c7306f"
}

{
"status": "failure"
"job_id": "163f99d4-e53f-4d07-9051-97d298c7306f"
}

Webhook

application/json

application/json

[
{
"id": "01-99-133457",
"name": "IN||ZYM Protein Isolate - Vanilje (750 g)",
"language": "Danish",
"short_description": "<p>Short description</p>",
"description": "<p>Long description</p>",
"meta_title": "Meta title content",
"meta_description": "Meta description content",
"alt_text": "Alt text content",
"status": "SUCCESS",
"report": null
},
]

[
{
"id": "01-99-133457",
"name": "IN||ZYM Protein Isolate - Vanilje (750 g)",
"language": "Danish",
"short_description": "<p>Short description</p>",
"description": "<p>Long description</p>",
"meta_title": "Meta title content",
"meta_description": "Meta description content",
"alt_text": "Alt text content",
"status": "SUCCESS",
"report": null
},
]

Category Updates

Request body

Categories uses the on-site URL from a sitemap

Response body

The request returns the state of the queued job and the corresponding UUID4 job id that is a global and unique identifier used to fetch resource

Webhooks

Webhooks are supported through configurations by contacting mfe@cernel.ai. Upon job completion the webhook returns data to the webhook URL

Endpoint

POST

/categories

Request samples

Payload:

application/json

application/json

{
"domain": "https://cernel.shop.dk
"categories": [
{
"number": "https://cernel.shop.dk/produkter/kaffemaskiner"
},
{
"number": "https://cernel.shop.dk/produkter/kaffemaskiner/rens-og-pleje"
}
]
}

{
"domain": "https://cernel.shop.dk
"categories": [
{
"number": "https://cernel.shop.dk/produkter/…"
},
{
"number": "https://cernel.shop.dk/produkter/…""
}
]
}

Response samples

Status 202:

application/json

application/json

{
"status": "queued"
"job_id": "163f99d4-e53f-4d07-9051-97d298c7306f"
}

{
"status": "queued"
"job_id": "163f99d4-e53f-4d07-9051-97d298c7306f"
}

Status 4xx:

application/json

application/json

{
"status": "failure"
"job_id": "163f99d4-e53f-4d07-9051-97d298c7306f"
}

{
"status": "failure"
"job_id": "163f99d4-e53f-4d07-9051-97d298c7306f"
}

Webhook

application/json

application/json

[
{
"id": "3131a",
"name": "Kaffemaskiner",
"language": "Danish",
"short_description": "<p>Short description</p>",
"description": "<p>Long description</p>",
"meta_title": "Meta title content",
"meta_description": "Meta description content",
"alt_text": "Alt text content",
"status": "SUCCESS",
"report": <h2>Category generation Report</h2>

<p>Generation specifics</p>
},
{
"id": "a6718-hg",
"name": "Rens og Pleje",
"language": "Danish",
"short_description": "<p>Short description</p>",
"description": "<p>Long description</p>",
"meta_title": "Meta title content",
"meta_description": "Meta description content",
"alt_text": "Alt text content",
"status": "SUCCESS",
"report": "<h2>Category generation Report</h2>

<p>Generation specifics</p>"
},
]

[
{
"id": "3131a",
"name": "Kaffemaskiner",
"language": "Danish",
"short_description": "<p>Short description</p>",
"description": "<p>Long description</p>",
"meta_title": "Meta title content",
"meta_description": "Meta description content",
"alt_text": "Alt text content",
"status": "SUCCESS",
"report": <h2>Category generation Report</h2>

<p>Generation specifics</p>
},
{
"id": "a6718-hg",
"name": "Rens og Pleje",
"language": "Danish",
"short_description": "<p>Short description</p>",
"description": "<p>Long description</p>",
"meta_title": "Meta title content",
"meta_description": "Meta description content",
"alt_text": "Alt text content",
"status": "SUCCESS",
"report": "<h2>Category generation Report</h2>

<p>Generation specifics</p>"
},
]

Job results

Request body

The generated content can be fetched through the unique job UUID.

Endpoint

GET

/jobs/<str:job_id>

Response samples

Status 200:

application/json

application/json

{
"status": "queued"
"job_id": "163f99d4-e53f-4d07-9051-97d298c7306f"
}

{
"status": "queued"
"job_id": "163f99d4-e53f-4d07-9051-97d298c7306f"
}