packerooDevelopers Deutsch

Postman and OpenAPI

The public packeroo API as OpenAPI 3.1 in JSON and YAML, the Postman collection with a sandbox environment, and the import into Insomnia, Bruno and Hoppscotch.

Every file is built at each release from the same contract as the reference. They hold only the public operations and stay at these addresses.

OpenAPI

FileAddress
OpenAPI 3.1, JSON/openapi.json
OpenAPI 3.1, YAML/openapi.yaml

There is no official SDK. For the operations of today an HTTP client is enough, as the examples show. If you want a typed client anyway, generate it from the OpenAPI file, for example with OpenAPI Generator (needs Java):

npx @openapitools/openapi-generator-cli generate -i https://developers.packeroo.com/openapi.yaml -g python -o packeroo-client

Instead of python, use typescript-fetch, csharp, php, go or java for your language. Generate the client again when an operation is added in the changelog.

Postman

To send the first request:

  1. Download both files.
  2. In Postman: Import, drop both files in.
  3. Choose the environment packeroo Sandbox at the top right.
  4. Under Table devices, open Ask to pair this device and send it. Postman makes a new Idempotency-Key for every send ({{$guid}}).
  5. Paste the token from the answer into token of the environment. From then on every request of the collection sends it as a bearer token.

The environment keeps token as a secret, so Postman does not show it openly. Do not share the environment with a token in it.

Insomnia, Bruno, Hoppscotch

These tools read the OpenAPI file directly:

The base address of the sandbox is https://api.qm.packeroo.com/api/v1. Set User-Agent to the name of your device, or the API answers 400.

This page as Markdown