- GET [/instances/$INSTANCE]/private/fountains#
Lists a bounded page of fountains of the instance, ordered by
fountain_serial. This endpoint is available since protocol v43. Pagination and thefountain_serialresponse field are available since protocol v44. Clients must iterate over the pages to retrieve all fountains.Required permission:
fountains-read(see Scopes)Request:
- Query Parameters:
limit – Optional. Signed 64-bit integer specifying the page size and order. Positive values select ascending serial order; negative values select descending serial order. The default is
20. The absolute page size is capped at100, including when a larger magnitude is requested. Zero returns an empty page.offset – Optional. Exclusive
fountain_serialcursor, an integer between0and9223372036854775807. Defaults to0for non-negative limits and9223372036854775807for negative limits. Ascending pages contain serials greater than the cursor; descending pages contain serials less than the cursor.
To iterate, use the last entry’s
fountain_serialas theoffsetof the next request, keeping the samelimit. Stop when a page is empty. For example, start with?limit=20and continue with?limit=20&offset=42if the last returned serial is42. Each request reads the current database state; the iteration does not provide a snapshot across requests.Response:
- 200 OK:
The backend has successfully returned a page of at most 100 fountains. Returns a FountainsListResponse.
- 400 Bad request:
A pagination parameter is malformed or outside its permitted range.
- 404 Not found:
The merchant instance is unknown.
- 500 Internal Server Error:
The server experienced an internal failure.
Details:
interface FountainsListResponse { // The requested page of fountains, in serial order. fountains: FountainEntry[]; }