Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • A client makes a request for the most recent cards: GET /cards?limit=20

  • On scroll/next page, client makes second request GET /cards?limit=20&offset=20

  • On scroll/next page, client makes third request GET /cards?limit=20&offset=40

Filtering

Filtering consists in of restricting the number of queried resources by specifying some attributes and their expected values.
URL parameters is are the easiest way to add basic filtering to REST APIs. If you have an /cards endpoint, you can filter via the property name such as:-

GET /cards?status=active or

GET /cards?status=active&expDate=12242021

Sorting

Sorting the result of a query on a collection of resources. A sort parameter should contain the names of the attributes on which the sorting is performed, separated by a comma. To enable sorting, add a sort_by URL parameter that can take a field name as the value and the asc/desc functions to specify ascending or descending order respectively.
Example formats
GET /users?sort_by=asc(email) and GET /users?sort_by=desc(email)
GET /users?sort_by=desc(last_modified),asc(email)

Searching

A search is a sub-resource of a collection. Searching can allow fuzziness matching and provide flexible queries for API users. For example, we could search cardholders for those that have a first name as Joe and the age is greater than or equal to 20 and less than or equal to 30.

GET /cardholders?q=firstName:joe AND age:[20 TO 30]

Glossary

Term

Description

About the Platform

...

  1. Group Level - This represents the complete client business or corporation. The client admin users will have direct access to this hierarchy level. In the PT system, this is identified with parentId.

  2. Client Level - This represents the individual client business units. So a corporation can have multiple business units known as “Client”. In the PT system, this is identified with customerId.

  3. Program Level - This represents financial products like gift cards, rewards, payroll, etc. So a Client can have multiple enrollments to financial products known as “Program”. In the PT system, this is identified with rowId rowed.

...