Files

Retrieves a specific file associations

Changed on

By passing in the appropriate options,

get/Files/{FileId}/Associations

Request

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

Path parameters

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

File id for single object

Response

search results matching criteria

SendWithObjectboolean

Boolean flag to determines whether the file is sent with the document it is attached to on client facing communications. Note- The SendWithObject element is only returned when using /Associations/{ObjectId} endpoint.

Namestring

The name of the associated file. Note- The Name element is only returned when using /Associations/{ObjectId} endpoint.

Sizeinteger

The size of the associated file in bytes. Note- The Size element is only returned when using /Associations/{ObjectId} endpoint.

CreatedDateUtcstring date-time

The date the file was created (UTC). Note- The CreatedDateUtc element is only returned when using /Associations/{ObjectId} endpoint.

AssociationDateUtcstring date-time

The date the file was associated with the object (UTC). Note- The AssociationDateUtc element is only returned when using /Associations/{ObjectId} endpoint.

FileIdstring uuid

The unique identifier of the file

ObjectIdstring uuid

The identifier of the object that the file is being associated with (e.g. InvoiceID, BankTransactionID, ContactID)

ObjectGroup'Account' | 'BankTransaction' | 'Contact' | 'CreditNote' | 'Invoice' | 'Item' | 'ManualJournal' | 'Overpayment' | 'Payment' | 'Prepayment' | 'Quote' | 'Receipt'

The Object Group that the object is in. These roughly correlate to the endpoints that can be used to retrieve the object via the core accounting API.

ObjectType'Unknown' | 'Accpay' | 'AccPayCredit' | 'AccPayPayment' | 'AccRec' | 'AccRecCredit' | 'AccRecPayment' | 'Adjustment' | 'ApCreditPayment' | 'ApOverPayment' | 'ApOverPaymentPayment' | 'ApOverPaymentSourcePayment' | 'ApPrepayment' | 'ApPrepaymentPayment' | 'ApPrepaymentSourcePayment' | 'ArCreditPayment' | 'ArOverPayment' | 'ArOverpaymentPayment' | 'ArOverpaymentSourcePayment' | 'ArPrepayment' | 'ArPrepaymentPayment' | 'ArPrepaymentSourcePayment' | 'CashPaid' | 'CashRec' | 'ExpPayment' | 'ManJournal' | 'PurchaseOrder' | 'Receipt' | 'Transfer' | 'Account' | 'Contact' | 'Business' | 'Employee' | 'Person' | 'User' | 'Org' | 'FixedAsset' | 'PayRun' | 'PriceListItem' | 'Bank' | 'Current' | 'Equity' | 'Expense' | 'Fixed' | 'Liability' | 'Prepayment' | 'Revenue' | 'Sales' | 'Overheads' | 'Depreciatn' | 'OtherIncome' | 'DirectCosts' | 'Currliab' | 'Termliab' | 'NonCurrent' | 'SalesQuote'

The Object Type

Example response

[
  {
    "SendWithObject": true,
    "Name": "Test.pdf",
    "Size": 12357,
    "CreatedDateUtc": "2020-12-10T01:22:00.0000000",
    "AssociationDateUtc": "2020-12-10T01:22:00.0000000"
  }
]

Changes

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • breaking

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

    • breaking

      the response's property type changed from no type to object for 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