Crear nota de venta
POST /api/sale-note
Autenticación: Bearer del usuario del tenant (Authorization: Bearer <api_token>).
Cuerpo
Content-Type: application/json
{
"prefix": "NV",
"series_id": 10,
"establishment_id": null,
"date_of_issue": "2021-06-17",
"time_of_issue": "16:31:01",
"customer_id": 36,
"currency_type_id": "PEN",
"purchase_order": null,
"exchange_rate_sale": 0,
"total_prepayment": 0,
"total_charge": 0,
"total_discount": 0,
"total_exportation": 0,
"total_free": 0,
"total_taxed": 0,
"total_unaffected": 0,
"total_exonerated": 100,
"total_igv": 0,
"total_base_isc": 0,
"total_isc": 0,
"total_base_other_taxes": 0,
"total_other_taxes": 0,
"total_taxes": 0,
"total_value": 100,
"total": 100,
"operation_type_id": null,
"items": [
{
"item_id": 1181,
"item": {
"id": 1181,
"item_id": 1181,
"name": null,
"full_description": "111111111111 - agua",
"description": "agua",
"currency_type_id": "PEN",
"internal_id": "111111111111",
"item_code": null,
"currency_type_symbol": "S/",
"sale_unit_price": "100.00",
"purchase_unit_price": "0.000000",
"unit_type_id": "NIU",
"sale_affectation_igv_type_id": "20",
"purchase_affectation_igv_type_id": "10",
"calculate_quantity": false,
"has_igv": true,
"is_set": false,
"aux_quantity": 1,
"brand": "CIELO",
"category": "CIELO",
"stock": -145,
"image": "https://demo.facturalo.pro/logo/imagen-no-disponible.jpg",
"warehouses": [
{
"warehouse_description": "Almacén Oficina Principal",
"stock": "-145.0000",
"warehouse_id": 1
},
{
"warehouse_description": "Almacén - Oficina Arequipa",
"stock": "-1.0000",
"warehouse_id": 4
}
],
"unit_price": "100.00",
"presentation": null
},
"currency_type_id": "PEN",
"quantity": 1,
"unit_value": 100,
"affectation_igv_type_id": "20",
"affectation_igv_type": {
"id": "20",
"active": 1,
"exportation": 0,
"free": 0,
"description": "Exonerado - Operación Onerosa"
},
"total_base_igv": 100,
"percentage_igv": 18,
"total_igv": 0,
"system_isc_type_id": null,
"total_base_isc": 0,
"percentage_isc": 0,
"total_isc": 0,
"total_base_other_taxes": 0,
"percentage_other_taxes": 0,
"total_other_taxes": 0,
"total_plastic_bag_taxes": 0,
"total_taxes": 0,
"price_type_id": "01",
"unit_price": 100,
"total_value": 100,
"total_discount": 0,
"total_charge": 0,
"total": 100,
"attributes": [],
"charges": [],
"discounts": []
}
],
"charges": [],
"discounts": [],
"attributes": [],
"guides": [],
"payments": [],
"additional_information": null,
"actions": {
"format_pdf": "a4"
},
"apply_concurrency": false,
"type_period": null,
"quantity_period": 0,
"automatic_date_of_issue": null,
"enabled_concurrency": false,
"datos_del_cliente_o_receptor": {
"codigo_tipo_documento_identidad": "6",
"numero_documento": "10417844398",
"apellidos_y_nombres_o_razon_social": "EMPRESA XYZ S.A.",
"codigo_pais": "PE",
"ubigeo": "150101",
"direccion": "Av. 2 de Mayo",
"correo_electronico": "demo@gmail.com",
"telefono": "427-1148"
}
}
Respuestas
200 — Nota de venta creada
Nombre en el SDK
El cuerpo de la consulta es el JSON de la sección Cuerpo. Si instalas el paquete generado en sdks/, esa misma petición es el método crearNotaDeVenta.
| Lenguaje | Llamada |
|---|---|
| PHP | TenantDominioDelClienteNotasDeVentaCotizacionesYPedidosApi::crearNotaDeVenta |
| JavaScript | TenantDominioDelClienteNotasDeVentaCotizacionesYPedidosApi.crearNotaDeVenta |
| TypeScript | TenantDominioDelClienteNotasDeVentaCotizacionesYPedidosApi.crearNotaDeVenta |
| Java | TenantDominioDelClienteNotasDeVentaCotizacionesYPedidosApi.crearNotaDeVenta |
| Python | TenantDominioDelClienteNotasDeVentaCotizacionesYPedidosApi.crear_nota_de_venta |
| C# | TenantDominioDelClienteNotasDeVentaCotizacionesYPedidosApi.CrearNotaDeVentaAsync |
| Go | TenantDominioDelClienteNotasDeVentaCotizacionesYPedidosAPIService.CrearNotaDeVenta |
| Ruby | TenantDominioDelClienteNotasDeVentaCotizacionesYPedidosApi.crear_nota_de_venta |
| Kotlin | TenantDominioDelClienteNotasDeVentaCotizacionesYPedidosApi.crearNotaDeVenta |
| Dart | TenantDominioDelClienteNotasDeVentaCotizacionesYPedidosApi.crearNotaDeVenta |
| Swift | TenantDominioDelClienteNotasDeVentaCotizacionesYPedidosAPI.crearNotaDeVenta |