Help articles
How to use Insomnia
TI provides all of our APIs as OpenAPI documents that can be imported into tools such as Insomnia. Insomnia can be downloaded for free at https://insomnia.rest/.
- Open Insomnia
- Create a new project
- Click on create > Request collection
- Import the TI OpenAPI file
- Go to Mange environments
- Ensure that your base environment contains the following variable.
{
"base_url": "{{ scheme }}://{{ host }}{{ base_path }}"
}
- After updating the base environment select the transact.ti.com environment.
- Update "oauth2ClientId with your TI store API key and oauth2ClientSecret with your TI store API secret.
How to use code snippets
Code snippets that can be used in your implementation can be generated in many different languages for TI APIs using the OpenAPI specifications embedded in documentation of the TI API portal or using the Insomnia tool.
From the TI API portal:
- Go to the desired API page.
- Expand one of the methods.
- Click on "try it out."
- Click on "Execute."
- A tab page of code snippets will open up.
From Insomnia:
- After importing the collection Into insomnia, select the method and click on the down arrow to the right.
- Select "Generate Code."