Codigos HTTP esperados
200/201 exito, 401 auth invalida, 403 modulo/tenant restringido, 422 validacion.
Busca por endpoint, modulo o verbo HTTP (ej: /reports/inventory, ventas, POST).
Actualizado con los endpoints activos de la plataforma. Total disponibles: 73.
| Contexto | Header requerido | Uso |
|---|---|---|
| Usuario cliente (Bearer) | Authorization: Bearer {token} X-Company-Id: {id} |
Apps moviles y sesiones por usuario. |
| Empresa (API Key) | X-API-Key: {api_key_empresa} | Integraciones server-to-server. |
| Base URL | https://troyansys.com/api/v1 | Todos los endpoints documentados usan este prefijo. |
200/201 exito, 401 auth invalida, 403 modulo/tenant restringido, 422 validacion.
POST /documents/invoices: crea comprobante, valida stock y ejecuta flujo SRI/email segun configuracion de empresa.
Cada modulo muestra sus metodos, payloads, ejemplos cURL/PHP/.NET y respuesta esperada.
Consulta de plan de cuentas, centros de costo, ejercicios y asientos contables.
Base URL: https://troyansys.com/api/v1
Obtiene cuentas contables con filtro por codigo o nombre.
| Campo | Tipo | Req. | Descripcion |
|---|---|---|---|
| q | string | No | Texto de busqueda. |
curl -X GET "https://troyansys.com/api/v1/accounting/accounts?q=1.1" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Company-Id: 1"
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://troyansys.com/api/v1/accounting/accounts?q=1.1', [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
'X-Company-Id' => '1'
],
]);
$data = json_decode((string) $response->getBody(), true);
print_r($data);
using System.Net.Http.Headers;
using System.Text;
var httpClient = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://troyansys.com/api/v1/accounting/accounts?q=1.1");
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "{token}");
request.Headers.Add("X-Company-Id", "1");
var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
curl -X GET "https://troyansys.com/api/v1/company/accounting/accounts?q=1.1" \
-H "Accept: application/json" \
-H "X-API-Key: {api_key_empresa}"
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://troyansys.com/api/v1/company/accounting/accounts?q=1.1', [
'headers' => [
'Accept' => 'application/json',
'X-API-Key' => '{api_key_empresa}'
],
]);
$data = json_decode((string) $response->getBody(), true);
print_r($data);
using System.Net.Http.Headers;
using System.Text;
var httpClient = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://troyansys.com/api/v1/company/accounting/accounts?q=1.1");
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
request.Headers.Add("X-API-Key", "{api_key_empresa}");
var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
{
"data": [
{
"id": 1,
"code": "1.1.1",
"name": "Caja",
"type": "asset",
"allows_posting": true
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 50,
"total": 1
}
}
Obtiene ejercicios contables de la empresa.
curl -X GET "https://troyansys.com/api/v1/accounting/fiscal-years" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Company-Id: 1"
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://troyansys.com/api/v1/accounting/fiscal-years', [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
'X-Company-Id' => '1'
],
]);
$data = json_decode((string) $response->getBody(), true);
print_r($data);
using System.Net.Http.Headers;
using System.Text;
var httpClient = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://troyansys.com/api/v1/accounting/fiscal-years");
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "{token}");
request.Headers.Add("X-Company-Id", "1");
var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
curl -X GET "https://troyansys.com/api/v1/company/accounting/fiscal-years" \
-H "Accept: application/json" \
-H "X-API-Key: {api_key_empresa}"
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://troyansys.com/api/v1/company/accounting/fiscal-years', [
'headers' => [
'Accept' => 'application/json',
'X-API-Key' => '{api_key_empresa}'
],
]);
$data = json_decode((string) $response->getBody(), true);
print_r($data);
using System.Net.Http.Headers;
using System.Text;
var httpClient = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://troyansys.com/api/v1/company/accounting/fiscal-years");
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
request.Headers.Add("X-API-Key", "{api_key_empresa}");
var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
{
"data": [
{
"id": 1,
"name": "EJERCICIO 2026",
"start_date": "2026-01-01",
"end_date": "2026-12-31",
"is_closed": false
}
]
}
Obtiene centros de costo con filtro por texto.
| Campo | Tipo | Req. | Descripcion |
|---|---|---|---|
| q | string | No | Texto de busqueda. |
curl -X GET "https://troyansys.com/api/v1/accounting/cost-centers?q=ADMIN" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Company-Id: 1"
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://troyansys.com/api/v1/accounting/cost-centers?q=ADMIN', [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
'X-Company-Id' => '1'
],
]);
$data = json_decode((string) $response->getBody(), true);
print_r($data);
using System.Net.Http.Headers;
using System.Text;
var httpClient = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://troyansys.com/api/v1/accounting/cost-centers?q=ADMIN");
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "{token}");
request.Headers.Add("X-Company-Id", "1");
var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
curl -X GET "https://troyansys.com/api/v1/company/accounting/cost-centers?q=ADMIN" \
-H "Accept: application/json" \
-H "X-API-Key: {api_key_empresa}"
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://troyansys.com/api/v1/company/accounting/cost-centers?q=ADMIN', [
'headers' => [
'Accept' => 'application/json',
'X-API-Key' => '{api_key_empresa}'
],
]);
$data = json_decode((string) $response->getBody(), true);
print_r($data);
using System.Net.Http.Headers;
using System.Text;
var httpClient = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://troyansys.com/api/v1/company/accounting/cost-centers?q=ADMIN");
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
request.Headers.Add("X-API-Key", "{api_key_empresa}");
var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
{
"data": [
{
"id": 2,
"code": "CC-01",
"name": "Administracion",
"is_active": true
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 50,
"total": 1
}
}
Obtiene asientos contables paginados.
| Campo | Tipo | Req. | Descripcion |
|---|---|---|---|
| status | string | No | draft o posted. |
curl -X GET "https://troyansys.com/api/v1/accounting/entries?status=posted" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Company-Id: 1"
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://troyansys.com/api/v1/accounting/entries?status=posted', [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
'X-Company-Id' => '1'
],
]);
$data = json_decode((string) $response->getBody(), true);
print_r($data);
using System.Net.Http.Headers;
using System.Text;
var httpClient = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://troyansys.com/api/v1/accounting/entries?status=posted");
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "{token}");
request.Headers.Add("X-Company-Id", "1");
var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
curl -X GET "https://troyansys.com/api/v1/company/accounting/entries?status=posted" \
-H "Accept: application/json" \
-H "X-API-Key: {api_key_empresa}"
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://troyansys.com/api/v1/company/accounting/entries?status=posted', [
'headers' => [
'Accept' => 'application/json',
'X-API-Key' => '{api_key_empresa}'
],
]);
$data = json_decode((string) $response->getBody(), true);
print_r($data);
using System.Net.Http.Headers;
using System.Text;
var httpClient = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://troyansys.com/api/v1/company/accounting/entries?status=posted");
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
request.Headers.Add("X-API-Key", "{api_key_empresa}");
var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
{
"data": [
{
"id": 20,
"entry_date": "2026-02-22",
"reference": "invoice 001-001-000000120",
"status": "posted"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 50,
"total": 1
}
}
Obtiene detalle de asiento y lineas contables.
curl -X GET "https://troyansys.com/api/v1/accounting/entries/20" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Company-Id: 1"
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://troyansys.com/api/v1/accounting/entries/20', [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
'X-Company-Id' => '1'
],
]);
$data = json_decode((string) $response->getBody(), true);
print_r($data);
using System.Net.Http.Headers;
using System.Text;
var httpClient = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://troyansys.com/api/v1/accounting/entries/20");
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "{token}");
request.Headers.Add("X-Company-Id", "1");
var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
curl -X GET "https://troyansys.com/api/v1/company/accounting/entries/20" \
-H "Accept: application/json" \
-H "X-API-Key: {api_key_empresa}"
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://troyansys.com/api/v1/company/accounting/entries/20', [
'headers' => [
'Accept' => 'application/json',
'X-API-Key' => '{api_key_empresa}'
],
]);
$data = json_decode((string) $response->getBody(), true);
print_r($data);
using System.Net.Http.Headers;
using System.Text;
var httpClient = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://troyansys.com/api/v1/company/accounting/entries/20");
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
request.Headers.Add("X-API-Key", "{api_key_empresa}");
var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
{
"data": {
"id": 20,
"entry_date": "2026-02-22",
"status": "posted",
"lines": [
{
"id": 101,
"description": "Cuenta por cobrar",
"debit": 46,
"credit": 0
},
{
"id": 102,
"description": "Ventas",
"debit": 0,
"credit": 46
}
]
}
}
Intenta con otra palabra clave o selecciona un resultado del buscador global.