{
  "opencollection": "1.0.0",
  "info": {
    "name": "PlanRadar's API Documentation Approval Requests V2 Documents API",
    "version": "2.0"
  },
  "items": [
    {
      "info": {
        "name": "Documents",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Retrieves All Documents",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/:customer_id/projects/:project_id/documents/",
            "params": [
              {
                "name": "customer_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "project_id",
                "value": "",
                "type": "path",
                "description": "Authenticated user must be a member of this project"
              },
              {
                "name": "page",
                "value": "",
                "type": "query",
                "description": "default: 1"
              },
              {
                "name": "pagesize",
                "value": "",
                "type": "query",
                "description": "Maximum is 500, default is 100"
              },
              {
                "name": "last_sync_date",
                "value": "",
                "type": "query",
                "description": "Only retrieve documents that were created after a specific timestamp"
              },
              {
                "name": "sort",
                "value": "",
                "type": "query",
                "description": "Field name to sort the results based on it, sort is always ascending unless the field name is prefixed with a minus (U+002D HYPHEN-MINUS, “-“)  i.e. \"-id\" or \"id\""
              },
              {
                "name": "filter",
                "value": "",
                "type": "query",
                "description": "Filter documents based on specific field values, for example filter[component_id]=1, will only return documents created in the provided component_id"
              }
            ]
          },
          "docs": "Retrieve all documents in a specific project. Documents are returned with respect to the role of the authenticated user in the project.\n      <br />Without any extra parameters it will return the first 100 documents ordered by ID ascending. Extra parameters can be added to filter and sort the results.\n      <br /><b>Document Types Dictionary:</b>  [pdf = 1, excel = 2, word = 3, dwg = 4, dxf = 5]"
        },
        {
          "info": {
            "name": "Create New Document",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v1/:customer_id/projects/:project_id/documents/",
            "params": [
              {
                "name": "customer_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "project_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "API to upload new documents.<br /><br />  <b>Supported Types:</b>  [PDF, Excel, Word, DWG, DXF]<br />\n        This API accepts both base64 and multipart data.<br />\n          <b>Base64 Uploads</b>\n          Set `is_base64` to `true`, add the base64 encoded document to the `document` field, add the uploaded file name to `filename`\n          <br /><b>Multipart Uploads</b>\n          Set `is_base64` to `false`, set the value of the `document` field to be the multipart data"
        },
        {
          "info": {
            "name": "Load one Document",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/:customer_id/projects/:project_id/documents/:document_uuid",
            "params": [
              {
                "name": "customer_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "project_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "document_uuid",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Load one Document"
        },
        {
          "info": {
            "name": "Update Document",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "{{baseUrl}}/api/v1/:customer_id/projects/:project_id/documents/:document_uuid",
            "params": [
              {
                "name": "customer_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "project_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "To rename the document, just send the title attribute, to update the whole document please check document creation API documentation."
        },
        {
          "info": {
            "name": "Delete one Document",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/api/v1/:customer_id/projects/:project_id/documents/:document_uuid",
            "params": [
              {
                "name": "customer_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "project_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "document_uuid",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Delete one Document"
        }
      ]
    }
  ],
  "bundled": true
}