Skip to main content
GET
Listar ventas
Returns a paginated list of sales. Each one carries its line items and the full amount breakdown, so a reporting job rarely needs a second call. Results cover the whole company, not just the project your token belongs to.

Endpoint

Required scope

ecommerce:sales:read

Headers

Query parameters

Example request

Response

200 OK

400 Bad Request

A status or payment_status outside the allowed set, a malformed date, limit above 200, or an unknown query parameter.

401 Unauthorized

Missing, invalid, revoked, or expired token.

403 Forbidden

The token does not have the ecommerce:sales:read scope.

502 Bad Gateway

The ecommerce service could not answer.

Operational notes

  • status and payment_status are independent. A completed sale can be partially_paid, and a cancelled one can still be paid if the money arrived before the cancellation. Filter on the one you actually mean.
  • sale_number is the human-readable correlative, unique and sequential per company. It is what appears on receipts — use it when talking to the customer, and _id when talking to the API.
  • Amounts are integers in the currency’s minor unit, and net_subtotal is after discounts but before tax. total is the number the customer paid.
  • chat_user_id links the sale to a contact, present when the sale came from a conversation. Sales rung up at the counter usually have only the embedded customer details.
  • Polling this endpoint is the wrong shape for reacting to sales. Subscribe to ecommerce.sale.paid instead — same data, no daily quota burned.

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Query Parameters

limit
number
default:50
Required range: 1 <= x <= 200
offset
number
default:0
Required range: x >= 0
status
enum<string>
Available options:
completed,
cancelled,
refunded
payment_status
enum<string>
Available options:
pending,
paid,
partially_paid,
refunded
chat_user_id
string

Filtrar por contacto

from
string

Fecha ISO 8601, inclusive

to
string

Fecha ISO 8601, inclusive

Búsqueda libre sobre la venta

Response

200 - application/json
total
number
required
limit
number
required
offset
number
required
data
object[]
required