Assign file

POST /api/v1/file

Set the unassigned files to belong to a documentable item and folder.

Headers

application/json

Body Required

  • folder string

    Parent folder UUID to store this file under.

  • files array[string] Required

    File UUIDs which are uploading, or has been uploaded but not yet been assigned to a model.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • uuid string

      UUID of the file

    • The timestamp of when the resource was created.

    • Timestamp of when the file was originally created.

    • The timestamp of when the resource was updated.

    • Timestamp of when the file was uploaded.

    • The last modified timestamp of the file metadata

    • status string

      Current status of the uploading progress

    • filename string

      The filename including extension

    • name string

      The name of the file without extension

    • The extension of the file

    • type string

      The MIME type of the file

    • size string

      The size of the file in bytes

    • parent string

      the parent object such as folder or message

    • firm object

      The firm which the file belongs to

    • account object

      The account that uploaded the file (if specified)

    • progress string

      The progress of the uploaded file as a percentage between 0 and 100

    • The download URL of the file

    • The name of the folder the file is located in.

    • tags array[object]

      The tags added to the file (if provided)

POST /api/v1/file
curl \
 -X POST https://api.plannrcrm.com/api/v1/file \
 -H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
 -H "Content-Type: application/json" \
 -H "Accept: application/json" \
 -d '{"folder":"8d88a243-f121-43d1-a1de-7243891c0e69","files":[null,null]}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json

# Payload
{
  "folder": "8d88a243-f121-43d1-a1de-7243891c0e69",
  "files": [
    null,
    null
  ]
}
Response examples (200)
{
  "firm": {
    "tax": 17.5,
    "logo": "https://api.plannrcrm.com/images/plannr.jpg",
    "name": "Codepotato",
    "slug": "codepotato",
    "uuid": "003d7bb4-d320-49fc-9b20-cac8439bb075",
    "county": "Hampshire",
    "billing": {
      "invoice_email": "gareth@codepotato.co.uk",
      "invoice_county": "Hampshire",
      "invoice_country": "United Kingdom",
      "invoice_postcode": "PO7 7YH",
      "invoice_address_1": "Suite E, 5 The Briars",
      "invoice_address_2": "Waterberry Drive",
      "invoice_town_city": "Waterlooville"
    },
    "country": "United Kingdom",
    "postcode": "PO7 7YH",
    "address_1": "Suite E, 5 The Briars",
    "address_2": "Waterberry Drive",
    "logo_icon": "https://api.plannrcrm.com/images/plannr-icon.jpg",
    "month_end": 25,
    "town_city": "Waterlooville",
    "created_at": "2024-10-16T11:10:15+01:00",
    "updated_at": "2024-10-16T11:10:15+01:00",
    "ip_whitelist": [
      "192.168.0.1",
      "127.0.0.1"
    ],
    "brand_colours": {
      "sidebar_text": "#ffffff",
      "sidebar_hover": "#0A0A42",
      "email_sub_text": "#ffffff",
      "sidebar_accent": "#36367E",
      "sidebar_active": "#53DBB8",
      "email_background": "#0E0E56",
      "email_button_text": "#ffffff",
      "sidebar_background": "#0E0E56",
      "sidebar_title_primary": "#FFC634",
      "email_button_background": "#36367E",
      "sidebar_title_secondary": "#ffffff",
      "sidebar_title_background": "#36367E",
      "email_logo_background_panel": "#36367E",
      "sidebar_title_secondary_hover": "#ffffff"
    },
    "is_subscribed": true,
    "regulatory_text": "Regulatory text",
    "addon_subscriptions": "App\\Http\\Resources\\Addons\\AddonSubscriptionResource",
    "statement_frequency": "monthly",
    "task_board_template": "App\\Http\\Resources\\Board\\BoardResource",
    "keep_deleted_files_for": 30,
    "welcome_paragraph_html": "<h1>Welcome.</h1>",
    "email_welcome_paragraph_html": "Welcome to Plannr!"
  },
  "name": "Welcome to Plannr",
  "size": "21691783",
  "tags": [
    {
      "name": "Mortgage",
      "slug": "mortgage",
      "uuid": "f89bfb35-55ce-4738-931e-2fcaa0be2fed",
      "colour": "#ef4582",
      "created_at": "2024-10-16T11:10:15+01:00",
      "updated_at": "2024-10-16T11:10:15+01:00"
    }
  ],
  "type": "type",
  "uuid": "4224a451-57e3-4df3-9104-74f2c23df4ee",
  "parent": "Object",
  "status": "uploaded",
  "account": {
    "firm": "App\\Http\\Resources\\FirmResource",
    "name": "Gareth Thompson",
    "role": "client",
    "tags": "App\\Http\\Resources\\TagResource",
    "type": "client",
    "uuid": "34e9dff3-374c-4168-a4d5-5cb91999dbcb",
    "email": "gareth@codepotato.co.uk",
    "groups": "App\\Http\\Resources\\GroupResource",
    "owners": "App\\Http\\Resources\\AccountResource",
    "last_name": "Thompson",
    "created_at": "2024-10-16T11:10:15+01:00",
    "first_name": "Gareth",
    "updated_at": "2024-10-16T11:10:15+01:00",
    "with_login": true,
    "custom_fields": "App\\Http\\Resources\\CustomFieldValueResource",
    "introduced_by": "App\\Http\\Resources\\AccountResource",
    "primary_email": "App\\Http\\Resources\\ContactDetailResource",
    "can_be_deleted": "false",
    "assigned_adviser": "App\\Http\\Resources\\AccountResource",
    "next_review_date": "2024-10-16T11:10:15+01:00",
    "has_joint_account": true,
    "current_time_entry": "App\\Http\\Resources\\TimeEntryResource",
    "first_contact_date": "2024-10-16T11:10:15+01:00",
    "external_references": "App\\Http\\Resources\\ExternalReferenceResource",
    "assigned_paraplanner": "App\\Http\\Resources\\AccountResource",
    "previous_review_date": "2024-10-16T11:10:15+01:00",
    "primary_phone_number": "App\\Http\\Resources\\ContactDetailResource",
    "assigned_administrator": "App\\Http\\Resources\\AccountResource",
    "anniversary_review_date": "2024-10-16T11:10:15+01:00"
  },
  "filename": "Welcome to Plannr.pdf",
  "progress": "100",
  "extension": "pdf",
  "created_at": "2024-10-16T11:10:15+01:00",
  "updated_at": "2024-10-16T11:10:15+01:00",
  "folder_name": "folder 2",
  "uploaded_at": "2024-10-16T11:10:15+01:00",
  "download_url": "https://plannr.valet/file/30c7c1ac-6dc5-445a-a26c-f7c022d4a015/download",
  "last_modified": "2024-10-16T11:10:15+01:00",
  "original_created_at": "2024-10-16T11:10:15+01:00"
}