NOTA DÉBITO - FACTURA
POST/api/documents
Una de estas formas es la nota de débito y se utiliza cuando un comprador quiere informar a un vendedor de que ha aumentado el precio de su deuda o que la cantidad que había pagado era errónea y debe pagar más.
Ejemplo:
- Método: POST
- URL: https://empresa1.demo3pro6.ibu.pe/api/documents
- TOKEN: HOHYgwd4atPalTxqi2IIspythpLAU7eP239oByfjk9VuveiOpfUTm4Yg0Szt
Request
- application/json
- application/xml
- application/x-www-form-urlencoded
Body
required
- JSON A ENVIAR
Array [
]
serie_documentostringrequired
Example:
FD01
numero_documentostringrequired
Example:
#
fecha_de_emisiondaterequired
Example:
2024-11-05
hora_de_emisiontime
Example:
10:11:11
codigo_tipo_documentostringrequired
Example:
08
codigo_tipo_notastring
Example:
01
motivo_o_sustento_de_notastring
Example:
Error al emitir comprobante
codigo_tipo_monedastring
Example:
PEN
numero_orden_de_comprastring
Example:
0045467898
documento_afectado
object
external_idstring
Example:
a7d75ecc-061d-46f6-8ee4-2521a5bbec1d
datos_del_cliente_o_receptor
object
codigo_tipo_documento_identidadstring
Example:
6
numero_documentostring
Example:
10414711225
apellidos_y_nombres_o_razon_socialstring
Example:
EMPRESA XYZ S.A.
codigo_paisstring
Example:
PE
ubigeostring
Example:
150101
direccionstring
Example:
Av. 2 de Mayo
correo_electronicostring
Example:
demo@gmail.com
telefonostring
Example:
427-1148
totales
object
total_exportacionfloat
Example:
0
total_operaciones_gravadasfloat
Example:
100
total_operaciones_inafectasfloat
Example:
0
total_operaciones_exoneradasfloat
Example:
0
total_operaciones_gratuitasfloat
Example:
0
total_igvfloat
Example:
18
total_impuestosfloat
Example:
18
total_valorfloat
Example:
100
total_ventafloat
Example:
118
items
object[]
codigo_internostring
Example:
P0121
descripcionstring
Example:
Inca Kola 250 ml
codigo_producto_sunatstring
Example:
51121703
unidad_de_medidastring
Example:
NIU
cantidadint32
Example:
2
valor_unitariofloat
Example:
50
codigo_tipo_preciostring
Example:
01
precio_unitariofloat
Example:
59
codigo_tipo_afectacion_igvstring
Example:
10
total_base_igvfloat
Example:
100
porcentaje_igvfloat
Example:
18
total_igvfloat
Example:
18
total_impuestosfloat
Example:
18
total_valor_itemfloat
Example:
100
total_itemfloat
Example:
118
Body
required
- JSON A ENVIAR
Array [
]
serie_documentostringrequired
Example:
FD01
numero_documentostringrequired
Example:
#
fecha_de_emisiondaterequired
Example:
2024-11-05
hora_de_emisiontime
Example:
10:11:11
codigo_tipo_documentostringrequired
Example:
08
codigo_tipo_notastring
Example:
01
motivo_o_sustento_de_notastring
Example:
Error al emitir comprobante
codigo_tipo_monedastring
Example:
PEN
numero_orden_de_comprastring
Example:
0045467898
documento_afectado
object
external_idstring
Example:
a7d75ecc-061d-46f6-8ee4-2521a5bbec1d
datos_del_cliente_o_receptor
object
codigo_tipo_documento_identidadstring
Example:
6
numero_documentostring
Example:
10414711225
apellidos_y_nombres_o_razon_socialstring
Example:
EMPRESA XYZ S.A.
codigo_paisstring
Example:
PE
ubigeostring
Example:
150101
direccionstring
Example:
Av. 2 de Mayo
correo_electronicostring
Example:
demo@gmail.com
telefonostring
Example:
427-1148
totales
object
total_exportacionfloat
Example:
0
total_operaciones_gravadasfloat
Example:
100
total_operaciones_inafectasfloat
Example:
0
total_operaciones_exoneradasfloat
Example:
0
total_operaciones_gratuitasfloat
Example:
0
total_igvfloat
Example:
18
total_impuestosfloat
Example:
18
total_valorfloat
Example:
100
total_ventafloat
Example:
118
items
object[]
codigo_internostring
Example:
P0121
descripcionstring
Example:
Inca Kola 250 ml
codigo_producto_sunatstring
Example:
51121703
unidad_de_medidastring
Example:
NIU
cantidadint32
Example:
2
valor_unitariofloat
Example:
50
codigo_tipo_preciostring
Example:
01
precio_unitariofloat
Example:
59
codigo_tipo_afectacion_igvstring
Example:
10
total_base_igvfloat
Example:
100
porcentaje_igvfloat
Example:
18
total_igvfloat
Example:
18
total_impuestosfloat
Example:
18
total_valor_itemfloat
Example:
100
total_itemfloat
Example:
118
Body
required
- JSON A ENVIAR
Array [
]
serie_documentostringrequired
Example:
FD01
numero_documentostringrequired
Example:
#
fecha_de_emisiondaterequired
Example:
2024-11-05
hora_de_emisiontime
Example:
10:11:11
codigo_tipo_documentostringrequired
Example:
08
codigo_tipo_notastring
Example:
01
motivo_o_sustento_de_notastring
Example:
Error al emitir comprobante
codigo_tipo_monedastring
Example:
PEN
numero_orden_de_comprastring
Example:
0045467898
documento_afectado
object
external_idstring
Example:
a7d75ecc-061d-46f6-8ee4-2521a5bbec1d
datos_del_cliente_o_receptor
object
codigo_tipo_documento_identidadstring
Example:
6
numero_documentostring
Example:
10414711225
apellidos_y_nombres_o_razon_socialstring
Example:
EMPRESA XYZ S.A.
codigo_paisstring
Example:
PE
ubigeostring
Example:
150101
direccionstring
Example:
Av. 2 de Mayo
correo_electronicostring
Example:
demo@gmail.com
telefonostring
Example:
427-1148
totales
object
total_exportacionfloat
Example:
0
total_operaciones_gravadasfloat
Example:
100
total_operaciones_inafectasfloat
Example:
0
total_operaciones_exoneradasfloat
Example:
0
total_operaciones_gratuitasfloat
Example:
0
total_igvfloat
Example:
18
total_impuestosfloat
Example:
18
total_valorfloat
Example:
100
total_ventafloat
Example:
118
items
object[]
codigo_internostring
Example:
P0121
descripcionstring
Example:
Inca Kola 250 ml
codigo_producto_sunatstring
Example:
51121703
unidad_de_medidastring
Example:
NIU
cantidadint32
Example:
2
valor_unitariofloat
Example:
50
codigo_tipo_preciostring
Example:
01
precio_unitariofloat
Example:
59
codigo_tipo_afectacion_igvstring
Example:
10
total_base_igvfloat
Example:
100
porcentaje_igvfloat
Example:
18
total_igvfloat
Example:
18
total_impuestosfloat
Example:
18
total_valor_itemfloat
Example:
100
total_itemfloat
Example:
118
Responses
- 200
- 400
- 422
JSON RESPUESTA
- application/json
- application/xml
- Schema
- Example (from schema)
Schema
successboolean
Example:
true
data
object
numberstring
Example:
FD01-1
filenamestring
Example:
11111111111-08-FD01-1
external_idstring
Example:
0128f958-b41b-4d21-ae91-6a7a7e2cecc1
state_type_idstring
Example:
05
state_type_descriptionstring
Example:
Aceptado
number_to_letterstring
Example:
Ciento dieciocho con 00/100
hashstring
Example:
zadRmfbphEVuiZqm69dR2VyCHSc=
qrstring
Example:
iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAIAAACzY+a1AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4AQCbgGR/Af///wAAAMPNxEJsyosTAAAAAElFTkSuQmCC
idinteger
Example:
559
print_ticketstring
Example:
https://empresa1.demo3pro6.ibu.pe/print/document/0128f958-b41b-4d21-ae91-6a7a7e2cecc1/ticket
links
object
xmlstring
Example:
https://empresa1.demo3pro6.ibu.pe/downloads/document/xml/0128f958-b41b-4d21-ae91-6a7a7e2cecc1
pdfstring
Example:
https://empresa1.demo3pro6.ibu.pe/downloads/document/pdf/0128f958-b41b-4d21-ae91-6a7a7e2cecc1
cdrstring
Example:
https://empresa1.demo3pro6.ibu.pe/downloads/document/cdr/0128f958-b41b-4d21-ae91-6a7a7e2cecc1
response
object
codestring
Example:
0
descriptionstring
Example:
La Nota de Debito numero FD01-1, ha sido aceptada
notesundefined[]
{
"success": true,
"data": {
"number": "FD01-1",
"filename": "11111111111-08-FD01-1",
"external_id": "0128f958-b41b-4d21-ae91-6a7a7e2cecc1",
"state_type_id": "05",
"state_type_description": "Aceptado",
"number_to_letter": "Ciento dieciocho con 00/100",
"hash": "zadRmfbphEVuiZqm69dR2VyCHSc=",
"qr": "iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAIAAACzY+a1AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4AQCbgGR/Af///wAAAMPNxEJsyosTAAAAAElFTkSuQmCC",
"id": 559,
"print_ticket": "https://empresa1.demo3pro6.ibu.pe/print/document/0128f958-b41b-4d21-ae91-6a7a7e2cecc1/ticket"
},
"links": {
"xml": "https://empresa1.demo3pro6.ibu.pe/downloads/document/xml/0128f958-b41b-4d21-ae91-6a7a7e2cecc1",
"pdf": "https://empresa1.demo3pro6.ibu.pe/downloads/document/pdf/0128f958-b41b-4d21-ae91-6a7a7e2cecc1",
"cdr": "https://empresa1.demo3pro6.ibu.pe/downloads/document/cdr/0128f958-b41b-4d21-ae91-6a7a7e2cecc1"
},
"response": {
"code": "0",
"description": "La Nota de Debito numero FD01-1, ha sido aceptada",
"notes": [
"4094 - La dirección completa y detallada del domicilio fiscal del emisor no cumple con el formato establecido - INFO: 4094 (nodo: \"cac:AddressLine/cbc:Line\" valor: \"-\")"
]
}
}
- Schema
- Example (from schema)
Schema
successboolean
Example:
true
data
object
numberstring
Example:
FD01-1
filenamestring
Example:
11111111111-08-FD01-1
external_idstring
Example:
0128f958-b41b-4d21-ae91-6a7a7e2cecc1
state_type_idstring
Example:
05
state_type_descriptionstring
Example:
Aceptado
number_to_letterstring
Example:
Ciento dieciocho con 00/100
hashstring
Example:
zadRmfbphEVuiZqm69dR2VyCHSc=
qrstring
Example:
iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAIAAACzY+a1AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4AQCbgGR/Af///wAAAMPNxEJsyosTAAAAAElFTkSuQmCC
idinteger
Example:
559
print_ticketstring
Example:
https://empresa1.demo3pro6.ibu.pe/print/document/0128f958-b41b-4d21-ae91-6a7a7e2cecc1/ticket
links
object
xmlstring
Example:
https://empresa1.demo3pro6.ibu.pe/downloads/document/xml/0128f958-b41b-4d21-ae91-6a7a7e2cecc1
pdfstring
Example:
https://empresa1.demo3pro6.ibu.pe/downloads/document/pdf/0128f958-b41b-4d21-ae91-6a7a7e2cecc1
cdrstring
Example:
https://empresa1.demo3pro6.ibu.pe/downloads/document/cdr/0128f958-b41b-4d21-ae91-6a7a7e2cecc1
response
object
codestring
Example:
0
descriptionstring
Example:
La Nota de Debito numero FD01-1, ha sido aceptada
notesundefined[]
<root>
<success>true</success>
<data>
<number>FD01-1</number>
<filename>11111111111-08-FD01-1</filename>
<external_id>0128f958-b41b-4d21-ae91-6a7a7e2cecc1</external_id>
<state_type_id>05</state_type_id>
<state_type_description>Aceptado</state_type_description>
<number_to_letter>Ciento dieciocho con 00/100</number_to_letter>
<hash>zadRmfbphEVuiZqm69dR2VyCHSc=</hash>
<qr>iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAIAAACzY+a1AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4AQCbgGR/Af///wAAAMPNxEJsyosTAAAAAElFTkSuQmCC</qr>
<id>559</id>
<print_ticket>https://empresa1.demo3pro6.ibu.pe/print/document/0128f958-b41b-4d21-ae91-6a7a7e2cecc1/ticket</print_ticket>
</data>
<links>
<xml>https://empresa1.demo3pro6.ibu.pe/downloads/document/xml/0128f958-b41b-4d21-ae91-6a7a7e2cecc1</xml>
<pdf>https://empresa1.demo3pro6.ibu.pe/downloads/document/pdf/0128f958-b41b-4d21-ae91-6a7a7e2cecc1</pdf>
<cdr>https://empresa1.demo3pro6.ibu.pe/downloads/document/cdr/0128f958-b41b-4d21-ae91-6a7a7e2cecc1</cdr>
</links>
<response>
<code>0</code>
<description>La Nota de Debito numero FD01-1, ha sido aceptada</description>
<notes>4094 - La dirección completa y detallada del domicilio fiscal del emisor no cumple con el formato establecido - INFO: 4094 (nodo: "cac:AddressLine/cbc:Line" valor: "-")</notes>
</response>
</root>
Invalid input
Validation exception