Skip to content

Latest commit

 

History

History
443 lines (314 loc) · 15.8 KB

ApiKeysApi.md

File metadata and controls

443 lines (314 loc) · 15.8 KB

conekta.ApiKeysApi

All URIs are relative to https://api.conekta.io

Method HTTP request Description
create_api_key POST /api_keys Create Api Key
delete_api_key DELETE /api_keys/{id} Delete Api Key
get_api_key GET /api_keys/{id} Get Api Key
get_api_keys GET /api_keys Get list of Api Keys
update_api_key PUT /api_keys/{id} Update Api Key

create_api_key

ApiKeyCreateResponse create_api_key(api_key_request, accept_language=accept_language, x_child_company_id=x_child_company_id)

Create Api Key

Create a api key

Example

  • Bearer Authentication (bearerAuth):
import conekta
from conekta.models.api_key_create_response import ApiKeyCreateResponse
from conekta.models.api_key_request import ApiKeyRequest
from conekta.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.conekta.io
# See configuration.py for a list of all supported configuration parameters.
configuration = conekta.Configuration(
    host = "https://api.conekta.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = conekta.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with conekta.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = conekta.ApiKeysApi(api_client)
    api_key_request = conekta.ApiKeyRequest() # ApiKeyRequest | requested field for a api keys
    accept_language = es # str | Use for knowing which language to use (optional) (default to es)
    x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)

    try:
        # Create Api Key
        api_response = api_instance.create_api_key(api_key_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
        print("The response of ApiKeysApi->create_api_key:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApiKeysApi->create_api_key: %s\n" % e)

Parameters

Name Type Description Notes
api_key_request ApiKeyRequest requested field for a api keys
accept_language str Use for knowing which language to use [optional] [default to es]
x_child_company_id str In the case of a holding company, the company id of the child company to which will process the request. [optional]

Return type

ApiKeyCreateResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 successful operation * Content-Type - The format of the response body
* Conekta-Media-Type -
401 authentication error -
422 parameter validation error -
500 internal server error -

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

delete_api_key

DeleteApiKeysResponse delete_api_key(id, accept_language=accept_language)

Delete Api Key

Deletes a api key that corresponds to a api key ID

Example

  • Bearer Authentication (bearerAuth):
import conekta
from conekta.models.delete_api_keys_response import DeleteApiKeysResponse
from conekta.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.conekta.io
# See configuration.py for a list of all supported configuration parameters.
configuration = conekta.Configuration(
    host = "https://api.conekta.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = conekta.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with conekta.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = conekta.ApiKeysApi(api_client)
    id = '6307a60c41de27127515a575' # str | Identifier of the resource
    accept_language = es # str | Use for knowing which language to use (optional) (default to es)

    try:
        # Delete Api Key
        api_response = api_instance.delete_api_key(id, accept_language=accept_language)
        print("The response of ApiKeysApi->delete_api_key:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApiKeysApi->delete_api_key: %s\n" % e)

Parameters

Name Type Description Notes
id str Identifier of the resource
accept_language str Use for knowing which language to use [optional] [default to es]

Return type

DeleteApiKeysResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 successful * Content-Type - The format of the response body
* Conekta-Media-Type -
401 authentication error -
404 not found entity -
500 internal server error -

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

get_api_key

ApiKeyResponse get_api_key(id, accept_language=accept_language, x_child_company_id=x_child_company_id)

Get Api Key

Gets a api key that corresponds to a api key ID

Example

  • Bearer Authentication (bearerAuth):
import conekta
from conekta.models.api_key_response import ApiKeyResponse
from conekta.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.conekta.io
# See configuration.py for a list of all supported configuration parameters.
configuration = conekta.Configuration(
    host = "https://api.conekta.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = conekta.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with conekta.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = conekta.ApiKeysApi(api_client)
    id = '6307a60c41de27127515a575' # str | Identifier of the resource
    accept_language = es # str | Use for knowing which language to use (optional) (default to es)
    x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)

    try:
        # Get Api Key
        api_response = api_instance.get_api_key(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
        print("The response of ApiKeysApi->get_api_key:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApiKeysApi->get_api_key: %s\n" % e)

Parameters

Name Type Description Notes
id str Identifier of the resource
accept_language str Use for knowing which language to use [optional] [default to es]
x_child_company_id str In the case of a holding company, the company id of the child company to which will process the request. [optional]

Return type

ApiKeyResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 successful * Content-Type - The format of the response body
* Conekta-Media-Type -
401 authentication error -
404 not found entity -
500 internal server error -

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

get_api_keys

GetApiKeysResponse get_api_keys(accept_language=accept_language, x_child_company_id=x_child_company_id, limit=limit, next=next, previous=previous, search=search)

Get list of Api Keys

Consume the list of api keys you have

Example

  • Bearer Authentication (bearerAuth):
import conekta
from conekta.models.get_api_keys_response import GetApiKeysResponse
from conekta.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.conekta.io
# See configuration.py for a list of all supported configuration parameters.
configuration = conekta.Configuration(
    host = "https://api.conekta.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = conekta.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with conekta.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = conekta.ApiKeysApi(api_client)
    accept_language = es # str | Use for knowing which language to use (optional) (default to es)
    x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
    limit = 20 # int | The numbers of items to return, the maximum value is 250 (optional) (default to 20)
    next = 'next_example' # str | next page (optional)
    previous = 'previous_example' # str | previous page (optional)
    search = 'search_example' # str | General search, e.g. by id, description, prefix (optional)

    try:
        # Get list of Api Keys
        api_response = api_instance.get_api_keys(accept_language=accept_language, x_child_company_id=x_child_company_id, limit=limit, next=next, previous=previous, search=search)
        print("The response of ApiKeysApi->get_api_keys:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApiKeysApi->get_api_keys: %s\n" % e)

Parameters

Name Type Description Notes
accept_language str Use for knowing which language to use [optional] [default to es]
x_child_company_id str In the case of a holding company, the company id of the child company to which will process the request. [optional]
limit int The numbers of items to return, the maximum value is 250 [optional] [default to 20]
next str next page [optional]
previous str previous page [optional]
search str General search, e.g. by id, description, prefix [optional]

Return type

GetApiKeysResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 successful * Content-Type - The format of the response body
* Conekta-Media-Type -
401 authentication error -
500 internal server error -

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

update_api_key

ApiKeyResponse update_api_key(id, accept_language=accept_language, api_key_update_request=api_key_update_request)

Update Api Key

Update an existing api key

Example

  • Bearer Authentication (bearerAuth):
import conekta
from conekta.models.api_key_response import ApiKeyResponse
from conekta.models.api_key_update_request import ApiKeyUpdateRequest
from conekta.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.conekta.io
# See configuration.py for a list of all supported configuration parameters.
configuration = conekta.Configuration(
    host = "https://api.conekta.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = conekta.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with conekta.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = conekta.ApiKeysApi(api_client)
    id = '6307a60c41de27127515a575' # str | Identifier of the resource
    accept_language = es # str | Use for knowing which language to use (optional) (default to es)
    api_key_update_request = conekta.ApiKeyUpdateRequest() # ApiKeyUpdateRequest |  (optional)

    try:
        # Update Api Key
        api_response = api_instance.update_api_key(id, accept_language=accept_language, api_key_update_request=api_key_update_request)
        print("The response of ApiKeysApi->update_api_key:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApiKeysApi->update_api_key: %s\n" % e)

Parameters

Name Type Description Notes
id str Identifier of the resource
accept_language str Use for knowing which language to use [optional] [default to es]
api_key_update_request ApiKeyUpdateRequest [optional]

Return type

ApiKeyResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 successful operation -
404 not found entity -
401 authentication error -
500 internal server error -

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