List Partner Files

GET https://api.suger.cloud/ai/org/{orgId}/prm/partnerFile

List the files in this organization's partner file library, private ones included, with their name, category, type, size and sharing (`sharingMode` says who can see each). Without `direction` it lists the whole library. For what was exchanged with one partner, set `direction` to `shared` (files this organization shared with them) or `received` (files they shared with it), together with `partnerOrgId`, which `direction` needs: the partner's own Fours organization id from its row in ListPrmPartnerships. `linkable=true` lists only the files a partner invitation email may link: this organization's own files shared with All Partners and available for download (the recipient of an invitation is not a partner yet, so never a Private, Specific-Partners or non-downloadable file), and is still answered while the Files module is hidden; it takes no `direction` or `partnerOrgId` (400). Feed a returned file's id (as a FILE-kind referenced document) to CreatePrmInvitation or GeneratePrmInvitationEmail. A call returns 10 rows unless `limit` says otherwise (at most 100; a larger `limit`, up to 1000, returns only 100 rows and sends `offset` to the wrong page, and one over 1000 is refused): page by sending `limit` on every call with `offset` a multiple of it (0, `limit`, twice `limit`,...) until you have `total_count` rows, and filter with `q`. For a download link to one file, call GetPartnerFile.

Parameters

NameInTypeRequiredDescription
orgId path string yes Organization ID
q query string no Filter: a LISP expression over the row's stored fields, written (= field "value"); combine conditions with (and...)
s query string no Sort field
limit query integer no Rows to return (default 10, at most 100; a larger value, up to 1000, returns only 100 rows and sends `offset` to the wrong page; over 1000 is refused)
offset query integer no Rows to skip, a multiple of `limit` and sent together with it
direction query string no Partner-profile view: shared | received (requires partnerOrgId). Omit for the owner-only library scope
partnerOrgId query string no Counterparty org id for a direction view
linkable query boolean no true: only the files an invitation may link (shared with All Partners, downloadable); not with direction or partnerOrgId

Responses

200 — OK

Content-Type: application/json · Schema: ListBaseResponse-PartnerFile

ListBaseResponse-PartnerFile fields:

FieldTypeRequiredDescription
data array<PartnerFile> no
page_number integer no
page_size integer no
total_count integer no TotalCount is the number of matching rows, counted up to ListCountCap. When TotalCountCapped is true it is that cap rather than the real total.
total_count_capped boolean no TotalCountCapped reports that more rows match than TotalCount says: the count stopped at ListCountCap because an exact total costs a full scan of everything the filter matches. Clients should present TotalCount as a lower bound ("10,000+") when this is set. Omitted when false, so clients that predate the field are unaffected.

PartnerFile fields:

FieldTypeRequiredDescription
allowDownload boolean no Whether partners can download (vs preview only)
category string no sales_enablement, product_documentation, marketing_assets, technical_resources, case_studies, legal_compliance, onboarding
createTime string no Creation timestamp
deletedAt string no The time it was deleted; empty while it is active.
description string no Optional description
externalId string no The file's ID in the source CRM. Nil for manual uploads.
fileType string no pdf, pptx, docx, xlsx, mp4, image, zip, other
id string no ID of the ent. Unique partner file identifier (UUID)
lastUpdateTime string no Last update timestamp
mimeType string no Content-Type captured from upload
name string no Display name
s3Bucket string no S3 bucket name (org-file bucket)
s3Key string no Full S3 object key
sharingMode string no private, all_partners, specific_partners
sizeBytes integer no File size in bytes
source string no Origin of the file: empty = uploaded by the user in Fours; otherwise the source CRM (e.g. salesforce)
sourceOrgId string no Uploader org (ISV org for ISV uploads, partner org for partner uploads)
targetOrgId array<string> no Recipient org IDs that can see this file. Empty for ISV private/all_partners files. Single element for partner uploads (the ISV org).
uploadedByUserId string no Fours user ID for ISV uploads, partner email for partner uploads
uploadedByUserName string no Display name of the uploader, as it was at upload time

400 — Bad request error

Content-Type: application/json

Example

Generated from this operation's schema. Values are placeholders — substitute your own ids, and set SUGER_TOKEN to a bearer token from the OAuth client-credentials exchange.

Request

curl -X GET 'https://api.suger.cloud/ai/org/{orgId}/prm/partnerFile' \
  -H "Authorization: Bearer $SUGER_TOKEN"

Response — 200

{
  "data": [
    {
      "allowDownload": true,
      "category": "string",
      "createTime": "2026-01-31T12:00:00Z",
      "deletedAt": "string",
      "description": "string",
      "externalId": "01H0000000000000000000",
      "fileType": "string",
      "id": "01H0000000000000000000",
      "lastUpdateTime": "2026-01-31T12:00:00Z",
      "mimeType": "string",
      "name": "Acme Corp",
      "s3Bucket": "string"
    }
  ],
  "page_number": 1,
  "page_size": 1,
  "total_count": 1,
  "total_count_capped": true
}

Error — 400

"string"

View as Markdown · API reference overview

Spotted something wrong or out of date on this page? Tell us and we'll correct it.