Bsale MCP by usefulapi is an MCP server published by io.usefulapi, hosted at bsale.usefulapi.io. When last checked on 2026-11-21 it was working: it answers and lists its tools. It declares 25 tools, including bsale_list_documents, bsale_get_document, bsale_sales_summary, bsale_list_returns, bsale_list_document_types.
Read Bsale products, documents and stock; manage customers, prices, receipts and payments.
4,258 connections through 5 shared values. Tap any node.
Inferred from the host name and headers: what a server runs on, not who runs it.
List issued documents (boletas, facturas, notas de credito, guias...) newest-first as Bsale returns them, with number, dates, net/tax/total amounts, state, SII status and public PDF link. Filter by emission date range, document type, client, office, folio number or SII code. Use expand (details, payments, client, office, document_type) to embed related data. GET /v1/documents.json.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-50 (default 25). |
| state | any | 0 = active records (Bsale default), 1 = inactive. |
| expand | array | |
| number | integer | Document folio number. |
None yet. Changes appear after a server's second daily check.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
| offset | integer | Items to skip (default 0). Pass the previous reply's next_offset. |
| code_sii | any | Tax code of the document type, e.g. 33 factura, 39 boleta, 61 nota de credito (Chile) or "01" (Peru). Not available for Mexico: use document_type_id. |
| client_id | integer |
| office_id | integer | Branch (sucursal) id. |
| emitted_to | string | A date, yyyy-mm-dd. |
| client_code | string | Client tax id (RUT/RUC/RFC) as stored in Bsale. |
| emitted_from | string | A date, yyyy-mm-dd. |
| informed_sii | integer | Tax authority declaration status (SII, SUNAT or SAT): 0 accepted, 1 sent, 2 rejected. |
| document_type_id | integer | Document type id (see bsale_list_document_types). |
{
"name": "bsale_list_documents",
"title": "List documents (sales)",
"description": "List issued documents (boletas, facturas, notas de credito, guias...) newest-first as Bsale returns them, with number, dates, net/tax/total amounts, state, SII status and public PDF link. Filter by emission date range, document type, client, office, folio number or SII code. Use expand (details, payments, client, office, document_type) to embed related data. GET /v1/documents.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 50,
"description": "Results per page, 1-50 (default 25).",
"exclusiveMinimum": 0
},
"state": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
],
"description": "0 = active records (Bsale default), 1 = inactive."
},
"expand": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z_]{1,40}$"
},
"maxItems": 8
},
"number": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Document folio number.",
"exclusiveMinimum": 0
},
"offset": {
"type": "integer",
"maximum": 10000000,
"minimum": 0,
"description": "Items to skip (default 0). Pass the previous reply's next_offset."
},
"code_sii": {
"anyOf": [
{
"type": "integer",
"maximum": 9999,
"exclusiveMinimum": 0
},
{
"type": "string",
"pattern": "^[A-Za-z0-9]{1,6}$"
}
],
"description": "Tax code of the document type, e.g. 33 factura, 39 boleta, 61 nota de credito (Chile) or \"01\" (Peru). Not available for Mexico: use document_type_id."
},
"client_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
"office_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Branch (sucursal) id.",
"exclusiveMinimum": 0
},
"emitted_to": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "A date, yyyy-mm-dd."
},
"client_code": {
"type": "string",
"maxLength": 40,
"minLength": 1,
"description": "Client tax id (RUT/RUC/RFC) as stored in Bsale."
},
"emitted_from": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "A date, yyyy-mm-dd."
},
"informed_sii": {
"type": "integer",
"maximum": 2,
"minimum": 0,
"description": "Tax authority declaration status (SII, SUNAT or SAT): 0 accepted, 1 sent, 2 rejected."
},
"document_type_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Document type id (see bsale_list_document_types).",
"exclusiveMinimum": 0
}
}
},
"annotations": {
"title": "List documents",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}One document by id with its amounts, dates, state and links. Use expand=[details,payments,client,office,document_type,references,sellers] to include line items, payments and related records. GET /v1/documents/{id}.json.
| Parameter | Type | Description |
|---|---|---|
| expand | array | |
| document_id * | integer | Bsale document id. |
{
"name": "bsale_get_document",
"title": "Get document",
"description": "One document by id with its amounts, dates, state and links. Use expand=[details,payments,client,office,document_type,references,sellers] to include line items, payments and related records. GET /v1/documents/{id}.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"document_id"
],
"properties": {
"expand": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z_]{1,40}$"
},
"maxItems": 8
},
"document_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Bsale document id.",
"exclusiveMinimum": 0
}
}
},
"annotations": {
"title": "Get document",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}Totals of sales documents (net, tax, total, count) by month, document type and office for a date range; set per_document to list each document instead. Good for 'how much did we sell in September?'. GET /v1/documents/summary.json.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-50 (default 25). |
| offset | integer | Items to skip (default 0). Pass the previous reply's next_offset. |
| code_sii | array | Only these document type tax codes, e.g. [33, 39] (Chile) or ["01", "03"] (Peru). |
| emitted_to | string | A date, yyyy-mm-dd. |
| emitted_from | string | A date, yyyy-mm-dd. |
| per_document | boolean | true = one row per document instead of grouped totals. |
{
"name": "bsale_sales_summary",
"title": "Sales summary",
"description": "Totals of sales documents (net, tax, total, count) by month, document type and office for a date range; set per_document to list each document instead. Good for 'how much did we sell in September?'. GET /v1/documents/summary.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 50,
"description": "Results per page, 1-50 (default 25).",
"exclusiveMinimum": 0
},
"offset": {
"type": "integer",
"maximum": 10000000,
"minimum": 0,
"description": "Items to skip (default 0). Pass the previous reply's next_offset."
},
"code_sii": {
"type": "array",
"items": {
"anyOf": [
{
"type": "integer",
"maximum": 9999,
"exclusiveMinimum": 0
},
{
"type": "string",
"pattern": "^[A-Za-z0-9]{1,6}$"
}
]
},
"maxItems": 10,
"description": "Only these document type tax codes, e.g. [33, 39] (Chile) or [\"01\", \"03\"] (Peru)."
},
"emitted_to": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "A date, yyyy-mm-dd."
},
"emitted_from": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "A date, yyyy-mm-dd."
},
"per_document": {
"type": "boolean",
"description": "true = one row per document instead of grouped totals."
}
}
},
"annotations": {
"title": "Sales summary",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}List returns (devoluciones) with date, motive, amounts and the credit note issued. Use expand=[reference_document,credit_note,details] for more. GET /v1/returns.json.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-50 (default 25). |
| expand | array | |
| offset | integer | Items to skip (default 0). Pass the previous reply's next_offset. |
{
"name": "bsale_list_returns",
"title": "List returns",
"description": "List returns (devoluciones) with date, motive, amounts and the credit note issued. Use expand=[reference_document,credit_note,details] for more. GET /v1/returns.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 50,
"description": "Results per page, 1-50 (default 25).",
"exclusiveMinimum": 0
},
"expand": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z_]{1,40}$"
},
"maxItems": 8
},
"offset": {
"type": "integer",
"maximum": 10000000,
"minimum": 0,
"description": "Items to skip (default 0). Pass the previous reply's next_offset."
}
}
},
"annotations": {
"title": "List returns",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}List document types (boleta, factura, nota de credito, guia de despacho...) with their id and tax (SII) code. Use the id when filtering documents. GET /v1/document_types.json.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-50 (default 25). |
| state | any | 0 = active records (Bsale default), 1 = inactive. |
| offset | integer | Items to skip (default 0). Pass the previous reply's next_offset. |
| code_sii | any |
{
"name": "bsale_list_document_types",
"title": "List document types",
"description": "List document types (boleta, factura, nota de credito, guia de despacho...) with their id and tax (SII) code. Use the id when filtering documents. GET /v1/document_types.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 50,
"description": "Results per page, 1-50 (default 25).",
"exclusiveMinimum": 0
},
"state": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
],
"description": "0 = active records (Bsale default), 1 = inactive."
},
"offset": {
"type": "integer",
"maximum": 10000000,
"minimum": 0,
"description": "Items to skip (default 0). Pass the previous reply's next_offset."
},
"code_sii": {
"anyOf": [
{
"type": "integer",
"maximum": 9999,
"exclusiveMinimum": 0
},
{
"type": "string",
"pattern": "^[A-Za-z0-9]{1,6}$"
}
]
}
}
},
"annotations": {
"title": "List document types",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}List customers with name, tax id (code), email, phone, address, credit limit and loyalty points. Filter by tax id, name, last name or email. GET /v1/clients.json.
| Parameter | Type | Description |
|---|---|---|
| code | string | Client tax id (RUT/RUC/RFC) exactly as stored. |
| string | ||
| limit | integer | Results per page, 1-50 (default 25). |
| state | any | 0 = active records (Bsale default), 1 = inactive. |
| expand | array | |
| offset | integer | Items to skip (default 0). Pass the previous reply's next_offset. |
| last_name | string | |
| first_name | string |
{
"name": "bsale_list_clients",
"title": "List clients",
"description": "List customers with name, tax id (code), email, phone, address, credit limit and loyalty points. Filter by tax id, name, last name or email. GET /v1/clients.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"code": {
"type": "string",
"maxLength": 40,
"minLength": 1,
"description": "Client tax id (RUT/RUC/RFC) exactly as stored."
},
"email": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"limit": {
"type": "integer",
"maximum": 50,
"description": "Results per page, 1-50 (default 25).",
"exclusiveMinimum": 0
},
"state": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
],
"description": "0 = active records (Bsale default), 1 = inactive."
},
"expand": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z_]{1,40}$"
},
"maxItems": 8
},
"offset": {
"type": "integer",
"maximum": 10000000,
"minimum": 0,
"description": "Items to skip (default 0). Pass the previous reply's next_offset."
},
"last_name": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"first_name": {
"type": "string",
"maxLength": 100,
"minLength": 1
}
}
},
"annotations": {
"title": "List clients",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}One customer by id. Use expand=[contacts,attributes,addresses] to include contacts and extra attributes. GET /v1/clients/{id}.json.
| Parameter | Type | Description |
|---|---|---|
| expand | array | |
| client_id * | integer |
{
"name": "bsale_get_client",
"title": "Get client",
"description": "One customer by id. Use expand=[contacts,attributes,addresses] to include contacts and extra attributes. GET /v1/clients/{id}.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"client_id"
],
"properties": {
"expand": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z_]{1,40}$"
},
"maxItems": 8
},
"client_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
}
},
"annotations": {
"title": "Get client",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}A client's receivables: overdue and upcoming debt, total owed, and the unpaid documents with amounts. Give client_id or client_code. GET /v1/clients/unpaid_documents.json.
| Parameter | Type | Description |
|---|---|---|
| as_of | string | Date that splits overdue from upcoming (default: today). |
| client_id | integer | |
| client_code | string | Client tax id (RUT/RUC/RFC). |
{
"name": "bsale_client_unpaid_documents",
"title": "Client unpaid documents",
"description": "A client's receivables: overdue and upcoming debt, total owed, and the unpaid documents with amounts. Give client_id or client_code. GET /v1/clients/unpaid_documents.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"as_of": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "Date that splits overdue from upcoming (default: today)."
},
"client_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
"client_code": {
"type": "string",
"maxLength": 40,
"minLength": 1,
"description": "Client tax id (RUT/RUC/RFC)."
}
}
},
"annotations": {
"title": "Client unpaid documents",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}List products and services (name, description, class, stock control, state). SKUs live on variants: see bsale_list_variants. GET /v1/products.json.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-50 (default 25). |
| state | any | 0 = active records (Bsale default), 1 = inactive. |
| expand | array | |
| offset | integer | Items to skip (default 0). Pass the previous reply's next_offset. |
| classification | integer | 0 product, 1 service, 3 pack/promotion. |
| product_type_id | integer |
{
"name": "bsale_list_products",
"title": "List products",
"description": "List products and services (name, description, class, stock control, state). SKUs live on variants: see bsale_list_variants. GET /v1/products.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 50,
"description": "Results per page, 1-50 (default 25).",
"exclusiveMinimum": 0
},
"state": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
],
"description": "0 = active records (Bsale default), 1 = inactive."
},
"expand": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z_]{1,40}$"
},
"maxItems": 8
},
"offset": {
"type": "integer",
"maximum": 10000000,
"minimum": 0,
"description": "Items to skip (default 0). Pass the previous reply's next_offset."
},
"classification": {
"type": "integer",
"maximum": 3,
"minimum": 0,
"description": "0 product, 1 service, 3 pack/promotion."
},
"product_type_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
}
},
"annotations": {
"title": "List products",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}One product by id; expand=[product_type] adds the type. GET /v1/products/{id}.json.
| Parameter | Type | Description |
|---|---|---|
| expand | array | |
| product_id * | integer |
{
"name": "bsale_get_product",
"title": "Get product",
"description": "One product by id; expand=[product_type] adds the type. GET /v1/products/{id}.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"product_id"
],
"properties": {
"expand": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z_]{1,40}$"
},
"maxItems": 8
},
"product_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
}
},
"annotations": {
"title": "Get product",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}List product variants, the sellable SKUs: description, SKU code, barcode, stock settings and product link. Search by SKU code, barcode, description or product id. GET /v1/variants.json.
| Parameter | Type | Description |
|---|---|---|
| code | string | SKU code. |
| limit | integer | Results per page, 1-50 (default 25). |
| state | any | 0 = active records (Bsale default), 1 = inactive. |
| expand | array | |
| offset | integer | Items to skip (default 0). Pass the previous reply's next_offset. |
| barcode | string | |
| product_id | integer | |
| description | string | Variant name. |
{
"name": "bsale_list_variants",
"title": "List variants (SKUs)",
"description": "List product variants, the sellable SKUs: description, SKU code, barcode, stock settings and product link. Search by SKU code, barcode, description or product id. GET /v1/variants.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"code": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "SKU code."
},
"limit": {
"type": "integer",
"maximum": 50,
"description": "Results per page, 1-50 (default 25).",
"exclusiveMinimum": 0
},
"state": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
],
"description": "0 = active records (Bsale default), 1 = inactive."
},
"expand": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z_]{1,40}$"
},
"maxItems": 8
},
"offset": {
"type": "integer",
"maximum": 10000000,
"minimum": 0,
"description": "Items to skip (default 0). Pass the previous reply's next_offset."
},
"barcode": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"product_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
"description": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Variant name."
}
}
},
"annotations": {
"title": "List variants",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}One variant (SKU) by id; expand=[product] embeds the product. GET /v1/variants/{id}.json.
| Parameter | Type | Description |
|---|---|---|
| expand | array | |
| variant_id * | integer |
{
"name": "bsale_get_variant",
"title": "Get variant",
"description": "One variant (SKU) by id; expand=[product] embeds the product. GET /v1/variants/{id}.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"variant_id"
],
"properties": {
"expand": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z_]{1,40}$"
},
"maxItems": 8
},
"variant_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
}
},
"annotations": {
"title": "Get variant",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}Stock per variant and office: quantity, reserved and available. Filter by office, variant id, SKU code or barcode (for a pack give a variant filter plus office_id). expand=[variant,office] adds names. GET /v1/stocks.json.
| Parameter | Type | Description |
|---|---|---|
| code | string | SKU code. |
| limit | integer | Results per page, 1-50 (default 25). |
| expand | array | |
| offset | integer | Items to skip (default 0). Pass the previous reply's next_offset. |
| barcode | string | |
| office_id | integer | |
| variant_id | integer |
{
"name": "bsale_list_stocks",
"title": "List stock levels",
"description": "Stock per variant and office: quantity, reserved and available. Filter by office, variant id, SKU code or barcode (for a pack give a variant filter plus office_id). expand=[variant,office] adds names. GET /v1/stocks.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"code": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "SKU code."
},
"limit": {
"type": "integer",
"maximum": 50,
"description": "Results per page, 1-50 (default 25).",
"exclusiveMinimum": 0
},
"expand": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z_]{1,40}$"
},
"maxItems": 8
},
"offset": {
"type": "integer",
"maximum": 10000000,
"minimum": 0,
"description": "Items to skip (default 0). Pass the previous reply's next_offset."
},
"barcode": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"office_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
"variant_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
}
},
"annotations": {
"title": "List stock levels",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}List price lists with name, currency and state. Use the id with bsale_list_price_list_details. GET /v1/price_lists.json.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-50 (default 25). |
| expand | array | |
| offset | integer | Items to skip (default 0). Pass the previous reply's next_offset. |
| coin_id | integer |
{
"name": "bsale_list_price_lists",
"title": "List price lists",
"description": "List price lists with name, currency and state. Use the id with bsale_list_price_list_details. GET /v1/price_lists.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 50,
"description": "Results per page, 1-50 (default 25).",
"exclusiveMinimum": 0
},
"expand": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z_]{1,40}$"
},
"maxItems": 8
},
"offset": {
"type": "integer",
"maximum": 10000000,
"minimum": 0,
"description": "Items to skip (default 0). Pass the previous reply's next_offset."
},
"coin_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
}
},
"annotations": {
"title": "List price lists",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}Prices in one price list: the net price (variantValue) and price with taxes per variant, plus the detail id needed to change a price. Filter by variant id, SKU code or barcode. GET /v1/price_lists/{id}/details.json.
| Parameter | Type | Description |
|---|---|---|
| code | string | SKU code. |
| limit | integer | Results per page, 1-50 (default 25). |
| expand | array | |
| offset | integer | Items to skip (default 0). Pass the previous reply's next_offset. |
| barcode | string | |
| variant_id | integer | |
| price_list_id * | integer |
{
"name": "bsale_list_price_list_details",
"title": "List price list prices",
"description": "Prices in one price list: the net price (variantValue) and price with taxes per variant, plus the detail id needed to change a price. Filter by variant id, SKU code or barcode. GET /v1/price_lists/{id}/details.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"price_list_id"
],
"properties": {
"code": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "SKU code."
},
"limit": {
"type": "integer",
"maximum": 50,
"description": "Results per page, 1-50 (default 25).",
"exclusiveMinimum": 0
},
"expand": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z_]{1,40}$"
},
"maxItems": 8
},
"offset": {
"type": "integer",
"maximum": 10000000,
"minimum": 0,
"description": "Items to skip (default 0). Pass the previous reply's next_offset."
},
"barcode": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"variant_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
"price_list_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
}
},
"annotations": {
"title": "List price list prices",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}List payments received (amount, date, payment type, document, office, user). Filter by payment date, document id, or document tax code plus folio number. GET /v1/payments.json.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-50 (default 25). |
| expand | array | |
| number | integer | Document folio number; combine with code_sii. |
| offset | integer | Items to skip (default 0). Pass the previous reply's next_offset. |
| paid_on | string | Only payments recorded on this date. |
| code_sii | any | Document tax code; combine with number. |
| document_id | integer |
{
"name": "bsale_list_payments",
"title": "List payments",
"description": "List payments received (amount, date, payment type, document, office, user). Filter by payment date, document id, or document tax code plus folio number. GET /v1/payments.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 50,
"description": "Results per page, 1-50 (default 25).",
"exclusiveMinimum": 0
},
"expand": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z_]{1,40}$"
},
"maxItems": 8
},
"number": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Document folio number; combine with code_sii.",
"exclusiveMinimum": 0
},
"offset": {
"type": "integer",
"maximum": 10000000,
"minimum": 0,
"description": "Items to skip (default 0). Pass the previous reply's next_offset."
},
"paid_on": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "Only payments recorded on this date."
},
"code_sii": {
"anyOf": [
{
"type": "integer",
"maximum": 9999,
"exclusiveMinimum": 0
},
{
"type": "string",
"pattern": "^[A-Za-z0-9]{1,6}$"
}
],
"description": "Document tax code; combine with number."
},
"document_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
}
},
"annotations": {
"title": "List payments",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}List payment methods (cash, card, transfer, credit...) with their id. The id is needed to record a payment. GET /v1/payment_types.json.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-50 (default 25). |
| state | any | 0 = active records (Bsale default), 1 = inactive. |
| offset | integer | Items to skip (default 0). Pass the previous reply's next_offset. |
{
"name": "bsale_list_payment_types",
"title": "List payment types",
"description": "List payment methods (cash, card, transfer, credit...) with their id. The id is needed to record a payment. GET /v1/payment_types.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 50,
"description": "Results per page, 1-50 (default 25).",
"exclusiveMinimum": 0
},
"state": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
],
"description": "0 = active records (Bsale default), 1 = inactive."
},
"offset": {
"type": "integer",
"maximum": 10000000,
"minimum": 0,
"description": "Items to skip (default 0). Pass the previous reply's next_offset."
}
}
},
"annotations": {
"title": "List payment types",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}List branches (sucursales) with name, address and cost center. Use the id for stock and document filters. GET /v1/offices.json.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-50 (default 25). |
| state | any | 0 = active records (Bsale default), 1 = inactive. |
| offset | integer | Items to skip (default 0). Pass the previous reply's next_offset. |
{
"name": "bsale_list_offices",
"title": "List offices (branches)",
"description": "List branches (sucursales) with name, address and cost center. Use the id for stock and document filters. GET /v1/offices.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 50,
"description": "Results per page, 1-50 (default 25).",
"exclusiveMinimum": 0
},
"state": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
],
"description": "0 = active records (Bsale default), 1 = inactive."
},
"offset": {
"type": "integer",
"maximum": 10000000,
"minimum": 0,
"description": "Items to skip (default 0). Pass the previous reply's next_offset."
}
}
},
"annotations": {
"title": "List offices",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}List Bsale users (sellers/cashiers) with name and office. GET /v1/users.json.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-50 (default 25). |
| state | any | 0 = active records (Bsale default), 1 = inactive. |
| expand | array | |
| offset | integer | Items to skip (default 0). Pass the previous reply's next_offset. |
| office_id | integer |
{
"name": "bsale_list_users",
"title": "List users (sellers)",
"description": "List Bsale users (sellers/cashiers) with name and office. GET /v1/users.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 50,
"description": "Results per page, 1-50 (default 25).",
"exclusiveMinimum": 0
},
"state": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
],
"description": "0 = active records (Bsale default), 1 = inactive."
},
"expand": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z_]{1,40}$"
},
"maxItems": 8
},
"offset": {
"type": "integer",
"maximum": 10000000,
"minimum": 0,
"description": "Items to skip (default 0). Pass the previous reply's next_offset."
},
"office_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
}
},
"annotations": {
"title": "List users",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}Sales and tax subtotal per seller for a date range (default: today, UTC), or for one user. GET /v1/users/sales_summary.json.
| Parameter | Type | Description |
|---|---|---|
| to | string | A date, yyyy-mm-dd. |
| from | string | A date, yyyy-mm-dd. |
| user_id | integer |
{
"name": "bsale_user_sales_summary",
"title": "Sales by seller",
"description": "Sales and tax subtotal per seller for a date range (default: today, UTC), or for one user. GET /v1/users/sales_summary.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"to": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "A date, yyyy-mm-dd."
},
"from": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "A date, yyyy-mm-dd."
},
"user_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
}
},
"annotations": {
"title": "Sales by seller",
"readOnlyHint": true,
"openWorldHint": true,
"destructiveHint": false
}
}WRITE: create a new customer in Bsale (it is visible to every user of the instance). Give at least a first name or a company. Bsale rejects a second client with the same tax id. POST /v1/clients.json.
| Parameter | Type | Description |
|---|---|---|
| city | string | |
| code | string | Tax id (RUT in Chile, RUC in Peru, RFC in Mexico). Validate it first. |
| note | string | |
| string | ||
| phone | string | |
| address | string | |
| company | string | |
| activity | string | Giro / business activity. |
| district | string | Colonia / district (Mexico). Chile and Peru: use municipality. |
| last_name | string | |
| first_name | string | |
| is_foreigner | boolean | true for a foreign client (Bsale assigns tax id 55555555-5 unless you also pass code). |
| municipality | string | Comuna (Chile) or municipality (Peru). Mexican accounts: use district. |
{
"name": "bsale_create_client",
"title": "Create client",
"description": "WRITE: create a new customer in Bsale (it is visible to every user of the instance). Give at least a first name or a company. Bsale rejects a second client with the same tax id. POST /v1/clients.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"city": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"code": {
"type": "string",
"maxLength": 40,
"minLength": 1,
"description": "Tax id (RUT in Chile, RUC in Peru, RFC in Mexico). Validate it first."
},
"note": {
"type": "string",
"maxLength": 1000,
"minLength": 1
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"maxLength": 200
},
"phone": {
"type": "string",
"maxLength": 40,
"minLength": 1
},
"address": {
"type": "string",
"maxLength": 300,
"minLength": 1
},
"company": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"activity": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Giro / business activity."
},
"district": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Colonia / district (Mexico). Chile and Peru: use municipality."
},
"last_name": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"first_name": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"is_foreigner": {
"type": "boolean",
"description": "true for a foreign client (Bsale assigns tax id 55555555-5 unless you also pass code)."
},
"municipality": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Comuna (Chile) or municipality (Peru). Mexican accounts: use district."
}
}
},
"annotations": {
"title": "Create client",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}WRITE: change fields of an existing customer; only the fields you pass are sent. This overwrites the stored values. PUT /v1/clients/{id}.json.
| Parameter | Type | Description |
|---|---|---|
| city | string | |
| code | string | Tax id (RUT in Chile, RUC in Peru, RFC in Mexico). Validate it first. |
| note | string | |
| string | ||
| phone | string | |
| address | string | |
| company | string | |
| activity | string | Giro / business activity. |
| district | string | Colonia / district (Mexico). Chile and Peru: use municipality. |
| client_id * | integer | |
| last_name | string | |
| first_name | string | |
| municipality | string | Comuna (Chile) or municipality (Peru). Mexican accounts: use district. |
{
"name": "bsale_update_client",
"title": "Update client",
"description": "WRITE: change fields of an existing customer; only the fields you pass are sent. This overwrites the stored values. PUT /v1/clients/{id}.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"client_id"
],
"properties": {
"city": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"code": {
"type": "string",
"maxLength": 40,
"minLength": 1,
"description": "Tax id (RUT in Chile, RUC in Peru, RFC in Mexico). Validate it first."
},
"note": {
"type": "string",
"maxLength": 1000,
"minLength": 1
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"maxLength": 200
},
"phone": {
"type": "string",
"maxLength": 40,
"minLength": 1
},
"address": {
"type": "string",
"maxLength": 300,
"minLength": 1
},
"company": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"activity": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Giro / business activity."
},
"district": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Colonia / district (Mexico). Chile and Peru: use municipality."
},
"client_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
"last_name": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"first_name": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"municipality": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Comuna (Chile) or municipality (Peru). Mexican accounts: use district."
}
}
},
"annotations": {
"title": "Update client",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": true
}
}WRITE: set the net price (variantValue, without taxes) of one variant in a price list. This changes what Bsale charges on new sales using that list. Get detail_id from bsale_list_price_list_details. PUT /v1/price_lists/{id}/details/{detail_id}.json.
| Parameter | Type | Description |
|---|---|---|
| detail_id * | integer | Price list detail id (the id of the row in bsale_list_price_list_details). |
| net_price * | number | New net price (before taxes) in the price list's currency. |
| price_list_id * | integer |
{
"name": "bsale_update_price",
"title": "Update price list price",
"description": "WRITE: set the net price (variantValue, without taxes) of one variant in a price list. This changes what Bsale charges on new sales using that list. Get detail_id from bsale_list_price_list_details. PUT /v1/price_lists/{id}/details/{detail_id}.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"price_list_id",
"detail_id",
"net_price"
],
"properties": {
"detail_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Price list detail id (the id of the row in bsale_list_price_list_details).",
"exclusiveMinimum": 0
},
"net_price": {
"type": "number",
"maximum": 1000000000,
"minimum": 0,
"description": "New net price (before taxes) in the price list's currency."
},
"price_list_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
}
},
"annotations": {
"title": "Update price list price",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": true
}
}WRITE: record a stock reception (ingreso de stock) that ADDS quantities to an office's inventory. Each line names the variant by id, SKU code or barcode, with quantity and unit cost. It changes stock levels and cost; Bsale has no undo through this API, so confirm the numbers first. POST /v1/stocks/receptions.json.
| Parameter | Type | Description |
|---|---|---|
| note | string | |
| details * | array | |
| document | string | Kind of incoming document, e.g. "Guia", "Factura", "Otro" (default "Otro"). |
| office_id * | integer | Office (sucursal) receiving the stock. |
| document_number | integer | Number of the incoming document. |
{
"name": "bsale_create_stock_reception",
"title": "Receive stock",
"description": "WRITE: record a stock reception (ingreso de stock) that ADDS quantities to an office's inventory. Each line names the variant by id, SKU code or barcode, with quantity and unit cost. It changes stock levels and cost; Bsale has no undo through this API, so confirm the numbers first. POST /v1/stocks/receptions.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"office_id",
"details"
],
"properties": {
"note": {
"type": "string",
"maxLength": 500,
"minLength": 1
},
"details": {
"type": "array",
"items": {
"type": "object",
"required": [
"quantity"
],
"properties": {
"code": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "SKU code."
},
"cost": {
"type": "number",
"maximum": 1000000000,
"minimum": 0,
"description": "Unit cost."
},
"barcode": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"quantity": {
"type": "number",
"maximum": 1000000000,
"exclusiveMinimum": 0
},
"variant_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
"serial_number": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Only for serial-tracked variants."
}
}
},
"maxItems": 100,
"minItems": 1
},
"document": {
"type": "string",
"maxLength": 50,
"minLength": 1,
"description": "Kind of incoming document, e.g. \"Guia\", \"Factura\", \"Otro\" (default \"Otro\")."
},
"office_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Office (sucursal) receiving the stock.",
"exclusiveMinimum": 0
},
"document_number": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Number of the incoming document."
}
}
},
"annotations": {
"title": "Receive stock",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}WRITE: record a payment against an issued document (normally a credit sale that is still unpaid). It changes the document's receivable balance in the books and cannot be removed through this API. Check the amount with bsale_client_unpaid_documents first and get payment_type_id from bsale_list_payment_types. POST /v1/payments.json.
| Parameter | Type | Description |
|---|---|---|
| amount * | number | |
| paid_on | string | Payment date (default: today, UTC). |
| document_id * | integer | |
| payment_type_id * | integer |
{
"name": "bsale_create_payment",
"title": "Record payment",
"description": "WRITE: record a payment against an issued document (normally a credit sale that is still unpaid). It changes the document's receivable balance in the books and cannot be removed through this API. Check the amount with bsale_client_unpaid_documents first and get payment_type_id from bsale_list_payment_types. POST /v1/payments.json.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"document_id",
"payment_type_id",
"amount"
],
"properties": {
"amount": {
"type": "number",
"maximum": 1000000000000,
"exclusiveMinimum": 0
},
"paid_on": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "Payment date (default: today, UTC)."
},
"document_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
"payment_type_id": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
}
},
"annotations": {
"title": "Record payment",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}Tools for Bsale, hosted by usefulapi.io. If the user is new or asks what this server can do, suggest requests such as: "How much did we sell last month, by document type and branch?"; "Which products are low on stock in my main branch?"; "Does client 12.345.678-9 have unpaid invoices?". Read-only tools never change data; ask the user before a tool that creates, changes or deletes Bsale data. Free plan: 50 tool calls per month. Run bsale_usage_status to see the calls used this month. If the user asks for something none of these tools can do, tell the user and, with their OK, run bsale_request_feature to record the request. Paid plans: Pro (10,000 tool calls a month, $9/month or $90/year, for normal use) and Pro+ (100,000 tool calls a month, $39/month or $390/year, for automations and heavy use). A plan can be cancelled at any time and then runs to the end of the paid period, so it also suits a one-time job. When the user wants more calls or reaches the limit, run bsale_upgrade without a plan: it returns both plans, each with a payment link for the user to open. bsale_cancel_subscription cancels Pro at the end of the paid period.
Names, descriptions and schemas were written by the server and are shown as data.
Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators.