Skip to content

HubSpot: Get the information on any import

HubSpot imports.getImport: arguments, response, policy and SDK examples.

← Imports operations · Get started

Operation hubspot.imports_get_import

Provider route: GET /crm/imports/2026-09/{importId}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/hubspot with npm, or alter-sdk-hubspot with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { HubSpotIntegration } from "@alter-ai/hubspot";
async function execute(input: Parameters<HubSpotIntegration["imports"]["getImport"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new HubSpotIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.imports.getImport(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_hubspot import HubSpotIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = HubSpotIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.imports.get_import(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.importIdintegerRequired within parentFormat: int64

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Create Import — response body

Referenced models: Create Import — response body

Create Import — response body
FieldTypePresenceDescription and constraints
$objectRoot
createdAtstringRequired within parentThe timestamp when the object was created, in ISO 8601 format.
Format: date-time
idstringRequired within parentThe unique identifier for this import.
importNamestringOptionalThe user-provided name for this import.
importRequestJsonobjectOptionalThe complete import request configuration as a JSON object.
importSourcestringOptionalIndicates where/how the import was initiated.
Known values: API, CRM_UI, IMPORT, MOBILE_ANDROID, MOBILE_IOS, SALESFORCE
importTemplateModelOptionalExpand Create Import — response body — import Template
mappedObjectTypeIdsarrayRequired within parentAn array of object type IDs that are mapped during the import.
mappedObjectTypeIds[]stringEach item
metadataModelRequired within parentExpand Create Import — response body — metadata
optOutImportbooleanRequired within parentWhether or not the import is a list of people disqualified from receiving emails.
statestringRequired within parentThe status of the import.
Known values: CANCELED, DEFERRED, DONE, FAILED, PROCESSING, REVERTED, STARTED
updatedAtstringRequired within parentThe timestamp when the import record was last updated, formatted as an ISO 8601 instant.
Format: date-time

Referenced models: Create Import — response body — import Template, Create Import — response body — metadata

Create Import — response body — import Template
FieldTypePresenceDescription and constraints
$objectRoot
templateIdJSONRequired within parent
templateId (anyOf 1)integerAlternativeThe unique identifier for the specific saved template or previous import being referenced.
Format: int64
templateId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
templateTypestringRequired within parentThe classification of what type of template this represents, and what is its origin or purpose.
Known values: admin_defined, previous_import, user_file
Create Import — response body — metadata
FieldTypePresenceDescription and constraints
$objectRoot
countersobjectRequired within parentSummarized outcomes of each row a developer attempted to import into HubSpot.
Additional keys: see wildcard field
counters.*JSONAdditional keys
counters.* (anyOf 1)integerAlternativeFormat: int32
counters.* (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
fileIdsarrayRequired within parentThe IDs of files uploaded in the File Manager API.
fileIds[]stringEach item
objectListsarrayRequired within parentThe lists containing the imported objects.
objectLists[]ModelEach itemExpand Create Import — response body — metadata object Lists item

Referenced models: Create Import — response body — metadata object Lists item

Create Import — response body — metadata object Lists item
FieldTypePresenceDescription and constraints
$objectRoot
listIdstringRequired within parentThe ID of the list containing the imported objects.
objectTypestringRequired within parentThe type of object contained in the list.

SDK function policy ID: hubspot.imports_get_import. Catalog operation: imports_get_import. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["crm.import"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.