v1

latestOpenAPI 3.0.3Apache 2.02026-08-062991191002.1 KB
Expense

Replaces the Expense resource.

Replaces the Expense resource.

put/expenses/{id}

Path parameters

idstring required

Resource identifier

Request body

idstring

Unique identifier for this customer note that no particular pattern in this field is guaranteed, only that this field is unique e.g. "xero-70"

integrationstring

The key of the integration source e.g. "quickbooks", or "xero"

srcIdstring

The unique identifier of the source 3rd party integration e.g. "982000000030049"

txnIdstring

Transaction ID e.g. "9856"

typestring

Type of expense: e.g. "expense"

accountIdstring

ID of account associated with expense e.g. "1057"

currencystring nullable

Currency code e.g. "EUR"

subtotalinteger nullable

Subtotal of expense in cents e.g. 9000

totalAmountinteger nullable

Total of expense in cents e.g. 12000

referenceNumberstring nullable

Reference number of the expense, max length of 100 e.g. "782364"

statusstring nullable

Status of expense e.g. "Unbilled"

invoiceIdstring nullable

ID of the invoice e.g. "460000000028192"

invoiceNumberstring nullable

Invoice number e.g. "INV-00003"

modifiedstring date-time nullable

Time at which the expense details were last updated e.g. "2019-05-25T02:17:40.080Z"

accountNamestring nullable

Expense account name e.g. "Rent"

createdstring date-time nullable

Time at which the expense details were created e.g. "2019-05-22T02:17:40.080Z"

accountCodestring nullable

Chart of accounts identifier for the account e.g. "4560"

contactIdstring nullable

Id of the contact which is usually a payee e.g. "23"

contactNamestring nullable

Name of the contact which is usually a payee e.g. "Cool Cars"

contactTypestring nullable

Type of the contact which can be customer, vendor, or employee

paymentMethodIdstring nullable

Reference to the related Payment Method object

datestring date-time nullable

Date of the expense e.g. "2019-05-22T02:17:40.080Z"

taxAmountinteger nullable

Total tax amount in cents e.g. 3000

descriptionstring nullable

A note, memo, or description for the expense e.g. "GPS rent"

deletedboolean

Indicates if the expense has been deleted

Example request

{
  "id": "xero-70",
  "integration": "quickbooks",
  "srcId": "982000000030049",
  "txnId": "9856",
  "type": "expense",
  "accountId": "1057",
  "currency": "EUR",
  "subtotal": 9000,
  "totalAmount": 12000,
  "referenceNumber": "782364",
  "status": "Unbilled",
  "invoiceId": "460000000028192",
  "invoiceNumber": "INV-00003",
  "modified": "2019-05-25T02:17:40.080Z",
  "accountName": "Rent",
  "created": "2019-05-22T02:17:40.080Z",
  "accountCode": "4560",
  "contactId": "23",
  "contactName": "Cool Cars",
  "contactType": "Vendor",
  "paymentMethodId": "1d80716b-427e-4cad-80c6-c4b3a18eb23d",
  "date": "2019-05-22T02:17:40.080Z",
  "taxAmount": 3000,
  "description": "GPS rent",
  "deleted": true
}

Response

Expense resource updated

idstring

Unique identifier for this customer note that no particular pattern in this field is guaranteed, only that this field is unique e.g. "xero-70"

integrationstring

The key of the integration source e.g. "quickbooks", or "xero"

srcIdstring

The unique identifier of the source 3rd party integration e.g. "982000000030049"

txnIdstring

Transaction ID e.g. "9856"

typestring

Type of expense: e.g. "expense"

accountIdstring

ID of account associated with expense e.g. "1057"

currencystring nullable

Currency code e.g. "EUR"

subtotalinteger nullable

Subtotal of expense in cents e.g. 9000

totalAmountinteger nullable

Total of expense in cents e.g. 12000

referenceNumberstring nullable

Reference number of the expense, max length of 100 e.g. "782364"

statusstring nullable

Status of expense e.g. "Unbilled"

invoiceIdstring nullable

ID of the invoice e.g. "460000000028192"

invoiceNumberstring nullable

Invoice number e.g. "INV-00003"

modifiedstring date-time nullable

Time at which the expense details were last updated e.g. "2019-05-25T02:17:40.080Z"

accountNamestring nullable

Expense account name e.g. "Rent"

createdstring date-time nullable

Time at which the expense details were created e.g. "2019-05-22T02:17:40.080Z"

accountCodestring nullable

Chart of accounts identifier for the account e.g. "4560"

contactIdstring nullable

Id of the contact which is usually a payee e.g. "23"

contactNamestring nullable

Name of the contact which is usually a payee e.g. "Cool Cars"

contactTypestring nullable

Type of the contact which can be customer, vendor, or employee

paymentMethodIdstring nullable

Reference to the related Payment Method object

datestring date-time nullable

Date of the expense e.g. "2019-05-22T02:17:40.080Z"

taxAmountinteger nullable

Total tax amount in cents e.g. 3000

descriptionstring nullable

A note, memo, or description for the expense e.g. "GPS rent"

deletedboolean

Indicates if the expense has been deleted

Example response

{
  "id": "xero-70",
  "integration": "quickbooks",
  "srcId": "982000000030049",
  "txnId": "9856",
  "type": "expense",
  "accountId": "1057",
  "currency": "EUR",
  "subtotal": 9000,
  "totalAmount": 12000,
  "referenceNumber": "782364",
  "status": "Unbilled",
  "invoiceId": "460000000028192",
  "invoiceNumber": "INV-00003",
  "modified": "2019-05-25T02:17:40.080Z",
  "accountName": "Rent",
  "created": "2019-05-22T02:17:40.080Z",
  "accountCode": "4560",
  "contactId": "23",
  "contactName": "Cool Cars",
  "contactType": "Vendor",
  "paymentMethodId": "1d80716b-427e-4cad-80c6-c4b3a18eb23d",
  "date": "2019-05-22T02:17:40.080Z",
  "taxAmount": 3000,
  "description": "GPS rent",
  "deleted": true
}