►  Read Expense

curl –H  'X-api_key: {value}'  http://companyid.seasoo.net/api/Expense/105

-> Return one JSON object of expense.

►  Query Expenses

curl –H  'X-api_key: {value}'  http://companyid.seasoo.net/api/Expense?date=='2010-09-07'

-> Return array of JSON object of expense, which has date of 07.Sep.2010.

date is filter-parameter. Following filter-parameters are supported:

Parameter

Type

Description

date

Datetime

Date of this expense.

owner

String

Owner of this expense.

vendor

String

 

category

String

 

notice

String

 

amount

Double

 

currency

String

ISO-currency code e.g. "EUR","USD"

isInvoiced

Boolean

true or false.

►  Insert Expense

POST/PUT   http://companyid.seasoo.net/api/Expense 

with api_key and following request body:

{"date":"2010-09-07",

  "owner":"Maria Schneider",

  "vendor":"Google Inc",

  "category":"Marketing",

  "amount":1000.56,

  "currency":"EUR",

  "notice":"advertisement with Google Adwords",

  "isInvoiced":false

 }

-> Response has http status code = 201 if successfully. Otherwise it returns status code 500.

►  Update Expense

Like insert expense, only URL is different:

POST/PUT http://companyid.seasoo.net/api/Expense/{id}

with request body is content of expense.

►  Delete Expense

DELETE http://companyid.seasoo.net/api/Expense/{id}

-> Response has status code = 204 in case of success and 404 in case of not success.