Headers

  • X-PLANNR-ACCOUNT-UUID string
application/json

Body

  • import_file string(binary) Required

    The provider statement file csv.

  • provider_statement array[object] Required

    An array of provider statement properties.

    Hide provider_statement attributes Show provider_statement attributes object
    • statement_uuid string(uuid)

      The uuid of the statement this refers to.

    • provider_uuid string(uuid)

      The uuid of the provider.

    • date string(date)

      Date of the provider statement.

    • name string | null

      Name of the provider statement.

    • reference string | null

      Reference of the provider statement.

    • origin string | null

      The origin of the provider statement.

      Value Description
      edi Edi
      manual Manual
      upload Upload
      auto Auto

      Values are edi, manual, upload, or auto.

  • mapping object Required

    Array of mappings for the provider statement import. This defines how the columns in the CSV file map to the fields in the system.

    Additional properties are allowed.

  • parameters array[object] Required

    Array of additional data to complete the request.

    Hide parameters attribute Show parameters attribute object
    • revenue_type_mapping object

      Mapping of revenue types for the provider statement import. This defines how the revenue types in the CSV file map to the charge categories in the system.

      Additional properties are allowed.

Responses

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

      The UUID of the resource.

    • created_at string

      The timestamp of when the resource was created.

    • updated_at string

      The timestamp of when the resource was updated.

    • type string

      The type of model the importer is importing

    • mode string

      The mode this import was run on

    • headers array[string]

      Headers taken from uploaded csv, not visible on index route

    • mapping object

      Mapped headers, not visible on index route

      Hide mapping attributes Show mapping attributes object
      • fname string
      • lname string
      • email string
    • importable_uuid string

      The uuid of the model this importer is importing. For example, for a provider statement import, this would be the uuid of the provider statement being imported

    • parameters object

      additional parameters for the import

      Hide parameters attribute Show parameters attribute object
      • revenue_type_mapping object
        Hide revenue_type_mapping attributes Show revenue_type_mapping attributes object
        • IF string
        • ADJ string
    • status string

      The status of the importer

    • total_jobs integer

      Total amount of imports in the importer

    • progress integer

      The current progress of the importer

    • jobs_remaining integer

      Number of pending imports

    • failed_jobs integer

      Number of failed imports

    • error_report object

      Error report file

      Hide error_report attributes Show error_report attributes object
      • uuid string
      • created_at string
      • original_created_at string
      • updated_at string
      • uploaded_at string
      • status string
      • filename string
      • name string
      • extension string
      • type string
      • size string
      • path string
      • last_modified string
      • progress string
      • download_url string
      • folder_name string
      • folder string
      • documentable_type string
      • documentable string
      • navigator object
        Hide navigator attributes Show navigator attributes object
        • model_type string
        • model_uuid string
      • firm string
      • account string
      • tags string
    • errors object

      Array of failed imports, limited to 25 rows

      Hide errors attributes Show errors attributes object
      • client object
        Hide client attributes Show client attributes object
        • example array
        • description string
      • errors object
        Hide errors attributes Show errors attributes object
        • example object
          Hide example attribute Show example attribute object
          • send_welcome_email array[string]
        • description string
    • account object

      Account that initiated the import

      Hide account attributes Show account attributes object
      • uuid string
      • created_at string
      • updated_at string
      • type string
      • role string
      • first_name string
      • last_name string
      • name string
      • email string
      • photo_url string
      • firm string
      • primary_phone_number string
      • primary_email string
      • current_time_entry string
      • assigned_adviser string
      • assigned_administrator string
      • assigned_paraplanner string
      • introduced_by string
      • groups string
      • tags string
      • owners string
      • first_contact_date string
      • next_review_date string
      • previous_review_date string
      • anniversary_review_date string
      • with_login boolean
      • has_joint_account boolean
      • can_be_deleted string
      • joint_account_circle string
      • circles string
      • ownership_percentage integer
      • inactive_at string
      • last_interaction_at string
      • referral_code string
      • permissions object
        Hide permissions attributes Show permissions attributes object
        • firm:read array[string]
        • network:read array[string]
      • custom_fields string
      • external_references string
POST /api/v1/provider-statement/import
curl \
 --request POST 'https://api.plannrcrm.com/api/v1/provider-statement/import' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --header "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
 --data '{"import_file":"file-contents","provider_statement":[{"provider_statement":{"date":"2025-07-11","name":"July Statement","origin":"upload","reference":"Aviva AV#834","provider_uuid":null,"statement_uuid":null}}],"mapping":{"date":"date","category":"revenue_type","net_amount":"net_amount","client_name":"client_name","scheme_name":"scheme_name","adviser_name":"adviser_name","gross_amount":"gross_amount","agency_number":"agency_number","policy_number":"policy_number","scheme_number":"scheme_number","customer_number":"customer_number","product_reference":"product_reference","sender_id_sib_number":"sender_id_sib_number","transaction_reference":"transaction_reference"},"parameters":[{"parameters":{"revenue_type_mapping":{"IF":"initial_fee","ADJ":"adjustment"}}}]}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}

