expense element

Type: expense
Namespace: http://api.crunch.co.uk/rest
XML Schema: api.xsd

Represents an expense

Example XML

<?xml version="1.0" encoding="UTF-8"?> <expense xmlns="http://api.crunch.co.uk/rest" expenseId="..." resourceUrl="..." amount="..."> <expenseDetails> <supplier supplierId="..." defaultExpenseType="..." resourceUrl="..." unknownSupplier="..."> <name>...</name> <contactName>...</contactName> <email>...</email> <website>...</website> <telephone>...</telephone> <fax>...</fax> </supplier> <supplierReference>...</supplierReference> <postingDate>...</postingDate> <rechargeable customerId="...">...</rechargeable> </expenseDetails> <expenseLineItems count="..." lineItemGrossTotal="..."> <expenseLineItem> <expenseType>...</expenseType> <benefitingDirector directorId="..." directorEmail="...">...</benefitingDirector> <lineItemDescription>...</lineItemDescription> <lineItemAmount currencyCode="..."> <netAmount>...</netAmount> <grossAmount>...</grossAmount> <vatAmount>...</vatAmount> <vatRate>...</vatRate> </lineItemAmount> </expenseLineItem> <expenseLineItem> <!--...--> </expenseLineItem> <!--...more "expenseLineItem" elements...--> </expenseLineItems> <paymentDetails count="..."> <payment> <paymentDate>...</paymentDate> <amount>...</amount> <paymentMethod>...</paymentMethod> <bankAccount accountId="..." lastFourDigits="..." sortCode="..." accountNumber="...">...</bankAccount> <creditCard accountId="..." lastFourDigits="..." sortCode="..." accountNumber="...">...</creditCard> <director directorId="..." directorEmail="...">...</director> <paymentProcessingAccount accountId="..." lastFourDigits="..." sortCode="..." accountNumber="...">...</paymentProcessingAccount> </payment> <payment> <!--...--> </payment> <!--...more "payment" elements...--> </paymentDetails> <receipts count="..."> <receipt fileName="..." contentType="...">...</receipt> <receipt fileName="..." contentType="...">...</receipt> <!--...more "receipt" elements...--> </receipts> <note>...</note> </expense>

Example JSON

{ "expenseId" : ..., "resourceUrl" : "...", "amount" : ..., "expenseDetails" : { "supplier" : { "supplierId" : ..., "defaultExpenseType" : "...", "resourceUrl" : "...", "unknownSupplier" : false, "name" : "...", "contactName" : "...", "email" : "...", "website" : "...", "telephone" : "...", "fax" : "..." }, "supplierReference" : "...", "postingDate" : "...", "rechargeable" : { "customerId" : ..., "value" : "..." } }, "expenseLineItems" : { "count" : ..., "lineItemGrossTotal" : ..., "expenseLineItem" : [ { "expenseType" : "...", "benefitingDirector" : { "directorId" : ..., "directorEmail" : "...", "value" : "..." }, "lineItemDescription" : "...", "lineItemAmount" : { "currencyCode" : "...", "netAmount" : ..., "grossAmount" : ..., "vatAmount" : ..., "vatRate" : ... } }, ... ] }, "paymentDetails" : { "count" : ..., "payment" : [ { "paymentDate" : "...", "amount" : ..., "paymentMethod" : "...", "bankAccount" : { "accountId" : ..., "lastFourDigits" : ..., "sortCode" : "...", "accountNumber" : "...", "value" : "..." }, "creditCard" : { "accountId" : ..., "lastFourDigits" : ..., "sortCode" : "...", "accountNumber" : "...", "value" : "..." }, "director" : { "directorId" : ..., "directorEmail" : "...", "value" : "..." }, "paymentProcessingAccount" : { "accountId" : ..., "lastFourDigits" : ..., "sortCode" : "...", "accountNumber" : "...", "value" : "..." } }, ... ] }, "receipts" : { "count" : ..., "receipt" : [ { "fileName" : "...", "contentType" : "...", "value" : "..." }, ... ] }, "note" : "..." }