POST /v1/file/hash

Attributes

Attributes are case-sensitive and should be inside JSON for POST request. for example: { "url": "https://example.com/file1.pdf" }
AttributeTypeRequiredDefaultDescription
urlstringYes-URL to the source file url attribute

Query parameters

No query parameters accepted.

Responses

ParameterTypeDescription
hashstringHash of the final PDF file stored in S3.
creditsintegerNumber of credits consumed by the request
remainingCreditsintegerNumber of credits remaining in the account
durationintegerTime taken for the operation in milliseconds

Example Payload

To see the request size limits, please refer to the Request Size Limits.
{
  "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/document-parser/sample-invoice.pdf"
}

Example Response

To see the main response codes, please refer to the Response Codes page.
{
  "hash": "d942e5becdcb0386598cce15e9e56deb1ca9d893b8578a88eca4a62f02c4000b",
  "remainingCredits": 98143
}

Code Samples

curl --location --request POST 'https://api.pdf.co/v1/file/hash'
--header 'x-api-key: *******************'
--data-raw '{
    "url": "pdfco-test-files.s3.us-west-2.amazonaws.compdf-split/sample.pdf"
}'