Skip to Content
rentall API byla vydána 🎉
ProductsGET /api/products/:id

title: GET /api/products/:id description: Získání jednoho produktu podle ID.

GET /api/products/:id

  • URL: /api/products/68b5b692be9080affaa098c3
  • Metoda: GET
  • Autorizace: dle projektu
  • Vrací: objekt Product

Tento endpoint Rentall API vrací jeden produkt podle jeho ID.

Poznámka: additional.selectedTerm odkazuje na podmínku z basic.rent_owner.terms.termsArray[].id příslušného pronajímatele.

Parametry cesty

  • :id — ID produktu (string)

Úspěšná odpověď

  • Stav: 200 OK
  • Tělo: objekt Product
{ "id": "68b5b692be9080affaa098c3", "createdAt": "2025-09-01T15:06:58.847Z", "updatedAt": "2025-09-01T15:07:09.125Z", "internal_name": "Example Product", "basic": { "product_name": "Example Product", "product_desc": "Example description ...", "location": "Example City" }, "additional": { "price": 500, "caution": 1000, "time_unit": "day", "selectedTerm": "qjnagbx6h1j" }, "settings": { "published": true, "slug": "vycepni-zarizeni-pipa-lindr-as-40-2-kohout-zwxfkxo" }, "gallery": { "images": [ { "id": "68b5b692be9080affaa098c1", "alt": "Example Product", "filename": "IMG20250614205309.jpg", "mimeType": "image/jpeg", "url": "/api/rentMedia/file/IMG20250614205309.jpg", "width": 819, "height": 614 } ] }, "availability": { "reservationDates": [] } }

Chyby

  • 404 Not Found pokud produkt neexistuje
  • 401/403 pokud je uživatel neautorizovaný/zakázaný

Příklady

curl -s \ -H "Authorization: Bearer $RENTALL_TOKEN" \ -H "Accept: application/json" \ https://rentall.cz/api/products/68b5b692be9080affaa098c3