Obtener las API Key
- Solicitar a soporte@rapifactura.com la habilitación de la API para la empresa.
- Una vez habilitada ingresar a Configuración > API, copiar las Key: Empresa, Sucursal y Punto de Venta.
Invoice:
POST | api.rapifactura.com/api/Invoice/New |
Respose:
OK | {“url”: “https://portal.rapifactura.com/xx”} |
ERROR | [{“message”: “xx”}] |
Request:
company_key * | string | Identificador de empresa |
branch_key * | string | Identificador de la sucursal |
pos_key * | string | Identificador del punto de venta |
document * | string(11) | Identificador fiscal (CUIT) |
production | bool | Definir en False para ambiente de test |
invoice.letter.id * | string(1) | Letra del comprobante: A/B/C/E/M |
invoice.concept.id * | string(1) | P(Productos), S(Servicios), A(Productos y Servicios) |
invoice.currency.id * | string(3) | Identificador de moneda: ARS/USD |
invoice.currency.rate * | decimal | Ratio de conversión |
invoice.sale_condition | string | Condición de venta. Ej: "Contado" |
invoice.type.id * | string(1) | Tipo de comprobante: S(Factura), D(Nota de débito), C(Nota de crédito) |
invoice.date_invoice * | string(10) | Fecha de emisión |
invoice.date_due * | string(10) | Fecha de vencimiento |
invoice.date_service_from * | string(10) | Fecha servicio desde |
invoice.date_service_to * | string(10) | Fecha servicio hasta |
invoice.customer.document * | string | Cliente: Nro. de CUIT / DNI / OTRO |
invoice.customer.name * | string | Cliente: Nombre / Razón Social |
invoice.customer.address | string | Cliente: Domicilio |
invoice.customer.city | string | Cliente: Ciudad |
invoice.customer.state | string | Cliente: Provincia |
invoice.customer.postal_code | string | Cliente: Código postal |
invoice.customer.country | string | Cliente: Pais |
invoice.customer.mail | string | Cliente: E-mail |
invoice.customer.fiscal_category.id * | string(2) | Cliente - Categoría Fiscal: RI (Responsable Inscripto) / EX (Exento)/ MO (Monotributo) / CF (Consumidor Final) |
invoice.customer.identification_category.name * | string | Cliente- Tipo de documento: CUIT / DNI / OTRO |
invoice.items.reference | string | Código del item |
invoice.items.name * | string | Descripción del item |
invoice.items.quantity * | decimal(2) | Cantidad |
invoice.items.price_unit * | decimal(4) | Importe unitario |
invoice.items.discount * | decimal(2) | Porcentaje de descuento |
invoice.items.price_discount * | decimal(2) | Importe unitario |
invoice.items.price_subtotal * | decimal(4) | roundHalfToEven((item.quantity * item.price_unit) - ((item.quantity * item.price_unit * item.discount) / 100) |
invoice.items.price_total * | decimal(4) | roundHalfToEven(item.price_subtotal + (item.tax.rate * item.price_subtotal / 100) |
invoice.items.tax.id | string |
Identificador de Alícuota IVA AFIP: "1" No Gravado; "2" Exento; "3" 0%; "4" 10.50%; "5" 21.00%; "6" 27.00%; "8" 5.00%; "9" 2.50 % |
invoice.items.tax.price | decimal(4) | Importe IVA |
invoice.items.tax.rate | decimal(2) | Porcentaje Alícuota |
invoice.items.um.code * | string(2) | Código de unidad de medida |
invoice.items.um.name * | string | Nombre de unidad de medida |
invoice.header_taxes.tax.name | string | Nombre de impuesto (Ej: Percepción IIBB) |
invoice.header_taxes.taxable | decimal(2) | Base imponible del impuesto |
invoice.header_taxes.aliquot | decimal(2) | Alícuota del impuesto |
invoice.header_taxes.price | decimal(4) | Importe del impuesto |
invoice.observation | string(300) | Observaciones |
* Campos obligatorios
Ejemplo:
{ "company_key": "...", "branch_key": "...", "pos_key": "...", "document": "...", "production": "false", "invoice" : { "letter" : { "id" : "A" }, "concept" : { "id" : "S" }, "currency" : { "id" : "ARS", "rate" : 1.00 }, "sale_condition" : "Contado", "type" : { "id" : "S" }, "date_due" : "2017-10-09", "date_invoice" : "2017-10-09", "date_service_from" : "2017-10-09", "date_service_to" : "2017-10-09", "customer" : { "document" : "33501880049", "fiscal_category" : { "id" : "RI" }, "identification_category" : { "name" : "CUIT" }, "name" : "SIKA ARGENTINA SA", "address" : "PASTEUR 2210", "city" : "CABA", "country" : "ARGENTINA", "postal_code" : "1425", "state" : "BUENOS AIRES" }, "items" : [ { "name" : "nombre servicio", "quantity" : 1.00, "price_unit" : 82.6446, "discount" : 0.00, "price_discount" : 0.00, "price_subtotal" : 82.6446, "price_total" : 100.00, "tax" : { "id" : "5", "price" : 17.3554 }, "um" : { "code" : "UN", "name" : "Unidad" } } ], "header_taxes": [{ "tax": { "name": "Percepción IIBB" }, "taxable": 100, "aliquot": 3.00, "price": 3.00 }] } }