Bulk deletion

Get bulk document deletion job status

Changed on

Retrieves the current status of a bulk document deletion job created with the Create bulk document deletion job endpoint.

Poll this endpoint until the job leaves the InProgress status.

Possible Status values:

  • InProgress: The job is running and documents are being deleted in batches. Keep polling and do not create another job for this data entity.
  • Success: All matching documents were deleted. Compare DocumentsDeleted with the number of documents you expected to delete.
  • Failed: Processing stopped after exhausting internal retries. The deletion is partial, which means that documents from completed batches were already deleted. Fix the underlying cause and create a new job with the same filter to finish the deletion.

Errors

Status codeCauseWhat to do
404The jobId does not exist for this account and data entity, or the job was created more than 60 days ago. Job records are kept for 60 days after creation.Check the jobId, the an query parameter, and the data entity in the URL. If all three are correct, the job is older than 60 days and its record is no longer available.

Permissions

This request requires a valid user token, sent in the VtexIdclientAutCookie header.

get/api/dataentities/{acronym}/delete/jobs/{jobId}

Request

  • Base URL
    https://apiexamples.vtexcommercestable.com.br
  • URL
    https://apiexamples.vtexcommercestable.com.br/api/dataentities/{acronym}/delete/jobs/{jobId}
  • Auth
    • API key in header X-VTEX-API-AppKey and API key in header X-VTEX-API-AppToken
    • or API key in header VtexIdclientAutCookie

Path parameters

acronymstring required
Example:SP

Two-letter string that identifies the data entity.

jobIdstring required
Example:01M08C83Z5D91S3CA0A15SRNV8

Unique identifier of the bulk deletion job, returned by the Create bulk document deletion job endpoint (for example, 01M08C83Z5D91S3CA0A15SRNV8).

Query parameters

anstring required
Example:apiexamples

Name of the VTEX account that owns the data entity (for example, apiexamples).

Response

OK

JobIdstring

Unique identifier of the bulk deletion job.

Entitystring

Name of the data entity whose documents the job deletes.

Status'InProgress' | 'Success' | 'Failed'

Current status of the bulk deletion job. Possible values: InProgress, Success, or Failed.

Filterstring

Deletion criteria sent when the job was created.

DocumentsDeletedinteger

Number of documents that the job has deleted.

CreatedAtstring date-time

Date and time when the job was created, in the ISO 8601 format.

UpdatedAtstring date-time

Date and time when the job was last updated, in the ISO 8601 format.

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      endpoint added