Pismo API reference overview

Integrate Pismo solutions with your applications and configure them according to your specific requirements using Pismo's 600+ integration endpoints. The API reference describes these endpoints and how to structure your API requests.

Endpoints in the API reference are grouped into the following high-level sections:

📘

Endpoint search

To find a specific endpoint quickly, you can use the JUMP TO search field.

gif showing how to use the JUMP TO search feature

Endpoints at a glance

An API endpoint is a specific, addressable URL that points to a resource on the API server. It defines where a request is sent and what operation the API performs on the resource.

Refer to the following figure for an overview of a typical endpoint page in the Developers Portal.

screenshot showing a typical API endpoint page in the Developers Portal
KeyItemDescription
1Endpoint descriptionDefines the endpoint and describes the action you can do with it
2Recent requestsLists the most recent requests you sent through the interactive console
3ParametersLists the parameters accepted by the endpoint
4HeadersLists the headers accepted by the endpoint
5ResponsesLists the response schemas for all possible response types returned by the API for a particular endpoint
6Interactive consoleProvides a dedicated, built-in tool for sending and testing API requests from within the Developers Portal

To help you navigate the API reference, the following sections describe the standard elements on a typical endpoint page in the Developers Portal and how to build and test API requests. This overview is intended for both complete beginners and those who need a quick refresher on general and Pismo-specific API standards.

Endpoint description

The endpoint description defines the endpoint and describes the action you can do with it.

screenshot showing a typical endpoint description, with callouts
KeyItemDescription
1Endpoint nameSummarizes the action done by the endpoint, for example, Create exchange rate
2HTTP methodDefines the type of request you are making

  • GET: retrieve information
  • POST: create a new entry
  • PATCH: update a specific part of a resource
  • PUT: replace an entire resource with new information
  • DELETE: remove a resource
3Endpoint URLPoints to the resource where the action is done:

https://sandbox.pismolabs.io/rates/v1/exchange-rates

If an endpoint accepts a path parameter, the URL includes a placeholder:

https://sandbox.pismolabs.io/accounts/v2/customers/{customerId}
4Endpoint overviewDescribes the endpoint

Make sure you read the overview carefully. It contains important information about prerequisites, endpoint-specific configurations, warnings, and next steps. For example, some endpoints require a specific authentication token type or environment.

Recent requests

The Recent Requests table lists the most recent requests you sent through the interactive console.

screenshot showing a typical Recent Requests table, with callouts
KeyItemDescription
1TIME columnIndicates how long ago you sent a request

To view the exact date and time, hover over the request's TIME entry.
2STATUS columnIndicates the status code of the response received from the API

For more information, refer to Responses.
3USER AGENT columnIdentifies the user who sent the request. For requests sent through the interactive console, this value is always Try it!
4INSPECT REQUEST buttonReloads the interactive console with the specific inputs used for the selected request
5Monthly request logShows the number of requests you sent to the endpoint in a four-week running period

Successful requests are shown in green and failed requests are shown in red

Parameters

Parameters are inputs included in an API request that provide specific information or instructions for the API to process.

In Pismo's API reference, parameters are described with the following information:

  • Name
  • Data type
  • If the parameter is required or optional
  • Minimum and maximum value constraints, if applicable
  • Description
  • Example values

Pismo endpoints use the following three parameter types common to REST APIs:

Path parameters

Path parameters identify a specific resource and are included as part of the endpoint URL. For endpoints that accept path parameters, you must always include the path parameters in the request.

screenshot showing a typical path parameter section

For example, in https://sandbox.pismolabs.io/accounts/v2/customers/{customerId}, {customerId} is a placeholder for a real customer ID value. When you replace the placeholder with a customer ID, the URL points to the customer resource associated with the customer ID you entered.

Query parameters

Query parameters filter the information returned in an API response. They're appended to the end of the endpoint URL, represented by a question mark (?).

screenshot showing a typical query parameters section

For example, in https://sandbox.pismolabs.io/acquisitions/v2/programs/{programId}/channels?perPage=10, perPage=10 filters the response to list only 10 items per page.

📘

Multiple filters

You can include more than one query parameter in your request by separating each query parameter with an ampersand (&).

https://sandbox.pismolabs.io/acquisitions/v2/programs/{programId}/channels?page=1&perPage=10

Body parameters