# Payload
{
  "import_file": "file-contents",
  "provider_statement": [
    {
      "provider_statement": {
        "date": "2025-07-11",
        "name": "July Statement",
        "origin": "upload",
        "reference": "Aviva AV#834",
        "provider_uuid": null,
        "statement_uuid": null
      }
    }
  ],
  "mapping": {
    "date": "date",
    "category": "revenue_type",
    "net_amount": "net_amount",
    "client_name": "client_name",
    "scheme_name": "scheme_name",
    "adviser_name": "adviser_name",
    "gross_amount": "gross_amount",
    "agency_number": "agency_number",
    "policy_number": "policy_number",
    "scheme_number": "scheme_number",
    "customer_number": "customer_number",
    "product_reference": "product_reference",
    "sender_id_sib_number": "sender_id_sib_number",
    "transaction_reference": "transaction_reference"
  },
  "parameters": [
    {
      "parameters": {
        "revenue_type_mapping": {
          "IF": "initial_fee",
          "ADJ": "adjustment"
        }
      }
    }
  ]
}
Response examples (201)
{
  "mode": "store",
  "type": "clients",
  "uuid": "d6550306-eeb1-48cc-ab0f-c3ea6761d6a0",
  "errors": {
    "client": {
      "example": [],
      "description": "Client that failed importing"
    },
    "errors": {
      "example": {
        "send_welcome_email": [
          "The send welcome email field is required."
        ]
      },
      "description": "The reasons why the client failed importing"
    }
  },
  "status": "processing",
  "account": {
    "firm": "App\\Http\\Resources\\FirmResource",
    "name": "Gareth Thompson",
    "role": "client",
    "tags": "App\\Http\\Resources\\TagResource",
    "type": "client",
    "uuid": "da38d915-28b8-45ba-b7bb-9dfe1a7c7c8b",
    "email": "gareth@codepotato.co.uk",
    "groups": "App\\Http\\Resources\\GroupResource",
    "owners": "App\\Http\\Resources\\AccountResource",
    "circles": "App\\Http\\Resources\\CircleResource",
    "last_name": "Thompson",
    "photo_url": "https://eu.ui-avatars.com/api/?name=gareth+thompson",
    "created_at": "2026-03-24T16:14:52+00:00",
    "first_name": "Gareth",
    "updated_at": "2026-03-24T16:14:52+00:00",
    "with_login": true,
    "inactive_at": "2026-03-24",
    "permissions": {
      "firm:read": [
        "firm"
      ],
      "network:read": [
        "network:uuid"
      ]
    },
    "custom_fields": "App\\Http\\Resources\\CustomFieldValueResource",
    "introduced_by": "App\\Http\\Resources\\AccountResource",
    "primary_email": "App\\Http\\Resources\\ContactDetailResource",
    "referral_code": "ABC12345",
    "can_be_deleted": "false",
    "assigned_adviser": "App\\Http\\Resources\\AccountResource",
    "next_review_date": "2026-03-24T16:14:52+00:00",
    "has_joint_account": true,
    "current_time_entry": "App\\Http\\Resources\\TimeEntryResource",
    "first_contact_date": "2026-03-24T16:14:52+00:00",
    "external_references": "App\\Http\\Resources\\ExternalReferenceResource",
    "last_interaction_at": "2026-03-24 16:14:52",
    "assigned_paraplanner": "App\\Http\\Resources\\AccountResource",
    "joint_account_circle": "App\\Http\\Resources\\CircleResource",
    "ownership_percentage": 100,
    "previous_review_date": "2026-03-24T16:14:52+00:00",
    "primary_phone_number": "App\\Http\\Resources\\ContactDetailResource",
    "assigned_administrator": "App\\Http\\Resources\\AccountResource",
    "anniversary_review_date": "2026-03-24T16:14:52+00:00"
  },
  "headers": [
    "fname",
    "lname",
    "email"
  ],
  "mapping": {
    "email": "email",
    "fname": "first_name",
    "lname": "last_name"
  },
  "progress": 100,
  "created_at": "2026-03-24T16:14:52+00:00",
  "parameters": {
    "revenue_type_mapping": {
      "IF": "initial_fee",
      "ADJ": "adjustment"
    }
  },
  "total_jobs": 4,
  "updated_at": "2026-03-24T16:14:52+00:00",
  "failed_jobs": 1,
  "error_report": {
    "firm": "App\\Http\\Resources\\FirmResource",
    "name": "Welcome to Plannr",
    "path": "Gareth Thompson/Subfolder/Welcome to Plannr.pdf",
    "size": "21691783",
    "tags": "App\\Http\\Resources\\TagResource",
    "type": "type",
    "uuid": "250d4664-4400-4d99-876e-400d252e1044",
    "folder": "App\\Http\\Resources\\FolderResource",
    "status": "uploaded",
    "account": "App\\Http\\Resources\\MinimalAccountResource",
    "filename": "Welcome to Plannr.pdf",
    "progress": "100",
    "extension": "pdf",
    "navigator": {
      "model_type": "account",
      "model_uuid": "74e9a58c-9ee2-4209-a420-e807a521a63e"
    },
    "created_at": "2026-03-24T16:14:52+00:00",
    "updated_at": "2026-03-24T16:14:52+00:00",
    "folder_name": "folder 2",
    "uploaded_at": "2026-03-24T16:14:52+00:00",
    "documentable": "Object",
    "download_url": "https://api.plannrcrm.com/file/7bc07f51-fa77-4f90-a8d6-3a05b3bc7771/download",
    "last_modified": "2026-03-24T16:14:52+00:00",
    "documentable_type": "account",
    "original_created_at": "2026-03-24T16:14:52+00:00"
  },
  "jobs_remaining": 1,
  "importable_uuid": "a25d5c8c-4509-484c-b0ad-15c2379020c2"
}