Upload a file with a multipart/form-data request. Send the file itself plus a type describing what the file is for; the response returns the id of the stored file.
Files are attached to a record in one of two ways, depending on the type.
Attached on upload. Send linkedTo with the id of the record the file belongs to and the file is attached immediately, appearing in that record's files (see Search files).
person— a person's files. Requires Write Files at one of the person's campuses while multi-campus is on. An upload carries no file category, so a caller limited to some file categories cannot upload person files this way.business— a business's files. Requires Limited Write Contributions or Full Write Accounting, and the caller's campus or organization limit must reach the business.sermon— a sermon's files. Requires Full Write Sermons, at one of the sermon's campuses or organizations. A sermon that belongs only to archived organizations is read-only history: the upload answers 400 with the messageorganization_archived_record_desc.batch— a contribution batch's files. Requires Limited Write Contributions.bank_reconciliation— a bank reconciliation's files. Requires Bank Reconciliations, and Full Write Accounting at every campus while multi-campus is on.
Attached by a later request. Omit linkedTo, then send the returned id in the files array of the record you save next. The file stays unattached until that request succeeds.
transaction_file— attach with Update contribution or Add transaction to batch. Requires Limited Write Contributions.journal_entry— attach with Create or Update journal entry, Adjust journal entry, or Create or Update bill. Requires Full Write Accounting.safeguard— attach with Add safeguard or Update safeguard. Requires Write Safeguards.
Uploads of person, business, transaction_file, journal_entry and safeguard files count against your account's storage capacity, and are rejected while the account is on a trial or once that capacity is exhausted.
Required permission: Write Files or Limited Write Contributions or Full Write Accounting or Bank Reconciliations or Full Write Sermons or Write Safeguards
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
401Authentication is required, or the Ocs-Api-Key header is missing or invalid.