Body parameters are inputs included in the body of an API request. They provide the information the API needs to create or update a resource.

screenshot showing a typical body parameter section

The structure and format of the request body depend on the programming language you use to send the request. Refer to the following code extract for an example of a typical request body in cURL, for the creation of a new account phone number.

     --data '
{
  "type": "RESIDENTIAL",
  "country_code": 55,
  "number": "11912345678",
  "active": true,
  "area_code": 11,
  "extension": "ext. 9"
}
'

The interactive console includes a language selector, so you can view request syntax in a variety of common languages. For more information, refer to Interactive console.

Headers

Headers are additional metadata included and sent with your request. They define how a request is processed, specify the request and response formats, and control access. Like parameters, each header listed in the Headers section includes useful information describing the header and its purpose.

screenshot showing a typical headers section

You must include the following headers with all Pismo API requests:

  • accept: application/json, which indicates the preferred API response format.
    In most cases, the accept header is already included in the interactive console by default and the field is not present in the Headers section.
  • content-type: application/json, which indicates the request body format.
    In most cases, the content-type header is already included in the interactive console by default and the field is not present in the Headers section.
  • authorization: Bearer <access_token>, which stores your authentication token and checks the request is sent from an authorized user or system.

📘

Authentication scheme

Pismo API requests are authenticated using the Bearer authentication scheme. When you send a request, make sure you format the authorization header correctly.

authorization: Bearer <access_token>

If you don't format the authorization header correctly, you'll get an error response.

For more information, refer to the following guides:

📘

Endpoint-specific headers

Some endpoints accept additional headers specific to the endpoint. The purpose of these headers is described in the Headers section for each header.

Responses

All API requests return a response. A response informs you if your request was successful and returns data relevant to the outcome of the request. The Responses section lists structured schemas for the possible responses returned by the API for a particular endpoint.

screenshot showing a typical responses section

A response schema defines the expected response and includes the following information:

  • An HTTP status code
  • A short summary
  • Details of each attribute included in the response along with a short description

The HTTP status code is a standardized numerical code that defines the general classification of a response and is included with all API responses. Refer to the following table for an overview of the status codes used in REST APIs.

Status codeDescription
1xxInformational: represents a temporary, non-final response that indicates the request is received and processing.
2xxSuccess: the request was successfully received, validated, and processed by the server.
3xxRedirection: the client must take additional action to complete the request.
4xxClient error: the request failed because the client sent invalid, incomplete, or unauthorized input that the server is unable to process.
5xxServer error: the request failed due to an error on the server.

For more information on API responses and response examples, refer to Interactive console.

Interactive console

Use the interactive console to test requests in a sandbox environment directly from the Developers Portal.

screenshot showing a typical interactive console
KeyItemDescription
1LANGUAGE selectorSpecifies the programming language shown in the code editor

Select for a list of additional language options.
2CREDENTIALS fieldAccepts and stores your authentication token

The CREDENTIALS field is not always present. Depending on the endpoint, an authentication token field is instead included in the Headers section.

For more information, refer to Headers.
3URL drop-downDefines the sandbox server where the request is sent

The URL drop-down is only included for endpoints that have server-specific constraints. For example, if you're sending a request that handles cardholder data, you must use the dedicated Payment Card Industry (PCI) server.

https://gw-pci.pismolabs.io

If the URL drop-down is not present on a particular endpoint page, your request is sent to the default https://sandbox.pismolabs.io server.

For more information, refer to Environments.
4Code editorShows the request in your selected programming language

The code editor updates automatically based on the values you provide in the following sections and fields:

  • Path Params
  • Query Params
  • Body Params
  • Headers
  • CREDENTIALS
  • URL
5RESPONSE paneDisplays the response to your request

The RESPONSE pane also provides endpoint-specific examples of successful and failed responses with mock data, showing how a typical real-world example is formatted.

To send a request using the interactive console, do the following:

  1. Read the endpoint overview and make sure you meet all the prerequisites.
  2. Configure the request parameters and headers.
  3. From LANGUAGE, select a programming language.
  4. If applicable, do the following:
    • In CREDENTIALS, enter your authentication token.
    • From URL, select the server where you want to send the request.
  5. Select Try it!
    The request is sent and the response is displayed in the RESPONSE pane.

Refer to the following figure for an overview of the request process, using the Get organization endpoint as an example.

gif of a request being set in the Developers Portal