Using Postman

This section provides an introduction to using the GPS REST API collection in Postman.

Prerequisites

  • Download and install the Postman app. See Download Postman.
  • Download the latest GPS REST API Collection (available on the API Explorer page).
  • Contact GPS to request VPN access and/or allow access from your static IP address.

Install the GPS Postman Collection

  1. Open Postman.
  2. Select File > Import.
  3. Upload the GPS REST API file GPS_Rest_API_External_postman_collection.json.
  4. Click Import.
10461046

Use the Postman Collection

The GPS REST API collection appears in the left-hand column of your Postman workspace.

Generate the OAuth Token

Generation of the OAuth token is done at the top level of the collection so you only need to authorise a token once.

  1. Select the GPS REST API External Postman collection.
12751275
  1. Click Get New Access Token button in the Authorization tab.
10841084
  1. Click Proceed, then click Use Token.

The token will be applied to every endpoint in the collection.

Create a Card

  1. Select the CreateCard API endpoint.
  2. Select the Body tab and enter the details of the card, replacing the example values with your required details.
  3. Click Send.
    GPS returns a 200 Ok response, containing the GPS public token, as shown in the example below.
{
    "publicToken": "102759761"
}

The public token provides a unique identifier for your card. You can use this public token in all subsequent requests related to the card.

Apply publicToken as a Variable

Almost all endpoints are set up to use the publicToken set in the Variables tab of the collection. To set the publicToken variable:

1: Select the Variables tab in the GPS REST API External Postman collection.

11401140

2: Enter the publicToken you want to use in the Initial Value and Current Value columns.

907907

3: Click Save.

391391

The collection is saved. All endpoints will use the variable and run using the set publicToken.

Retrieve the Details of a Card

  1. Select the Retrieve a Card API endpoint.
  2. If required, generate a new access token.
  3. Click Send.

GPS returns a 200 Ok response, containing details of the card linked to the GPS public token, as shown in the example below.

{
    "cardType": "Physical",
    "publicToken": "105284447",
    "status": "Inactive",
    "balance": {
        "currencyCode": "GBP",
        "cardBalance": 0,
        "pendingAmount": 0,
        "availableBalance": 0
    },
    "cardDetails": {
        "customerReference": "CustNo12345A",
        "fullNameOnCard": "Mr. Bruce Wayne",
        "maskedPan": "999999******3631",
        "pan": "9999999985643631",
        "startDate": "2022-06-06",
        "expiryDate": "2023-06-30"
    },
    "cardHolder": {
        "title": "Mr.",
        "firstName": "Bruce",
        "lastName": "Wayne",
        "dateOfBirth": "1982-02-19",
        "mobile": "07755123456",
        "email": "[email protected]"
    },
    "cardProduct": {
        "scheme": "GPS SCHEME TEST",
        "product": 10023
    },
    "controlGroups": {
        "limitsGroup": 1051,
        "usageGroup": 374,
        "recurringFeeGroup": 0,
        "webServiceFeeGroup": 0,
        "authFeeGroup": 0,
        "mccGroup": 0,
        "cardLinkageGroup": 0,
        "calendarGroup": 0,
        "fxGroup": 0,
        "paymentTokenUsageGroup": 0
    },
    "3DS": [],
    "designId": "PMTREST"
}