> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Uploads (Chunked) resources

The chunked upload endpoints support files from 20MB in size and allow an application to upload the file in parts, allowing for more control to catch any errors and retry parts individually.

## Upload part

The representation of an upload session chunk.

<Accordion title="Attributes and example">
  | Property  | Type      | Required | Description                                                                                                     |
  | --------- | --------- | -------- | --------------------------------------------------------------------------------------------------------------- |
  | `part_id` | `string`  | No       | The unique ID of the chunk.                                                                                     |
  | `offset`  | `integer` | No       | The offset of the chunk within the file in bytes. The lower bound of the position of the chunk within the file. |
  | `size`    | `integer` | No       | The size of the chunk in bytes.                                                                                 |
  | `sha1`    | `string`  | No       | The SHA1 hash of the chunk.                                                                                     |

  ```json Example theme={null}
  {
    "part_id": "6F2D3486",
    "offset": 16777216,
    "size": 3222784,
    "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
  }
  ```
</Accordion>

## Upload part (Mini)

The basic representation of an upload session chunk.

<Accordion title="Attributes and example">
  | Property  | Type      | Required | Description                                                                                                     |
  | --------- | --------- | -------- | --------------------------------------------------------------------------------------------------------------- |
  | `part_id` | `string`  | No       | The unique ID of the chunk.                                                                                     |
  | `offset`  | `integer` | No       | The offset of the chunk within the file in bytes. The lower bound of the position of the chunk within the file. |
  | `size`    | `integer` | No       | The size of the chunk in bytes.                                                                                 |

  ```json Example theme={null}
  {
    "part_id": "6F2D3486",
    "offset": 16777216,
    "size": 3222784
  }
  ```
</Accordion>

## Upload parts

A list of uploaded chunks for an upload session.

<Accordion title="Attributes and example">
  | Property      | Type                                 | Required | Description                                                                                                                                                                                                                                                                                |
  | ------------- | ------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | `total_count` | `integer`                            | No       | One greater than the offset of the last entry in the entire collection. The total number of entries in the collection may be less than `total_count`. This field is only returned for calls that use offset-based pagination. For marker-based paginated APIs, this field will be omitted. |
  | `limit`       | `integer`                            | No       | The limit that was used for these entries. This will be the same as the `limit` query parameter unless that value exceeded the maximum value allowed. The maximum value varies by API.                                                                                                     |
  | `offset`      | `integer`                            | No       | The 0-based offset of the first entry in this set. This will be the same as the `offset` query parameter. This field is only returned for calls that use offset-based pagination. For marker-based paginated APIs, this field will be omitted.                                             |
  | `order`       | array of `object`                    | No       | The order by which items are returned. This field is only returned for calls that use offset-based pagination. For marker-based paginated APIs, this field will be omitted.                                                                                                                |
  | `entries`     | array of [Upload part](#upload-part) | No       | A list of uploaded chunks for an upload session.                                                                                                                                                                                                                                           |

  ```json Example theme={null}
  {
    "total_count": 5000,
    "limit": 1000,
    "offset": 2000,
    "order": [
      {
        "by": "type",
        "direction": "ASC"
      }
    ],
    "entries": [
      {
        "part_id": "6F2D3486",
        "offset": 16777216,
        "size": 3222784,
        "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
      }
    ]
  }
  ```
</Accordion>

## Upload session

An upload session for chunk uploading a file.

<Accordion title="Attributes and example">
  | Property              | Type           | Required | Description                                                                                                                                                                                                        |
  | --------------------- | -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | `id`                  | `string`       | No       | The unique identifier for this session.                                                                                                                                                                            |
  | `type`                | `enum<string>` | No       | The value will always be `upload_session`. Available options: `upload_session`.                                                                                                                                    |
  | `session_expires_at`  | `string`       | No       | The date and time when this session expires.                                                                                                                                                                       |
  | `part_size`           | `integer`      | No       | The size in bytes that must be used for all parts of of the upload. Only the last part is allowed to be of a smaller size.                                                                                         |
  | `total_parts`         | `integer`      | No       | The total number of parts expected in this upload session, as determined by the file size and part size.                                                                                                           |
  | `num_parts_processed` | `integer`      | No       | The number of parts that have been uploaded and processed by the server. This starts at `0`. When committing a file files, inspecting this property can provide insight if all parts have been uploaded correctly. |
  | `session_endpoints`   | `object`       | No       | A list of endpoints for a chunked upload session.                                                                                                                                                                  |

  ```json Example theme={null}
  {
    "id": "F971964745A5CD0C001BBE4E58196BFD",
    "type": "upload_session",
    "session_expires_at": "2012-12-12T10:53:43-08:00",
    "part_size": 1024,
    "total_parts": 1000,
    "num_parts_processed": 455,
    "session_endpoints": {
      "upload_part": "https://{box-upload-server}/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD",
      "commit": "https://{box-upload-server}/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD/commit",
      "abort": "https://{box-upload-server}/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD",
      "list_parts": "https://{box-upload-server}/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD/parts",
      "status": "https://{box-upload-server}/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD",
      "log_event": "https://{box-upload-server}/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD/log"
    }
  }
  ```
</Accordion>

## Uploaded part

A chunk of a file uploaded as part of an upload session, as returned by some endpoints.

<Accordion title="Attributes and example">
  | Property | Type                        | Required | Description |
  | -------- | --------------------------- | -------- | ----------- |
  | `part`   | [Upload part](#upload-part) | No       |             |

  ```json Example theme={null}
  {
    "part": {
      "part_id": "6F2D3486",
      "offset": 16777216,
      "size": 3222784,
      "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
    }
  }
  ```
</Accordion>
