GET InvoiceAttachments/Id

Gets all the information around attachments for a given invoice id. Does not return the attachment itself, just the metadata/information regarding all attachments.

Request Information

URI Parameters

Name Description Type Additional information
WsAccessKey The Web Service access key for this user and file which allows access to the API for the associated file (found in File - Settings). Using OAuth authentication mechanism is the preferred method to allow API access. string

Optional. Legacy authentication method and only required if not using OAuth. OAuth is preferred.

FileId Specifies the file id of the file to perform the operation upon. integer

Required

Id The Invoice Id to retrieve attachments for. integer

Required

Body Parameters

None.

Response Information

Resource Description

FileAttachmentListResponse
Name Description Type Additional information
Attachments List of attachments. Collection of FileAttachmentInfo

None.

_links Hypermedia links. Contains contextual links to possible next actions related to this resource. Only present in responses. This data is not to be sent to the server. Collection of Link

None.

Response Formats

application/json, text/json

Sample:
{
  "Attachments": [
    {
      "Id": 282,
      "Size": 29924,
      "Name": "File attachment 1.doc",
      "Description": "Invoice document 1",
      "ItemIdAttachedTo": 16845,
      "_links": [
        {
          "rel": "detail",
          "href": "https://api.saasu.com/InvoiceAttachment/282?FileId=123",
          "method": "GET",
          "title": null
        }
      ]
    },
    {
      "Id": 283,
      "Size": 54124,
      "Name": "Toy sale.doc",
      "Description": "Toy sale invoice",
      "ItemIdAttachedTo": 16845,
      "_links": [
        {
          "rel": "detail",
          "href": "https://api.saasu.com/InvoiceAttachment/283?FileId=123",
          "method": "GET",
          "title": null
        }
      ]
    }
  ],
  "_links": [
    {
      "rel": "self",
      "href": "https://api.saasu.com/InvoiceAttachments?FileId=123",
      "method": "GET",
      "title": null
    },
    {
      "rel": "next",
      "href": "https://api.saasu.com/InvoiceAttachments?FileId=123&Page=2&PageSize=25",
      "method": "GET",
      "title": null
    }
  ]
}

application/xml, text/xml

Sample:
<FileAttachmentListResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <_links>
    <Link>
      <rel>self</rel>
      <href>https://api.saasu.com/InvoiceAttachments?FileId=123</href>
      <method>GET</method>
    </Link>
    <Link>
      <rel>next</rel>
      <href>https://api.saasu.com/InvoiceAttachments?FileId=123&amp;Page=2&amp;PageSize=25</href>
      <method>GET</method>
    </Link>
  </_links>
  <Attachments>
    <FileAttachmentInfo>
      <_links>
        <Link>
          <rel>detail</rel>
          <href>https://api.saasu.com/InvoiceAttachment/282?FileId=123</href>
          <method>GET</method>
        </Link>
      </_links>
      <Name>File attachment 1.doc</Name>
      <Description>Invoice document 1</Description>
      <ItemIdAttachedTo>16845</ItemIdAttachedTo>
      <Id>282</Id>
      <Size>29924</Size>
    </FileAttachmentInfo>
    <FileAttachmentInfo>
      <_links>
        <Link>
          <rel>detail</rel>
          <href>https://api.saasu.com/InvoiceAttachment/283?FileId=123</href>
          <method>GET</method>
        </Link>
      </_links>
      <Name>Toy sale.doc</Name>
      <Description>Toy sale invoice</Description>
      <ItemIdAttachedTo>16845</ItemIdAttachedTo>
      <Id>283</Id>
      <Size>54124</Size>
    </FileAttachmentInfo>
  </Attachments>
</FileAttachmentListResponse>