List Tokens by mAccount
GET
https://api.mpay.com.au/token/v1/list/{cardNumber}
Path Parameters
- cardNumberstringrequiredExampleDescriptionDefault1234567890123456Pattern^[0-9]{16}$
Responses
200
- tokenListResponse_V1Example
{ "tokens": [ { "token": "0f1c7c2e-9f4a-4c53-9e66-2f0b6a9d1f47", "hint": "Savings Account ****6789", "payloadType": "AustralianBankAccount", "description": "Savings Account" }, { "token": "7b3d9a55-1c88-4f02-b6a1-5d4e8c07be92", "hint": "Monthly Electricity Bill BPAY ****9012", "payloadType": "BPAY", "description": "Monthly Electricity Bill BPAY" } ], "durationMs": 42, "status": "Ok", "statusDescription": "Operation completed successfully" }Description- tokenstokenDetails[]Description
- tokenstringExampleDescriptionDefault0f1c7c2e-9f4a-4c53-9e66-2f0b6a9d1f47Pattern^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
- hintstringExampleDescriptionDefaultSavings Account ****6789Max Length140Pattern^.{0,140}$
- payloadTypestring<BPAY | AustralianBankAccount>ExampleDescriptionDefaultAustralianBankAccountAllowedBPAYAustralianBankAccountPattern^(BPAY|AustralianBankAccount)$
- descriptionstringExampleDescriptionDefaultSavings AccountMax Length255Pattern^.{0,255}$
- durationMsinteger<int64>ExampleDescriptionDefault42Formatint64Minimum0
- statusstringExampleDescriptionDefaultOkPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultOperation completed successfullyMax Length500Pattern^.{0,500}$
400
- errorResponse_V1Example
{ "durationMs": 12, "status": "Error", "statusDescription": "Validation failed: bsb must be 3-3 digits. (Eg. 000-000)" }Description- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultValidation failed: bsb must be 3-3 digits. (Eg. 000-000)Max Length500Pattern^.{0,500}$
401
- errorResponse_V1Example
{ "durationMs": 5, "status": "Unauthorized", "statusDescription": "Authentication failed. Provide a valid API key as the basic authentication username." }Description- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultValidation failed: bsb must be 3-3 digits. (Eg. 000-000)Max Length500Pattern^.{0,500}$
500
- errorResponse_V1Example
{ "durationMs": 30, "status": "Error", "statusDescription": "An unexpected error occurred while processing the request." }Description- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultValidation failed: bsb must be 3-3 digits. (Eg. 000-000)Max Length500Pattern^.{0,500}$
curl
curl --request GET \
--url https://api.mpay.com.au/token/v1/list/{cardNumber} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.mpay.com.au/token/v1/list/{cardNumber}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.mpay.com.au/token/v1/list/{cardNumber}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.mpay.com.au/token/v1/list/{cardNumber}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Success. The response contains every token associated with the supplied account.
{
"tokens": [
{
"token": "0f1c7c2e-9f4a-4c53-9e66-2f0b6a9d1f47",
"hint": "Savings Account ****6789",
"payloadType": "AustralianBankAccount",
"description": "Savings Account"
}
],
"durationMs": 42,
"status": "Ok",
"statusDescription": "Operation completed successfully"
}400
// Bad Request — the request could not be processed because one or more fields are missing, malformed or failed validation. Check statusDescription for the field at fault.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "Validation failed: bsb must be 3-3 digits. (Eg. 000-000)"
}401
// Unauthorized — the API key is missing, invalid, or not permitted to call this endpoint. Pass your API key as the basic authentication username with no password.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "Validation failed: bsb must be 3-3 digits. (Eg. 000-000)"
}500
// Internal Server Error — the Platform encountered an unexpected condition and could not complete the request. Retry the request; if the error persists, contact Monoova support quoting the time of the call.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "Validation failed: bsb must be 3-3 digits. (Eg. 000-000)"
}