Media

Upload a JPEG, PNG, GIF or WebP image of up to 10 MB. Attach the returned media's id to a catalogue item, brand or category.

Required scopes: business/catalogue:read, business/catalogue:write

post/v1/media/

Request

  • Base URL
    https://api.yoco.com
  • Auth
    HTTP bearer

Request body application/x-www-form-urlencoded

filestring binary required

The image file to upload.

category'catalogue' required

Example request

{
  "category": "catalogue"
}

Response

Successful Response

idstring required

The unique identifier of the media.

type'image' required
mime_typestring required

The mime type indicates the format of the media.

urlstring required

The URL of the media file.

created_atstring date-time required

The media creation date and time in ISO 8601 format.

updated_atstring date-time nullable required

The date and time the media was last modified in ISO 8601 format.

Example response

{
  "created_at": "2024-11-19T15:27:02+00:00",
  "id": "1757533814961-58f649da-81e3-4877-8769-f407cfba8aff",
  "mime_type": "image/jpeg",
  "type": "image",
  "updated_at": "2024-11-19T16:27:23+00:00",
  "url": "https://images.yoco.com/foo/bar.jpg"
}

Changes