{
  "info": {
    "_postman_id": "apeiron-documents___reports",
    "name": "Apeiron API - Documents & Reports",
    "description": "Document management (upload/list/delete) and CDR (Call Detail Record) reporting.\n\nCollection Version: 1.0.0\nBase URL: https://api.apeiron.io/v2\nAuth: HTTP Basic (email + API token) or JWT Bearer token\nAPI Reference: https://api.apeiron.io/v2/",
    "version": "1.0.0",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "basic",
    "basic": [
      {
        "key": "username",
        "value": "{{username}}",
        "type": "string"
      },
      {
        "key": "password",
        "value": "{{api_token}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.apeiron.io",
      "type": "string"
    },
    {
      "key": "username",
      "value": "",
      "type": "string"
    },
    {
      "key": "api_token",
      "value": "",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "CDR",
      "description": "CDR endpoints",
      "item": [
        {
          "name": "Get CDR summary report",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/reports/cdr/{customer_number}/{year}-{month}-{day}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "reports",
                "cdr",
                "{customer_number}",
                "{year}-{month}-{day}"
              ]
            },
            "description": "Get CDR summary report for a particular day.  The date for this report must be within 31 days."
          }
        },
        {
          "name": "List CDR detailed report",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/reports/cdr/{customer_number}/{year}-{month}-{day}/source",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "reports",
                "cdr",
                "{customer_number}",
                "{year}-{month}-{day}",
                "source"
              ]
            },
            "description": "List CDR reports by hostname for a particular day.  The date for these reports must be within 31 days."
          }
        }
      ]
    },
    {
      "name": "Documents",
      "description": "Documents endpoints",
      "item": [
        {
          "name": "List uploaded documents",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/documents/{customer_number}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "documents",
                "{customer_number}"
              ]
            },
            "description": "List uploaded documents"
          }
        },
        {
          "name": "Upload file",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/documents/{customer_number}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "documents",
                "{customer_number}"
              ]
            },
            "description": "Upload image or voice recording",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "document",
                  "description": "Audio or text file encoded in url safe base64.  Maximum file size is 150MB",
                  "type": "text",
                  "value": ""
                },
                {
                  "key": "file_name",
                  "description": "File name",
                  "type": "text",
                  "value": ""
                },
                {
                  "key": "document_type",
                  "description": "The type of file being uploaded",
                  "type": "text",
                  "value": ""
                },
                {
                  "key": "label",
                  "description": "Label describing the file",
                  "type": "text",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Delete file",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/documents/{document_id}/delete",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "documents",
                "{document_id}",
                "delete"
              ]
            },
            "description": "Delete file"
          }
        }
      ]
    }
  ]
}