Opportunities / Attachments#
File attachments (Salesforce ContentDocuments) linked to an Opportunity.Concepts#
Upload is raw binary, not multipart: unlike XC Documents, uploading here sends the file's raw bytes as the request body (application/octet-stream). The filename and MIME type are passed via the X-Filename and X-Content-Type headers, not form fields. If X-Filename is omitted, a name is generated from the opportunity ID, a timestamp, and the content type.
"Download" returns a URL, not a stream: the download endpoint's response body is { "url": "..." } — a direct Salesforce link to the file — rather than the file bytes themselves. The client fetches that URL separately.
Endpoints#
GET /v1/xc/salesforce/opportunities/{id}/attachmentsPOST /v1/xc/salesforce/opportunities/{id}/attachmentsGET /v1/xc/salesforce/opportunities/{id}/attachments/{attachmentId}Source#
Controller: controllers/salesforce/opportunity.controller.js
Service: services/salesforce/opportunity.service.js
Modified at 2026-09-25 18:25:20