An attachment can be any document, such as a bill, spreadsheet, or tax form, that provides tangible, historical, and auditable information in support of a transaction or financial record.


List Attachments

get_list

<get_list object="supdoc" maxitems="1">
</get_list>

Parameters

Name Required Type Description
object Required string Use supdoc
start Optional integer Start at item, zero-based integer
maxitems Optional integer Max items to return
showprivate Optional boolean Show entity private records if running this at top level. Use either true or false. (Default: false)
filter Optonal object Filter(s) to use in list
sorts Optional sortfield[] Field(s) to sort by in response
fields Optional field[] Field(s) to return in response

filter

Name Required Type Description
logical Optional object Logical filter. Required if not using expression
expression Optional object Expression filter. Required if not using logical

logical

Name Required Type Description
logical_operator Required string Operator. Use either and or or.
object Optional string Object of operator
Logical Filter/Expression Required array[logical, expression] Additional logical objects or expressions to filter by

expression

Name Required Type Description
field Required string Field
operator Required string Operator
value Required string Value. Use either =, !=, <, <=, >=, >, like or is null.

sortfield

Name Required Type Description
order Required string Sort by order. Use either asc or desc

Consider limiting the fields and maxitems returned since attachment data is also sent, which can be very large.


Get Attachment by Name

get

<get object="supdoc" key="A1234">
</get>

Parameters

Name Required Type Description
object Required string Use supdoc
key Required string The object supdocid to get
fields Optional field[] Field(s) to return in response

Consider limiting the fields returned since attachment data is also sent, which can be very large.


Create Attachment

create_supdoc

<create_supdoc>
    <supdocid>newSupDocID</supdocid>
    <supdocfoldername>mySupFolder</supdocfoldername>
    <supdocdescription>Blah blah</supdocdescription>
    <attachments>
        <attachment>
            <attachmentname>My Attachment1</attachmentname>
            <attachmenttype>txt</attachmenttype>
            <attachmentdata>aGVsbG8gd29ybGQhIHRoaXMgaXMgYmFzZTY0IGVuY29kZWQgZGF0YQ==</attachmentdata>
        </attachment>
    </attachments>
</create_supdoc>

Parameters

Name Required Type Description
supdocid Optional string Attachment ID. Required if company does not have attachment autonumbering configured.
supdocname Required string Name of attachment
supdocfoldername Required string Attachments folder to create in
supdocdescription Optional string Description
attachments Optional array[attachment] Zero to many attachments

attachment

Name Required Type Description
attachmentname Required string File name, no period or extension
attachmenttype Required string File extension, no period
attachmentdata Required string Base64 encode the file’s binary data

Update Attachment

update_supdoc

<update_supdoc>
    <supdocid>oldSupDocID</supdocid>
    <supdocfoldername>A Different Folder</supdocfoldername>
    <supdocdescription>Update!</supdocdescription>
    <attachments>
        <attachment>
            <attachmentname>My Attachment1</attachmentname>
            <attachmenttype>txt</attachmenttype>
            <attachmentdata>aGVsbG8gd29ybGQhIHRoaXMgaXMgYmFzZTY0IGVuY29kZWQgZGF0YQ==</attachmentdata>
        </attachment>
    </attachments>
</update_supdoc>

Parameters

Name Required Type Description
supdocid Required string Attachment ID to update
supdocname Optional string Name of attachment
supdocfoldername Optional string Attachments folder to create in
supdocdescription Optional string Description
attachments Optional array[attachment]  

attachment

Name Required Type Description
attachmentname Required string File name, no period or extension
attachmenttype Required string File extension, no period
attachmentdata Required string Base64 encode the file’s binary data

Delete Attachment

delete_supdoc

<delete_supdoc key="A1234"></delete_supdoc>

Parameters

Name Required Type Description
key Required string Attachment ID to delete

List Attachment Folders

get_list

<get_list object="supdocfolder">
</get_list>

Parameters

Name Required Type Description
object Required string Use supdocfolder
start Optional integer Start at item, zero-based integer
maxitems Optional integer Max items to return
showprivate Optional boolean Show entity private records if running this at top level. Use either true or false. (Default: false)
filter Optonal object Filter(s) to use in list
sorts Optional sortfield[] Field(s) to sort by in response
fields Optional field[] Field(s) to return in response

filter

Name Required Type Description
logical Optional object Logical filter. Required if not using expression
expression Optional object Expression filter. Required if not using logical

logical

Name Required Type Description
logical_operator Required string Operator. Use either and or or.
object Optional string Object of operator
Logical Filter/Expression Required array[logical, expression] Additional logical objects or expressions to filter by

expression

Name Required Type Description
field Required string Field
operator Required string Operator
value Required string Value. Use either =, !=, <, <=, >=, >, like or is null.

sortfield

Name Required Type Description
order Required string Sort by order. Use either asc or desc

Get Attachment Folder by Name

get

<get object="supdocfolder" key="Bills">
</get>

Parameters

Name Required Type Description
object Required string Use supdocfolder
key Required string The object supdocfoldername to get
fields Optional field[] Field(s) to return in response

Create Attachment Folder

create_supdocfolder

<create_supdocfolder>
    <supdocfoldername>MyTestFolder</supdocfoldername>
    <supdocfolderdescription></supdocfolderdescription>
    <supdocparentfoldername></supdocparentfoldername>
</create_supdocfolder>

Parameters

Name Required Type Description
supdocfoldername Required string Attachment folder name to create
supdocfolderdescription Optional string Description
supdocparentfoldername Optional string Parent attachment folder

Update Attachment Folder

update_supdocfolder

<update_supdocfolder>
    <supdocfoldername>MyTestFolder</supdocfoldername>
    <supdocfolderdescription>hello world!</supdocfolderdescription>
    <supdocparentfoldername></supdocparentfoldername>
</update_supdocfolder>

Parameters

Name Required Type Description
supdocfoldername Required string Attachment folder name to update
supdocfolderdescription Optional string Description
supdocparentfoldername Optional string Parent attachment folder

Delete Attachment Folder

delete_supdocfolder

<delete_supdocfolder key="MyFolder"></delete_supdocfolder>

Parameters

Name Required Type Description
key Required string Attachment folder name to delete

Provide feedback