All URIs are relative to https://api.conekta.io
Method | HTTP request | Description |
---|---|---|
create_customer | POST /customers | Create customer |
create_customer_fiscal_entities | POST /customers/{id}/fiscal_entities | Create Fiscal Entity |
delete_customer_by_id | DELETE /customers/{id} | Delete Customer |
get_customer_by_id | GET /customers/{id} | Get Customer |
get_customers | GET /customers | Get a list of customers |
update_customer | PUT /customers/{id} | Update customer |
update_customer_fiscal_entities | PUT /customers/{id}/fiscal_entities/{fiscal_entities_id} | Update Fiscal Entity |
CustomerResponse create_customer(customer, accept_language=accept_language, x_child_company_id=x_child_company_id)
Create customer
The purpose of business is to create and keep a customer, you will learn what elements you need to create a customer. Remember the credit and debit card tokenization process: https://developers.conekta.com/page/web-checkout-tokenizer
- Bearer Authentication (bearerAuth):
import conekta
from conekta.models.customer import Customer
from conekta.models.customer_response import CustomerResponse
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.CustomersApi(api_client)
customer = conekta.Customer() # Customer | requested field for customer
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 customer
api_response = api_instance.create_customer(customer, accept_language=accept_language, x_child_company_id=x_child_company_id)
print("The response of CustomersApi->create_customer:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CustomersApi->create_customer: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
customer | Customer | requested field for customer | |
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] |
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | * Date - The date and time that the response was sent * Content-Type - The format of the response body * Content-Length - The length of the response body in bytes * Connection - The type of connection used to transfer the response * Conekta-Media-Type - |
401 | authentication error | - |
402 | payment required error | - |
422 | parameter validation error | - |
500 | internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateCustomerFiscalEntitiesResponse create_customer_fiscal_entities(id, customer_fiscal_entities_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
Create Fiscal Entity
Create Fiscal entity resource that corresponds to a customer ID.
- Bearer Authentication (bearerAuth):
import conekta
from conekta.models.create_customer_fiscal_entities_response import CreateCustomerFiscalEntitiesResponse
from conekta.models.customer_fiscal_entities_request import CustomerFiscalEntitiesRequest
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.CustomersApi(api_client)
id = '6307a60c41de27127515a575' # str | Identifier of the resource
customer_fiscal_entities_request = conekta.CustomerFiscalEntitiesRequest() # CustomerFiscalEntitiesRequest | requested field for customer fiscal entities
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 Fiscal Entity
api_response = api_instance.create_customer_fiscal_entities(id, customer_fiscal_entities_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
print("The response of CustomersApi->create_customer_fiscal_entities:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CustomersApi->create_customer_fiscal_entities: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Identifier of the resource | |
customer_fiscal_entities_request | CustomerFiscalEntitiesRequest | requested field for customer fiscal entities | |
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] |
CreateCustomerFiscalEntitiesResponse
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
401 | authentication error | - |
404 | not found entity | - |
422 | parameter validation error | - |
500 | internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CustomerResponse delete_customer_by_id(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
Delete Customer
Deleted a customer resource that corresponds to a customer ID.
- Bearer Authentication (bearerAuth):
import conekta
from conekta.models.customer_response import CustomerResponse
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.CustomersApi(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:
# Delete Customer
api_response = api_instance.delete_customer_by_id(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
print("The response of CustomersApi->delete_customer_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CustomersApi->delete_customer_by_id: %s\n" % e)
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] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
422 | parameter validation error | - |
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]
CustomerResponse get_customer_by_id(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
Get Customer
Gets a customer resource that corresponds to a customer ID.
- Bearer Authentication (bearerAuth):
import conekta
from conekta.models.customer_response import CustomerResponse
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.CustomersApi(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 Customer
api_response = api_instance.get_customer_by_id(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
print("The response of CustomersApi->get_customer_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CustomersApi->get_customer_by_id: %s\n" % e)
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] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
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]
CustomersResponse get_customers(accept_language=accept_language, x_child_company_id=x_child_company_id, limit=limit, search=search, next=next, previous=previous)
Get a list of customers
The purpose of business is to create and maintain a client, you will learn what elements you need to obtain a list of clients, which can be paged.
- Bearer Authentication (bearerAuth):
import conekta
from conekta.models.customers_response import CustomersResponse
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.CustomersApi(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)
search = 'search_example' # str | General order search, e.g. by mail, reference etc. (optional)
next = 'next_example' # str | next page (optional)
previous = 'previous_example' # str | previous page (optional)
try:
# Get a list of customers
api_response = api_instance.get_customers(accept_language=accept_language, x_child_company_id=x_child_company_id, limit=limit, search=search, next=next, previous=previous)
print("The response of CustomersApi->get_customers:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CustomersApi->get_customers: %s\n" % e)
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] |
search | str | General order search, e.g. by mail, reference etc. | [optional] |
next | str | next page | [optional] |
previous | str | previous page | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | * Date - The date and time that the response was sent * Content-Type - The format of the response body * Content-Length - The length of the response body in bytes * Connection - The type of connection used to transfer the response * Conekta-Media-Type - |
401 | authentication error | - |
500 | internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CustomerResponse update_customer(id, update_customer, accept_language=accept_language, x_child_company_id=x_child_company_id)
Update customer
You can update customer-related data
- Bearer Authentication (bearerAuth):
import conekta
from conekta.models.customer_response import CustomerResponse
from conekta.models.update_customer import UpdateCustomer
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.CustomersApi(api_client)
id = '6307a60c41de27127515a575' # str | Identifier of the resource
update_customer = conekta.UpdateCustomer() # UpdateCustomer | requested field for customer
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:
# Update customer
api_response = api_instance.update_customer(id, update_customer, accept_language=accept_language, x_child_company_id=x_child_company_id)
print("The response of CustomersApi->update_customer:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CustomersApi->update_customer: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Identifier of the resource | |
update_customer | UpdateCustomer | requested field for customer | |
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] |
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
401 | authentication error | - |
402 | payment required error | - |
422 | parameter validation error | - |
500 | internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateCustomerFiscalEntitiesResponse update_customer_fiscal_entities(id, fiscal_entities_id, customer_update_fiscal_entities_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
Update Fiscal Entity
Update Fiscal Entity resource that corresponds to a customer ID.
- Bearer Authentication (bearerAuth):
import conekta
from conekta.models.customer_update_fiscal_entities_request import CustomerUpdateFiscalEntitiesRequest
from conekta.models.update_customer_fiscal_entities_response import UpdateCustomerFiscalEntitiesResponse
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.CustomersApi(api_client)
id = '6307a60c41de27127515a575' # str | Identifier of the resource
fiscal_entities_id = 'fis_ent_2tQ8HkkfbauaKP9Ho' # str | identifier
customer_update_fiscal_entities_request = conekta.CustomerUpdateFiscalEntitiesRequest() # CustomerUpdateFiscalEntitiesRequest | requested field for customer update fiscal entities
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:
# Update Fiscal Entity
api_response = api_instance.update_customer_fiscal_entities(id, fiscal_entities_id, customer_update_fiscal_entities_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
print("The response of CustomersApi->update_customer_fiscal_entities:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CustomersApi->update_customer_fiscal_entities: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Identifier of the resource | |
fiscal_entities_id | str | identifier | |
customer_update_fiscal_entities_request | CustomerUpdateFiscalEntitiesRequest | requested field for customer update fiscal entities | |
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] |
UpdateCustomerFiscalEntitiesResponse
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
401 | authentication error | - |
404 | not found entity | - |
422 | parameter validation error | - |
500 | internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]