admin-components

Reorder the product photos

Restates the gallery filenames in a new order. order must be a permutation of the stored filenames, so nothing can be dropped or added; the first image is the one the detail page and the catalogue card show. On success the cached component reads and the public pages /components and /components/<slug> are revalidated.

patch/api/admin/components/{id}/gallery

Request

  • Base URL: https://voltplan.app
  • URL: https://voltplan.app/api/admin/components/{id}/gallery
  • Auth: HTTP bearer

Request body

orderstring[] required

All stored filenames in the new order (a permutation of gallery).

Response

Gallery in the new order.

successunknown required
gallerystring[] required

Stored filenames in display order; the first one is the cover image.

urlsstring[] required

Public file URLs <PocketBase>/api/files/<collectionId>/<id>/<filename>, same order as gallery.

Changes

No recorded changes to this operation across all 1 revision of this API.