Saltar al contenido principal
Version: Pro7

FACTURA GRAVADA EN DÓLARES

POST 

https://empresa1.demo3pro6.ibu.pe/api/documents

Ejemplo:

Request

Body

required

  1. JSON A ENVIAR
    serie_documentostringrequired
    Example: F001
    numero_documentostringrequired
    Example: #
    fecha_de_emisiondaterequired
    Example: 2018-10-09
    hora_de_emisiontimerequired
    Example: 10:11:11
    codigo_tipo_operacionstringrequired
    Example: 0101
    codigo_tipo_documentostringrequired
    Example: 01
    codigo_tipo_monedastringrequired
    Example: USD
    fecha_de_vencimientodaterequired
    Example: 2018-10-09
    numero_orden_de_comprastring
    Example: 0045467898

    datos_del_cliente_o_receptor

    object

    required

    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

    required

    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[]

    required

  • Array [

  • codigo_internostring
    Example: P0121
    descripcionstring
    Example: Inca Kola 250 ml
    codigo_producto_sunatstring
    Example:
    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

JSON RESPUESTA

Schema

    successboolean
    Example: true

    data

    object

    required

    numberstring
    Example: F001-29
    filenamestring
    Example: 20302019010-01-F001-29
    external_idstring
    Example: 2bb69425-77e0-4566-8150-08f7828ea189
    state_type_idstring
    Example: 05
    state_type_descriptionstring
    Example: Aceptado
    number_to_letterstring
    Example: Ciento dieciocho con 00/100
    hashstring
    Example: L4SMnLskkHwi02oy6a4tqcRMv0Y=
    qrstring
    Example: iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAIAAACzY+a1AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4AQCbgGR/Af///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALZZrzNrOjhXAAAAAElFTkSuQmCC
    idinteger
    Example: 324

    links

    object

    xmlstring
    Example: https://demo.pro5.fastura.app/downloads/document/xml/2bb69425-77e0-4566-8150-08f7828ea189
    pdfstring
    Example: https://demo.pro5.fastura.app/downloads/document/pdf/2bb69425-77e0-4566-8150-08f7828ea189
    cdrstring
    Example: https://demo.pro5.fastura.app/downloads/document/cdr/2bb69425-77e0-4566-8150-08f7828ea189

    response

    object

    codestring
    Example: 0
    descriptionstring
    Example: La Factura numero F001-29, ha sido aceptada
    notesstring[]
    Example: []

Authorization: oauth2

name: petstore_authtype: oauth2scopes: write:pets,read:petsflows: {
  "implicit": {
    "authorizationUrl": "https://empresa1.demo3pro6.ibu.pe",
    "scopes": {
      "write:pets": "modify pets in your account",
      "read:pets": "read your pets"
    }
  }
}
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://empresa1.demo3pro6.ibu.pe/api/documents");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"serie_documento\": \"F001\",\n \"numero_documento\": \"#\",\n \"fecha_de_emision\": \"2018-10-09\",\n \"hora_de_emision\": \"10:11:11\",\n \"codigo_tipo_operacion\": \"0101\",\n \"codigo_tipo_documento\": \"01\",\n \"codigo_tipo_moneda\": \"USD\",\n \"fecha_de_vencimiento\": \"2018-10-09\",\n \"numero_orden_de_compra\": \"0045467898\",\n \"datos_del_cliente_o_receptor\": {\n \"codigo_tipo_documento_identidad\": \"6\",\n \"numero_documento\": \"10414711225\",\n \"apellidos_y_nombres_o_razon_social\": \"EMPRESA XYZ S.A.\",\n \"codigo_pais\": \"PE\",\n \"ubigeo\": \"150101\",\n \"direccion\": \"Av. 2 de Mayo\",\n \"correo_electronico\": \"demo@gmail.com\",\n \"telefono\": \"427-1148\"\n },\n \"totales\": {\n \"total_exportacion\": 0,\n \"total_operaciones_gravadas\": 100,\n \"total_operaciones_inafectas\": 0,\n \"total_operaciones_exoneradas\": 0,\n \"total_operaciones_gratuitas\": 0,\n \"total_igv\": 18,\n \"total_impuestos\": 18,\n \"total_valor\": 100,\n \"total_venta\": 118\n },\n \"items\": [\n {\n \"codigo_interno\": \"P0121\",\n \"descripcion\": \"Inca Kola 250 ml\",\n \"codigo_producto_sunat\": \"\",\n \"unidad_de_medida\": \"NIU\",\n \"cantidad\": 2,\n \"valor_unitario\": 50,\n \"codigo_tipo_precio\": \"01\",\n \"precio_unitario\": 59,\n \"codigo_tipo_afectacion_igv\": \"10\",\n \"total_base_igv\": 100,\n \"porcentaje_igv\": 18,\n \"total_igv\": 18,\n \"total_impuestos\": 18,\n \"total_valor_item\": 100,\n \"total_item\": 118\n }\n ]\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://empresa1.demo3pro6.ibu.pe
Auth
Body required
{
  "serie_documento": "F001",
  "numero_documento": "#",
  "fecha_de_emision": "2018-10-09",
  "hora_de_emision": "10:11:11",
  "codigo_tipo_operacion": "0101",
  "codigo_tipo_documento": "01",
  "codigo_tipo_moneda": "USD",
  "fecha_de_vencimiento": "2018-10-09",
  "numero_orden_de_compra": "0045467898",
  "datos_del_cliente_o_receptor": {
    "codigo_tipo_documento_identidad": "6",
    "numero_documento": "10414711225",
    "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"
  },
  "totales": {
    "total_exportacion": 0,
    "total_operaciones_gravadas": 100,
    "total_operaciones_inafectas": 0,
    "total_operaciones_exoneradas": 0,
    "total_operaciones_gratuitas": 0,
    "total_igv": 18,
    "total_impuestos": 18,
    "total_valor": 100,
    "total_venta": 118
  },
  "items": [
    {
      "codigo_interno": "P0121",
      "descripcion": "Inca Kola 250 ml",
      "codigo_producto_sunat": "",
      "unidad_de_medida": "NIU",
      "cantidad": 2,
      "valor_unitario": 50,
      "codigo_tipo_precio": "01",
      "precio_unitario": 59,
      "codigo_tipo_afectacion_igv": "10",
      "total_base_igv": 100,
      "porcentaje_igv": 18,
      "total_igv": 18,
      "total_impuestos": 18,
      "total_valor_item": 100,
      "total_item": 118
    }
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!