Skip to main content
POST
/
api
/
v1
/
reports
/
query
curl --request POST \
  --url https://api.lapyme.com.ar/api/v1/reports/query \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source": "sales",
  "period": {
    "start_date": "2026-01-01",
    "end_date": "2026-03-31"
  },
  "dimensions": [
    "product"
  ],
  "measures": [
    "total",
    "units",
    "count"
  ],
  "include_totals": true
}
'
{
  "request_id": "req_report_1",
  "data": {
    "rows": [
      {
        "id": "9c692e8b",
        "ids": [
          "9c692e8b-0f9a-4f7c-8b99-061a2eb188ae"
        ],
        "labels": [
          "Almohada Microfibra 80x50"
        ],
        "measures": {
          "total": 998300,
          "units": 12,
          "count": 8
        }
      },
      {
        "id": "3b4a1c2d",
        "ids": [
          "3b4a1c2d-1234-5678-abcd-ef1234567890"
        ],
        "labels": [
          "King size sheet"
        ],
        "measures": {
          "total": 450000,
          "units": 5,
          "count": 4
        }
      }
    ],
    "totals": {
      "total": 1448300,
      "units": 17,
      "count": 12
    },
    "metadata": {
      "source": "sales",
      "dimensions": [
        "product"
      ],
      "measures": [
        "total",
        "units",
        "count"
      ],
      "period": {
        "start_date": "2026-01-01",
        "end_date": "2026-03-31"
      },
      "date_basis": "commercial"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.lapyme.com.ar/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Incluí tu API key en el header Authorization con el prefijo Bearer.

Body

application/json
source
enum<string>
required
Available options:
sales
period
object
required
measures
enum<string>[]
required

Medidas a calcular. Al menos una.

Minimum array length: 1
Available options:
total,
subtotal,
taxAmount,
count,
units,
cost,
margin,
avgTicket,
marginPercent,
discountAmount,
balance,
uniqueCustomers,
uniqueProducts
dimensions
enum<string>[]

Dimensiones de agrupación. Máximo 4.

Maximum array length: 4
Available options:
date,
week,
weekOfYear,
month,
monthOfYear,
dayOfWeek,
year,
quarter,
hourOfDay,
customer,
customerTaxCategory,
personType,
province,
city,
product,
variant,
category,
productType,
salesperson,
pointOfSale,
warehouse,
register,
integrationSource,
voucherType,
currency,
paymentStatus,
caeStatus,
paymentMethod,
taxRate
dimension_filters
object

Filtros por dimensión. Cada clave debe ser una dimensión filtrable para la fuente. El valor es un array de IDs o valores a incluir.

include_totals
boolean

Si es true, la respuesta incluye totales agregados en el campo totals.

date_basis
enum<string>
default:commercial

commercial usa la fecha de venta. fiscal usa la fecha contable del comprobante.

Available options:
commercial,
fiscal

Response

Reporte ejecutado exitosamente

request_id
string
required
data
object
required