Electronic receipts

Electronic receipt for an employee.

List electronic receipts

get/objects/expenses/electronic-receipt

Returns a collection with a key, ID, and link for each electronic receipt.

SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "84",
      • "id": "EXP-00001",
      • "href": "/objects/expenses/electronic-receipt/84"
      },
    • {
      • "key": "85",
      • "id": "EXP-00002",
      • "href": "/objects/expenses/electronic-receipt/85"
      },
    • {
      • "key": "60",
      • "id": "EXP-00003",
      • "href": "/objects/expenses/electronic-receipt/60"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 5,
    • "next": 0,
    • "previous": 0
    }
}

Create an electronic receipt

post/objects/expenses/electronic-receipt

Creates a new electronic receipt.

You must specify a unique electronic receipt ID when creating an electronic receipt unless document sequencing is configured, in which case the ID is auto-generated.

SecurityOAuth2
Request
Request Body schema: application/json

Creates an electronic receipt

required
object

Employee that incurred the expense.

key
string

System-assigned unique key for the employee.

Example: "12345"
id
string

Unique ID of the employee.

Example: "12345"
createdDate
required
string <date>

Date the electronic receipt was created.

Example: "2021-01-23"
state
string
Default: "draft"

Status of the electronic receipt.

Enum: "analyzing" "draft" "review" "used"
Example: "draft"
receiptNumber
string

Number associated with the electronic receipt.

Example: "EXP-00001"
description
string

Reason for the receipt.

Example: "Supplies for customer training"
object

An attachment for electronic receipts could be scanned or digital receipts.

key
string

System-assigned key for the attachment.

Example: "1"
id
string

Unique ID of the attachment.

Example: "1"
Array of objects

Line items of the electronic receipt.

Array
entryDate
string <date>

Date filed.

Example: "2021-01-23"
currency
string

Transaction currency of the receipt.

Example: "INR"
txnAmount
string or null <decimal-precision-2>

Transaction amount.

Example: "123.45"
quantity
string <decimal-precision-2>

Quantity for a rate-based receipt, for example mileage.

Example: "5.75"
unitRate
string <decimal-precision-2>

Monetary amount for a rate-based receipt, for example mileage.

Example: "20.00"
paidTo
string

Notes regarding to whom you paid the amount.

Example: "Hotel Westin"
paidFor
string

Notes regarding what the receipt was for.

Example: "Attending conference"
object

General ledger account associated with the line item. Used when no expense type is assigned.

object

An expense type defined in the company.

object
Responses
201

Created

400

Bad Request

Request samples
application/json
{
  • "state": "draft",
  • "receiptNumber": "EXP-00001",
  • "employee": {
    • "key": "10"
    },
  • "createdDate": "2021-03-11",
  • "description": "Travel expense",
  • "memo": "Paid to employee",
  • "lines": [
    • {
      • "glAccount": {
        },
      • "paidTo": "Stella Johnson",
      • "paidFor": "Hotel stay",
      • "quantity": "10",
      • "unitRate": "20",
      • "currency": "INR",
      • "txnAmount": "100",
      • "dimensions": {
        }
      }
    ]
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "124",
    • "id": "124",
    • "href": "/objects/expenses/electronic-receipt/124"
    },
  • "ia::meta": {
    • "totalCount": 1
    }
}

Get an electronic receipt

get/objects/expenses/electronic-receipt/{key}

Returns detailed information for a specified electronic receipt.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the electronic-receipt.

Example: 6
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "receiptNumber": "ER-0152",
    • "employee": {
      • "id": "EMP8",
      • "key": "10",
      • "href": "/objects/company-config/employee/10"
      },
    • "employeeContact": {
      • "key": "977",
      • "id": "Thomas, Glenn",
      • "firstName": "Glenn",
      • "lastName": "Thomas",
      • "href": "/objects/company-config/employee/10"
      },
    • "key": "124",
    • "id": "124",
    • "createdDate": "2021-03-11",
    • "state": "draft",
    • "totalAmount": "1000",
    • "currency": "USD",
    • "baseCurrency": "USD",
    • "baseAmount": "120",
    • "description": "Supplies for customer training",
    • "lines": [
      • {
        }
      ],
    • "memo": "Covered by customer",
    • "href": "/objects/expenses/electronic-receipt/124"
    },
  • "ia::meta": {
    • "totalCount": 1
    }
}

Update an electronic receipt

patch/objects/expenses/electronic-receipt/{key}

Updates an existing electronic receipt by setting field values. Any fields not provided remain unchanged.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the electronic-receipt.

Example: 6
Request Body schema: application/json
state
string
Default: "draft"

Status of the electronic receipt.

Enum: "analyzing" "draft" "review" "used"
Example: "draft"
receiptNumber
string

Number associated with the electronic receipt.

Example: "EXP-00001"
description
string

Reason for the receipt.

Example: "Supplies for customer training"
object

An attachment for electronic receipts could be scanned or digital receipts.

key
string

System-assigned key for the attachment.

Example: "1"
id
string

Unique ID of the attachment.

Example: "1"
Array of objects

Line items of the electronic receipt.

Array
entryDate
string <date>

Date filed.

Example: "2021-01-23"
currency
string

Transaction currency of the receipt.

Example: "INR"
txnAmount
string or null <decimal-precision-2>

Transaction amount.

Example: "123.45"
quantity
string <decimal-precision-2>

Quantity for a rate-based receipt, for example mileage.

Example: "5.75"
unitRate
string <decimal-precision-2>

Monetary amount for a rate-based receipt, for example mileage.

Example: "20.00"
paidTo
string

Notes regarding to whom you paid the amount.

Example: "Hotel Westin"
paidFor
string

Notes regarding what the receipt was for.

Example: "Attending conference"
object

General ledger account associated with the line item. Used when no expense type is assigned.

object

An expense type defined in the company.

object
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "memo": "Covered by customer"
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "124",
    • "id": "124",
    • "href": "/objects/expenses/electronic-receipt/124"
    },
  • "ia::meta": {
    • "totalCount": 1
    }
}

Delete an electronic receipt

delete/objects/expenses/electronic-receipt/{key}

Deletes an electronic receipt.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the electronic-receipt.

Example: 6
Responses
204

No Content

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "ia::error": {
      • "code": "invalidRequest",
      • "message": "A POST request requires a payload",
      • "errorId": "REST-1028",
      • "additionalInfo": {
        },
      • "supportId": "Kxi78%7EZuyXBDEGVHD2UmO1phYXDQAAAAo"
      }
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 0,
    • "totalError": 1
    }
}

Query electronic receipts

post/services/core/query

Use the query service to find electronic receipts that meet certain criteria and to specify the properties that are returned.

SecurityOAuth2
Responses
200

OK

Request samples