Xero: Files schemas
10 Xero schemas with complete fields and constraints.
← Files operations · All schemas
Creates a new file association — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
AssociationDateUtc | string | Optional | The date the file was associated with the object (UTC). Note- The AssociationDateUtc element is only returned when using /Associations/{ObjectId} endpoint. Format: date-time |
CreatedDateUtc | string | Optional | The date the file was created (UTC). Note- The CreatedDateUtc element is only returned when using /Associations/{ObjectId} endpoint. Format: date-time |
FileId | string | Optional | The unique identifier of the file Format: uuid |
Name | string | Optional | The name of the associated file. Note- The Name element is only returned when using /Associations/{ObjectId} endpoint. |
ObjectGroup | string | Optional | 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. One of: Account, BankTransaction, Contact, CreditNote, Invoice, Item, ManualJournal, Overpayment, Payment, Prepayment, Quote, Receipt |
ObjectId | string | Optional | The identifier of the object that the file is being associated with (e.g. InvoiceID, BankTransactionID, ContactID) Format: uuid |
ObjectType | Model | Optional | Expand Creates a new file association — request body — body Object Type |
SendWithObject | boolean | Optional | 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. |
Size | integer | Optional | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | string | Root | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
AssociationDateUtc | string | Optional | The date the file was associated with the object (UTC). Note- The AssociationDateUtc element is only returned when using /Associations/{ObjectId} endpoint. Format: date-time |
CreatedDateUtc | string | Optional | The date the file was created (UTC). Note- The CreatedDateUtc element is only returned when using /Associations/{ObjectId} endpoint. Format: date-time |
FileId | string | Optional | The unique identifier of the file Format: uuid |
Name | string | Optional | The name of the associated file. Note- The Name element is only returned when using /Associations/{ObjectId} endpoint. |
ObjectGroup | string | Optional | 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. Known values: Account, BankTransaction, Contact, CreditNote, Invoice, Item, ManualJournal, Overpayment, Payment, Prepayment, Quote, Receipt |
ObjectId | string | Optional | The identifier of the object that the file is being associated with (e.g. InvoiceID, BankTransactionID, ContactID) Format: uuid |
ObjectType | Model | Optional | Expand Creates a new file association — response body — Object Type |
SendWithObject | boolean | Optional | 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. |
Size | JSON | Optional | |
Size (anyOf 1) | integer | Alternative | The size of the associated file in bytes. Note- The Size element is only returned when using /Associations/{ObjectId} endpoint. |
Size (anyOf 2) | string | Alternative | Pattern: ^-?[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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | string | Root | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
Email | string | Optional | The email address used to email files to the inbox. Only the inbox will have this element. |
FileCount | integer | Optional | The number of files in the folder |
Id | string | Optional | Xero unique identifier for a folder Files Format: uuid |
IsInbox | boolean | Optional | to indicate if the folder is the Inbox. The Inbox cannot be renamed or deleted. |
Name | string | Optional | The name of the folder |
Creates a new folder — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
Email | string | Optional | The email address used to email files to the inbox. Only the inbox will have this element. |
FileCount | JSON | Optional | |
FileCount (anyOf 1) | integer | Alternative | The number of files in the folder |
FileCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Id | string | Optional | Xero unique identifier for a folder Files Format: uuid |
IsInbox | boolean | Optional | to indicate if the folder is the Inbox. The Inbox cannot be renamed or deleted. |
Name | string | Optional | The name of the folder |
Retrieves files — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
Items | array | Optional | |
Items[] | Model | Each item | Expand Update a file — response body |
Page | JSON | Optional | |
Page (anyOf 1) | integer | Alternative | |
Page (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
PerPage | JSON | Optional | |
PerPage (anyOf 1) | integer | Alternative | |
PerPage (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
TotalCount | JSON | Optional | |
TotalCount (anyOf 1) | integer | Alternative | |
TotalCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Update a file — response body
Update a file — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
CreatedDateUtc | string | Optional | Created date in UTC |
FolderId | string | Optional | Folder relation object's UUID Format: uuid |
Id | string | Optional | File object's UUID Format: uuid |
MimeType | string | Optional | MimeType of the file (image/png, image/jpeg, application/pdf, etc..) |
Name | string | Optional | File Name |
Size | integer | Optional | Numeric value in bytes |
UpdatedDateUtc | string | Optional | Updated date in UTC |
User | Model | Optional | Expand Update a file — response body — User |
Referenced models: Update a file — response body — User
Update a file — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
CreatedDateUtc | string | Optional | Created date in UTC |
FolderId | string | Optional | Folder relation object's UUID Format: uuid |
Id | string | Optional | File object's UUID Format: uuid |
MimeType | string | Optional | MimeType of the file (image/png, image/jpeg, application/pdf, etc..) |
Name | string | Optional | File Name |
Size | JSON | Optional | |
Size (anyOf 1) | integer | Alternative | Numeric value in bytes |
Size (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
UpdatedDateUtc | string | Optional | Updated date in UTC |
User | Model | Optional | Expand Update a file — response body — User |
Referenced models: Update a file — response body — User
Update a file — response body — User
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
FirstName | string | Optional | First name of user |
FullName | string | Optional | Last name of user |
Id | string | Required within parent | Xero identifier Format: uuid |
LastName | string | Optional | Last name of user |
Name | string | Optional | Key is Name, but returns Email address of user who created the file |