Skip to content

Gallery

The company’s images and documents. For images, public_url is the stable address and thumb_url the thumbnail. Documents are private until they get a public_link, with the create_link action. file_type is the document type, empty for images. Upload: POST /media_items/upload. The full guide is in the documentation, under Images and files.

Module: Settings (settings).

  • GET /api/v1/media_items - List with filters, sorting and pagination (scope settings:read)
  • GET /api/v1/media_items/{id} - A record by id (scope settings:read)
  • PATCH /api/v1/media_items/{id} - Modify the submitted fields (scope settings:write)
  • DELETE /api/v1/media_items/{id} - Delete or deactivate (scope settings:write)
  • POST /api/v1/media_items/{id}/usage - Where the file is used, including the active public link. (scope settings:write)
  • POST /api/v1/media_items/{id}/replace - Replaces the file, with the same address: an image with an image, a document with a document. (scope settings:write)
  • POST /api/v1/media_items/{id}/replace_from - Replaces the content with another gallery file’s, with the same address. The chosen file stays unchanged. (scope settings:write)
  • POST /api/v1/media_items/{id}/create_link - Creates the public link: anyone who has it opens the file without an account, and the file appears as used externally. If one already exists, it returns that one. (scope settings:write)
  • POST /api/v1/media_items/{id}/remove_link - Stops the public link. One created afterwards has a different address. (scope settings:write)
  • POST /api/v1/media_items/{id}/force_delete - Deletes the image even when it is used: it disappears from product and accommodation photos, and in settings it is left without an image. (scope settings:write)
  • POST /api/v1/media_items/upload - Upload a file (multipart: file, alt) (scope settings:write)
  • GET /api/v1/media_items/{id}/file - Download the file, including a private document (scope settings:read)
  • id (string, uuid; read): Unique identifier (UUID).
  • name (string; write, required)
  • alt (string; write)
  • public_url (string; read)
  • source (string; read)
  • width (integer; read)
  • height (integer; read)
  • size_bytes (integer; read)
  • created_by (string; read)
  • created_at (string, date-time; read): Creation date (ISO 8601).
  • updated_at (string, date-time; read): Last modification date (ISO 8601).
  • file_type (string; read)
  • public_link (string; read)
  • media_items.created
  • media_items.updated
  • media_items.deleted