Overview

Uploading and attaching files to item requires three api requests.

  1. You need to upload the file to the system. The response from this request will provide you with a fileItemId.
  2. If you have not previously obtained the item details you need to fetch the item details to obtain the current item properties. The most important property you require is the item signature, however, you should also retrieve the collection, geometry, icon and colour. See Fetch an item, for more information about how to retrieve item details.
  3. The final request is required to attach the file to an asset and is performed as an item edit. See Fetch an item
Note

The behaviour of this endpoint differs depending on whether a design for the item is versioned or non versioned.

For a non-versioned design there is only one version of an item available, and the edit operation is applied to that version editing its properties and attributes.

For a versioned design of the item, however, a new version of the item being edited is created with the new properties and attributes. The End date property of the current version of the item is changed to the date of the edit operation.

If one or more attributes are not specified or the attribute values are not changed then their value will be left unchanged, otherwise the values will be replaced by the new values.

For more information go to Delete Item.

Example

The following example illustrate the requests required to upload and attach a file to an item.