POST
/
v1
/
files
/
{id}
/
uploaded
from polar_sdk import Polar


with Polar(
    access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:

    res = polar.files.uploaded(id="<value>", file_upload_completed={
        "id": "<id>",
        "path": "/boot",
        "parts": [
            {
                "number": 979613,
                "checksum_etag": "<value>",
                "checksum_sha256_base64": "<value>",
            },
        ],
    })

    # Handle response
    print(res)
{
  "id": "<string>",
  "organization_id": "<string>",
  "name": "<string>",
  "path": "<string>",
  "mime_type": "<string>",
  "size": 123,
  "storage_version": "<string>",
  "checksum_etag": "<string>",
  "checksum_sha256_base64": "<string>",
  "checksum_sha256_hex": "<string>",
  "last_modified_at": "2023-11-07T05:31:56Z",
  "version": "<string>",
  "service": "<string>",
  "is_uploaded": true,
  "created_at": "2023-11-07T05:31:56Z",
  "size_readable": "<string>"
}

Authorizations

Authorization
string
header
required

You can generate an Organization Access Token from your organization's settings.

Path Parameters

id
string
required

The file ID.

Body

application/json

Response

200
application/json

File upload completed.

File to be associated with the downloadables benefit.