> For the complete documentation index, see [llms.txt](https://guia.fenicio.help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guia.fenicio.help/developers/integracion-de-comercios/servicios/permiso-para-cancelacion.md).

# Permiso para cancelación

Este servicio permite a Fenicio consultar si una orden puede ser cancelada.

<table data-full-width="false"><thead><tr><th width="111">Método</th><th>URL</th></tr></thead><tbody><tr><td><code>GET</code></td><td><code>https://{ApiURL}/permitecancelar</code></td></tr></tbody></table>

## Request

El *request* de Fenicio será un objeto [**Orden**](https://guia.fenicio.help/developers/referencia/modelos-de-datos/integraciones.md#orden).

### Ejemplo <a href="#ejemplo" id="ejemplo"></a>

```json
{
  "_idSolicitud": "200325120000-FNSHPUY-3c7621ed5a707177c1421cce79338668",
  "idOrden": "1235",
  "idOrdenOrigen": "6789",
  "referencia": null,
  "estado": "APROBADA",
  "motivoCancelacion": null,
  "origen": "MERCADOLIBRE",
  "fechaInicio": "2019-12-01T11:00:00-0300",
  "fechaAbandono": "2019-12-01T11:30:00-0300",
  "fechaRecuperada": "2019-12-01T11:55:00-0300",
  "fechaFin": "2019-12-01T12:01:00-0300",
  "fechaCancelada": null,
  "comprador": {
    "id": 123,
    "codigo": "doc1234567",
    "email": "mail@dominio.com",
    "nombre": "Juan",
    "apellido": "Pérez",
    "telefono": "+59899123456",
    "genero": "M",
    "documento": {
      "numero": "41234568",
      "pais": "UY",
      "tipo": "DOCUMENTO_IDENTIDAD"
    },
    "extras": {
      "programaMillas": "LATAM"
    }
  },
  "direccionFacturacion": {
    "latitud": 14.22545121542,
    "longitud": -50.32655885488,
    "pais": "Uruguay",
    "estado": "Montevideo",
    "localidad": "Montevideo",
    "calle": "Obligado",
    "numeroPuerta": "1316",
    "numeroApto": null,
    "codigoPostal": "11300",
    "observaciones": null
  },
  "codigoTributario": null,
  "razonSocial": null,
  "moneda": "UYU",
  "pago": {
    "id": 2000,
    "idExterno": "52bf5321eadb4603b3f01502db7c7f62",
    "codigo": "VISA",
    "conector": "ALIGNET",
    "estado": "APROBADO",
    "fechaVencimiento": null,
    "fechaPago": "2019-12-01T12:01:00-0300",
    "fechaCancelacion": null,
    "cuotas": 1,
    "importe": 750,
    "moneda": "UYU",
    "bin": "5469015",
    "autorizacion": "00054890564XC",
    "numeroTarjeta": "411111******1111",
    "terminacionTarjeta": "1234"
  },
  "entrega": {
    "tipo": "RETIRO",
    "estado": "PREPARANDO",
    "horario": {
      "desde": "2019-12-27T10:00:00-0300",
      "hasta": "2019-12-27T18:00:00-0300"
    },
    "destinatario": "Juan Lopez",
    "direccionEnvio": null,
    "local": "ABCD",
    "servicioEntrega": null
  },
  "lineas": [
    {
      "nombre": "Remera Slim Fit",
      "sku": "0000123",
      "cantidad": 2,
      "cantidadRegalo": 0,
      "codigoPrecio": "1",
      "precio": 500,
      "descuentos": [
        {
          "nombre": "Cupon Fin de año",
          "codigo": "123",
          "origen": "CUPON",
          "monto": 250
        }
      ],
      "atributos": {
        "categoria": "vestimenta/camperas",
        "composicion": "100% Algodón",
        "genero": "F",
        "descripcion": "Campera de denim clásica, con cortes y bolsillos en el frente.",
        "nuevo": "si"
      }
    },
    {
      "nombre": "Nombre de articulo",
      "sku": "0000124",
      "cantidad": 1,
      "cantidadRegalo": 1,
      "codigoPrecio": "1",
      "precio": 500,
      "descuentos": [
        {
          "nombre": "50% OFF Fin de año",
          "codigo": "145",
          "origen": "PRODUCTO",
          "monto": 250
        }
      ],
      "atributos": {
        "categoria": "otra/categoria",
        "color": "rojo"
      }
    },
    {
      "nombre": "Costo envío",
      "sku": "ENVIO_100",
      "cantidad": 1,
      "cantidadRegalo": 0,
      "codigoPrecio": "1",
      "precio": 100,
      "descuentos": [
        {
          "nombre": "Envío gratis",
          "codigo": "145",
          "origen": "CUPON",
          "monto": 100
        }
      ],
      "atributos": null
    }
  ],
  "impuestos": 135.22,
  "importeTotal": 750,
  "observaciones": null,
  "historialCallCenter": [
    {
      "evento": "CREAR",
      "fecha": "2019-12-01T10:32:00-0300",
      "operador": {
        "nombre": "Lorena",
        "apellido": "Gómez",
        "email": "lgomez@dominio.com"
      }
    }
  ]
}
```

## Response

<table data-full-width="false"><thead><tr><th width="201.33333333333331">Clave</th><th width="104">Tipo</th><th>Descripción</th></tr></thead><tbody><tr><td><strong><code>permiteCancelar</code></strong></td><td>Boolean</td><td>Indica si la orden puede ser cancelada.</td></tr><tr><td><strong><code>motivoRechazo</code></strong></td><td>String</td><td>Permite especificar el motivo por el cual se rechaza la cancelación de la orden.</td></tr></tbody></table>

### Ejemplo

```json
{
  "status": "OK",
  "mensaje": null,
  "_idSolicitud": "200325120000-FNSHPUY-3c7621ed5a707177c1421cce79338668",
  "data": {
    "permiteCancelar": false,
    "motivoRechazo": "La orden ya fue despachada."
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://guia.fenicio.help/developers/integracion-de-comercios/servicios/permiso-para-cancelacion.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
