API documentation for working with video reviews
Table with field descriptions:
| Field | Type | Required? | Description |
|---|---|---|---|
| id | int | No | Unique identifier of the video review (required when updating). |
| name | string | Yes | Title of the video review. |
| video_ro | string | Yes | Link to video review in Romanian. |
| video_ru | string | Yes | Link to video review in Russian. |
| video_en | string | No | Link to video review in English. |
| video_uk | string | No | Link to video review in Ukrainian. |
| order | int | No | Field for sorting video reviews (by default 0). |
1. Receive all video reviews
Method: GET
URL: {domain}/external/product-review/
Description:
Returns a list of all video reviews associated with certain products.
Query example:
GET {domain}/external/product-review/
Example answer:
[
{
"id": 4,
"name": "123",
"video_ro": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"video_ru": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"video_en": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"video_uk": null,
"order": 0
},
{
"id": 8,
"name": "GO 3 Black",
"video_ro": "https://www.youtube.com/embed/jjCejstFlkQ?si=SbkruDNKz3eoaGVY",
"video_ru": "https://www.youtube.com/embed/jjCejstFlkQ?si=SbkruDNKz3eoaGVY",
"video_en": null,
"video_uk": null,
"order": 0
}
]
2. Receive one video review
Method: GET
URL: {domain}/external/product-review/{id}/
Description:
Returns data for one video review by its unique identifier.
Query example:
GET {domain}/external/product-review/4/
Example answer:
{
"id": 4,
"name": "123",
"video_ro": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"video_ru": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"video_en": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"video_uk": null,
"order": 0
}
3. Creating multiple video reviews
Method: POST
URL: {domain}/external/product-review/bulk-create/
Description:
Creates several video reviews at the same time.
Query example:
POST {domain}/external/product-review/bulk-create/
Content-Type: application/json
Request body:
[
{
"name": "New video review 1",
"video_ro": "https://www.youtube.com/example1",
"video_ru": "https://www.youtube.com/example1",
"video_en": "https://www.youtube.com/example1",
"order": 1
},
{
"name": "New video review 2",
"video_ro": "https://www.youtube.com/example2",
"video_ru": "https://www.youtube.com/example2",
"video_en": null,
"video_uk": "https://www.youtube.com/example2",
"order": 2
}
]
Example answer:
[
{
"id": 9,
"name": "New video review 1",
"video_ro": "https://www.youtube.com/example1",
"video_ru": "https://www.youtube.com/example1",
"video_en": "https://www.youtube.com/example1",
"video_uk": null,
"order": 1
},
{
"id": 10,
"name": "New video review 2",
"video_ro": "https://www.youtube.com/example2",
"video_ru": "https://www.youtube.com/example2",
"video_en": null,
"video_uk": "https://www.youtube.com/example2",
"order": 2
}
]
4. Update one video review
Method: PUT
URL: {domain}/external/product-review/{id}/
Description:
Updates data for one video review by its unique identifier.
Query example:
PUT {domain}/external/product-review/4/
Content-Type: application/json
Request body:
{
"name": "Updated review",
"video_ro": "https://www.youtube.com/updated",
"video_ru": "https://www.youtube.com/updated",
"order": 3
}
Example answer:
{
"id": 4,
"name": "Updated review",
"videoro": "https://www.youtube.com/updated", "videoru": "https://www.youtube.com/updated", "videoen": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "videouk": null, "order": 3 }
5. Update of several video reviews
Method: PUT
URL: {domain}/external/product-review/bulk-update/
Description:
Updates data from several video reviews simultaneously.
Query example:
PUT {domain}/external/product-review/bulk-update/
Content-Type: application/json
Request body:
[
{
"id": 4,
"name": "Updated Review 1",
"video_ro": "https://www.youtube.com/new1",
"video_ru": "https://www.youtube.com/new1",
"order": 1
},
{
"id": 8,
"name": "Updated Review 2",
"video_ro": "https://www.youtube.com/new2",
"video_ru": "https://www.youtube.com/new2",
"video_en": null,
"video_uk": "https://www.youtube.com/new2",
"order": 2
}
]
Example answer:
[
{
"id": 4,
"name": "Updated Review 1",
"video_ro": "https://www.youtube.com/new1",
"video_ru": "https://www.youtube.com/new1",
"video_en": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"video_uk": null,
"order": 1
},
{
"id": 8,
"name": "Updated Review 2",
"video_ro": "https://www.youtube.com/new2",
"video_ru": "https://www.youtube.com/new2",
"video_en": null,
"video_uk": "https://www.youtube.com/new2",
"order": 2
}
]
Was the article helpful?
Yes, thank you! Unfortunately no