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));import requests
url = "https://api.dcycle.io/v2/imports/{import_id}/submit"
payload = {
"ignore_errors": True,
"context": {}
}
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"x-partner": "<x-partner>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.dcycle.io/v2/imports/{import_id}/submit \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--header 'x-partner: <x-partner>' \
--data '
{
"ignore_errors": true,
"context": {}
}
'{
"status": "<string>",
"file_id": {},
"processing_job_id": {},
"rows_submitted": 123
}Submit Import
Submit a validated import session for downstream processing
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));import requests
url = "https://api.dcycle.io/v2/imports/{import_id}/submit"
payload = {
"ignore_errors": True,
"context": {}
}
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"x-partner": "<x-partner>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.dcycle.io/v2/imports/{import_id}/submit \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--header 'x-partner: <x-partner>' \
--data '
{
"ignore_errors": true,
"context": {}
}
'{
"status": "<string>",
"file_id": {},
"processing_job_id": {},
"rows_submitted": 123
}← Imports
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
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51fastring
required
Partner identifier for the submitting applicationExample:
dcyclePath Parameters
string
required
UUID of the import session to submitExample:
"11111111-1111-1111-1111-111111111111"Body Parameters
boolean
default:"false"
When
true, submit even if some rows have validation errors. Only valid rows will be processed; error rows are skipped.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
string
Submission result status (e.g.
submitted)string | null
UUID of the created data file
string | null
UUID of the downstream processing job. Use this to track processing progress.
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}'
import requests
import os
headers = {
"x-api-key": os.getenv("DCYCLE_API_KEY"),
"x-organization-id": os.getenv("DCYCLE_ORG_ID"),
"x-partner": "dcycle",
"Content-Type": "application/json",
}
import_id = "11111111-1111-1111-1111-111111111111"
response = requests.post(
f"https://api.dcycle.io/v2/imports/{import_id}/submit",
headers=headers,
json={"ignore_errors": False},
)
result = response.json()
print(f"Status: {result['status']}")
print(f"Rows submitted: {result['rows_submitted']}")
if result.get("processing_job_id"):
print(f"Processing job: {result['processing_job_id']}")
const axios = require('axios');
const headers = {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
'x-partner': 'dcycle',
'Content-Type': 'application/json',
};
const importId = '11111111-1111-1111-1111-111111111111';
axios.post(`https://api.dcycle.io/v2/imports/${importId}/submit`, {
ignore_errors: false,
}, { headers })
.then(response => {
const { status, rows_submitted, processing_job_id } = response.data;
console.log(`${status}: ${rows_submitted} rows, job ${processing_job_id}`);
});
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"}
404 Not Found
Cause: The import session does not exist or belongs to another organization. Both cases return the same response, so a session id from another organization is indistinguishable from one that does not exist.{"code": "NOT_FOUND", "detail": "ImportSessionModel with id='1b2c3d4e-5f60-7182-93a4-b5c6d7e8f901' not found"}
400 Bad Request
Cause: Session has validation errors andignore_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'"
}
Related Endpoints
Get Import Status
Check submission and processing progress
Create Session
Start a new import
Was this page helpful?