Map headers on an import

POST /api/v1/import/map/{import_uuid}

Path parameters

  • import_uuid string Required
application/json

Body Required

  • headers array[string] Required

    Key value array containing the supported import headers as keys, and the csv headers as values

Responses

  • 200 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
    • 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 inititiated 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
      • 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
      • ownership_percentage integer
      • inactive_at string
      • custom_fields string
      • external_references string
POST /api/v1/import/map/{import_uuid}
curl \
 --request POST 'https://api.plannrcrm.com/api/v1/import/map/6ff8f7f6-1eb3-3525-be4a-3932c805afed' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"headers":[{"email":"email","last_name":"lname","first_name":"fname"}]}'
Request examples
{
  "headers": [
    {
      "email": "email",
      "last_name": "lname",
      "first_name": "fname"
    }
  ]
}
Response examples (200)
{
  "mode": "store",
  "type": "clients",
  "uuid": "e1dc0dd7-4086-4ce1-94ac-1dab3c875365",
  "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": "0a308b37-eeaa-42f5-a16b-37753c9cd1fe",
    "email": "gareth@codepotato.co.uk",
    "groups": "App\\Http\\Resources\\GroupResource",
    "owners": "App\\Http\\Resources\\AccountResource",
    "last_name": "Thompson",
    "created_at": "2025-06-26T11:37:02+01:00",
    "first_name": "Gareth",
    "updated_at": "2025-06-26T11:37:02+01:00",
    "with_login": true,
    "inactive_at": "2025-06-26",
    "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": "2025-06-26T11:37:02+01:00",
    "has_joint_account": true,
    "current_time_entry": "App\\Http\\Resources\\TimeEntryResource",
    "first_contact_date": "2025-06-26T11:37:02+01:00",
    "external_references": "App\\Http\\Resources\\ExternalReferenceResource",
    "assigned_paraplanner": "App\\Http\\Resources\\AccountResource",
    "joint_account_circle": "App\\Http\\Resources\\CircleResource",
    "ownership_percentage": 100,
    "previous_review_date": "2025-06-26T11:37:02+01:00",
    "primary_phone_number": "App\\Http\\Resources\\ContactDetailResource",
    "assigned_administrator": "App\\Http\\Resources\\AccountResource",
    "anniversary_review_date": "2025-06-26T11:37:02+01:00"
  },
  "headers": [
    "fname",
    "lname",
    "email"
  ],
  "mapping": {
    "email": "email",
    "fname": "first_name",
    "lname": "last_name"
  },
  "progress": 100,
  "created_at": "2025-06-26T11:37:02+01:00",
  "total_jobs": 4,
  "updated_at": "2025-06-26T11:37:02+01: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": "63ad8b16-60c4-47ee-9e37-3a85aff19e83",
    "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": "f55502f1-3e2c-4461-acd2-7666c3f82427"
    },
    "created_at": "2025-06-26T11:37:02+01:00",
    "updated_at": "2025-06-26T11:37:02+01:00",
    "folder_name": "folder 2",
    "uploaded_at": "2025-06-26T11:37:02+01:00",
    "documentable": "Object",
    "download_url": "https://api.plannrcrm.com/file/2b791030-7a28-44e3-a0af-c13ba0acc599/download",
    "last_modified": "2025-06-26T11:37:02+01:00",
    "documentable_type": "account",
    "original_created_at": "2025-06-26T11:37:02+01:00"
  },
  "jobs_remaining": 1
}