Skip to content

Postman Guide

This page explains how to test the SportyWallet Worker integration with the provided Postman assets.


Available Files

These files should be published as static content together with the generated documentation site.


Import Steps

  1. Download both JSON files from the links above.
  2. Import the collection file into Postman.
  3. Import the environment file into Postman.
  4. Select the imported environment before running requests.

Environment Setup

Set the following values in the imported environment:

Variable Value
baseUrl http://localhost:60000
apiKey Your assigned API key

Included Requests

The collection contains the following requests:

  • Ping to verify the Worker is running
  • Read card to read the current card identifier
  • Write card to write credits to the current card

The Write card request already includes the X-Api-Key header and uses the {{apiKey}} environment variable.


Test Flow

  1. Run Ping and expect pong.
  2. Place a card on the reader and run Read card.
  3. Update the credits value in Write card if needed.
  4. Run Write card with a valid apiKey.

Example request body:

{
  "credits": 1.5
}

Notes

  • The documentation examples use only http://localhost:60000.
  • X-Api-Key is required for Write card.
  • Ping is not rate limited.
  • Read card and Write card are limited to 5 requests per minute.