All URIs are relative to https://api.conekta.io
Method | HTTP request | Description |
---|---|---|
CreateCustomer | POST /customers | Create customer |
CreateCustomerFiscalEntities | POST /customers/{id}/fiscal_entities | Create Fiscal Entity |
DeleteCustomerById | DELETE /customers/{id} | Delete Customer |
GetCustomerById | GET /customers/{id} | Get Customer |
GetCustomers | GET /customers | Get a list of customers |
UpdateCustomer | PUT /customers/{id} | Update customer |
UpdateCustomerFiscalEntities | PUT /customers/{id}/fiscal_entities/{fiscal_entities_id} | Update Fiscal Entity |
CustomerResponse CreateCustomer (Customer customer, string acceptLanguage = null, string xChildCompanyId = null)
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
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class CreateCustomerExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.conekta.io";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new CustomersApi(config);
var customer = new Customer(); // Customer | requested field for customer
var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es)
var xChildCompanyId = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try
{
// Create customer
CustomerResponse result = apiInstance.CreateCustomer(customer, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.CreateCustomer: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Create customer
ApiResponse<CustomerResponse> response = apiInstance.CreateCustomerWithHttpInfo(customer, acceptLanguage, xChildCompanyId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.CreateCustomerWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
customer | Customer | requested field for customer | |
acceptLanguage | string | Use for knowing which language to use | [optional] [default to es] |
xChildCompanyId | string | 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 CreateCustomerFiscalEntities (string id, CustomerFiscalEntitiesRequest customerFiscalEntitiesRequest, string acceptLanguage = null, string xChildCompanyId = null)
Create Fiscal Entity
Create Fiscal entity resource that corresponds to a customer ID.
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class CreateCustomerFiscalEntitiesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.conekta.io";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new CustomersApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
var customerFiscalEntitiesRequest = new CustomerFiscalEntitiesRequest(); // CustomerFiscalEntitiesRequest | requested field for customer fiscal entities
var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es)
var xChildCompanyId = 6441b6376b60c3a638da80af; // string | 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
CreateCustomerFiscalEntitiesResponse result = apiInstance.CreateCustomerFiscalEntities(id, customerFiscalEntitiesRequest, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.CreateCustomerFiscalEntities: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Create Fiscal Entity
ApiResponse<CreateCustomerFiscalEntitiesResponse> response = apiInstance.CreateCustomerFiscalEntitiesWithHttpInfo(id, customerFiscalEntitiesRequest, acceptLanguage, xChildCompanyId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.CreateCustomerFiscalEntitiesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
customerFiscalEntitiesRequest | CustomerFiscalEntitiesRequest | requested field for customer fiscal entities | |
acceptLanguage | string | Use for knowing which language to use | [optional] [default to es] |
xChildCompanyId | string | 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 DeleteCustomerById (string id, string acceptLanguage = null, string xChildCompanyId = null)
Delete Customer
Deleted a customer resource that corresponds to a customer ID.
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class DeleteCustomerByIdExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.conekta.io";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new CustomersApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es)
var xChildCompanyId = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try
{
// Delete Customer
CustomerResponse result = apiInstance.DeleteCustomerById(id, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.DeleteCustomerById: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Delete Customer
ApiResponse<CustomerResponse> response = apiInstance.DeleteCustomerByIdWithHttpInfo(id, acceptLanguage, xChildCompanyId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.DeleteCustomerByIdWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
acceptLanguage | string | Use for knowing which language to use | [optional] [default to es] |
xChildCompanyId | string | 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 GetCustomerById (string id, string acceptLanguage = null, string xChildCompanyId = null)
Get Customer
Gets a customer resource that corresponds to a customer ID.
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class GetCustomerByIdExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.conekta.io";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new CustomersApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es)
var xChildCompanyId = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try
{
// Get Customer
CustomerResponse result = apiInstance.GetCustomerById(id, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.GetCustomerById: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get Customer
ApiResponse<CustomerResponse> response = apiInstance.GetCustomerByIdWithHttpInfo(id, acceptLanguage, xChildCompanyId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.GetCustomerByIdWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
acceptLanguage | string | Use for knowing which language to use | [optional] [default to es] |
xChildCompanyId | string | 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 GetCustomers (string acceptLanguage = null, string xChildCompanyId = null, int? limit = null, string search = null, string next = null, string previous = null)
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.
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class GetCustomersExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.conekta.io";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new CustomersApi(config);
var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es)
var xChildCompanyId = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request. (optional)
var limit = 20; // int? | The numbers of items to return, the maximum value is 250 (optional) (default to 20)
var search = "search_example"; // string | General order search, e.g. by mail, reference etc. (optional)
var next = "next_example"; // string | next page (optional)
var previous = "previous_example"; // string | previous page (optional)
try
{
// Get a list of customers
CustomersResponse result = apiInstance.GetCustomers(acceptLanguage, xChildCompanyId, limit, search, next, previous);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.GetCustomers: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get a list of customers
ApiResponse<CustomersResponse> response = apiInstance.GetCustomersWithHttpInfo(acceptLanguage, xChildCompanyId, limit, search, next, previous);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.GetCustomersWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
acceptLanguage | string | Use for knowing which language to use | [optional] [default to es] |
xChildCompanyId | string | 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 | string | General order search, e.g. by mail, reference etc. | [optional] |
next | string | next page | [optional] |
previous | string | 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 UpdateCustomer (string id, UpdateCustomer updateCustomer, string acceptLanguage = null, string xChildCompanyId = null)
Update customer
You can update customer-related data
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class UpdateCustomerExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.conekta.io";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new CustomersApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
var updateCustomer = new UpdateCustomer(); // UpdateCustomer | requested field for customer
var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es)
var xChildCompanyId = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try
{
// Update customer
CustomerResponse result = apiInstance.UpdateCustomer(id, updateCustomer, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.UpdateCustomer: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Update customer
ApiResponse<CustomerResponse> response = apiInstance.UpdateCustomerWithHttpInfo(id, updateCustomer, acceptLanguage, xChildCompanyId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.UpdateCustomerWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
updateCustomer | UpdateCustomer | requested field for customer | |
acceptLanguage | string | Use for knowing which language to use | [optional] [default to es] |
xChildCompanyId | string | 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 UpdateCustomerFiscalEntities (string id, string fiscalEntitiesId, CustomerUpdateFiscalEntitiesRequest customerUpdateFiscalEntitiesRequest, string acceptLanguage = null, string xChildCompanyId = null)
Update Fiscal Entity
Update Fiscal Entity resource that corresponds to a customer ID.
using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;
namespace Example
{
public class UpdateCustomerFiscalEntitiesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.conekta.io";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new CustomersApi(config);
var id = 6307a60c41de27127515a575; // string | Identifier of the resource
var fiscalEntitiesId = fis_ent_2tQ8HkkfbauaKP9Ho; // string | identifier
var customerUpdateFiscalEntitiesRequest = new CustomerUpdateFiscalEntitiesRequest(); // CustomerUpdateFiscalEntitiesRequest | requested field for customer update fiscal entities
var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es)
var xChildCompanyId = 6441b6376b60c3a638da80af; // string | 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
UpdateCustomerFiscalEntitiesResponse result = apiInstance.UpdateCustomerFiscalEntities(id, fiscalEntitiesId, customerUpdateFiscalEntitiesRequest, acceptLanguage, xChildCompanyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.UpdateCustomerFiscalEntities: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Update Fiscal Entity
ApiResponse<UpdateCustomerFiscalEntitiesResponse> response = apiInstance.UpdateCustomerFiscalEntitiesWithHttpInfo(id, fiscalEntitiesId, customerUpdateFiscalEntitiesRequest, acceptLanguage, xChildCompanyId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.UpdateCustomerFiscalEntitiesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Identifier of the resource | |
fiscalEntitiesId | string | identifier | |
customerUpdateFiscalEntitiesRequest | CustomerUpdateFiscalEntitiesRequest | requested field for customer update fiscal entities | |
acceptLanguage | string | Use for knowing which language to use | [optional] [default to es] |
xChildCompanyId | string | 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]