SAP Knowledge Base Article - Public

2537592 - Download Attachments Using OData Service


You want to download the files attached to your documents (Opportunities, Service Requests, Leads, etc.) by making use of the OData Service.


SAP Cloud for Customer


  1. Access the URL for the desired OData collection you want to use, for this test we will use the ServiceRequestCollection object.
  2. After using the URL for the object, i.e.,'Object ID')? . (Replace XXXXXX with your system number after "my". The Object ID here is that of a service request.)
  3. Expand the attachment folder by adding $expand=ServiceRequestAttachmentFolder at the end of the URL.
  4. Use the link provided in the property “id” that is like this:'Object ID'). (The Object ID here is that of an attachment. )
  5. Append the segment /Binary/$value to the end of the link above and access the link.
  6. The corresponding attachment will be downloaded.


Download attachments, OData services, OData API , KBA , LOD-CRM-INT-API , OData API (C4C Only) , AP-RC-ODF , OData framework (C4C Only) , How To


SAP Cloud for Customer add-ins all versions