{
  "opencollection": "1.0.0",
  "info": {
    "name": "MVMNT Bill Payments Documents API",
    "version": "1.0.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Documents",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Filter documents",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.mvmnt.io/v1/documents/filter",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Search for documents using filter criteria.\n\n## Usage\n\nDocuments are typically associated with other entities (orders, loads, services).\nUse filters to find documents by type, status, or date range.\n\n## Example Filters\n\n- Find all invoices: `{ \"filter\": { \"type\": { \"equalTo\": \"INVOICE\" } } }`\n- Find uploaded documents: `{ \"filter\": { \"status\": { \"equalTo\": \"UPLOADED\" } } }`\n- Find documents created today: `{ \"filter\": { \"createdAt\": { \"greaterThanOrEqualTo\": \"2025-01-15T00:00:00Z\" } } }`\n"
        },
        {
          "info": {
            "name": "Create a document",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.mvmnt.io/v1/documents",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a new document record and receive a pre-signed URL for uploading the file.\n\n## Workflow\n\n1. Call this endpoint with document metadata (type, fileName, contentType)\n2. Receive the created document with an `uploadUrl`\n3. Upload the file directly to S3 using the `uploadUrl` (PUT request)\n4. Document status changes from `PENDING_UPLOAD` to `UPLOADED` automatically\n\n## Upload Instructions\n\nThe `uploadUrl` is a pre-signed S3 URL. Upload your file with:\n\n```bash\ncurl -X PUT -H \"Content-Type: app"
        },
        {
          "info": {
            "name": "Get a document",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.mvmnt.io/v1/documents/:id",
            "params": [
              {
                "name": "id",
                "value": "550e8400-e29b-41d4-a716-446655440000",
                "type": "path",
                "description": "Resource ID (UUID) or client key"
              },
              {
                "name": "by",
                "value": "key",
                "type": "query",
                "description": "Specify lookup type for faster retrieval.\nIf omitted, defaults to looking up by ID first, then falls back to client key if not found.\nUse `by=key` when you know you're providing a client key for best performance.\n"
              }
            ]
          },
          "docs": "Retrieve a document by ID or key.\n\nReturns the document metadata including a fresh `downloadUrl` if the file is uploaded.\n\n**Note:** The `downloadUrl` is a pre-signed S3 URL that expires after 1 hour.\nEach GET request generates a fresh URL.\n"
        },
        {
          "info": {
            "name": "Update a document",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.mvmnt.io/v1/documents/:id",
            "params": [
              {
                "name": "id",
                "value": "550e8400-e29b-41d4-a716-446655440000",
                "type": "path",
                "description": "Resource ID (UUID) or client key"
              },
              {
                "name": "by",
                "value": "key",
                "type": "query",
                "description": "Specify lookup type for faster retrieval.\nIf omitted, defaults to looking up by ID first, then falls back to client key if not found.\nUse `by=key` when you know you're providing a client key for best performance.\n"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update document metadata.\n\n**Note:** File content cannot be changed after upload.\nTo replace a file, create a new document.\n"
        },
        {
          "info": {
            "name": "Delete a document",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.mvmnt.io/v1/documents/:id",
            "params": [
              {
                "name": "id",
                "value": "550e8400-e29b-41d4-a716-446655440000",
                "type": "path",
                "description": "Resource ID (UUID) or client key"
              },
              {
                "name": "by",
                "value": "key",
                "type": "query",
                "description": "Specify lookup type for faster retrieval.\nIf omitted, defaults to looking up by ID first, then falls back to client key if not found.\nUse `by=key` when you know you're providing a client key for best performance.\n"
              }
            ]
          },
          "docs": "Soft delete a document.\n\nThe document record is marked as deleted but not permanently removed.\nAssociated files in S3 may be cleaned up asynchronously.\n"
        }
      ]
    }
  ],
  "bundled": true
}