---
title: "Get signed upload URLs for a file's parts"
method: POST
path: "/uploads/sessions/{upload_session_id}/parts"
tags: ["Uploads"]
---

# Get signed upload URLs for a file's parts

`POST /uploads/sessions/{upload_session_id}/parts`

## Request

- Base URL: `https://api.invoicedataextraction.com/v1`
- URL: `https://api.invoicedataextraction.com/v1/uploads/sessions/{upload_session_id}/parts`
- Auth: HTTP bearer

Returns one signed URL per requested part number. `PUT` the raw bytes of each part to
its URL with no extra headers, and keep the `ETag` response header of each `PUT`
(quotes included) for completing the file.

`total_parts = ceil(file_size_bytes / part_size)`; a file smaller than `part_size` is
one part. Up to 1,000 part numbers per request, each from 1 to 10,000; a URL is valid
for 15 minutes from issue, so for a very large file request URLs in batches just before
uploading each batch.

Rate limit: 600 requests per minute per API key, shared by the upload endpoints.

## Path parameters

- `upload_session_id` string, required: An identifier you choose: 1 to 200 characters from letters, digits, dots, underscores, colons and hyphens. Used for `upload_session_id`, `file_id` and `submission_id`.

## Request body

- GetUploadPartUrlsRequest
  - `file_id` string, required: An identifier you choose: 1 to 200 characters from letters, digits, dots, underscores, colons and hyphens. Used for `upload_session_id`, `file_id` and `submission_id`.
  - `part_numbers` integer[], required: 1-indexed part numbers; duplicates are ignored.

## Response `200`

The signed URLs, one per part number requested.

- GetUploadPartUrlsResponse
  - `success` true, required
  - `upload_session_id` string, required: An identifier you choose: 1 to 200 characters from letters, digits, dots, underscores, colons and hyphens. Used for `upload_session_id`, `file_id` and `submission_id`.
  - `file_id` string, required: An identifier you choose: 1 to 200 characters from letters, digits, dots, underscores, colons and hyphens. Used for `upload_session_id`, `file_id` and `submission_id`.
  - `file_name` string, required
  - `part_size` integer, required
  - `part_urls` object[], required
    - `part_number` integer, required
    - `url` string, uri, required: `PUT` the part's raw bytes here within 15 minutes; keep the `ETag` response header.

## Other responses

- `400`: `INVALID_INPUT`: the request does not match the contract; `details.issues` lists each problem with its `path`.
- `401`: `UNAUTHENTICATED`, `API_KEY_EXPIRED` or `API_KEY_REVOKED`.
- `404`: `FILE_NOT_FOUND`: this `file_id` was not registered when the session was created.
- `409`: `FILE_NOT_UPLOADABLE`: the file has already been completed or aborted.
- `429`: `RATE_LIMITED`: wait `details.retry_after_seconds` (also the `Retry-After` header), then retry.
- `500`: `INTERNAL_ERROR`: retry after a short delay.

---

[API](https://skmtc.dev/invoicedataextraction/apis/invoice-data-extraction-api.md) · [All operations](https://skmtc.dev/invoicedataextraction/apis/invoice-data-extraction-api/llms.txt) · [OpenAPI document](https://skmtc.dev/invoicedataextraction/apis/invoice-data-extraction-api/revisions/16d920350483?raw)
