Also see LineItems::Attachments#create.

This operation is authorized to any partner of the line item.

Existing versions cannot be updated, they can only be deleted.

Examples

This will create a new version for the attachment with the provided :id.

PUT /line_items/:line_item_id/attachments/:id

{
  versions_attributes: [{
    note: "Direct upload from our FTP",
    remote_attached_url: "ftp://www.mycompany.com/images/my_file.png"
  }]
}

Params

Param name Description
source_id
optional

ID in Customer’s source system (optional, max 255 char.)

Must be a String
name
optional

A name for the attachment. If no name provided, filename will be used

Must be a String
label
optional

The ‘folder’ (virtual) for his attachment

Must be a String
versions_attributes
optional

an array of versions

An array of versions. Here is a list version attributes * base64_data allow you to submit an image as a base64 string * attached a file, any kind of format * remote_attached_url an url to find a file. the file is downloaded asynchronously. Please observe that * you can only submit a version at a time * you should only use one of the three attributes