{"id":3449,"date":"2021-05-13T09:42:10","date_gmt":"2021-05-13T09:42:10","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/?p=3449"},"modified":"2024-07-01T09:09:41","modified_gmt":"2024-07-01T09:09:41","slug":"reading-attachments-through-api","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/","title":{"rendered":"Reading Attachments through API"},"content":{"rendered":"\n<p>Attachments are useful in maintaining a track of any supportive documents added to any sale,&nbsp;purchase&nbsp;or journal entry transactions. Supporting information files\/images can be attached for quotes, invoices, credit notes, payments, bills, journal entries.<br>For instance, one can attach a receipt, brochure, commodity images, or any such transaction documents that might prove useful to the customers or&nbsp;vendors.<\/p>\n\n\n\n<p>To find details of a referenced attachment ID from GL batch, AP bill, etc., we can use <a href=\"https:\/\/www.greytrix.com\/product\/professional-services\/sage-intacct-development-services\" data-type=\"URL\" data-id=\"https:\/\/www.greytrix.com\/product\/professional-services\/sage-intacct-development-services\">Sage Intacct<\/a> Web Services. They are the systematic way of retrieving data through API. These XML-based API calls are convenient means to read the complete data of any object in Intacct. We can apply queries and filter it according to our needs.<\/p>\n\n\n\n<p>We can use the &lt;get_list object=\u201dsupdoc\u201d&gt; function to read the object supdoc. Attachment IDs are stored as SUPDOCIDs in GLBatch, AP Bill, Invoice objects as shown below.<\/p>\n\n\n<p><a href=\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-content\/uploads\/2021\/05\/supdoc_api_request1.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px;\" src=\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-content\/uploads\/2021\/05\/supdoc_api_request1.png\" alt=\"supdoc_api_request\"><\/a><\/p>\n\n\n<p>For extracting any particular attachment data as base64 encoded string, we can query in the following way. The SUPDOCID(Attachment1) that we supplied in the below query can be retrieved by firing a read query on the desired object. The value of the field &lt;SUPDOCID&gt; is to be fetched from response.<\/p>\n\n\n<p><a href=\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-content\/uploads\/2021\/05\/supdoc_api_using_filters1.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px;\" src=\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-content\/uploads\/2021\/05\/supdoc_api_using_filters1.png\" alt=\"supdoc_api_using_filters\"><\/a><\/p>\n\n\n<p>The function returns all the details like name, type, base64 of the attachment and the supporting document creation details. Below is the response snippet after executing the above query:<\/p>\n\n\n<p><a href=\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-content\/uploads\/2021\/05\/supdoc_api_response1.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px;\" src=\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-content\/uploads\/2021\/05\/supdoc_api_response1.png\" alt=\"supdoc_api_response\"><\/a><\/p>\n\n\n<p>This is how we can fetch the details of any attachment through web services so easily. Once we get the base64 and the attachment type, we can further carry out actions that feeds it to some external program if required.<\/p>\n\n\n\n<p><span style=\"font-size: Medium;\"><strong>About Us<\/strong><\/span><\/p>\n\n\n\n<p>Greytrix has a wide product range for Sage Intacct- a Cloud ERP. This includes migrations from QuickBooks | Sage 50 | Sage 100 | Sage 300 to Sage Intacct. Our unique GUMU&#x2122; integrations include Sage Intacct for Sage CRM | Salesforce | FTP\/SFTP | Rev.io | Checkbook | Dynamics 365 CRM | Magento | Rent Manager&nbsp;| Treez | Avalara Avatax | Blackline SFTP. We also offer best-in-class Sage Intacct Development Services, Consulting services, integrated apps like POS | WMS | Payroll | Shipping System | Business Intelligence | eCommerce for Sage Intacct to Sage business partners, resellers, and Sage PSG worldwide. Greytrix constantly develops apps, products, and add-ons to enhance user experience. Sage Intacct add-ons include AR Lockbox File Processing. <br><br>Greytrix GUMU&#x2122; integration for Sage CRM &#8211; Sage Intacct, Sales Commission App for Sage Intacct, and Checkbook.io ACH\/Digital Check Payments for Sage powered by GUMU&#x2122; are listed on Sage Intacct Marketplace.<\/p>\n\n\n\n<p>The GUMU&#x2122; Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for the processing and execution of application programs at the click of a button.<\/p>\n\n\n\n<p>For more information on Sage Business Cloud Services, please contact us at <a href=\"mailto:sagecloud@greytrix.com\">sagecloud@greytrix.com<\/a>. We will like to hear from you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Attachments are useful in maintaining a track of any supportive documents added to any sale,&nbsp;purchase&nbsp;or journal entry transactions. Supporting information files\/images can be attached for quotes, invoices, credit notes, payments, bills, journal entries.For instance, one can attach a receipt, brochure, commodity images, or any such transaction documents that might prove useful to the customers or&nbsp;vendors.\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[397,396,351,395,34,119],"class_list":["post-3449","post","type-post","status-publish","format-standard","hentry","category-sage-intacct","tag-ap-bill","tag-gl-batch","tag-invoice-analysis","tag-reading-attachments-through-api","tag-sage-intacct","tag-sage-intacct-web-services"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Reading attachments through the API<\/title>\n<meta name=\"description\" content=\"Discover an attachment ID referenced from an AP bill, GL batch, etc.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Reading attachments through the API\" \/>\n<meta property=\"og:description\" content=\"Discover an attachment ID referenced from an AP bill, GL batch, etc.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Sage Intacct \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-13T09:42:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-01T09:09:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-content\/uploads\/2021\/05\/supdoc_api_request1.png\" \/>\n<meta name=\"author\" content=\"Greytrix\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Greytrix\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/\",\"name\":\"Reading attachments through the API\",\"isPartOf\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-content\/uploads\/2021\/05\/supdoc_api_request1.png\",\"datePublished\":\"2021-05-13T09:42:10+00:00\",\"dateModified\":\"2024-07-01T09:09:41+00:00\",\"author\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#\/schema\/person\/8ac414c989344a55601e96b46e8720fb\"},\"description\":\"Discover an attachment ID referenced from an AP bill, GL batch, etc.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/#primaryimage\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-content\/uploads\/2021\/05\/supdoc_api_request1.png\",\"contentUrl\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-content\/uploads\/2021\/05\/supdoc_api_request1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Reading Attachments through API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#website\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/\",\"name\":\"Sage Intacct \u2013 Tips, Tricks and Components\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#\/schema\/person\/8ac414c989344a55601e96b46e8720fb\",\"name\":\"Greytrix\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3cdb553d6ca07df0e407d5e092f2410d163e0fd40b27734b345b04c8f0786969?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3cdb553d6ca07df0e407d5e092f2410d163e0fd40b27734b345b04c8f0786969?s=96&d=mm&r=g\",\"caption\":\"Greytrix\"},\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/author\/greytrix\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Reading attachments through the API","description":"Discover an attachment ID referenced from an AP bill, GL batch, etc.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/","og_locale":"en_US","og_type":"article","og_title":"Reading attachments through the API","og_description":"Discover an attachment ID referenced from an AP bill, GL batch, etc.","og_url":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/","og_site_name":"Sage Intacct \u2013 Tips, Tricks and Components","article_published_time":"2021-05-13T09:42:10+00:00","article_modified_time":"2024-07-01T09:09:41+00:00","og_image":[{"url":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-content\/uploads\/2021\/05\/supdoc_api_request1.png","type":"","width":"","height":""}],"author":"Greytrix","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Greytrix","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/","url":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/","name":"Reading attachments through the API","isPartOf":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/#primaryimage"},"image":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-content\/uploads\/2021\/05\/supdoc_api_request1.png","datePublished":"2021-05-13T09:42:10+00:00","dateModified":"2024-07-01T09:09:41+00:00","author":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#\/schema\/person\/8ac414c989344a55601e96b46e8720fb"},"description":"Discover an attachment ID referenced from an AP bill, GL batch, etc.","breadcrumb":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/#primaryimage","url":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-content\/uploads\/2021\/05\/supdoc_api_request1.png","contentUrl":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-content\/uploads\/2021\/05\/supdoc_api_request1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/05\/13\/reading-attachments-through-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/"},{"@type":"ListItem","position":2,"name":"Reading Attachments through API"}]},{"@type":"WebSite","@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#website","url":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/","name":"Sage Intacct \u2013 Tips, Tricks and Components","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#\/schema\/person\/8ac414c989344a55601e96b46e8720fb","name":"Greytrix","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3cdb553d6ca07df0e407d5e092f2410d163e0fd40b27734b345b04c8f0786969?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3cdb553d6ca07df0e407d5e092f2410d163e0fd40b27734b345b04c8f0786969?s=96&d=mm&r=g","caption":"Greytrix"},"url":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/author\/greytrix\/"}]}},"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/posts\/3449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/comments?post=3449"}],"version-history":[{"count":4,"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/posts\/3449\/revisions"}],"predecessor-version":[{"id":3490,"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/posts\/3449\/revisions\/3490"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/media?parent=3449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/categories?post=3449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/tags?post=3449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}