Files

Updates file properties of a single file

put/Files/{FileId}

Request

  • Base URL
    https://api.xero.com/files.xro/1.0
  • URL
    https://api.xero.com/files.xro/1.0/Files/{FileId}
  • Auth
    OAuth 2
    Authorization code: https://login.xero.com/identity/connect/authorize
    Token URL: https://identity.xero.com/connect/token scopes: files

Path parameters

FileIdstring uuid required
Example:4ff1e5cc-9835-40d5-bb18-09fdb118db9c

File id for single object

Headers

Idempotency-Keystring

This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Request body

Namestring

File Name

MimeTypestring

MimeType of the file (image/png, image/jpeg, application/pdf, etc..)

Sizeinteger

Numeric value in bytes

CreatedDateUtcstring

Created date in UTC

UpdatedDateUtcstring

Updated date in UTC

Idstring uuid

File object's UUID

FolderIdstring uuid

Folder relation object's UUID

Example request

{
  "Name": "File2.jpg",
  "MimeType": "image/jpeg",
  "Size": 3615,
  "CreatedDateUtc": "2020-12-03T19:04:58.6970000",
  "UpdatedDateUtc": "2020-12-03T19:04:58.6970000",
  "User": {
    "Id": "4ff1e5cc-9835-40d5-bb18-09fdb118db9c",
    "Name": "john.smith@mail.com",
    "FirstName": "John",
    "LastName": "Smith",
    "FullName": "Smith"
  },
  "Id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "FolderId": "0f8ccf21-7267-4268-9167-a1e2c40c84c8"
}

Response

A successful request

Namestring

File Name

MimeTypestring

MimeType of the file (image/png, image/jpeg, application/pdf, etc..)

Sizeinteger

Numeric value in bytes

CreatedDateUtcstring

Created date in UTC

UpdatedDateUtcstring

Updated date in UTC

Idstring uuid

File object's UUID

FolderIdstring uuid

Folder relation object's UUID

Example response

{
  "Name": "File2.jpg",
  "MimeType": "image/jpeg",
  "Size": 3615,
  "CreatedDateUtc": "2020-12-03T19:04:58.6970000",
  "UpdatedDateUtc": "2020-12-03T19:04:58.6970000",
  "User": {
    "Id": "4ff1e5cc-9835-40d5-bb18-09fdb118db9c",
    "Name": "john.smith@mail.com",
    "FirstName": "John",
    "LastName": "Smith",
    "FullName": "Smith"
  },
  "Id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "FolderId": "0f8ccf21-7267-4268-9167-a1e2c40c84c8"
}

Changes

    • breaking

      added the new required header request parameter xero-tenant-id to all path's operations

    • breaking

      the request's body type changed from no type to object

    • breaking

      the response's body type changed from no type to object for status

    • info

      added the new optional header request parameter Idempotency-Key

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • breaking

      the request's body type changed from object to no type

    • breaking

      the response's body type changed from object to no type for status

    • warning

      deleted the header request parameter Idempotency-Key

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status