In this article, you will learn how to set up Postman for calls such as GET/POST/PUT/DELETE with OSS. The following documentation provides additional information on the calls supported in REST API: Feature Guides.
Requirements
Ensure that the Postman Desktop App is installed. The application may be downloaded from the following link: https://www.getpostman.com/downloads/.
GET calls
A GET call may be used to retrieve information, such as account information, the package object, or the document approvals.
1. From the drop-down, select "GET".
2. Enter the request URL. The documentation provided in the Feature Guides lists the different types of requests that may be sent in OSS.
In the example below, a GET call is sent to retrieve a list of senders on the account. The format {environment}/api/account/senders is used.
3. Navigate to the "Headers" tab and enter the required keys and values. Please ensure to verify in the documentation the different headers needed for the request.
In the example below, the following headers are required.
4. Click Send.
The information requested will be displayed with a 200 response.
POST calls
A POST call may be used to create data such as creating a package.
1. Create a package without a document
1. From the drop-down, select "POST".
2. Enter the request URL. The format is as follows: {environment}/api/packages.
3. Navigate to the "Headers" tab and enter the following values:
4. Navigate to the "Body" tab and select "raw".
5. Insert the minimum JSON to create a package such as a JSON containing the package name only (i.e. {"name":"test package API"}).
6. Click Send.
The package ID of the newly created transaction will be displayed with a 200 response.
2. Create a package with a document
1. From the drop-down, select "POST".
2. Enter the request URL. The format is as follows: {environment}/api/packages.
3. Navigate to the "Headers" tab and enter the following values:
4. Navigate to the "Body" tab and select "form-data".
5. Under "Key", type "file" to upload a document, and change the key type to "file" in the drop-down. Under "Value", upload your document.
Note: If you have more than one document, a new row may be added per document.
6. Under "Key", type "payload" to upload the JSON. As an example, the attached JSON "CreatePackageWithDocument" may be used.
7. Click Send.
The package ID of the newly created transaction will be displayed with a 200 response.
PUT calls
A PUT call may be used to update data such as the package's settings.
1. From the drop-down, select "PUT".
2. Enter the request URL.
For example, to update a package setting, the following format may be used: {environment}/api/packages/{packageID}
3. Navigate to the "Headers" tab and enter the following values:
4. Navigate to the "Body" tab and select "raw".
5. Insert the updated JSON.
6. Click send.
A 200 response will be returned.
DELETE calls
A DELETE call may be used to delete information such as a package.
1. From the drop-down, choose "DELETE".
2. Enter the request URL.
For example, to delete a package, the following format may be used: {environment}/api/packages/{packageID}.
3. Click Send.
A 200 response will be returned.