---
title: "Start an import for a connected planning table"
method: POST
path: "/tables/{table_pk}/imports"
tags: ["Planning Table"]
---

# Start an import for a connected planning table

`POST /tables/{table_pk}/imports`

Enqueue a background import that pulls the latest source data into this table. Returns 409 with code TABLE_IMPORT_IN_PROGRESS when an import is already running. Failed imports expose error_code on the import run.

## Path parameters

- `table_pk` string, required

## Headers

- `X-Company-ID` string, required

## Request body

- PlanningTableImport — Mixin to delegate create, update, and destroy operations to a service class.
  - `id` integer, required
  - `planning_table_id` integer, required
  - `status` 'ERROR' | 'IMPORTED' | 'PROCESSING' | 'CANCELLED', required — * `ERROR` - Error * `IMPORTED` - Imported * `PROCESSING` - Processing * `CANCELLED` - Cancelled
  - `status_message` string, nullable, required
  - `error_code` union, required
    - 'SOURCE_UNAVAILABLE' | 'SOURCE_RATE_LIMITED' | 'DUPLICATE_SOURCE_KEYS' | 'IMPORT_FAILED' | 'IMPORT_STALE' — * `SOURCE_UNAVAILABLE` - Source unavailable * `SOURCE_RATE_LIMITED` - Source rate limited * `DUPLICATE_SOURCE_KEYS` - Duplicate source keys * `IMPORT_FAILED` - Import failed * `IMPORT_STALE` - Import stale
    - unknown
  - `created_at` string, date-time, required
  - `completed_at` string, date-time, nullable, required
  - `source_import_type` 'USER' | 'SCHEDULED', required — * `USER` - User * `SCHEDULED` - Scheduled

## Response `202`

- PlanningTableImport — Mixin to delegate create, update, and destroy operations to a service class.
  - `id` integer, required
  - `planning_table_id` integer, required
  - `status` 'ERROR' | 'IMPORTED' | 'PROCESSING' | 'CANCELLED', required — * `ERROR` - Error * `IMPORTED` - Imported * `PROCESSING` - Processing * `CANCELLED` - Cancelled
  - `status_message` string, nullable, required
  - `error_code` union, required
    - 'SOURCE_UNAVAILABLE' | 'SOURCE_RATE_LIMITED' | 'DUPLICATE_SOURCE_KEYS' | 'IMPORT_FAILED' | 'IMPORT_STALE' — * `SOURCE_UNAVAILABLE` - Source unavailable * `SOURCE_RATE_LIMITED` - Source rate limited * `DUPLICATE_SOURCE_KEYS` - Duplicate source keys * `IMPORT_FAILED` - Import failed * `IMPORT_STALE` - Import stale
    - unknown
  - `created_at` string, date-time, required
  - `completed_at` string, date-time, nullable, required
  - `source_import_type` 'USER' | 'SCHEDULED', required — * `USER` - User * `SCHEDULED` - Scheduled

## Changes

- **2026-08-31** `8ff8b401f791` — 2 breaking, 3 info
  - added `#/components/schemas/ErrorCodeEnum, #/components/schemas/NullEnum` to the `error_code` response property `oneOf` list for the response status `202`
  - the `error_code` response's property type changed from `string` to no type for status `202`
  - added `#/components/schemas/ErrorCodeEnum, #/components/schemas/NullEnum` to the `error_code` request property `oneOf` list (media type: application/json)
  - added `#/components/schemas/ErrorCodeEnum, #/components/schemas/NullEnum` to the `error_code` request property `oneOf` list (media type: application/x-www-form-urlencoded)
  - …1 more
- **2026-08-25** `2ef6e2cdfaef` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/cubesoftware/apis/cube-api/changes/tables/:table_pk/imports/post.md)

---

[API](https://skmtc.dev/cubesoftware/apis/cube-api.md) · [All operations](https://skmtc.dev/cubesoftware/apis/cube-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cubesoftware/cube-api/revisions/8ff8b401f791/schema)
