Emburse expense-approval-controller-v1 API

Approve, return and reassign expense reports.

OpenAPI Specification

emburse-expense-approval-controller-v1-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: Api Documentation
  version: '1.0'
  title: Api Documentation Accounts expense-approval-controller-v1 API
  termsOfService: urn:tos
  contact: {}
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://service.chromeriver.com
tags:
- name: expense-approval-controller-v1
  description: Approve, return and reassign expense reports.
paths:
  /v1/expense-report-approvals:
    get:
      tags:
      - expense-approval-controller-v1
      summary: Get list of reports for approval
      description: This web service allows an external application to get a list of expense reports awaiting approval by a user
      operationId: getApprovalsUsingGET
      parameters:
      - name: chain-id
        in: header
        description: Used for tracking the flow of the request
        required: false
        schema:
          type: string
      - name: customer-code
        in: header
        description: Unique customer identifier provided by Chrome River
        required: true
        schema:
          type: string
      - name: logged-in-user-id
        in: header
        description: Unique ID of the approver logged in making request
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        description: 'API key for Authentication '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ExpenseReport'
        '400':
          description: Customer Code is invalid.
        '401':
          description: Customer Code is not authorized.  Cannot get list of expense reports for approval.
        '403':
          description: Logged in user does not exist.
        '503':
          description: Service unavailable.
      deprecated: false
  /v1/expense-report-approvals/count:
    get:
      tags:
      - expense-approval-controller-v1
      summary: Get count of reports for approval
      description: This web service allows an external application to a count of expense reports awaiting approval by a user.
      operationId: getExpenseReportCountUsingGET
      parameters:
      - name: chain-id
        in: header
        description: Used for tracking the flow of the request
        required: false
        schema:
          type: string
      - name: customer-code
        in: header
        description: Unique customer identifier provided by Chrome River
        required: true
        schema:
          type: string
      - name: logged-in-user-id
        in: header
        description: Unique ID of the approver logged in making request
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        description: 'API key for Authentication '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountModel'
        '400':
          description: Customer Code is invalid
        '401':
          description: Customer Code is not authorized.  Cannot get expense report count.
        '403':
          description: Logged in user does not exist.
        '503':
          description: Service unavailable.
      deprecated: false
  /v1/expense-report-approvals/{reportId}:
    get:
      tags:
      - expense-approval-controller-v1
      summary: Get expense report details
      description: This web service allows an external application to get the details of an expense report
      operationId: getExpenseReportUsingGET
      parameters:
      - name: chain-id
        in: header
        description: Used for tracking the flow of the request
        required: false
        schema:
          type: string
      - name: customer-code
        in: header
        description: Unique customer identifier provided by Chrome River
        required: true
        schema:
          type: string
      - name: logged-in-user-id
        in: header
        description: Unique ID of the approver logged in making request
        required: true
        schema:
          type: string
      - name: reportId
        in: path
        description: Report ID for report
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        description: 'API key for Authentication '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpenseReport'
        '400':
          description: Customer Code is invalid.
        '401':
          description: Customer Code is not authorized.  Cannot get expense report.
        '403':
          description: Logged in user is not allowed to view details expense report or Logged in user does not exist
        '404':
          description: Expense Report does not exist.
        '503':
          description: Service unavailable.
      deprecated: false
  /v1/expense-report-approvals/{reportId}/submit:
    post:
      tags:
      - expense-approval-controller-v1
      summary: Submit an expense report for approval
      description: This web service allows an external application to submit the specified expense report for approval
      operationId: submitExpenseReportForApprovalUsingPOST
      parameters:
      - name: approver-id
        in: header
        description: Unique ID of the approver who currently has the report and wants to submit it further
        required: true
        schema:
          type: string
      - name: chain-id
        in: header
        description: Used for tracking the flow of the request
        required: false
        schema:
          type: string
      - name: customer-code
        in: header
        description: Unique customer identifier provided by Chrome River
        required: true
        schema:
          type: string
      - name: reportId
        in: path
        description: Report ID for report
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        description: 'API key for Authentication '
        required: true
        schema:
          type: string
      requestBody:
        $ref: '#/components/requestBodies/ExpenseSubmit'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpenseSubmitResponse'
        '400':
          description: Required query parameters are missing or invalid
        '422':
          description: Expense report has not been submitted. Report have some business rules violations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpenseSubmitResponse'
        '503':
          description: Service unavailable.
      deprecated: false
  /v1/expense-reports/{report-id}/line-items/{report-line-item-id}/approve:
    post:
      tags:
      - expense-approval-controller-v1
      summary: Approve an expense report line item
      description: This web service allows an external application to approve the specified expense report line item.
      operationId: approveExpenseReportLineItemUsingPOST
      parameters:
      - name: chain-id
        in: header
        description: Used for tracking the flow of the request
        required: false
        schema:
          type: string
      - name: customer-code
        in: header
        description: Unique customer identifier provided by Chrome River
        required: true
        schema:
          type: string
      - name: logged-in-user-id
        in: header
        description: Unique ID for the approver logged in making request
        required: true
        schema:
          type: string
      - name: report-id
        in: path
        description: Report ID for report
        required: true
        schema:
          type: string
      - name: report-line-item-id
        in: path
        description: Report Line Item ID for report
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        description: 'API key for Authentication '
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotesModel'
        description: Optional note tied to Line Item Approval
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Customer Code is invalid.
        '401':
          description: Customer Code is not authorized.  Cannot approve expense report line item.
        '403':
          description: Logged in user is not authorized to approve line item or Logged in user does not exist.
        '503':
          description: Service unavailable.
      deprecated: false
  /v1/expense-reports/{report-id}/line-items/{report-line-item-id}/reassign:
    post:
      tags:
      - expense-approval-controller-v1
      summary: Reassign an expense report line item
      description: This web service allows an external application to reassign the specified expense report line item to another approver for review
      operationId: reassignExpenseReportLineItemUsingPOST
      parameters:
      - name: chain-id
        in: header
        description: Used for tracking the flow of the request
        required: false
        schema:
          type: string
      - name: customer-code
        in: header
        description: Unique customer identifier provided by Chrome River
        required: true
        schema:
          type: string
      - name: logged-in-user-id
        in: header
        description: Unique ID for the approver logged in making request
        required: true
        schema:
          type: string
      - name: report-id
        in: path
        description: Report ID for report
        required: true
        schema:
          type: string
      - name: report-line-item-id
        in: path
        description: Report Line Item ID for report
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        description: 'API key for Authentication '
        required: true
        schema:
          type: string
      requestBody:
        $ref: '#/components/requestBodies/ReassignModelV1'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Customer Code is invalid.
        '401':
          description: Customer Code is not authorized.  Cannot reassign expense report line item.
        '403':
          description: Logged in user is not authorized to reassign report line item or Logged in user does not exist.
        '503':
          description: Service unavailable.
      deprecated: false
  /v1/expense-reports/{report-id}/line-items/{report-line-item-id}/return:
    post:
      tags:
      - expense-approval-controller-v1
      summary: Return an expense report line item
      description: This web service allows an external application to return the specified expense report line item.
      operationId: returnExpenseReportLineItemUsingPOST
      parameters:
      - name: chain-id
        in: header
        description: Used for tracking the flow of the request
        required: false
        schema:
          type: string
      - name: customer-code
        in: header
        description: Unique customer identifier provided by Chrome River
        required: true
        schema:
          type: string
      - name: logged-in-user-id
        in: header
        description: Unique ID for the approver logged in making request
        required: true
        schema:
          type: string
      - name: report-id
        in: path
        description: Report ID for report
        required: true
        schema:
          type: string
      - name: report-line-item-id
        in: path
        description: Report Line Item ID for report
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        description: 'API key for Authentication '
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotesModel'
        description: Note tied to Line Item Return
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Customer Code is invalid.
        '401':
          description: Customer Code is not authorized.  Cannot return expense report line item.
        '403':
          description: Logged in user is not authorized to return report or Logged in user does not exist.
        '503':
          description: Service unavailable.
      deprecated: false
  /v1/expense-reports/{reportId}:
    delete:
      tags:
      - expense-approval-controller-v1
      summary: Delete an expense report
      description: This web service allows an external application to delete the specified expense report
      operationId: deleteExpenseReportUsingDELETE
      parameters:
      - name: chain-id
        in: header
        description: Used for tracking the flow of the request
        required: false
        schema:
          type: string
      - name: customer-code
        in: header
        description: Unique customer identifier provided by Chrome River
        required: true
        schema:
          type: string
      - name: logged-in-user-id
        in: header
        description: Unique ID for the submitter logged in making request
        required: true
        schema:
          type: string
      - name: reportId
        in: path
        description: Report ID for report
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        description: 'API key for Authentication '
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content. Expense report successfully deleted
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Customer Code is not authorized.  Cannot delete expense report.
        '403':
          description: Logged in user is not authorized to delete report or Logged in user does not exist.
        '404':
          description: Expense report not found
        '503':
          description: Service unavailable.
      deprecated: false
  /v1/expense-reports/{reportId}/approve:
    post:
      tags:
      - expense-approval-controller-v1
      summary: Approve an expense report
      description: This web service allows an external application to approve the specified expense report
      operationId: approveExpenseReportUsingPOST
      parameters:
      - name: chain-id
        in: header
        description: Used for tracking the flow of the request
        required: false
        schema:
          type: string
      - name: customer-code
        in: header
        description: Unique customer identifier provided by Chrome River
        required: true
        schema:
          type: string
      - name: logged-in-user-id
        in: header
        description: Unique ID for the approver logged in making request
        required: true
        schema:
          type: string
      - name: reportId
        in: path
        description: Report ID for report
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        description: 'API key for Authentication '
        required: true
        schema:
          type: string
      requestBody:
        $ref: '#/components/requestBodies/NotesModel2'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Customer Code is invalid.
        '401':
          description: Customer Code is not authorized.  Cannot approve expense report.
        '403':
          description: Logged in user is not authorized to approve report or Logged in user does not exist.
        '503':
          description: Service unavailable.
      deprecated: false
  /v1/expense-reports/{reportId}/reassign:
    post:
      tags:
      - expense-approval-controller-v1
      summary: Reassign an expense report
      description: This web service allows an external application to reassign the specified expense report to another approver for review
      operationId: reassignExpenseReportUsingPOST
      parameters:
      - name: chain-id
        in: header
        description: Used for tracking the flow of the request
        required: false
        schema:
          type: string
      - name: customer-code
        in: header
        description: Unique customer identifier provided by Chrome River
        required: true
        schema:
          type: string
      - name: logged-in-user-id
        in: header
        description: Unique ID for the approver logged in making request
        required: true
        schema:
          type: string
      - name: reportId
        in: path
        description: Report ID for report
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        description: 'API key for Authentication '
        required: true
        schema:
          type: string
      requestBody:
        $ref: '#/components/requestBodies/ReassignModelV1'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Customer Code is invalid.
        '401':
          description: Customer Code is not authorized.  Cannot reassign expense report.
        '403':
          description: Logged in user is not authorized to reassign report or Logged in user does not exist.
        '503':
          description: Service unavailable.
      deprecated: false
  /v1/expense-reports/{reportId}/return:
    post:
      tags:
      - expense-approval-controller-v1
      summary: Return an expense report
      description: This web service allows an external application to return the specified expense report to the expense owner
      operationId: returnExpenseReportUsingPOST
      parameters:
      - name: chain-id
        in: header
        description: Used for tracking the flow of the request
        required: false
        schema:
          type: string
      - name: customer-code
        in: header
        description: Unique customer identifier provided by Chrome River
        required: true
        schema:
          type: string
      - name: logged-in-user-id
        in: header
        description: Unique ID for the approver logged in making request
        required: true
        schema:
          type: string
      - name: reportId
        in: path
        description: Report ID for report
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        description: 'API key for Authentication '
        required: true
        schema:
          type: string
      requestBody:
        $ref: '#/components/requestBodies/NotesModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Customer Code is invalid.
        '401':
          description: Customer Code is not authorized.  Cannot return expense report.
        '403':
          description: Logged in user is not authorized to return report or Logged in user does not exist.
        '503':
          description: Service unavailable.
      deprecated: false
  /v1/expense-reports/{reportId}/submit:
    post:
      tags:
      - expense-approval-controller-v1
      summary: Submit an expense report
      description: This web service allows an external application to submit the specified expense report
      operationId: submitExpenseReportUsingPOST
      parameters:
      - name: chain-id
        in: header
        description: Used for tracking the flow of the request
        required: false
        schema:
          type: string
      - name: customer-code
        in: header
        description: Unique customer identifier provided by Chrome River
        required: true
        schema:
          type: string
      - name: logged-in-user-id
        in: header
        description: Unique ID for the submitter logged in making request
        required: true
        schema:
          type: string
      - name: reportId
        in: path
        description: Report ID for report
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        description: 'API key for Authentication '
        required: true
        schema:
          type: string
      requestBody:
        $ref: '#/components/requestBodies/ExpenseSubmit'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpenseSubmitResponse'
        '400':
          description: Customer Code is invalid.
        '401':
          description: Customer Code is not authorized.  Cannot submit expense report.
        '403':
          description: Logged in user is not authorized to submit report or Logged in user does not exist.
        '422':
          description: Expense report has not been submitted. Report have some business rules violations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpenseSubmitResponse'
        '503':
          description: Service unavailable.
      deprecated: false
  /v1/trip-reports-summary:
    get:
      tags:
      - expense-approval-controller-v1
      summary: Get trips and expense reports summary details
      description: This web service allows an external application to get trips and expense reports summary details
      operationId: getTripReportsSummaryUsingGET
      parameters:
      - name: chain-id
        in: header
        description: Used for tracking the flow of the request
        required: true
        schema:
          type: string
      - name: customer-code
        in: header
        description: Unique customer identifier provided by Chrome River
        required: true
        schema:
          type: string
      - name: logged-in-user-id
        in: header
        description: Unique ID for the user logged in making request
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        description: 'API key for Authentication '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TripReportSummaryHeader'
        '400':
          description: Customer Code is invalid.
        '401':
          description: Customer Code is not authorized.
        '403':
          description: Logged in user does not exist
        '503':
          description: Service unavailable.
      deprecated: false
