Skip to content

Latest commit

 

History

History
73 lines (51 loc) · 2.82 KB

File metadata and controls

73 lines (51 loc) · 2.82 KB

openapi_client.GetTokenApi

All URIs are relative to https://api.mastercard.com/mdes

Method HTTP request Description
get_token POST /digitization/static/1/0/getToken Used to get the status and details of a single given Token.

get_token

GetTokenResponseSchema get_token(get_token_request_schema=get_token_request_schema)

Used to get the status and details of a single given Token.

This API is used to get the status and details of a single given Token. It may be used to check current Token state or in exception scenarios (such as network time out) to ensure that external systems remain in sync with the Token state as maintained by MDES. Optionally, if requested, the token number can also be provided in the response (in encrypted form).

Example

from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mastercard.com/mdes
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://api.mastercard.com/mdes"
)


# Enter a context with an instance of the API client
with openapi_client.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.GetTokenApi(api_client)
    get_token_request_schema = openapi_client.GetTokenRequestSchema() # GetTokenRequestSchema | Contains the details of the request message.  (optional)

    try:
        # Used to get the status and details of a single given Token.
        api_response = api_instance.get_token(get_token_request_schema=get_token_request_schema)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling GetTokenApi->get_token: %s\n" % e)

Parameters

Name Type Description Notes
get_token_request_schema GetTokenRequestSchema Contains the details of the request message. [optional]

Return type

GetTokenResponseSchema

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Contains the details of the response message. -
401 Example gateway error response -
500 Example application error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]