You can try most API products in the freely accessible sandbox environment. Sandbox APIs implement the same OpenAPI specifications used for Live APIs to ensure a similar integration experience. However not all sandbox APIs can be used to fully qualify and test your application because some sandbox APIs only return static responses, which is in a non-business meaningful way.
APIs not provided by Swift may not be available in the sandbox. You can find out whether the sandbox can be used for functional testing for the API of your interests under API Guides.
The API calls available in the sandbox are shown in postman collections. You can view all the collections in the public workspace: Swift API Sandbox Collections. Postman collection linked to the specific API can be found under .
We strongly recommend forking the collection to be notified when enhancement and bug fixes are made to the collection. Alternatively you can simply view the collection in "read-only" mode. Importing a static copy of the collection is another option however you will not be notified when change happens and you will need to re-import the latest collection to see the changes.
This option opens a tab in your browser, directing you to the Swift API Sandbox Collections workspace. You can inspect all the available API calls. However, you will not be able to make any API call. The option for viewing is read-only.
This option opens a new tab in your browser. If you are logged in to your postman Account, then it will bring up a form to let you set the label, workspace, and notification settings for your fork. On clicking Fork Collection the fork is added to your specified workspace. With a fork, you will be able to send API calls to the sandbox, stay updated on the latest changes, and collaborate through Pull Requests. For more information about forks, please see Fork collections, environments, and Flows in Postman.
Now that you have a Postman Collection in your workspace, here are a few things for you to know.
Each Postman Collection comes with its own set of pre-defined variables. These variables can be applied to any call within the collection. At the root folder of the Postman Collection, select the Variables tab to locate the pre-defined variables as the following.
Replace the values with the consumer-key and consumer-secret from the app that you have created. Make sure to click the Save button on the top right after updating the values.
sandbox-private-key and sandbox-certificate are retrieved automatically when the authorisation API call is made. You can use as is.
util-lib contains the function that handles signing using JSON Web Key (JWK).
server is always sandbox.swift.com.
In the Authorization tab of the collection, Bearer Token is selected as the Auth Type. The Token value is defined in a collection variable access_token. This variable is set by the post-response script after the authorisation API call response is returned.
Pre-request and post-response scripts are located in the Generate Token API call inside the Authorization folder.
Refer to Authentication to learn how to call the Authorisation API to gain access to the API Sandbox. You can expect the same behaviour when you move to Pilot or Live environments. To get started, you can use the dedicated sandbox credentials below to get authenticated and authorised to call the sandbox APIs. After you have successfully tested the APIs in the sandbox, swap the credentials with your Pilot or Live credentials and start making the API calls in Pilot or Live environments.
| Sandbox credentials | Value | Descriptions |
|---|---|---|
| username | sandbox-id | Use in place of License ID. |
| password | sandbox-key | Use in place of License Secret. |
| Sandbox credentials | Value | Descriptions |
|---|---|---|
| Self-signed certificate in PEM format | Private Key (PEM encoded) Certificate (PEM encoded) | For using in Swift zero-footprint postman collection. |
| Self-signed certificate in JKS format | For using with Swift SDK or Swift Microgateway. |