components:
  schemas:
    ExpenseSubmitResponse:
      type: object
      properties:
        complianceItems:
          type: array
          description: List of compliance issues associated with report
          items:
            $ref: '#/components/schemas/ComplianceItem'
        hasComplianceItems:
          type: boolean
          description: Indicates if compliance issues are associated with report
        submitted:
          type: boolean
      title: ExpenseSubmitResponse
    Entity:
      type: object
      properties:
        code:
          type: string
          example: 100
          description: Entity code. Max 50 characters
        extraData1:
          type: string
          example: Main
          description: Extra data field. Max 1000 characters
        extraData2:
          type: string
          example: Office
          description: Extra data field. Max 1000 characters
        extraData3:
          type: string
          example: 1000
          description: Extra data field. Max 1000 characters
        extraData4:
          type: string
          example: 900
          description: Extra data field. Max 1000 characters
        extraData5:
          type: string
          example: '0000'
          description: Extra data field. Max 1000 characters
        name:
          type: string
          example: Los Angeles
          description: Name of entity. Max 100 characters
      title: Entity
    Person:
      type: object
      properties:
        firstName:
          type: string
          example: Smith
          description: Person's last name. Max 100 characters
        lastName:
          type: string
          example: Jacob
          description: Person's first name. Max 100 characters
        personEntities:
          type: array
          description: List of person entities associated with person
          items:
            $ref: '#/components/schemas/PersonEntities'
        personUniqueId:
          type: string
          example: jsmith
          description: Unique identifier for person. Max 100 characters
        primaryEmailAddress:
          type: string
          example: jacob.smith@cpa.org
          description: Person's primary email address. Max 100 characters
        reportsToUniqueId:
          type: string
          example: lkemp
          description: Unique identifier for manager person reports to
        title:
          type: string
          example: Associate Accountant
          description: Person's title. Max 255 characters
        uniquePersonId:
          type: string
      title: Person
    CountModel:
      type: object
      properties:
        reportsToApprove:
          type: integer
          format: int32
          example: 9
          description: The number of expense reports awaiting approval by approver.
      title: CountModel
    PaLineItemType:
      type: object
      properties:
        externalRef:
          type: string
          example: 4320
          description: Reference to an external system's expense types. Max 50 characters
        id:
          type: integer
          format: int32
          example: 1398
          description: Internal ID of preapproval line item
        name:
          type: string
          example: Airfare
          description: Expense type of preapproval line item. Max 50 characters
        type:
          type: string
          example: LineItem
          enum:
          - LineItem
          - Header
      title: PaLineItemType
    ExpenseReportLineItemPersonGuest:
      type: object
      properties:
        amount:
          type: number
          example: 11.98
          description: Amount of expense spent by/for guest
        company:
          type: string
          example: CFA Consultants
          description: Company of guest. Max 100 characters
        firstName:
          type: string
          example: Jennifer
          description: First name of guest. Max 100 characters
        guestType:
          type: string
          example: InternalGuest
          description: Type of guest
          enum:
          - InternalGuest
          - ExternalGuest
          - HealthCareProvider
          - TemporaryHealthCareProvider
          - CRMGuest
        lastName:
          type: string
          example: Garth
          description: Last name of guest. Max 100 characters
        percentage:
          type: number
          example: 10
          description: Percentage of expense spent by/for guest
        title:
          type: string
          example: Legal Consultant
          description: Title of guest. Max 255 characters
      title: ExpenseReportLineItemPersonGuest
    ExpenseReportLineItem:
      type: object
      properties:
        allocations:
          type: array
          description: List of allocations selected for line item
          items:
            $ref: '#/components/schemas/LineItemAllocation'
        amount:
          type: number
          example: 119.81
          description: Amount of line item
        amountApproved:
          type: number
          example: 119.81
          description: Approved amount due to expense owner
        amountCustomer:
          type: number
          example: 0
          description: AmountSpent * customer's exchange rate
        amountSpent:
          type: number
          example: 119.81
          description: Amount spent of line item
        approvalStatus:
          type: string
          example: Pending Approval
          description: NULL for parent line items (parent == true)
          enum:
          - Draft
          - Pending Approval
          - Approved For Payment
          - Returned
          - Exported
          - Paid
          - Partially Paid
        businessPurpose:
          type: string
          example: Conference
          description: Business purpose of expense. Max 2500 characters
        children:
          type: array
          description: List of child expenses. Used for hotel items.
          items:
            $ref: '#/components/schemas/ExpenseReportLineItem'
        comments:
          type: array
          description: List of comments attached to line item
          items:
            $ref: '#/components/schemas/Comment'
        complianceItems:
          type: array
          description: List of compliance issues associated with the line item
          items:
            $ref: '#/components/schemas/ComplianceItem'
        createDate:
          type: string
          format: date-time
          example: 2022-01-03 05:53:39:000
          description: Date expense line item was created on report
        currencyCodeCustomer:
          type: string
          example: USD
          description: Customer's default ISO-4217 currency code
        currencySpent:
          type: string
          example: USD
          description: ' ISO-4217 Currency code spent'
        currentApprovers:
          type: array
          description: List of approvers where line item is currently pending
          items:
            $ref: '#/components/schemas/Person'
        description:
          type: string
          example: Flight to St. Louis
          description: Description of expense. Max 2500 characters
        expenseItemType:
          type: string
          example: Airfare
          description: Expense category of line item. Max 50 characters
        exportStatus:
          type: string
          example: Exported
          description: Export status of line item
          enum:
          - In Export
          - Waiting for Export
          - Exported
          - Paid
          - Partially Paid
        feedCode:
          type: string
          example: CreditCardAmex
          description: Name of feed for expense transaction
        feedName:
          type: string
          example: Amex Corporate Card
          description: Name of feed for expense transaction
        firmPaid:
          type: boolean
        guests:
          type: array
          description: List of guests for line item
          items:
            $ref: '#/components/schemas/ExpenseReportLineItemPersonGuest'
        hasReceipt:
          type: boolean
          example: true
          description: Is a receipt attached
        hasTaxReceipt:
          type: boolean
          example: true
          description: Is a tax receipt attached
        id:
          type: string
          example: b0dd069a-ce1a-45bf-b9dd-48cac24735ff
          description: Internal ID of expense report line item. 36 characters
        images:
          type: array
  

# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/emburse/refs/heads/main/openapi/emburse-expense-approval-controller-v1-api-openapi.yml