Skip to main content

Submit Defense

Use this endpoint to register a defense for a specific MED by its id, with optional text and attachments.

Available Environments​

https://api.gateway.com.br/core

Endpoint​

  • Method: POST
  • Endpoint: /med/{id}/appeal
  • Authentication: Bearer token
  • Content-Type: multipart/form-data

Path Params​

NameTypeRequiredDescriptionValidations
idstring (UUID v4)YesMED identifierMust be a valid UUID v4

Body (multipart/form-data)​

NameTypeRequiredDescriptionValidations
messagestringNoDefense messageText field of the defense (AppealMedInput), between 2 and 1000 characters
filesfile[]NoEvidence filesSend multiple files under the same files field; allowed extensions: .jpg, .jpeg, .png, .pdf, .txt, .xls, .xlsx, .ico

Request Example (with every field)​

curl --request POST \
--url https://api.gateway.com.br/core/med/553e8400-e29b-41d4-a716-436251480000/appeal \
--header 'Authorization: Bearer your-jwt-token' \
--form 'message=Anexamos comprovante de entrega e autenticação da compra.' \
--form 'files=@C:/evidencias/comprovante-entrega.pdf' \
--form 'files=@C:/evidencias/print-rastreio.png'

Success Response​

CodeDescription
201 CreatedDefense registered successfully
ℹ️ Response body

This endpoint returns 201 and has no response payload.

Possible Errors​

CodeDescriptionSolution
400Invalid requestCheck the multipart/form-data format and the files field
401Invalid credentialsCheck your credentials
403No permission/authorizationContact support
404MED not foundCheck the id you sent
422Invalid or missing dataCheck the content of the defense and the files sent
500Internal errorContact support