---
agentTools:
  projectIndex: https://docs.grafeno.digital/llms.txt
---

# Cancelar protesto de cobrança

Este recurso efetua o cancelamento de um protesto.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "API V2 Grafeno",
    "version": "3.0.0"
  },
  "servers": [
    {
      "url": "https://pagamentos.grafeno.be/api/v2"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "Account-Number",
        "in": "header"
      },
      "sec1": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-bearer-format": ""
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/charges/{charge_uuid}/cancel_protest": {
      "patch": {
        "summary": "Cancelar protesto de cobrança",
        "description": "Este recurso efetua o cancelamento de um protesto.",
        "operationId": "cancel-charge-protest",
        "parameters": [
          {
            "name": "charge_uuid",
            "in": "path",
            "description": "uuid da cobrança.",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"uuid\": \"426bd953-c717-4616-87da-e7e5af6e5e21\",\n  \"charge_uuid\": \"e4edeb32-f70e-4067-ac46-3735aadc34a0\",\n  \"number\": \"11119999\",\n  \"type_protest\": \"C\",\n  \"human_state\": \"Protesto Desistido\",\n  \"square_ibge\": \"3550308\",\n  \"status_certdox\": \"DESISTIDO\",\n  \"grafeno_state_cd\": \"desisted\",\n  \"debt_identification\": null,\n  \"debt_type\": null,\n  \"email_status\": null,\n  \"deadline_to_desist\": null,\n  \"created_at\": \"2024-09-09T15:00:26.958-03:00\",\n  \"canceled_at\": \"2024-09-09T15:01:12.599-03:00\",\n  \"deleted_at\": null,\n  \"updated_at\": \"2024-09-09T15:01:12.601-03:00\",\n  \"batch_id\": null,\n  \"certdox_errors\": null,\n  \"value\": \"900.09\",\n  \"name\": \"Jose do Protesto\",\n  \"document_number\": \"38227157351\",\n  \"account_number_with_dv\": \"08124695-1\",\n  \"email_config_kind\": \"Manual\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "example": "426bd953-c717-4616-87da-e7e5af6e5e21"
                    },
                    "charge_uuid": {
                      "type": "string",
                      "example": "e4edeb32-f70e-4067-ac46-3735aadc34a0"
                    },
                    "number": {
                      "type": "string",
                      "example": "11119999"
                    },
                    "type_protest": {
                      "type": "string",
                      "example": "C"
                    },
                    "human_state": {
                      "type": "string",
                      "example": "Protesto Desistido"
                    },
                    "square_ibge": {
                      "type": "string",
                      "example": "3550308"
                    },
                    "status_certdox": {
                      "type": "string",
                      "example": "DESISTIDO"
                    },
                    "grafeno_state_cd": {
                      "type": "string",
                      "example": "desisted"
                    },
                    "debt_identification": {},
                    "debt_type": {},
                    "email_status": {},
                    "deadline_to_desist": {},
                    "created_at": {
                      "type": "string",
                      "example": "2024-09-09T15:00:26.958-03:00"
                    },
                    "canceled_at": {
                      "type": "string",
                      "example": "2024-09-09T15:01:12.599-03:00"
                    },
                    "deleted_at": {},
                    "updated_at": {
                      "type": "string",
                      "example": "2024-09-09T15:01:12.601-03:00"
                    },
                    "batch_id": {},
                    "certdox_errors": {},
                    "value": {
                      "type": "string",
                      "example": "900.09"
                    },
                    "name": {
                      "type": "string",
                      "example": "Jose do Protesto"
                    },
                    "document_number": {
                      "type": "string",
                      "example": "38227157351"
                    },
                    "account_number_with_dv": {
                      "type": "string",
                      "example": "08124695-1"
                    },
                    "email_config_kind": {
                      "type": "string",
                      "example": "Manual"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": 400,\n  \"title\": \"Erro de validação\",\n  \"message\": \"Aconteceram erros de validação ao tentar salvar o registro\",\n  \"errors\": [\n    {\n      \"field\": \"message\",\n      \"message\": \"Não é possível cancelar/desistir no status: Protesto Desistido.\"\n    }\n  ],\n  \"traceId\": \"c19e614a60af6379b976d41a8d2fc9c7\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 400,
                      "default": 0
                    },
                    "title": {
                      "type": "string",
                      "example": "Erro de validação"
                    },
                    "message": {
                      "type": "string",
                      "example": "Aconteceram erros de validação ao tentar salvar o registro"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string",
                            "example": "message"
                          },
                          "message": {
                            "type": "string",
                            "example": "Não é possível cancelar/desistir no status: Protesto Desistido."
                          }
                        }
                      }
                    },
                    "traceId": {
                      "type": "string",
                      "example": "c19e614a60af6379b976d41a8d2fc9c7"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"errors\": [\n    \"Você precisa entrar ou registrar-se antes de continuar.\"\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "Você precisa entrar ou registrar-se antes de continuar."
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": 403,\n  \"message\": \"Número de conta inválido.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 403,
                      "default": 0
                    },
                    "message": {
                      "type": "string",
                      "example": "Número de conta inválido."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "null"
                  }
                },
                "schema": {}
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "64d50ab7b21b9e0063a215f9:64d50956330b890025bfa9ab"
}
```