Background Job Check#

Checks the status of a background job that was previously created with PDF.co API. Use this API to check the status of your asynchronous API calls.

Available Methods#

/job/check#

  • Method: POST

  • Endpoint: /v1/job/check

Attributes#

Note

Attributes are case-sensitive and should be inside JSON for POST request, for example:

{
    "jobId": "6YSZD3U872ZYYFEDMQCQSGEEO8YSF5WA--151-300"
}

Attribute

Description

Required

jobId

ID of background that was started asynchronously. To start a new async background job, you should set async to true for API methods.

yes

force

Set to true to forcibly check the status of the background job. Intended to be used with really long and heavy background jobs only.

no

Returns JSON with the status of the background job.

Available status values#

  • working background job is currently in work or does not exist.

  • success background job was successfully finished.

  • failed background job failed for some reason (see message for more details).

  • aborted background job was aborted.

  • unknown unknown background job id. Available only when force is set to true for input request.

Query parameters#

No query parameters accepted.

Payload#

{
  "jobid": "6YSZD3U872ZYYFEDMQCQSGEEO8YSF5WA--151-300"
}

Response 2#

{
  "status": "working",
  "remainingCredits": 60227
}
{
   "status": "success",
   "message": "Success",
   "url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/6YSZD3U872ZYYFEDMQCQSGEEO8YSF5WA--151-300/L8QYIZQ6KZOITCT0PXUNPM6HKYSP5OIO.json?X-Amz-Expires=3600&X-Amz-Security-Token=FwoGZXIvYXdzECcaDAbrXwAd1IYG3nZR5yKCAdcavWT%2BuwTotGsad9asqRzowPa1M4BoIWU0M9FqXNJP8xBIQX1Cn7XTq4ZfpklsxcpGE4WcapfHdooi2uR1QWw4kuUlMGGU92uy7pS0RhaGCEL00ES%2BIb%2F5039yyAFklqfAgDlHvi47I7Pp01y6Ua25RzrZGh6ACOd7le%2BXArnbQs4o4ezNqgYyKD%2FCX1I5ZOS0tu0ND0I%2FUWTHp6OR8He9a0dgVXfiMU7pNkwQqwVVFcM%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHAZTLLKK5/20231114/us-west-2/s3/aws4_request&X-Amz-Date=20231114T134932Z&X-Amz-SignedHeaders=host&X-Amz-Signature=e5553e080a23fb158c0514f99c9f70be0cb74f764933d712ba628110d4079b4c",
   "jobId": "6YSZD3U872ZYYFEDMQCQSGEEO8YSF5WA--151-300",
   "credits": 2,
   "remainingCredits": 1480582,
   "duration": 33
}

CURL#

curl --location --request POST 'https://api.pdf.co/v1/job/check' \
--header 'x-api-key: ' \
--data-raw '{
    "jobid": "6YSZD3U872ZYYFEDMQCQSGEEO8YSF5WA--151-300"
}'

Footnotes

1

Supports links from Google Drive, Dropbox, and PDF.co Built-In Files Storage. To upload files via the API check out the File Upload section. Note: If you experience intermittent Too Many Requests or Access Denied errors, please try to add cache: to enable built-in URL caching. (e.g cache:https://example.com/file1.pdf) For data security, you have the option to encrypt output files and decrypt input files. Learn more about user-controlled data encryption.

2

Main response codes as follows:

Code

Description

200

Success

400

Bad request. Typically happens because of bad input parameters, or because the input URLs can’t be reached, possibly due to access restrictions like needing a login or password.

401

Unauthorized

402

Not enough credits

445

Timeout error. To process large documents or files please use asynchronous mode (set the async parameter to true) and then check status using the /job/check endpoint. If a file contains many pages then specify a page range using the pages parameter. The number of pages of the document can be obtained using the /pdf/info endpoint.