taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

get-products-IMAGE_HASH-image.rst (736B)


      1 .. http:get:: /products/$IMAGE_HASH/image
      2 
      3   Returns a stored product image by its content hash. The hash is the lowercase
      4   hexadecimal SHA-256 digest of the base64-encoded image data supplied in
      5   ``image`` during product creation or update.
      6 
      7   **Required permission:** none (public endpoint)
      8 
      9   **Response:**
     10 
     11   :http:statuscode:`200 OK`:
     12     The body is a `ProductImageResponse`.
     13   :http:statuscode:`400 Bad Request`:
     14     The hash is not a valid hex-encoded SHA-256 digest.
     15   :http:statuscode:`404 Not found`:
     16     No image is known for the given hash.
     17 
     18   .. ts:def:: ProductImageResponse
     19 
     20     interface ProductImageResponse {
     21       // Data URL containing the product image as stored in the backend.
     22       image: ImageDataUrl;
     23     }