openapi.json, let you run every endpoint from Postman or from Newman.
No key and no document is inside either file.
Text copies for import by link: collection and environment. They hold the same JSON. The
.json files are in the postman/ folder of the documentation package.
Import
- Open Postman. Click Import.
- Import the collection. Choose one way:
- Link: paste
https://docs.sahlfinancial.com/postman/sahl-partner-api.postman_collection.json.txt. - File: choose the downloaded
sahl-partner-api.postman_collection.json. - Raw text: open the text copy above, select all, paste.
- Link: paste
- Import the environment the same way. Its content is small enough to paste here:
- Select Sahl sandbox in the environment menu at the top right.
- Open the environment and set Current value of
apiKeyto your own key. Use the current value, not the initial value: Postman keeps current values on your machine and can sync initial values to a shared workspace. Create the key as described in Test in the sandbox.
environment as sandbox. baseUrl is https://app.sahlfinancial.com/api.
The requests
Run them in order. Each stores what the next one needs.
Before each request a collection script checks that
apiKey is set, and adds a fresh X-Request-ID (a GUID) so you can find the call in Developers, Call log in the console.
Files for requests 1 and 2
The collection holds no document. In requests 1 and 2, open the Body tab and click thefiles row to choose your own fake test file. The collection refers to them as payslip-test.pdf and cin-test.jpg as placeholders. Make the files yourself with invented data and do not upload a real client document: see Sandbox.
Variables
Request 3 and 4 put
{{documents}} in the JSON body. Postman’s editor may underline it as invalid JSON before the run. It is replaced by the entries from requests 1 and 2 when you send.
What the scripts do
All scripts are plain Postman sandbox code. Request 1:passed is false. Add your own assertion if you want a failing run to fail the pipeline, for example pm.expect(body.passed).to.eql(true).
Run from the command line with Newman
payslip-test.pdf and cin-test.jpg in ./samples. --folder is given the request names here so that the eID requests are skipped. The collection and its scripts were run with Newman against a local stand-in server, not against the live API.