To make a REST API request, you combine the HTTP GET, POST, PUT, PATCH, or DELETE method, the URL to the API service, the URI to a resource to query, submit data to, update, or delete, and one or more HTTP request headers.
The URL to the API service is either:
https://sandbox.smartfastpay.com
https://api.smartfastpay.com
Optionally, you can include query parameters on GET calls to filter, limit the size of, and sort the data in the responses.
Most GET
, POST
, PUT
, and PATCH
calls require a JSON request body.
This sample request lists transactions:
curl -v --location --request GET 'https://sandbox.smartfastpay.com/transactions' \
--header "Content-Type: application/json" \
--header "Authorization: Bearer < Access-Token >"
For most REST GET
calls, you can include one or more query parameters on the request URI to filter, limit the size of,
and sort the data in an API response. For filter parameters, see the individual GET
calls.
To limit, or page, and sort the data that is returned in some API responses, use these, or similar, query parameters:
Parameter | Type | Description | |
---|---|---|---|
limit
|
integer min: 1 | max: 40
|
optional | The number of items to return in the response. |
page
|
integer min: 1 | max: 9999999
|
optional |
The page number indicating which set of items will be returned in the response. So, the combination of page=1
and limit=20 returns the first 20 items. The combination of page=2 and limit=20
returns items 21 through 40.
|
sort
|
string Format: item,(asc|desc)
|
optional |
Sorts the items in the response by filter in ascending or descending order. Eg.: sort=id,desc (This combination returns a list in descending order based on id.) |
start_time
|
string Internet date and time format
|
optional |
The start date and time for the range to show in the response, in Internet date and time format. Eg.: start_time=2021-09-05T11:00:00Z .
|
end_time
|
string Internet date and time format
|
optional |
The end date and time for the range to show in the response, in Internet date and time format. Eg.: end_time=2021-09-05T11:00:00Z .
|
customer_id
|
string min: 1 | max: 255
|
optional | Sorts the items in the response by looking for the customer_id that was once provided by your system. |
transaction_id
|
string
|
optional |
Sorts the items in the response by looking for the transaction_id that was once provided by your system.
To get multiple transaction_id, send each transaction_id separating by comma (,). Eg.: 8fecdfcc-4e4d-11ee,8fece5ee-4e4d-11ee,d42953be-4e4d-11ee
|
For example, the Transaction API returns details for ten transactions starting with the second page sorted by descending id in the response:
curl -v --location --request GET 'https://sandbox.smartfastpay.com/transactions?limit=10&page=2&sort=id,desc' \
--header "Content-Type: application/json" \
--header "Authorization: Bearer < Access-Token >"
The commonly used HTTP request headers are:
Content-Type | |
The response format, which is required for operations with a response body. The syntax is:
Where |
|
Authorization | |
Required to get an access token or make API calls:
|