Cancel Job
Beta/v1/core/jobs/{id}/cancelIdempotent with Idempotency-Key header. Learn more
Cancels a job and returns it carrying its cancelled status.
Work in flight is not interrupted but can no longer settle, and a finished job cannot be cancelled.
idstringJob ID.
include[]optional arrayenumValues:created_bycreated_by.roleSub-objects to expand in the response. When omitted, sub-objects are returned as null.
idstringJob ID.
objectstringenumValues:jobResource type identifier.
typestringenumValues:bulk_createbulk_upsertexportThe kind of work the job carries out.
resource_typestringnullableenumValues:accountactorentityThe kind of resource the job operates on, as an object-type value (e.g. product).
type names the verb — what the job does — and this names the subject, so a job that produced no results still says what it was for.
statusstringenumValues:createdstartedcompletedHow far the job has got.
completed means the work was processed, not that every row succeeded — read each entry's own status in results.
created_byactorExpandablenullableThe actor who requested the work.
idstringUnique identifier of the actor.
objectstringenumValues:actorResource type identifier.
typestringenumValues:userapi_keyagentActor type.
user: a human user account.api_key: a programmatic caller authenticating with an API key.agent: an automated agent acting on the account's behalf.group: a shared group identity, such as a "Customer Service" persona, rather than a single individual.
namestringnullableThe actor's display name.
handlestringnullableHuman-readable handle identifying the actor.
- For
useractors: the user's email address. - For
api_keyactors: the redacted key value.
Other actor types carry no handle.
avatar_urlstringnullableURL of the actor's profile photo, if one is set.
Only populated for user actors.
The role the actor holds in the account, which determines what it is permitted to do.
idstringRole ID.
objectstringenumValues:roleResource type identifier.
namestringDisplay name of the role.
Unique within the account.
typestringenumValues:adminuserscannerThe kind of role.
The type gates behavior that individual permissions do not cover, and some actions are reserved for a single role type.
admin: full administrative access. Sensitive areas such as API keys, billing, and third-party integrations are restricted to admins no matter what permissions another role holds.user: a custom role tailored to a specific need, with its permissions defined explicitly. Roles created through the API always have this type.scanner: the role used by shop-floor scanning stations, assigned automatically when a scanning-station user is created.sales_rep: a role for sales representatives. Order analytics are scoped to the rep's own orders.agent: a role assigned to an automated agent rather than a person.
ownerownernullableProvenance of this role.
System-owned roles are platform-provided defaults shared across all accounts and cannot be updated or deleted; account-owned roles are custom to your account.
null in this endpoint.permissionsarray of stringnullablePermissions granted by this role, in {permission}:{action} format, such as customers:read.
created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
One entry per submitted row, saying what became of it. A bulk create records these when it accepts the request, so they stay provisional until status is completed.
page_info.has_next_page is true when the job produced more rows than it records.
objectstringenumValues:listResource type identifier.
page_infoobjectPagination metadata.
next_page_urlstringnullableRelative URL that fetches the next page of results.
previous_page_urlstringnullableRelative URL that fetches the previous page of results.
has_next_pagebooleanWhether more results exist after this page.
has_prev_pagebooleanWhether results exist before this page.
dataarray of job_resultResources in this page.
objectstringenumValues:job_resultResource type identifier.
indexintegerZero-based row of the request this result names.
statusstringenumValues:createdupdatedfailedWhat became of the row.
created: the row produced a new resource.updated: the row updated an existing resource.failed: the row was rejected and wrote nothing.
resourceentitynullableThe resource the row produced. Null when the row failed.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe resource kind that this entity references, as an object-type value (e.g. user, account).
Unlike object — which is always entity — this names the underlying resource the id points to.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
Resources produced as a side effect to the row's primary operation.
For example, when creating a production run, several batch records may also be created.
objectstringenumValues:listResource type identifier.
page_infoobjectPagination metadata.
next_page_urlstringnullableRelative URL that fetches the next page of results.
previous_page_urlstringnullableRelative URL that fetches the previous page of results.
has_next_pagebooleanWhether more results exist after this page.
has_prev_pagebooleanWhether results exist before this page.
dataarray of entityResources in this page.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe resource kind that this entity references, as an object-type value (e.g. user, account).
Unlike object — which is always entity — this names the underlying resource the id points to.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
errorobjectnullableWhy the row was rejected, in the same shape a synchronous error response carries.
Null unless status is failed.
codestringenumValues:expired_tokenapi_key_expiredapi_key_revokedA machine-readable code for the error.
typestringenumValues:api_erroridempotency_errorinvalid_request_errorThe type of error.
messagestringA human-readable message providing more details about the error.
paramstringnullableThe parameter that caused the error, if applicable.
doc_urlstringnullableA URL to documentation about the error.
is_transientbooleanWhether this error is transient and the request can be retried.
quotaobjectnullableQuota provides plan limit details when the error is limit_exceeded. Nil otherwise.
limitintegerLimit is the maximum number of resources allowed by the current plan.
usedintegerUsed is the number of resources currently consumed.
reset_atstring (date-time)nullableResetAt is the time when the quota resets, if applicable. Nil for static (non-metered) limits.
request_log_urlstringnullableRequestLogURL is a link to the dashboard page for this request's log entry. Nil when no request log is available.
errorobjectnullableThe failure that sank the job as a whole, in the same shape a synchronous error response carries.
A row rejected on its own merits reports its failure on its own entry in results instead, so this stays null even when some rows failed.
codestringenumValues:expired_tokenapi_key_expiredapi_key_revokedA machine-readable code for the error.
typestringenumValues:api_erroridempotency_errorinvalid_request_errorThe type of error.
messagestringA human-readable message providing more details about the error.
paramstringnullableThe parameter that caused the error, if applicable.
doc_urlstringnullableA URL to documentation about the error.
is_transientbooleanWhether this error is transient and the request can be retried.
quotaobjectnullableQuota provides plan limit details when the error is limit_exceeded. Nil otherwise.
limitintegerLimit is the maximum number of resources allowed by the current plan.
usedintegerUsed is the number of resources currently consumed.
reset_atstring (date-time)nullableResetAt is the time when the quota resets, if applicable. Nil for static (non-metered) limits.
request_log_urlstringnullableRequestLogURL is a link to the dashboard page for this request's log entry. Nil when no request log is available.
exportjob_exportnullableWhere a completed export job's file can be downloaded.
Null on every other job, and returned only to a caller asking for JSON — otherwise retrieving the job redirects to it.
objectstringenumValues:job_exportResource type identifier.
urlstringPresigned link to the file, valid for five minutes.
If the link has expired, read the job again for a fresh one.
started_atstring (date-time)nullableWhen the job began executing.
completed_atstring (date-time)nullableWhen the job finished processing, whether or not every row succeeded.
failed_atstring (date-time)nullableWhen the most recent attempt failed. A retry that succeeds leaves this alongside completed_at.
cancelled_atstring (date-time)nullableWhen the job was cancelled.
created_atstring (date-time)When the job was created.
updated_atstring (date-time)When the job was last updated.
Responses
Successful response for Cancel Job