📄 MIPYME Documents
Create a new account
POST
Endpoint URL
https://api-billing.koywe.com/V1/accounts
Requires authentication
Authentication
Send header Authorization: Bearer <token> (obtained from POST /auth) for protected endpoints.
Parameters
No parameters.
Request body — fields
| Field | Type | Required | Description |
|---|---|---|---|
country_id | integer | Always required | Country ID where the account is created, supported IDs are: 253 = Chile 89 = United States 66 = Colombia 80 = Mexico 83 = Perú |
contact_name | string | Always required | Contact name associated with the account that will be created. |
contact_phone | string | Always required | Contact phone associated with the account that will be created, format: +56xxxxxxxxx = Chile +1xxxxxxxxx = United States +57xxxxxxxxxx = Colombia +51xxxxxxxxx = Perú +52xxxxxxxxxx = México +54xxxxxxxxxxx = Argentina |
admin_email | string | Always required | Admin email associated with the account that will be created. Valid for login. |
admin_password | string | Always required | Admin password associated with the account that will be created. Valid for login. |
registration_legal_name_company | string | Always required | Legal name of the company being registered. |
registration_tax_id_code | string | Always required | Tax ID code of the company being registered, format: XXXXXXXX-X = Chile XXXXXXXXXXXX = México XXXXXXXXXX-X = Colombia XXXXXXXXXXX = Perú XXXXXXXXXXX = Argentina |
registration_tax_id_type | string | Always required | Tax ID type of the company being registered, supported IDs are: CL-RUT = Chile RUT US-EIN = United States EIN US-SSN = United States SSN CO-NIT = Colombia NIT PE-RUC = Peru RUC MX-RFC = Mexico RFC AR-CUIT = Argentina CUIT |
registration_company_size | string | Always required | Size of the company being registered. 1 = Micro 2 = Small 3 = Medium 4 = Large |
registration_terms_of_use | integer | Always required | Acceptance of the terms of use. 1 = Accepted |
registration_type_use | integer | Always required | Type use of the accounts being registered, supported IDs are: 1 = Billing |
registration_company_industry_sector | string | Optional | Industry sector of the company being registered. |
registration_additional_data | object | Always required | Required for certain countries. Check individual fields for more information |
registration_additional_data.registration_test_set_id | string | Required when: Colombia | Required for Colombia. TEST SET ID provided by DIAN |
registration_additional_data.registration_form_rut | string | Required when: Colombia | Required for Colombia. RUT PDF form provided by DIAN format: PDF encoded as base64 |
registration_additional_data.certificate_file | string | Required when: Chile | Required for Chile. Digital certificate file. format: PFX encoded as base64 |
registration_additional_data.certificate_key | string | Required when: Mexico and Argentina | Required for Mexico and Argentina. Private key provided by SAT. format: DER format just as provided by the SAT. format: .key format just as provided by the ARCA. |
registration_additional_data.certificate_cer | string | Required when: Mexico and Argentina | Required for Mexico and Argentina. Public certificate provided by SAT. format: DER format just as provided by the SAT. format: .cer format just as provided by the ARCA. |
registration_additional_data.certificate_password | string | Required when: Chile and Mexico | Required for Chile and Mexico. The certificate password |
account_config | object | Optional | — |
account_config.rounding_format | number | Optional | You can select what rounding method to use for totals. 0 = net rounding. 1 = gross rounding |
account_config.time_zone | string | Optional | Time zone to use for your account. Example: UTC-3 |
account_config.allow_issuance_based_on_stock | number | Optional | Configuration related to available stock restrictions. 0 = allow invoicing if the stock is available in the sum of all your warehouses. 1 = allow invoicing even if you don't have enough inventory. 2 = only allow invoicing if the stock is available in the selected warehouse |
account_config.show_document_time | number | Optional | Include the issuance time on the document PDF. 0 = Don't include. 1 = Include |
account_config.adjust_draft_date | number | Optional | When you issue a draft, update the document date to the current date before issuing. 0 = Don't update. 1 = Update to current date |
account_config.sum_up_detail_lines | number | Optional | If two or more lines make reference to the same product with same price, combine them into one line adding up the quantity. 0 = Don't combine. 1 = Combine |
account_config.order_of_added_products | number | Optional | Order of products in PDF. 0 = Same as JSON. 1 = Last product first |
account_config.display_tax_receipt | number | Optional | Convert additional taxes on receipts. 0 = Keep same gross and increase net and VAT. 1 = Don't include additional tax on receipts. 2 = Include additional tax on receipts. |
account_config.stock_reservation_for_quotation | number | Optional | Quotes cause inventory to become reserved to avoid duplicated sales. 0 = Don't reserve. 1 = Reserve quoted inventory |
account_config.cost_greater_than_the_price | number | Optional | Prevents a product from being sold at a price below its costs. 0 = Allow any price. 1 = Don't allow prices below cost |
Request body — JSON example
{
"country_id": 0,
"contact_name": "string",
"contact_phone": "string",
"admin_email": "string",
"admin_password": "string",
"registration_legal_name_company": "string",
"registration_tax_id_code": "string",
"registration_tax_id_type": "string",
"registration_company_size": "string",
"registration_terms_of_use": 0,
"registration_type_use": 0,
"registration_company_industry_sector": "string",
"registration_additional_data": {
"registration_test_set_id": "string",
"registration_form_rut": "string",
"certificate_file": "string",
"certificate_key": "string",
"certificate_cer": "string",
"certificate_password": "string"
},
"account_config": {
"rounding_format": 0,
"time_zone": "UTC+0",
"allow_issuance_based_on_stock": 0,
"show_document_time": 0,
"adjust_draft_date": 0,
"sum_up_detail_lines": 0,
"order_of_added_products": 0,
"display_tax_receipt": 0,
"stock_reservation_for_quotation": 0,
"cost_greater_than_the_price": 0
}
}
Responses
Your account is successfully created
Bad request - invalid input or validation error
Unauthorized - invalid token or missing authentication
Server error - unexpected error occurred