Skip to main content
POST
/
v2
/
imports
/
{import_id}
/
submit
Submit Import
const options = {
  method: 'POST',
  headers: {
    'x-api-key': '<x-api-key>',
    'x-organization-id': '<x-organization-id>',
    'x-partner': '<x-partner>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ignore_errors: true, context: {}})
};

fetch('https://api.dcycle.io/v2/imports/{import_id}/submit', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "status": "<string>",
  "file_id": {},
  "processing_job_id": {},
  "rows_submitted": 123
}

Submit Import

Submit a validated import session for downstream processing. This creates the data file and starts the processing pipeline that will ingest the records into your organization’s data.
Submission is irreversible. Once submitted, the session cannot be modified or re-submitted. Make sure all row corrections are complete before submitting.

Request

Headers

x-api-key
string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
x-organization-id
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa
x-partner
string
required
Partner identifier for the submitting applicationExample: dcycle

Path Parameters

import_id
string
required
UUID of the import session to submitExample: "11111111-1111-1111-1111-111111111111"

Body Parameters

ignore_errors
boolean
default:"false"
When true, submit even if some rows have validation errors. Only valid rows will be processed; error rows are skipped.
context
object
Additional context values collected late in the wizard (e.g. facility_id for wastes). Values are merged into the session before submission.Example: {"facility_id": "a8315ef3-dd50-43f8-b7ce-d839e68d51fa"}

Response

status
string
Submission result status (e.g. submitted)
file_id
string | null
UUID of the created data file
processing_job_id
string | null
UUID of the downstream processing job. Use this to track processing progress.
rows_submitted
integer
Number of rows submitted for processing

Example

curl -X POST "https://api.dcycle.io/v2/imports/11111111-1111-1111-1111-111111111111/submit" \
  -H "x-api-key: ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}" \
  -H "x-partner: dcycle" \
  -H "Content-Type: application/json" \
  -d '{"ignore_errors": false}'

Successful Response

{
  "status": "submitted",
  "file_id": "22222222-2222-2222-2222-222222222222",
  "processing_job_id": "33333333-3333-3333-3333-333333333333",
  "rows_submitted": 237
}

Common Errors

401 Unauthorized

Cause: Missing or invalid API key
{"detail": "Invalid API key for organization", "code": "INVALID_API_KEY"}

403 Forbidden

Cause: The authenticated user is not a member of the organization
{"detail": "Logged User is not Member of Organization", "code": "LOGGED_USER_NOT_MEMBER"}

400 Bad Request

Cause: Session has validation errors and ignore_errors is false
{
  "detail": "Import session has 3 error rows. Set ignore_errors=true to submit only valid rows."
}

409 Conflict

Cause: Session has already been submitted
{
  "detail": "Import session has already been submitted."
}

422 Unprocessable Entity

Cause: Missing required context field for the template
{
  "detail": "facility_id is required for template 'wastes'"
}

Get Import Status

Check submission and processing progress

Create Session

Start a new import