POST /v1/job/check

Attributes

Attributes are case-sensitive and should be inside JSON for POST request. for example: { "url": "https://example.com/file1.pdf" }
AttributeTypeRequiredDefaultDescription
jobIdstringYes-ID of background that was started asynchronously. To start a new async background job, you should set async to true for API methods.
forcebooleanNofalseSet to true to forcibly check the status of the background job. Intended to be used with really long and heavy background jobs only.

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.

Responses

ParameterTypeDescription
statusstringStatus code of the request (200, 404, 500, etc.). For more information, see Response Codes.
messagestringMessage of the request
pageCountintegerNumber of pages in the PDF document.
urlstringDirect URL to the final PDF file stored in S3.
outputLinkValidTillstringTimestamp indicating when the output link will expire
jobIdstringIdentifier for the job request
creditsintegerNumber of credits consumed by the request
remainingCreditsintegerNumber of credits remaining in the account
jobDurationintegerTime taken to execute the job in milliseconds
durationintegerTime taken for the operation in milliseconds

Example Payload

To see the request size limits, please refer to the Request Size Limits.
{
  "jobid": "6YSZD3U872ZYYFEDMQCQSGEEO8YSF5WA--151-300"
}

Example Response

To see the main response codes, please refer to the Response Codes page.
1

{
  "status": "working",
  "remainingCredits": 60227
}

Example Response

To see the main response codes, please refer to the Response Codes page.
2

{
  "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
}

Code Samples

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