Update

update

Parameter Type I/O Description
IN Parameters described in Overview
Company String IN The users default company number for the companies list
Action String IN Identifier for the list requested
Input String IN Data array containing optional parameters
expensesheet\_expensesheetinternal String IN Expense sheet input data array parameter
expensesheet\_company String IN Expense sheet company parameter required for create
expensesheet_suppliercode
    [OPTIONAL]
  </td>
  <td>
    String
  </td>
  <td>
    IN
  </td>
  <td>
    Expense sheet suppliercode parameter, required for create
  </td>
</tr>
<tr>
  <td>
    expensesheet_sheetdate 

    [OPTIONAL]
  </td>
  <td>
    String
  </td>
  <td>
    IN
  </td>
  <td>
    Expense sheet date parameter
  </td>
</tr>
<tr>
  <td>
    expensesheet_sheetstatuscode 

    [OPTIONAL]
  </td>
  <td>
    String
  </td>
  <td>
    IN
  </td>
  <td>
    Status code for the expense sheet
  </td>
</tr>
<tr>
  <td>
    expensesheet_description 

    [OPTIONAL]
  </td>
  <td>
    String
  </td>
  <td>
    IN
  </td>
  <td>
    Sheet description
  </td>
</tr>
<tr>
  <td>
    Response
  </td>
  <td>
    XML / JSON
  </td>
  <td>
    OUT
  </td>
  <td>
    An XML tree / JSON string containing the success or error response
  </td>
</tr>

Description

Calling the expenses API with an action of update retrieves a response. Update can be used to Create, Update or Delete an expense line.

  • Providing a expensesheet_expensesheetinternal along with other optional parameters will assume the update operation to be an update.
  • Providing expensesheet_expensesheetinternal without any other optional parameters assumes the update operation to be a delete.
  • Providing optional parameters without a expensesheet_expensesheetinternal will assume the update operation to be a create. Create requires the expensesheet_company and expensesheet_resourcecode to be supplied as part of the input data. The response will contain the UUID for the sheet created.

Return Values

Response – Success or error response.

The structure of the response is:

<Responses>
  <Success>
    <SuccessText>data processed successfully.</SuccessText>
    <Data>
      <expensesheet_uuid>E4F8CFB657A34540AC7A3A7A1133BC27
      </expensesheet_uuid>
    </Data>
    <Data>
      <expensesheet_expensesheetinternal>1331
      </expensesheet_expensesheetinternal>
    </Data>
  </Success>
</Responses>
{
    "responsecode": 1,
    "responsestatus": "OK",
    "errorcode": 0,
    "errormessage": "",
    "responsemessage": "data processed successfully.",
    "success": true,
    "data": [
        {
            "expensesheet_uuid": "679BC088725B8E469719E41682D7DD67",
            "expensesheet_expensesheetinternal": 1330
        }
    ]
}