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

# Protestar cobrança

este recurso abre um protesto em uma cobrança.

# 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}/protest": {
      "post": {
        "summary": "Protestar cobrança",
        "description": "este recurso abre um protesto em uma cobrança.",
        "operationId": "protest-charge",
        "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  \"data\": {\n    \"id\": \"0e683d5d-61ce-445b-928e-3cc3340c0eda\",\n    \"type\": \"charge\",\n    \"attributes\": {\n      \"createdAt\": \"2023-12-07T13:27:23.653-03:00\",\n      \"updatedAt\": \"2023-12-07T13:27:23.653-03:00\",\n      \"status\": \"pending\",\n      \"paymentMethod\": \"boleto\",\n      \"dueDate\": \"2023-12-10\",\n      \"value\": 50,\n      \"discount\": {\n        \"range\": \"2023-12-08\",\n        \"discountType\": \"percentage\",\n        \"discountValue\": 5\n      },\n      \"abatementValue\": 5.2,\n      \"interestType\": \"percentage\",\n      \"interestValue\": 2,\n      \"applicableFine\": 2,\n      \"payer\": {\n        \"data\": {\n          \"type\": \"payer\",\n          \"attributes\": {\n            \"name\": \"Han Solo\",\n            \"documentNumber\": \"12345679891\",\n            \"email\": \"han.solo@dunder-mifflin.paper\",\n            \"address\": {\n              \"street\": \"Rua Dr. Albuquerque Lins\",\n              \"number\": \"2222\",\n              \"complement\": \"Apt 222\",\n              \"zipCode\": \"01230-000\",\n              \"neighborhood\": \"Santa Cecília\",\n              \"city\": \"São Paulo\",\n              \"state\": \"SP\"\n            },\n            \"phone\": {\n              \"countryCode\": \"55\",\n              \"areaCode\": \"51\",\n              \"number\": \"995562211\"\n            }\n          }\n        }\n      },\n      \"grantor\": {\n        \"data\": {\n          \"type\": \"grantor\",\n          \"attributes\": {\n            \"name\": \"Harrison Ford\",\n            \"documentNumber\": \"88650081000116\",\n            \"address\": {\n              \"street\": \"Avenida Vinte de Setembro\",\n              \"number\": \"456\",\n              \"complement\": \"Apto 987\",\n              \"zipCode\": \"93819-300\",\n              \"neighborhood\": \"São Jacó\",\n              \"city\": \"Sapiranga\",\n              \"state\": \"RS\"\n            }\n          }\n        }\n      },\n      \"fees\": {\n        \"data\": []\n      },\n      \"boleto\": {\n        \"data\": {\n          \"id\": \"a55b20c8-7896-44a2-8b42-53137cd09208\",\n          \"type\": \"boleto\",\n          \"attributes\": {\n            \"ourNumber\": \"00000004321\",\n            \"ourNumberDv\": 8,\n            \"barCode\": null,\n            \"emv\": null,\n            \"image\": null,\n            \"quickPdfUrl\": null,\n            \"lineCode\": null,\n            \"registrationStatus\": null,\n            \"pdf\": \"https://pagamentos.grafeno.be/charges/0e683d5d-61ce-445b-928e-3cc3340c0eda/download_boleto\",\n            \"yourNumber\": \"11119998\",\n            \"registrationMethod\": \"online\",\n            \"messagingRuleId\": \"589f899a-9650-45ce-aeda-937f49c27156\",\n            \"observation\": \"Sr(a) caixa, não receber o boleto após o vencimento\"\n          }\n        }\n      },\n      \"payments\": {\n        \"data\": []\n      },\n      \"clientControlNumber\": \"7543649847645556555553425\",\n      \"origin\": \"api\",\n      \"receiptNumber\": \"51080701212344000127550010000000981364117781\",\n      \"expiresAfter\": 90,\n      \"titleType\": \"monthly_tuition\"\n    }\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "0e683d5d-61ce-445b-928e-3cc3340c0eda"
                        },
                        "type": {
                          "type": "string",
                          "example": "charge"
                        },
                        "attributes": {
                          "type": "object",
                          "properties": {
                            "createdAt": {
                              "type": "string",
                              "example": "2023-12-07T13:27:23.653-03:00"
                            },
                            "updatedAt": {
                              "type": "string",
                              "example": "2023-12-07T13:27:23.653-03:00"
                            },
                            "status": {
                              "type": "string",
                              "example": "pending"
                            },
                            "paymentMethod": {
                              "type": "string",
                              "example": "boleto"
                            },
                            "dueDate": {
                              "type": "string",
                              "example": "2023-12-10"
                            },
                            "value": {
                              "type": "integer",
                              "example": 50,
                              "default": 0
                            },
                            "discount": {
                              "type": "object",
                              "properties": {
                                "range": {
                                  "type": "string",
                                  "example": "2023-12-08"
                                },
                                "discountType": {
                                  "type": "string",
                                  "example": "percentage"
                                },
                                "discountValue": {
                                  "type": "integer",
                                  "example": 5,
                                  "default": 0
                                }
                              }
                            },
                            "abatementValue": {
                              "type": "number",
                              "example": 5.2,
                              "default": 0
                            },
                            "interestType": {
                              "type": "string",
                              "example": "percentage"
                            },
                            "interestValue": {
                              "type": "integer",
                              "example": 2,
                              "default": 0
                            },
                            "applicableFine": {
                              "type": "integer",
                              "example": 2,
                              "default": 0
                            },
                            "payer": {
                              "type": "object",
                              "properties": {
                                "data": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "example": "payer"
                                    },
                                    "attributes": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "example": "Han Solo"
                                        },
                                        "documentNumber": {
                                          "type": "string",
                                          "example": "12345679891"
                                        },
                                        "email": {
                                          "type": "string",
                                          "example": "han.solo@dunder-mifflin.paper"
                                        },
                                        "address": {
                                          "type": "object",
                                          "properties": {
                                            "street": {
                                              "type": "string",
                                              "example": "Rua Dr. Albuquerque Lins"
                                            },
                                            "number": {
                                              "type": "string",
                                              "example": "2222"
                                            },
                                            "complement": {
                                              "type": "string",
                                              "example": "Apt 222"
                                            },
                                            "zipCode": {
                                              "type": "string",
                                              "example": "01230-000"
                                            },
                                            "neighborhood": {
                                              "type": "string",
                                              "example": "Santa Cecília"
                                            },
                                            "city": {
                                              "type": "string",
                                              "example": "São Paulo"
                                            },
                                            "state": {
                                              "type": "string",
                                              "example": "SP"
                                            }
                                          }
                                        },
                                        "phone": {
                                          "type": "object",
                                          "properties": {
                                            "countryCode": {
                                              "type": "string",
                                              "example": "55"
                                            },
                                            "areaCode": {
                                              "type": "string",
                                              "example": "51"
                                            },
                                            "number": {
                                              "type": "string",
                                              "example": "995562211"
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "grantor": {
                              "type": "object",
                              "properties": {
                                "data": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "example": "grantor"
                                    },
                                    "attributes": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "example": "Harrison Ford"
                                        },
                                        "documentNumber": {
                                          "type": "string",
                                          "example": "88650081000116"
                                        },
                                        "address": {
                                          "type": "object",
                                          "properties": {
                                            "street": {
                                              "type": "string",
                                              "example": "Avenida Vinte de Setembro"
                                            },
                                            "number": {
                                              "type": "string",
                                              "example": "456"
                                            },
                                            "complement": {
                                              "type": "string",
                                              "example": "Apto 987"
                                            },
                                            "zipCode": {
                                              "type": "string",
                                              "example": "93819-300"
                                            },
                                            "neighborhood": {
                                              "type": "string",
                                              "example": "São Jacó"
                                            },
                                            "city": {
                                              "type": "string",
                                              "example": "Sapiranga"
                                            },
                                            "state": {
                                              "type": "string",
                                              "example": "RS"
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "fees": {
                              "type": "object",
                              "properties": {
                                "data": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {}
                                  }
                                }
                              }
                            },
                            "boleto": {
                              "type": "object",
                              "properties": {
                                "data": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "example": "a55b20c8-7896-44a2-8b42-53137cd09208"
                                    },
                                    "type": {
                                      "type": "string",
                                      "example": "boleto"
                                    },
                                    "attributes": {
                                      "type": "object",
                                      "properties": {
                                        "ourNumber": {
                                          "type": "string",
                                          "example": "00000004321"
                                        },
                                        "ourNumberDv": {
                                          "type": "integer",
                                          "example": 8,
                                          "default": 0
                                        },
                                        "barCode": {},
                                        "emv": {},
                                        "image": {},
                                        "quickPdfUrl": {},
                                        "lineCode": {},
                                        "registrationStatus": {},
                                        "pdf": {
                                          "type": "string",
                                          "example": "https://pagamentos.grafeno.be/charges/0e683d5d-61ce-445b-928e-3cc3340c0eda/download_boleto"
                                        },
                                        "yourNumber": {
                                          "type": "string",
                                          "example": "11119998"
                                        },
                                        "registrationMethod": {
                                          "type": "string",
                                          "example": "online"
                                        },
                                        "messagingRuleId": {
                                          "type": "string",
                                          "example": "589f899a-9650-45ce-aeda-937f49c27156"
                                        },
                                        "observation": {
                                          "type": "string",
                                          "example": "Sr(a) caixa, não receber o boleto após o vencimento"
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "payments": {
                              "type": "object",
                              "properties": {
                                "data": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {}
                                  }
                                }
                              }
                            },
                            "clientControlNumber": {
                              "type": "string",
                              "example": "7543649847645556555553425"
                            },
                            "origin": {
                              "type": "string",
                              "example": "api"
                            },
                            "receiptNumber": {
                              "type": "string",
                              "example": "51080701212344000127550010000000981364117781"
                            },
                            "expiresAfter": {
                              "type": "integer",
                              "example": 90,
                              "default": 0
                            },
                            "titleType": {
                              "type": "string",
                              "example": "monthly_tuition"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"success\": false,\n    \"message\": \"Número de conta inválido.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Número de conta inválido."
                    }
                  }
                }
              }
            }
          },
          "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": {}
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": 422,\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\": \"Instrução de protesto já solicitada.\"\n    }\n  ],\n  \"traceId\": \"1f9454844df5a12d012096490dbf0eed\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 422,
                      "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": "Instrução de protesto já solicitada."
                          }
                        }
                      }
                    },
                    "traceId": {
                      "type": "string",
                      "example": "1f9454844df5a12d012096490dbf0eed"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "64d50ab7b21b9e0063a215f9:64d50956330b890025bfa9aa"
}
```