v1

latestOpenAPI 3.0.3Apache 2.02026-07-131453851.1 MB
Expense Reports

Update Expense Report

Update Expense Report

patch/accounting/expense-reports/{id}

Path parameters

idstring required

ID of the record you are acting upon.

Query parameters

rawboolean

Include raw response. Mostly used for debugging purposes

Headers

x-apideck-consumer-idstring required

ID of the consumer which you want to get or push data from

x-apideck-app-idstring required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

Request body

idstring

A unique identifier for an object.

display_idstring nullable

Id to be displayed.

numberstring nullable

The expense report number.

titlestring nullable

Title or purpose of the expense report.

status'draft' | 'submitted' | 'approved' | 'reimbursed' | 'rejected' | 'reversed' | 'voided' nullable

The status of the expense report.

transaction_datestring date-time nullable required

The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD

posting_datestring date nullable

The date the expense report was posted to the general ledger.

due_datestring date nullable

Date when reimbursement is due.

currency'UNKNOWN_CURRENCY' | 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRC' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'USS' | 'UYI' | 'UYU' | 'UZS' | 'VEF' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XTS' | 'XXX' | 'YER' | 'ZAR' | 'ZMK' | 'ZMW' | 'BTC' | 'ETH' nullable

Indicates the associated currency for an amount of money. Values correspond to ISO 4217.

currency_ratenumber nullable

Currency Exchange Rate at the time entity was recorded/generated.

sub_totalnumber nullable

Subtotal amount, normally before tax.

total_taxnumber nullable

Total tax amount applied to this transaction.

total_amountnumber nullable

Total amount of all expense lines including tax.

reimbursable_amountnumber nullable

Total reimbursable amount (may differ from total if some expenses are non-reimbursable).

memostring nullable

The memo of the expense report.

tax_inclusiveboolean nullable

Amounts are including tax

custom_mappingsCustomMappings nullable

When custom mappings are configured on the resource, the result is included here.

row_versionstring nullable

A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.

updated_bystring nullable

The user who last updated the object.

created_bystring nullable

The user who created the object.

updated_atstring date-time nullable

The date and time when the object was last updated.

created_atstring date-time nullable

The date and time when the object was created.

Example request

{
  "id": "12345",
  "display_id": "123456",
  "number": "ER-001",
  "title": "Q1 Business Travel",
  "employee": {
    "id": "12345",
    "display_name": "John Doe"
  },
  "status": "submitted",
  "transaction_date": "2021-05-01T12:00:00.000Z",
  "posting_date": "2024-06-01",
  "due_date": "2024-06-15",
  "currency": "USD",
  "currency_rate": 0.69,
  "sub_total": 250,
  "total_tax": 25,
  "total_amount": 1250.75,
  "reimbursable_amount": 1100,
  "memo": "Business travel expenses for Q1 client meetings",
  "department": {
    "id": "12345",
    "display_id": "123456",
    "name": "Acme Inc.",
    "downstream_id": "12345"
  },
  "location": {
    "id": "123456",
    "display_id": "123456",
    "name": "New York Office",
    "downstream_id": "12345"
  },
  "account": {
    "id": "123456",
    "name": "Bank account",
    "nominal_code": "N091",
    "code": "453",
    "parent_id": "123456",
    "display_id": "123456"
  },
  "accounting_period": {
    "id": "12345",
    "name": "Q1 2024"
  },
  "line_items": [
    {
      "id": "12345",
      "line_number": 1,
      "expense_category": {
        "id": "12345",
        "downstream_id": "12345",
        "display_id": "Airfare",
        "name": "Airfare"
      },
      "account": {
        "id": "123456",
        "name": "Bank account",
        "nominal_code": "N091",
        "code": "453",
        "parent_id": "123456",
        "display_id": "123456"
      },
      "description": "Flight to New York",
      "quantity": 1,
      "unit_price": 27500.5,
      "amount": 275,
      "tax_rate": {
        "id": "123456",
        "code": "N-T",
        "name": "GST on Purchases",
        "rate": 10
      },
      "tax_amount": 27.5,
      "total_amount": 302.5,
      "transaction_date": "2024-05-15",
      "billable": true,
      "reimbursable": true,
      "customer": {
        "id": "12345",
        "display_id": "CUST00101",
        "display_name": "Windsurf Shop",
        "name": "Windsurf Shop",
        "company_name": "The boring company",
        "email": "boring@boring.com"
      },
      "department": {
        "id": "12345",
        "display_id": "123456",
        "name": "Acme Inc.",
        "downstream_id": "12345"
      },
      "location": {
        "id": "123456",
        "display_id": "123456",
        "name": "New York Office",
        "downstream_id": "12345"
      },
      "tracking_categories": [
        {
          "id": "123456",
          "code": "100",
          "name": "New York",
          "parent_id": "123456",
          "parent_name": "New York"
        }
      ],
      "receipt_url": "https://example.com/receipts/123.pdf",
      "currency": "USD",
      "updated_by": "12345",
      "created_by": "12345",
      "updated_at": "2020-09-30T07:43:32.000Z",
      "created_at": "2020-09-30T07:43:32.000Z"
    }
  ],
  "subsidiary": {
    "id": "12345",
    "display_id": "123456",
    "name": "Acme Inc."
  },
  "tracking_categories": [
    {
      "id": "123456",
      "code": "100",
      "name": "New York",
      "parent_id": "123456",
      "parent_name": "New York"
    }
  ],
  "tax_inclusive": true,
  "approved_by": {
    "id": "12345",
    "display_name": "Jane Smith"
  },
  "custom_fields": [
    {
      "id": "2389328923893298",
      "name": "employee_level",
      "description": "Employee Level",
      "value": "Uses Salesforce and Marketo"
    }
  ],
  "row_version": "1-12345",
  "updated_by": "12345",
  "created_by": "12345",
  "updated_at": "2020-09-30T07:43:32.000Z",
  "created_at": "2020-09-30T07:43:32.000Z",
  "pass_through": [
    {
      "extend_paths": [
        {
          "path": "$.nested.property",
          "value": {
            "TaxClassificationRef": {
              "value": "EUC-99990201-V1-00020000"
            }
          }
        }
      ]
    }
  ]
}

Response

Expense Reports

status_codeinteger required

HTTP Response Status Code

statusstring required

HTTP Response Status

servicestring required

Apideck ID of service provider

resourcestring required

Unified API resource name

operationstring required

Operation performed

_rawRaw nullable

Raw response from the integration when raw=true query param is provided

Example response

{
  "status_code": 200,
  "status": "OK",
  "service": "netsuite",
  "resource": "ExpenseReports",
  "operation": "update",
  "data": {
    "id": "12345"
  }
}