Items

Find items by document

Returns the ids of the items linked to a document whose contents are identical to the file you provide, limited to the items your service account can access. Matching is by file contents, not file name.

Send the file as multipart/form-data in the file field. The file is hashed (SHA-256) as it uploads and is not stored. The response includes that hash as file_hash. To fetch further pages without uploading the file again, call this endpoint with the file_hash query parameter and no request body. Send either file or file_hash, not both.

Results are ordered by item id and paged with an opaque cursor. Pass the next_cursor from one response as cursor on the next call until it is absent. If no accessible item is linked to the document, item_ids is an empty array.

Files up to 512 MB are accepted, and large uploads have up to 5 minutes to complete. Requests may be rate limited. When the limit is exceeded the API returns 429 with a Retry-After header giving the seconds to wait.

Requires an access token with the items:read scope.

post/items/by-document

Query parameters

file_hashstring

Hex SHA-256 of the document, as returned in a previous response. Case-insensitive. Use it to fetch further pages without uploading the file again. Do not send it together with file.

limitinteger

Number of item ids per page. Defaults to 50, maximum 100. Values outside 1 to 100 fall back to 50.

cursorstring

The next_cursor value from the previous page.

Response

OK

file_hashstring

hex SHA-256 of the document; pass it as file_hash to fetch further pages without uploading again

item_idsstring[]

ids of the linked items, ordered by id; empty if none are accessible to your service account

next_cursorstring

pass as cursor to get the next page; absent on the last page

Changes

Changed in 2 of the 12 revisions of this API.7

    • ○

      the endpoint scheme security OAuth2 was added to the API

      api-security-added

    • ○

      the endpoint scheme security BearerAuth was removed from the API

      api-security-removed

    • ○

      api tag Items added

      api-tag-added

    • ○

      api tag items removed

      api-tag-removed

    • ○

      added the non-success response with the status

      response-non-success-status-added

    • ○

      added the non-success response with the status

      response-non-success-status-added

    • ○

      endpoint added

      endpoint-added