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.
Panel y reportes operativos por modulo con KPIs y series para dashboards.
Base URL: https://troyansys.com/api/v1
Devuelve KPI y series para graficos del panel principal.
curl -X GET "https://troyansys.com/api/v1/reports/dashboard" \
-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/reports/dashboard', [
'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/reports/dashboard");
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/reports/dashboard" \
-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/reports/dashboard', [
'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/reports/dashboard");
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);
{
"kpis": {
"sales_month": 2100.25,
"collections_month": 1330,
"purchases_month": 840.1,
"active_products": 120,
"stock_value": 18000,
"draft_entries": 2,
"available_advances": 320,
"pending_receivables": 760.15
},
"charts": {
"labels": [
"Sep 2025",
"Oct 2025"
],
"sales": [
1200.5,
2100.25
],
"purchases": [
730,
840.1
],
"top_products": {
"labels": [
"SERV-HOSTING",
"DOM-PRO"
],
"values": [
540.1,
420
]
}
}
}
Obtiene ventas filtradas y resumen de totales.
| Campo | Tipo | Req. | Descripcion |
|---|---|---|---|
| per_page | integer | No | Cantidad por pagina. |
| type | string | No | invoice, sales_order, quotation. |
| status | string | No | draft, issued, cancelled. |
| customer_id | integer | No | Filtro por cliente. |
| date_from | date | No | Desde YYYY-MM-DD. |
| date_to | date | No | Hasta YYYY-MM-DD. |
curl -X GET "https://troyansys.com/api/v1/reports/sales?per_page=20&type=invoice&status=issued" \
-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/reports/sales?per_page=20&type=invoice&status=issued', [
'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/reports/sales?per_page=20&type=invoice&status=issued");
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/reports/sales?per_page=20&type=invoice&status=issued" \
-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/reports/sales?per_page=20&type=invoice&status=issued', [
'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/reports/sales?per_page=20&type=invoice&status=issued");
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);
{
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 20,
"total": 2
},
"summary": {
"docs": 2,
"subtotal": 80,
"tax": 12,
"total": 92,
"payment": {
"payable_docs": 2,
"payable_total": 92,
"paid_total": 60,
"pending_total": 32,
"paid_docs": 1,
"partial_docs": 1,
"pending_docs": 0,
"applied_advances": 10,
"excess_as_advance": 2,
"excess_as_tip": 1
}
},
"data": [
{
"id": 120,
"series": "001-001",
"number": "000000120",
"total": "46.0000",
"paid_amount": 30,
"pending_balance": 16,
"payment_status": "partial"
}
]
}
Consulta stock valorizado con filtros por bodega/producto/categoria.
| Campo | Tipo | Req. | Descripcion |
|---|---|---|---|
| per_page | integer | No | Cantidad por pagina. |
| warehouse_id | integer | No | Filtro por bodega. |
| product_id | integer | No | Filtro por producto. |
| category_id | integer | No | Filtro por categoria. |
| search | string | No | Filtro por nombre o SKU. |
curl -X GET "https://troyansys.com/api/v1/reports/inventory?warehouse_id=1&search=lapiz" \
-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/reports/inventory?warehouse_id=1&search=lapiz', [
'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/reports/inventory?warehouse_id=1&search=lapiz");
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/reports/inventory?warehouse_id=1&search=lapiz" \
-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/reports/inventory?warehouse_id=1&search=lapiz', [
'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/reports/inventory?warehouse_id=1&search=lapiz");
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);
{
"summary": {
"total_qty": 280.5,
"total_value": 1240.1,
"low_stock_items": 8,
"zero_stock_items": 3
},
"data": [
{
"id": 55,
"warehouse_id": 1,
"product_id": 10,
"quantity": "120.000",
"stock_alert_code": "ok",
"stock_alert_label": "Normal"
}
]
}
Obtiene compras filtradas y resumen de totales.
| Campo | Tipo | Req. | Descripcion |
|---|---|---|---|
| per_page | integer | No | Cantidad por pagina. |
| type | string | No | purchase_order o supplier_invoice. |
| status | string | No | draft, issued o cancelled. |
| supplier_id | integer | No | Filtro por proveedor. |
| date_from | date | No | Desde YYYY-MM-DD. |
| date_to | date | No | Hasta YYYY-MM-DD. |
curl -X GET "https://troyansys.com/api/v1/reports/purchases?per_page=20&type=supplier_invoice" \
-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/reports/purchases?per_page=20&type=supplier_invoice', [
'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/reports/purchases?per_page=20&type=supplier_invoice");
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/reports/purchases?per_page=20&type=supplier_invoice" \
-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/reports/purchases?per_page=20&type=supplier_invoice', [
'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/reports/purchases?per_page=20&type=supplier_invoice");
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);
{
"summary": {
"docs": 3,
"subtotal": 900,
"tax": 108,
"total": 1008
},
"data": [
{
"id": 33,
"series": "001-001",
"number": "000000041",
"total": "550.1200"
}
]
}
Obtiene asientos contables y resumen debito/credito.
| Campo | Tipo | Req. | Descripcion |
|---|---|---|---|
| per_page | integer | No | Cantidad por pagina. |
| status | string | No | draft o posted. |
| date_from | date | No | Desde YYYY-MM-DD. |
| date_to | date | No | Hasta YYYY-MM-DD. |
curl -X GET "https://troyansys.com/api/v1/reports/accounting?status=posted&date_from=2026-02-01&date_to=2026-02-29" \
-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/reports/accounting?status=posted&date_from=2026-02-01&date_to=2026-02-29', [
'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/reports/accounting?status=posted&date_from=2026-02-01&date_to=2026-02-29");
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/reports/accounting?status=posted&date_from=2026-02-01&date_to=2026-02-29" \
-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/reports/accounting?status=posted&date_from=2026-02-01&date_to=2026-02-29', [
'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/reports/accounting?status=posted&date_from=2026-02-01&date_to=2026-02-29");
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);
{
"summary": {
"entries": 14,
"debit_total": 10220.5,
"credit_total": 10220.5
},
"data": [
{
"id": 20,
"entry_date": "2026-02-22",
"status": "posted"
}
]
}
Intenta con otra palabra clave o selecciona un resultado del buscador global.