Skip to content

Xero: Files schemas

10 Xero schemas with complete fields and constraints.

← Files operations · All schemas

Creates a new file association — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
AssociationDateUtcstringOptionalThe date the file was associated with the object (UTC). Note- The AssociationDateUtc element is only returned when using /Associations/{ObjectId} endpoint.
Format: date-time
CreatedDateUtcstringOptionalThe date the file was created (UTC). Note- The CreatedDateUtc element is only returned when using /Associations/{ObjectId} endpoint.
Format: date-time
FileIdstringOptionalThe unique identifier of the file
Format: uuid
NamestringOptionalThe name of the associated file. Note- The Name element is only returned when using /Associations/{ObjectId} endpoint.
ObjectGroupstringOptionalThe 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.
One of: Account, BankTransaction, Contact, CreditNote, Invoice, Item, ManualJournal, Overpayment, Payment, Prepayment, Quote, Receipt
ObjectIdstringOptionalThe identifier of the object that the file is being associated with (e.g. InvoiceID, BankTransactionID, ContactID)
Format: uuid
ObjectTypeModelOptionalExpand Creates a new file association — request body — body Object Type
SendWithObjectbooleanOptionalBoolean 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.
SizeintegerOptionalThe size of the associated file in bytes. Note- The Size element is only returned when using /Associations/{ObjectId} endpoint.

Referenced models: Creates a new file association — request body — body Object Type

Creates a new file association — request body — body Object Type

FieldTypePresenceDescription and constraints
$stringRootThe Object Type
One of: 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

Creates a new file association — response body

FieldTypePresenceDescription and constraints
$objectRoot
AssociationDateUtcstringOptionalThe date the file was associated with the object (UTC). Note- The AssociationDateUtc element is only returned when using /Associations/{ObjectId} endpoint.
Format: date-time
CreatedDateUtcstringOptionalThe date the file was created (UTC). Note- The CreatedDateUtc element is only returned when using /Associations/{ObjectId} endpoint.
Format: date-time
FileIdstringOptionalThe unique identifier of the file
Format: uuid
NamestringOptionalThe name of the associated file. Note- The Name element is only returned when using /Associations/{ObjectId} endpoint.
ObjectGroupstringOptionalThe 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.
Known values: Account, BankTransaction, Contact, CreditNote, Invoice, Item, ManualJournal, Overpayment, Payment, Prepayment, Quote, Receipt
ObjectIdstringOptionalThe identifier of the object that the file is being associated with (e.g. InvoiceID, BankTransactionID, ContactID)
Format: uuid
ObjectTypeModelOptionalExpand Creates a new file association — response body — Object Type
SendWithObjectbooleanOptionalBoolean 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.
SizeJSONOptional
Size (anyOf 1)integerAlternativeThe size of the associated file in bytes. Note- The Size element is only returned when using /Associations/{ObjectId} endpoint.
Size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Creates a new file association — response body — Object Type

Creates a new file association — response body — Object Type

FieldTypePresenceDescription and constraints
$stringRootThe Object Type
Known values: 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

Creates a new folder — request body — body

FieldTypePresenceDescription and constraints
$JSONRoot
EmailstringOptionalThe email address used to email files to the inbox. Only the inbox will have this element.
FileCountintegerOptionalThe number of files in the folder
IdstringOptionalXero unique identifier for a folder Files
Format: uuid
IsInboxbooleanOptionalto indicate if the folder is the Inbox. The Inbox cannot be renamed or deleted.
NamestringOptionalThe name of the folder

Creates a new folder — response body

FieldTypePresenceDescription and constraints
$JSONRoot
EmailstringOptionalThe email address used to email files to the inbox. Only the inbox will have this element.
FileCountJSONOptional
FileCount (anyOf 1)integerAlternativeThe number of files in the folder
FileCount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
IdstringOptionalXero unique identifier for a folder Files
Format: uuid
IsInboxbooleanOptionalto indicate if the folder is the Inbox. The Inbox cannot be renamed or deleted.
NamestringOptionalThe name of the folder

Retrieves files — response body

FieldTypePresenceDescription and constraints
$objectRoot
ItemsarrayOptional
Items[]ModelEach itemExpand Update a file — response body
PageJSONOptional
Page (anyOf 1)integerAlternative
Page (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
PerPageJSONOptional
PerPage (anyOf 1)integerAlternative
PerPage (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
TotalCountJSONOptional
TotalCount (anyOf 1)integerAlternative
TotalCount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Update a file — response body

Update a file — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
CreatedDateUtcstringOptionalCreated date in UTC
FolderIdstringOptionalFolder relation object's UUID
Format: uuid
IdstringOptionalFile object's UUID
Format: uuid
MimeTypestringOptionalMimeType of the file (image/png, image/jpeg, application/pdf, etc..)
NamestringOptionalFile Name
SizeintegerOptionalNumeric value in bytes
UpdatedDateUtcstringOptionalUpdated date in UTC
UserModelOptionalExpand Update a file — response body — User

Referenced models: Update a file — response body — User

Update a file — response body

FieldTypePresenceDescription and constraints
$objectRoot
CreatedDateUtcstringOptionalCreated date in UTC
FolderIdstringOptionalFolder relation object's UUID
Format: uuid
IdstringOptionalFile object's UUID
Format: uuid
MimeTypestringOptionalMimeType of the file (image/png, image/jpeg, application/pdf, etc..)
NamestringOptionalFile Name
SizeJSONOptional
Size (anyOf 1)integerAlternativeNumeric value in bytes
Size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
UpdatedDateUtcstringOptionalUpdated date in UTC
UserModelOptionalExpand Update a file — response body — User

Referenced models: Update a file — response body — User

Update a file — response body — User

FieldTypePresenceDescription and constraints
$objectRoot
FirstNamestringOptionalFirst name of user
FullNamestringOptionalLast name of user
IdstringRequired within parentXero identifier
Format: uuid
LastNamestringOptionalLast name of user
NamestringOptionalKey is Name, but returns Email address of user who created the file

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.