For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a product video

Attaches a video to a product. Provide at least one of video (inline content) or video_path (a path to an already-uploaded file); if neither is supplied the request is rejected with error code product_image_500_1.

post
/product_video/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Body

Fields for creating or fully replacing a product video. At least one of video or video_path must be supplied on create. On update, product and video are ignored; use video_path to repoint the stored file.

productintegerRequired

Identifier of the product the video belongs to. Ignored on update.

videostringOptional

Inline video file content, sent as a string. Ignored on update.

video_pathstringOptional

Storage path of an already-uploaded video file to point the record at.

Example: product_videos/abc123.mp4
orderintegerOptional

Sort order. Lower values appear first. Defaults to 0.

Default: 0
Responses
201

The product video was created.

application/json

A product video record.

pkintegerRead-onlyRequired

Unique identifier of the product video.

productintegerRequired

Identifier of the product the video belongs to.

videostringRequired

Reference to the stored video file.

orderintegerRequired

Sort order used when listing a product's videos. Lower values appear first.

Default: 0
post/product_video/
POST /api/v1/remote/1/product_video/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 66

{
  "product": 340,
  "video_path": "product_videos/abc123.mp4",
  "order": 0
}
{
  "pk": 7,
  "product": 340,
  "video": "product_videos/abc123.mp4",
  "order": 0
}

Last updated

Was this helpful?