All URIs are relative to https://api.conekta.io
| Method | HTTP request | Description |
|---|---|---|
| create_company | POST /companies | Create Company |
| get_companies | GET /companies | Get List of Companies |
| get_company | GET /companies/{id} | Get Company |
| get_company_documents | GET /companies/{company_id}/documents | Get Company Documents |
| get_current_company | GET /companies/current | Get Current Company |
| update_company_document | PATCH /companies/{company_id}/document | Update Company Document |
| upload_company_document | POST /companies/{company_id}/document | Upload Company Document |
create_company(create_company_request)
Create Company
Create a new company.
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::CompaniesApi.new
create_company_request = Conekta::CreateCompanyRequest.new # CreateCompanyRequest | Company data
begin
# Create Company
result = api_instance.create_company(create_company_request)
p result
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->create_company: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_company_with_http_info(create_company_request)
begin
# Create Company
data, status_code, headers = api_instance.create_company_with_http_info(create_company_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <CompanyResponse>
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->create_company_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| create_company_request | CreateCompanyRequest | Company data |
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.3.0+json
get_companies(opts)
Get List of Companies
Consume the list of child companies. This is used for holding companies with several child entities.
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::CompaniesApi.new
opts = {
accept_language: 'es', # String | Use for knowing which language to use
limit: 56, # Integer | The numbers of items to return, the maximum value is 250
search: 'search_example', # String | General order search, e.g. by mail, reference etc.
_next: '_next_example', # String | next page
previous: 'previous_example' # String | previous page
}
begin
# Get List of Companies
result = api_instance.get_companies(opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->get_companies: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_companies_with_http_info(opts)
begin
# Get List of Companies
data, status_code, headers = api_instance.get_companies_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetCompaniesResponse>
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->get_companies_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
| limit | Integer | 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.3.0+json
get_company(id, opts)
Get Company
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::CompaniesApi.new
id = '6307a60c41de27127515a575' # String | Identifier of the resource
opts = {
accept_language: 'es' # String | Use for knowing which language to use
}
begin
# Get Company
result = api_instance.get_company(id, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->get_company: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_company_with_http_info(id, opts)
begin
# Get Company
data, status_code, headers = api_instance.get_company_with_http_info(id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <CompanyResponse>
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->get_company_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Identifier of the resource | |
| accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.3.0+json
<Array> get_company_documents(company_id, opts)
Get Company Documents
Retrieve a list of documents associated with a specific company.
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::CompaniesApi.new
company_id = '6307a60c41de27127515a575' # String | The unique identifier of the company.
opts = {
accept_language: 'es' # String | Use for knowing which language to use
}
begin
# Get Company Documents
result = api_instance.get_company_documents(company_id, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->get_company_documents: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> get_company_documents_with_http_info(company_id, opts)
begin
# Get Company Documents
data, status_code, headers = api_instance.get_company_documents_with_http_info(company_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<CompanyDocumentResponse>>
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->get_company_documents_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| company_id | String | The unique identifier of the company. | |
| accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
Array<CompanyDocumentResponse>
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.3.0+json
get_current_company(opts)
Get Current Company
Retrieves information about the currently authenticated company. This endpoint returns the same data as the standard company endpoint but automatically uses the current company's context.
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::CompaniesApi.new
opts = {
accept_language: 'es' # String | Use for knowing which language to use
}
begin
# Get Current Company
result = api_instance.get_current_company(opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->get_current_company: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_current_company_with_http_info(opts)
begin
# Get Current Company
data, status_code, headers = api_instance.get_current_company_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <CompanyResponse>
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->get_current_company_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.3.0+json
update_company_document(company_id, company_document_request, opts)
Update Company Document
Updates an existing document associated with a specific company.
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::CompaniesApi.new
company_id = '6827206b1ec60400015eb09a' # String | The unique identifier of the company.
company_document_request = Conekta::CompanyDocumentRequest.new({file_classification: 'id_legal_representative', content_type: 'application/pdf', file_name: 'example_document.pdf', file_data: 'VGhpcyBpcyBhIHRlc3QgZmlsZSBkYXRhIGluIGJhc2UgNjQu'}) # CompanyDocumentRequest | Document information to update.
opts = {
accept_language: 'es' # String | Use for knowing which language to use
}
begin
# Update Company Document
result = api_instance.update_company_document(company_id, company_document_request, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->update_company_document: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> update_company_document_with_http_info(company_id, company_document_request, opts)
begin
# Update Company Document
data, status_code, headers = api_instance.update_company_document_with_http_info(company_id, company_document_request, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <CompanyDocumentResponse>
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->update_company_document_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| company_id | String | The unique identifier of the company. | |
| company_document_request | CompanyDocumentRequest | Document information to update. | |
| accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.3.0+json
upload_company_document(company_id, company_document_request, opts)
Upload Company Document
Uploads a document associated with a specific company.
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::CompaniesApi.new
company_id = '6827206b1ec60400015eb09a' # String | The unique identifier of the company.
company_document_request = Conekta::CompanyDocumentRequest.new({file_classification: 'id_legal_representative', content_type: 'application/pdf', file_name: 'example_document.pdf', file_data: 'VGhpcyBpcyBhIHRlc3QgZmlsZSBkYXRhIGluIGJhc2UgNjQu'}) # CompanyDocumentRequest | Document information to upload.
opts = {
accept_language: 'es' # String | Use for knowing which language to use
}
begin
# Upload Company Document
result = api_instance.upload_company_document(company_id, company_document_request, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->upload_company_document: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> upload_company_document_with_http_info(company_id, company_document_request, opts)
begin
# Upload Company Document
data, status_code, headers = api_instance.upload_company_document_with_http_info(company_id, company_document_request, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <CompanyDocumentResponse>
rescue Conekta::ApiError => e
puts "Error when calling CompaniesApi->upload_company_document_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| company_id | String | The unique identifier of the company. | |
| company_document_request | CompanyDocumentRequest | Document information to upload. | |
| accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.3.0+json