MED Details Endpoint

This endpoint allows listing PIX MED cases for a specific company using cursor-based pagination. It provides filtering capabilities by date range, status, reason, and infraction report status.

Headers

ParameterTypeDescriptionExample
AuthorizationStringBearer + Access_tokenBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzEzMzAwOTMxLCJpYXQiOjE3MTMyOTczMzEsImp0aSI6Ijc2ZWI4ZTE5ZjM4YjQ4NmZiODdmNzNjNTdkMWVmNDJhIiwidXNlcl9pZCI6MjQ2fQ.5zekMa7CUj9p-MvNHns5ke4ZPhYV3Y1CLOsYL7hDUUo

URL Parameters

ParameterTypeDescription
med_idstringRequired. Unique identifier of the MED to retrieve
{
  "pix_med_id": "med-123-abc-def",
  "e2e": "E1234567820240115143000123",
  "amount": 1000.50,
  "transaction_date": "2024-01-15T14:30:00",
  "reason": "RETURN_REQUEST",
  "status": "WAITING",
  "infraction_report_id": "report-456",
  "infraction_report_status": "OPEN",
  "origin_situation_type": "SCAM_FRAUD",
  "details": "Detailed description of the dispute",
  "payer_name": "João Silva",
  "payer_document": "12345678901",
  "debited": {
    "ispb": "12345678",
    "bank": "Banco Example",
    "agency": "1234",
    "account": "567890",
    "document": "12345678901",
    "name": "João Silva"
  },
  "credited": {
    "ispb": "35535240",
    "bank": "Bank",
    "agency": "0001",
    "account": "123456",
    "document": "98765432000123",
    "name": "Digital"
  },
  "qrcode_details": {
    "qr_code_id": 123,
    "tx_id": "tx-456",
    "pix_type": "DYNAMIC",
    "status": "PAID",
    "key": "[email protected]",
    "expiration_date": "2024-01-15T23:59:59",
    "due_date": "2024-01-15T23:59:59",
    "copy_and_paste": "00020126580014...",
    "payment_date": "2024-01-15T14:30:00",
    "created_at": "2024-01-15T10:00:00"
  },
  "analysis": {
    "analysis_result": "ACCEPTED",
    "analysis_details_user": "User analysis details",
    "analysis_details_psp": "PSP analysis details",
    "internal_notes": null,
    "user_analyzed_by": "Ana Costa",
    "psp_analyzed_by": "Carlos Silva"
  },
  "chargebacks": [
    {
      "status": "SUCCESS",
      "info_text": "Chargeback successful",
      "error_descriptor": null,
      "amount": 1000.50,
      "created_at": "2024-01-16T10:00:00",
      "updated_at": "2024-01-16T10:30:00"
    }
  ],
  "created_at": "2024-01-15T14:30:00",
  "updated_at": "2024-01-16T10:30:00"
}

Additional Detail Fields

Account Information (debited/credited)

FieldTypeDescription
ispbstringBank's ISPB code
bankstringBank name
agencystringBank agency code
accountstringAccount number
documentstringAccount holder document
namestringAccount holder name

QR Code Details (qrcode_details)

FieldTypeDescription
qr_code_idintegerQR Code unique identifier
tx_idstringTransaction ID
pix_typeenumType: STATIC or DYNAMIC
statusenumQR Code status
keystringPIX key used
expiration_datedatetimeQR Code expiration
due_datedatetimePayment due date
copy_and_pastestringQR Code string for copy/paste
payment_datedatetimeWhen payment was made
created_atdatetimeQR Code creation date

Analysis Information (analysis)

FieldTypeDescription
analysis_resultenumAnalysis result: ACCEPTED or REJECTED
analysis_details_userstringUser analysis details
analysis_details_pspstringPSP analysis details
internal_notesstringInternal notes (currently not used)
user_analyzed_bystringName of user who analyzed
psp_analyzed_bystringName of PSP analyst

Chargeback History (chargebacks)

FieldTypeDescription
statusenumChargeback status: PENDING, SUCCESS, REJECTED
info_textstringAdditional information
error_descriptorstringError description if failed
amountdecimalChargeback amount
created_atdatetimeChargeback creation date
updated_atdatetimeLast update date

Usage Examples

  1. List All MEDs (First Page)
    GET /v3/meds/?limit=10
  2. Filter MEDs by Date Range
    GET /v3/meds/?filter_start_date=2024-01-01&filter_end_date=2024-01-31&limit=20
  3. Filter by Status and Reason
    GET /v3/meds/?status=WAITING&reason=RETURN_REQUEST&limit=15
  4. Navigate to Next Page
    GET /v3/meds/?limit=10&id=med-123-abc&dt=2024-01-15T14:30:00&direction=next
  5. Navigate to Previous Page
    GET /v3/meds/?limit=10&id=med-456-def&dt=2024-01-14T10:00:00&direction=previous
  6. Get MED Details
    GET /v3/meds/med-123-abc-def
  7. Complex Filter Example
    GET /v3/meds/?filter_start_date=2024-01-01&filter_end_date=2024-01-31&status=WAITING&infraction_report_status=OPEN&limit=25

Cursor Pagination

How It Works

The API uses cursor-based pagination, which is more efficient and consistent than offset-based pagination, especially for large datasets that may change during navigation.

Navigation Process

  1. First Request: Don't include id, dt, or direction parameters
  2. Next Page: Use the URL provided in the next field
  3. Previous Page: Use the URL provided in the previous field

Cursor Parameters

  • id: The MED ID of the cursor position
  • dt: The datetime of the cursor position (ISO 8601 format)
  • direction: Either next or previous
    Ordering
    Results are ordered by infraction_report_creation_datetime in descending order (most recent first), with id as a secondary sort for consistency.

Ordering

Results are ordered by infraction_report_creation_datetime in descending order (most recent first), with id as a secondary sort for consistency.

Language
Click Try It! to start a request and see the response here!