REST API Reference

REST API Reference

The API uses HTTP verbs and a RESTful structure; OAuth 2.0 used as the API authorization framework; Requests and responses are JSON formatted.

API Operations

The REST APIs are available in two environments; Demo and Live. Demo environment is for testing; then switching to live environment for production processing.

The following base URIs address the two environments:

A complete REST operation is formed by combining an HTTP method with the full URI to the resource you are addressing. To create a complete request, combine the operation with the appropriate HTTP headers and any required JSON payload.

API Grant Types

Available API grant_type are:

A complete REST operation is formed by combining an HTTP method with the full URI to the resource you are addressing. To create a complete request, combine the operation with the appropriate HTTP headers and any required JSON payload.

API Scope

API scope is the access privileges allowed based on the grant type and program access privileges settings.

API Methods

API Namespace Summary

Here are the available REST API namespace:

Name Description Endpoint
oauth obtain access token using OAuth2.0 service/oauth/
user activate, lookup, and update user status and information service/v1/user/
account activate, lookup, and update account status and information service/v1/account/
program To get the program setting for merchant service/v1/program/
pos activate, add users, authenticate, and get status and information service/v1/pos/
transaction process, reverse and lookup transaction status and information service/v1/transaction/
catalog Get catalog information service/v1/catalog/
order process, reverse, validate, and get order information service/v1/order/
group activate, lookup, and update group status and information service/v1/group/
message lookup, and update message status service/v1/message/
report report inquiry service/v1/report/

Headers

With each API call, you will need to set request headers, including an OAuth 2.0 access token.

Field Name Field Type Regular Expression Sample Field Status
POST PUT GET DELETE
header
lang String ^[a-zA-Z]{1,2}(-[a-zA-Z]{1,2})?$ EN, en, en-ca R R R R
source_id String ^[a-zA-Z0-9]{1,100} 2Feb2015000001 R R R R
time_zone String ^((?:UTC [+|-](?:2[0-3]|[01][0-9]):[0-5][0-9])){1,10}$ UTC -06:00, UTC +02:30 R R R R
device_id String ^[a-zA-Z0-9\s-]{1,50}$ ^[a-zA-Z0-9-_]{1,50}$ O O O O
show_sensitive_data String ^[0-1]{1,1}$ 1, 0 O O O O
show_custom_field String ^[0-1]{1,1}$ 1, 0 O O O O
Note: source id is a requiered header parameter.

Example header:


  url           : https://demoapi.domain.com/oauth/token
" Authorization : bearer [Token]"
" Content-Type  : application/json" 
" source_id     : 123M" 
" time_zone     : UTC +03:00 " 
" lang          : en" 

Request Validation

The following Parameter validate send with body parameters at POST And PUT Methods, if true the result returned without processing.

Business Definitions

Business definitions for the objects and terms used in the service are located in the Definitions.

Process Flow

Different operational flow using the API can be used detailed in the Process Flow section.

HATEOAS Links

The following filters can be used for paging and filtering results on GET calls that return multiple results.

Element Description
href URL of the related HATEOAS link you can use for subsequent calls.
Rel Link relation that describes how this link relates to the previous call. Examples include self (get details of the current call), or a related call such as cancel or reverse.
method The HTTP method required for the related call; such as POST, PUT



Top