Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Attachments > View Attachment List

View Attachment List

Use the View Attachment REST request to get a list of attachments on an account, an invoice, or a subscription.

Request

  • Production: GET https://api.zuora.com/rest/v1/attachments/
    {object-type}/{object-key}
  • API SandboxGET https://apisandbox-api.zuora.com/rest/v1/attachments/
    {object-type}/{object-key}

Request Parameters

object-type required

Specify one of the following:

  • Account
  • Subscription
  • Invoice
object-key required Id of the attachment. This id is included in the response from the Add Attachment request.

 

Response

attachments

Container for one or more attachments

id Zuora id of this attachement
fileName Attachment file name
description Description of the attachment
fileId File id of the attached file
fileContentType Attachment file type
createdOn Date and time when the attachment was added to the object
createdBy Zuora user id of who added this attachment to the object
updatedOn Date and time when the attachment was last updated
updatedBy Zuora user id who last updated the attachment
success

Returns true if the request is successful. Otherwise, returns false.

 

Sample

Request

GET https://api.zuora.com/rest/v1/attachments/Account/402896b9530c897a01530c93e85e0011

Response

{
  ​"attachments": [
    {
      "id": "402896b95397c169015397c2ebca0003",
      "filename": "Search _ Splunk.pdf",
      "description": null,
      "fileId": "402896b95397c169015397c2ebc50002",
      "fileContentType": "application/pdf",
      "createdOn": "2016-03-21 14:00:47",
      "createdBy": "402881e522cf4f9b0122cf5d82860002",
      "updatedOn": "2016-03-21 14:00:47",
      "updatedBy": "402881e522cf4f9b0122cf5d82860002",
      "success": true
    },
    {
      "id": "8a8083e1545b706a01547316d93f4401",
      "fileName": "AttachTest.txt",
      "description": "",
      "fileId": "8a8083e1545b706a01547316d9094400",
      "fileContentType": "text/plain",
      "createdOn": "2016-05-02 13:09:17",
      "createdBy": "4028e487327fd45a0132829ebb673ff9",
      "updatedOn": "2016-05-02 13:09:17",
      "updatedBy": "4028e487327fd45a0132829ebb673ff9"
    }
  ],
  "success": true
}

 

Last modified
10:54, 9 May 2016

Tags

This page has no custom tags.

Classifications

(not set)