Servidor MCPHerramientas disponibles
Crear recibo de venta
Crea un recibo de venta de caja sin timbrar un CFDI.
Herramienta MCP
create_sales_receiptPropósito
Crea un recibo de venta de caja sin timbrar un CFDI.
- Usar cuando
- Se completó una venta de punto de venta.
- No usar cuando
- Necesitas crear directamente un CFDI fiscal.
- Permisos requeridos
- Efectos secundarios
- Modifica datos
- Idempotencia
- Idempotente
Esquema de entrada
JSON Schema{ "type": "object", "properties": { "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 200, "description": "Unique retry key for this exact operation. Reuse it only when retrying the same request." }, "input": { "oneOf": [ { "type": "object", "properties": { "items": { "$ref": "#/definitions/__schema0" }, "currency": { "$ref": "#/definitions/__schema2" }, "locationId": { "$ref": "#/definitions/__schema3" }, "pricesIncludeIva": { "$ref": "#/definitions/__schema4" }, "notes": { "$ref": "#/definitions/__schema5" }, "customFields": { "$ref": "#/definitions/__schema6" }, "invoiceRequested": { "type": "boolean" }, "saleType": { "type": "string", "const": "paid" }, "paymentForm": { "type": "string", "enum": [ "12", "13", "14", "15", "17", "23", "24", "25", "26", "27", "28", "29", "30", "31", "99", "02", "06", "01", "05", "04", "03", "08" ], "description": "Active SAT payment-form code.", "x-exac-sat-catalog": "payment-forms" }, "customer": { "allOf": [ { "$ref": "#/definitions/__schema7" } ] } }, "required": [ "items", "saleType", "paymentForm" ], "additionalProperties": false }, { "type": "object", "properties": { "items": { "$ref": "#/definitions/__schema0" }, "currency": { "$ref": "#/definitions/__schema2" }, "locationId": { "$ref": "#/definitions/__schema3" }, "pricesIncludeIva": { "$ref": "#/definitions/__schema4" }, "notes": { "$ref": "#/definitions/__schema5" }, "customFields": { "$ref": "#/definitions/__schema6" }, "invoiceRequested": { "type": "boolean" }, "saleType": { "type": "string", "const": "credit" }, "paymentForm": { "type": "string", "const": "99" }, "customer": { "type": "object", "properties": { "kind": { "type": "string", "const": "stored" }, "customerId": { "type": "string", "minLength": 1 } }, "required": [ "kind", "customerId" ], "additionalProperties": false }, "collection": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "const": "due_date" }, "date": { "type": "string" } }, "required": [ "kind", "date" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "installments" }, "terms": { "type": "object", "properties": { "installmentCount": { "type": "integer", "minimum": 1, "maximum": 60 }, "firstDue": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "const": "transaction_date" } }, "required": [ "kind" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "months_after_transaction" }, "months": { "type": "integer", "minimum": 1, "maximum": 60 } }, "required": [ "kind", "months" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "fixed_date" }, "date": { "type": "string" } }, "required": [ "kind", "date" ], "additionalProperties": false } ] }, "recurrence": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "const": "anchor_day" } }, "required": [ "kind" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "day_of_month" }, "day": { "type": "integer", "minimum": 1, "maximum": 31 } }, "required": [ "kind", "day" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "last_day" } }, "required": [ "kind" ], "additionalProperties": false } ] } }, "required": [ "installmentCount", "firstDue", "recurrence" ], "additionalProperties": false } }, "required": [ "kind", "terms" ], "additionalProperties": false } ] } }, "required": [ "items", "saleType", "paymentForm", "customer" ], "additionalProperties": false }, { "type": "object", "properties": { "items": { "$ref": "#/definitions/__schema0" }, "currency": { "$ref": "#/definitions/__schema2" }, "locationId": { "$ref": "#/definitions/__schema3" }, "pricesIncludeIva": { "$ref": "#/definitions/__schema4" }, "notes": { "$ref": "#/definitions/__schema5" }, "customFields": { "$ref": "#/definitions/__schema6" }, "invoiceRequested": { "type": "boolean", "const": false }, "saleType": { "type": "string", "const": "courtesy" }, "customer": { "allOf": [ { "$ref": "#/definitions/__schema7" } ] } }, "required": [ "items", "saleType" ], "additionalProperties": false } ] } }, "required": [ "idempotencyKey", "input" ], "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "definitions": { "__schema0": { "minItems": 1, "type": "array", "items": { "$ref": "#/definitions/__schema1" } }, "__schema1": { "type": "object", "properties": { "productId": { "type": "string" }, "description": { "type": "string", "minLength": 1 }, "quantity": { "type": "number", "exclusiveMinimum": 0 }, "unitPrice": { "type": "number", "minimum": 0 }, "discount": { "type": "number" }, "taxIncluded": { "type": "boolean" } }, "required": [ "description", "quantity", "unitPrice" ], "additionalProperties": false }, "__schema2": { "type": "string", "pattern": "^[A-Z]{3}$" }, "__schema3": { "type": "string" }, "__schema4": { "type": "boolean" }, "__schema5": { "type": "string" }, "__schema6": { "type": "array", "items": { "type": "object", "properties": { "fieldName": { "type": "string", "minLength": 1 }, "value": { "type": "string" } }, "required": [ "fieldName", "value" ], "additionalProperties": false } }, "__schema7": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "const": "stored" }, "customerId": { "type": "string", "minLength": 1 } }, "required": [ "kind", "customerId" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "walk_in" }, "name": { "type": "string", "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-z]{2,}$" } }, "required": [ "kind" ], "additionalProperties": false } ] } }}Esquema de salida
JSON Schema{ "type": "object", "properties": { "data": { "type": "object", "properties": { "documentRef": { "type": "string", "pattern": "^sales_receipt:.+$" }, "status": { "type": "string", "enum": [ "open", "invoiced", "global_invoiced", "canceled" ] } }, "required": [ "documentRef", "status" ], "additionalProperties": false }, "error": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "code": { "type": "string", "enum": [ "validation_error", "unauthenticated", "forbidden", "not_found", "method_not_allowed", "conflict", "idempotency_conflict", "operation_in_progress", "recovery_required", "rate_limited", "provider_unavailable", "internal" ] }, "message": { "type": "string" }, "details": { "type": "object", "properties": { "issues": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "number" } ] } }, "message": { "type": "string" }, "code": { "type": "string" } }, "required": [ "path", "message" ], "additionalProperties": false } }, "retryable": { "type": "boolean" }, "retryAfterSeconds": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "additionalProperties": false } }, "required": [ "code", "message" ], "additionalProperties": false } }, "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "oneOf": [ { "required": [ "data" ] }, { "required": [ "error" ] } ]}