Crunch Expenses API Documentation

expenses-api-service

Overview

Version information

Version : 1

Tags

  • Attachments
  • ExpenseTypeController
  • ExpensesController
  • LedgerController
  • PaymentMethodController
  • PersonsController
  • RecurringExpensesController
  • SupplierController
  • VatTypeController

Access

  • Base URL: https://public-api.crunch.co.uk/v1/expenses

Paths

Download expense attachment

Up
get /attachments

Query parameters

expenseId (required)
Query Parameter — format: int64
attachmentId (required)
Query Parameter — format: int64
fileName (required)
Query Parameter

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

byte[]

Example data

Content-Type: application/json
""

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

returns the raw content of an attachment attached to an expense byte[]

Fetch all expense types

Up
get /expense-types/all

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

Example data

Content-Type: application/json
{
  "count" : 6,
  "expenseGroups" : [ {
    "groupName" : "groupName",
    "count" : 0,
    "expenseTypes" : [ {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    }, {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    } ]
  }, {
    "groupName" : "groupName",
    "count" : 0,
    "expenseTypes" : [ {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    }, {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    } ]
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Fetch all expense types ExpenseTypesDto

Fetch expense types

Up
get /expense-types

Query parameters

excludeDeprecated (optional)
Query Parameter
date (optional)
Query Parameter — format: date

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

Example data

Content-Type: application/json
{
  "count" : 6,
  "expenseGroups" : [ {
    "groupName" : "groupName",
    "count" : 0,
    "expenseTypes" : [ {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    }, {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    } ]
  }, {
    "groupName" : "groupName",
    "count" : 0,
    "expenseTypes" : [ {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    }, {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    } ]
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Fetch expense types ExpenseTypesDto

Create new expense

Up
post /

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Request body

body ExpenseDto (optional)
Body Parameter

Security

oauth2-authorisation-code
Type: oauth2 Scopes: create:all

Return type

Example data

Content-Type: application/json
{
  "supplierReference" : "supplierReference",
  "recharged" : true,
  "note" : "note",
  "reconciled" : true,
  "attachments" : [ {
    "fileName" : "fileName",
    "id" : 8,
    "fileContents" : "fileContents"
  }, {
    "fileName" : "fileName",
    "id" : 8,
    "fileContents" : "fileContents"
  } ],
  "supplierPayments" : [ {
    "date" : "2000-01-23",
    "paymentTarget" : {
      "bankAccount" : {
        "defaultBankAccount" : true,
        "bankName" : "bankName",
        "displayableName" : "displayableName",
        "id" : 1
      },
      "paymentMethod" : {
        "paymentMethodName" : "paymentMethodName",
        "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
      },
      "creditCard" : {
        "defaultCreditCard" : true,
        "displayableName" : "displayableName",
        "id" : 1
      }
    },
    "amount" : 7.386281948385884,
    "reconciled" : true,
    "id" : 4
  }, {
    "date" : "2000-01-23",
    "paymentTarget" : {
      "bankAccount" : {
        "defaultBankAccount" : true,
        "bankName" : "bankName",
        "displayableName" : "displayableName",
        "id" : 1
      },
      "paymentMethod" : {
        "paymentMethodName" : "paymentMethodName",
        "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
      },
      "creditCard" : {
        "defaultCreditCard" : true,
        "displayableName" : "displayableName",
        "id" : 1
      }
    },
    "amount" : 7.386281948385884,
    "reconciled" : true,
    "id" : 4
  } ],
  "editable" : true,
  "rechargedClient" : {
    "name" : "name",
    "id" : 9
  },
  "deletable" : true,
  "totalCreditsAmount" : 1.1730742509559433,
  "postingDate" : "2000-01-23",
  "expenseLineItems" : [ {
    "expenseType" : "expenseType",
    "amount" : {
      "netAmount" : 9.301444243932576,
      "grossAmount" : 7.061401241503109,
      "vatAmount" : 3.616076749251911
    },
    "vatType" : "vatType",
    "description" : "description",
    "id" : 2,
    "employee" : {
      "forename" : "forename",
      "surname" : "surname",
      "displayableName" : "displayableName",
      "id" : 2
    }
  }, {
    "expenseType" : "expenseType",
    "amount" : {
      "netAmount" : 9.301444243932576,
      "grossAmount" : 7.061401241503109,
      "vatAmount" : 3.616076749251911
    },
    "vatType" : "vatType",
    "description" : "description",
    "id" : 2,
    "employee" : {
      "forename" : "forename",
      "surname" : "surname",
      "displayableName" : "displayableName",
      "id" : 2
    }
  } ],
  "creditNotes" : [ {
    "date" : "2000-01-23",
    "lineItems" : [ {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    }, {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    } ],
    "id" : 1,
    "refunds" : [ null, null ]
  }, {
    "date" : "2000-01-23",
    "lineItems" : [ {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    }, {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    } ],
    "id" : 1,
    "refunds" : [ null, null ]
  } ],
  "createdBy" : "createdBy",
  "recurringEvent" : {
    "frequencyOccurrence" : "frequencyOccurrence",
    "nextOccurrenceDate" : "2000-01-23",
    "endDate" : "2000-01-23",
    "occurrenceCount" : 6,
    "description" : "description",
    "id" : 9,
    "recurringEventFrequency" : "recurringEventFrequency",
    "recurringEventEndType" : "recurringEventEndType",
    "enabled" : true
  },
  "supplier" : {
    "archived" : true,
    "country" : "country",
    "expenseType" : {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    },
    "vatRegistrationNumber" : "vatRegistrationNumber",
    "contactName" : "contactName",
    "companyName" : "companyName",
    "deletable" : true,
    "id" : 5
  },
  "expenseLedgerIsOpen" : true,
  "totalRefundsAmount" : 4.965218492984954,
  "createdByRecurringEvent" : true,
  "id" : 5,
  "status" : "status",
  "outstandingBalance" : 5.025004791520295
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

201

new expense is created and put to the body of the response ExpenseDto

Delete an expense

Up
delete /{expenseId}

Path parameters

expenseId (required)
Path Parameter — format: int64

Security

oauth2-authorisation-code
Type: oauth2 Scopes: delete:all

Responses

200

Expense is successfully deleted

400

Expense cannot be deleted

Fetch all expenses

Up
get /
The default sorting criteria is date,desc,id,desc.

Query parameters

page (optional)
Query Parameter — The index of the page to retrieve, based at 0. format: int32
size (optional)
Query Parameter — Number of records returned per page. Maximum value allowed is 200. default: 20 format: int32
sort (optional)
Query Parameter — Sorting criteria by a given <code>field</code>. format: <field>[,asc|desc]
supplierId (optional)
Query Parameter — format: int64
expenseType (optional)
Query Parameter
attachment (optional)
Query Parameter
paymentMethod (optional)
Query Parameter
startDate (optional)
Query Parameter — format: date
endDate (optional)
Query Parameter — format: date
paymentStartDate (optional)
Query Parameter — format: date
paymentEndDate (optional)
Query Parameter — format: date

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

Example data

Content-Type: application/json
{
  "number" : 9,
  "size" : 1,
  "last" : true,
  "numberOfElements" : 6,
  "totalPages" : 0,
  "pageable" : {
    "paged" : true,
    "pageNumber" : 1,
    "offset" : 3,
    "pageSize" : 6,
    "unpaged" : true
  },
  "sort" : {
    "unsorted" : true,
    "sorted" : true,
    "empty" : true
  },
  "content" : [ {
    "supplierReference" : "supplierReference",
    "recharged" : true,
    "note" : "note",
    "reconciled" : true,
    "attachments" : [ {
      "fileName" : "fileName",
      "id" : 8,
      "fileContents" : "fileContents"
    }, {
      "fileName" : "fileName",
      "id" : 8,
      "fileContents" : "fileContents"
    } ],
    "supplierPayments" : [ {
      "date" : "2000-01-23",
      "paymentTarget" : {
        "bankAccount" : {
          "defaultBankAccount" : true,
          "bankName" : "bankName",
          "displayableName" : "displayableName",
          "id" : 1
        },
        "paymentMethod" : {
          "paymentMethodName" : "paymentMethodName",
          "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
        },
        "creditCard" : {
          "defaultCreditCard" : true,
          "displayableName" : "displayableName",
          "id" : 1
        }
      },
      "amount" : 7.386281948385884,
      "reconciled" : true,
      "id" : 4
    }, {
      "date" : "2000-01-23",
      "paymentTarget" : {
        "bankAccount" : {
          "defaultBankAccount" : true,
          "bankName" : "bankName",
          "displayableName" : "displayableName",
          "id" : 1
        },
        "paymentMethod" : {
          "paymentMethodName" : "paymentMethodName",
          "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
        },
        "creditCard" : {
          "defaultCreditCard" : true,
          "displayableName" : "displayableName",
          "id" : 1
        }
      },
      "amount" : 7.386281948385884,
      "reconciled" : true,
      "id" : 4
    } ],
    "editable" : true,
    "rechargedClient" : {
      "name" : "name",
      "id" : 9
    },
    "deletable" : true,
    "totalCreditsAmount" : 1.1730742509559433,
    "postingDate" : "2000-01-23",
    "expenseLineItems" : [ {
      "expenseType" : "expenseType",
      "amount" : {
        "netAmount" : 9.301444243932576,
        "grossAmount" : 7.061401241503109,
        "vatAmount" : 3.616076749251911
      },
      "vatType" : "vatType",
      "description" : "description",
      "id" : 2,
      "employee" : {
        "forename" : "forename",
        "surname" : "surname",
        "displayableName" : "displayableName",
        "id" : 2
      }
    }, {
      "expenseType" : "expenseType",
      "amount" : {
        "netAmount" : 9.301444243932576,
        "grossAmount" : 7.061401241503109,
        "vatAmount" : 3.616076749251911
      },
      "vatType" : "vatType",
      "description" : "description",
      "id" : 2,
      "employee" : {
        "forename" : "forename",
        "surname" : "surname",
        "displayableName" : "displayableName",
        "id" : 2
      }
    } ],
    "creditNotes" : [ {
      "date" : "2000-01-23",
      "lineItems" : [ {
        "description" : "description",
        "id" : 6,
        "expenseLineItemIndex" : 7
      }, {
        "description" : "description",
        "id" : 6,
        "expenseLineItemIndex" : 7
      } ],
      "id" : 1,
      "refunds" : [ null, null ]
    }, {
      "date" : "2000-01-23",
      "lineItems" : [ {
        "description" : "description",
        "id" : 6,
        "expenseLineItemIndex" : 7
      }, {
        "description" : "description",
        "id" : 6,
        "expenseLineItemIndex" : 7
      } ],
      "id" : 1,
      "refunds" : [ null, null ]
    } ],
    "createdBy" : "createdBy",
    "recurringEvent" : {
      "frequencyOccurrence" : "frequencyOccurrence",
      "nextOccurrenceDate" : "2000-01-23",
      "endDate" : "2000-01-23",
      "occurrenceCount" : 6,
      "description" : "description",
      "id" : 9,
      "recurringEventFrequency" : "recurringEventFrequency",
      "recurringEventEndType" : "recurringEventEndType",
      "enabled" : true
    },
    "supplier" : {
      "archived" : true,
      "country" : "country",
      "expenseType" : {
        "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
        "defaultVatType" : "defaultVatType",
        "expenseTypeName" : "expenseTypeName",
        "deprecated" : true,
        "dormantAllowable" : true,
        "assignable" : true
      },
      "vatRegistrationNumber" : "vatRegistrationNumber",
      "contactName" : "contactName",
      "companyName" : "companyName",
      "deletable" : true,
      "id" : 5
    },
    "expenseLedgerIsOpen" : true,
    "totalRefundsAmount" : 4.965218492984954,
    "createdByRecurringEvent" : true,
    "id" : 5,
    "status" : "status",
    "outstandingBalance" : 5.025004791520295
  }, {
    "supplierReference" : "supplierReference",
    "recharged" : true,
    "note" : "note",
    "reconciled" : true,
    "attachments" : [ {
      "fileName" : "fileName",
      "id" : 8,
      "fileContents" : "fileContents"
    }, {
      "fileName" : "fileName",
      "id" : 8,
      "fileContents" : "fileContents"
    } ],
    "supplierPayments" : [ {
      "date" : "2000-01-23",
      "paymentTarget" : {
        "bankAccount" : {
          "defaultBankAccount" : true,
          "bankName" : "bankName",
          "displayableName" : "displayableName",
          "id" : 1
        },
        "paymentMethod" : {
          "paymentMethodName" : "paymentMethodName",
          "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
        },
        "creditCard" : {
          "defaultCreditCard" : true,
          "displayableName" : "displayableName",
          "id" : 1
        }
      },
      "amount" : 7.386281948385884,
      "reconciled" : true,
      "id" : 4
    }, {
      "date" : "2000-01-23",
      "paymentTarget" : {
        "bankAccount" : {
          "defaultBankAccount" : true,
          "bankName" : "bankName",
          "displayableName" : "displayableName",
          "id" : 1
        },
        "paymentMethod" : {
          "paymentMethodName" : "paymentMethodName",
          "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
        },
        "creditCard" : {
          "defaultCreditCard" : true,
          "displayableName" : "displayableName",
          "id" : 1
        }
      },
      "amount" : 7.386281948385884,
      "reconciled" : true,
      "id" : 4
    } ],
    "editable" : true,
    "rechargedClient" : {
      "name" : "name",
      "id" : 9
    },
    "deletable" : true,
    "totalCreditsAmount" : 1.1730742509559433,
    "postingDate" : "2000-01-23",
    "expenseLineItems" : [ {
      "expenseType" : "expenseType",
      "amount" : {
        "netAmount" : 9.301444243932576,
        "grossAmount" : 7.061401241503109,
        "vatAmount" : 3.616076749251911
      },
      "vatType" : "vatType",
      "description" : "description",
      "id" : 2,
      "employee" : {
        "forename" : "forename",
        "surname" : "surname",
        "displayableName" : "displayableName",
        "id" : 2
      }
    }, {
      "expenseType" : "expenseType",
      "amount" : {
        "netAmount" : 9.301444243932576,
        "grossAmount" : 7.061401241503109,
        "vatAmount" : 3.616076749251911
      },
      "vatType" : "vatType",
      "description" : "description",
      "id" : 2,
      "employee" : {
        "forename" : "forename",
        "surname" : "surname",
        "displayableName" : "displayableName",
        "id" : 2
      }
    } ],
    "creditNotes" : [ {
      "date" : "2000-01-23",
      "lineItems" : [ {
        "description" : "description",
        "id" : 6,
        "expenseLineItemIndex" : 7
      }, {
        "description" : "description",
        "id" : 6,
        "expenseLineItemIndex" : 7
      } ],
      "id" : 1,
      "refunds" : [ null, null ]
    }, {
      "date" : "2000-01-23",
      "lineItems" : [ {
        "description" : "description",
        "id" : 6,
        "expenseLineItemIndex" : 7
      }, {
        "description" : "description",
        "id" : 6,
        "expenseLineItemIndex" : 7
      } ],
      "id" : 1,
      "refunds" : [ null, null ]
    } ],
    "createdBy" : "createdBy",
    "recurringEvent" : {
      "frequencyOccurrence" : "frequencyOccurrence",
      "nextOccurrenceDate" : "2000-01-23",
      "endDate" : "2000-01-23",
      "occurrenceCount" : 6,
      "description" : "description",
      "id" : 9,
      "recurringEventFrequency" : "recurringEventFrequency",
      "recurringEventEndType" : "recurringEventEndType",
      "enabled" : true
    },
    "supplier" : {
      "archived" : true,
      "country" : "country",
      "expenseType" : {
        "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
        "defaultVatType" : "defaultVatType",
        "expenseTypeName" : "expenseTypeName",
        "deprecated" : true,
        "dormantAllowable" : true,
        "assignable" : true
      },
      "vatRegistrationNumber" : "vatRegistrationNumber",
      "contactName" : "contactName",
      "companyName" : "companyName",
      "deletable" : true,
      "id" : 5
    },
    "expenseLedgerIsOpen" : true,
    "totalRefundsAmount" : 4.965218492984954,
    "createdByRecurringEvent" : true,
    "id" : 5,
    "status" : "status",
    "outstandingBalance" : 5.025004791520295
  } ],
  "first" : true,
  "totalElements" : 6,
  "empty" : true
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

expenses are gathered and put to the body of the response PageExpenseDto

Get expense by id

Up
get /{expenseId}

Path parameters

expenseId (required)
Path Parameter — format: int64

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

Example data

Content-Type: application/json
{
  "supplierReference" : "supplierReference",
  "recharged" : true,
  "note" : "note",
  "reconciled" : true,
  "attachments" : [ {
    "fileName" : "fileName",
    "id" : 8,
    "fileContents" : "fileContents"
  }, {
    "fileName" : "fileName",
    "id" : 8,
    "fileContents" : "fileContents"
  } ],
  "supplierPayments" : [ {
    "date" : "2000-01-23",
    "paymentTarget" : {
      "bankAccount" : {
        "defaultBankAccount" : true,
        "bankName" : "bankName",
        "displayableName" : "displayableName",
        "id" : 1
      },
      "paymentMethod" : {
        "paymentMethodName" : "paymentMethodName",
        "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
      },
      "creditCard" : {
        "defaultCreditCard" : true,
        "displayableName" : "displayableName",
        "id" : 1
      }
    },
    "amount" : 7.386281948385884,
    "reconciled" : true,
    "id" : 4
  }, {
    "date" : "2000-01-23",
    "paymentTarget" : {
      "bankAccount" : {
        "defaultBankAccount" : true,
        "bankName" : "bankName",
        "displayableName" : "displayableName",
        "id" : 1
      },
      "paymentMethod" : {
        "paymentMethodName" : "paymentMethodName",
        "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
      },
      "creditCard" : {
        "defaultCreditCard" : true,
        "displayableName" : "displayableName",
        "id" : 1
      }
    },
    "amount" : 7.386281948385884,
    "reconciled" : true,
    "id" : 4
  } ],
  "editable" : true,
  "rechargedClient" : {
    "name" : "name",
    "id" : 9
  },
  "deletable" : true,
  "totalCreditsAmount" : 1.1730742509559433,
  "postingDate" : "2000-01-23",
  "expenseLineItems" : [ {
    "expenseType" : "expenseType",
    "amount" : {
      "netAmount" : 9.301444243932576,
      "grossAmount" : 7.061401241503109,
      "vatAmount" : 3.616076749251911
    },
    "vatType" : "vatType",
    "description" : "description",
    "id" : 2,
    "employee" : {
      "forename" : "forename",
      "surname" : "surname",
      "displayableName" : "displayableName",
      "id" : 2
    }
  }, {
    "expenseType" : "expenseType",
    "amount" : {
      "netAmount" : 9.301444243932576,
      "grossAmount" : 7.061401241503109,
      "vatAmount" : 3.616076749251911
    },
    "vatType" : "vatType",
    "description" : "description",
    "id" : 2,
    "employee" : {
      "forename" : "forename",
      "surname" : "surname",
      "displayableName" : "displayableName",
      "id" : 2
    }
  } ],
  "creditNotes" : [ {
    "date" : "2000-01-23",
    "lineItems" : [ {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    }, {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    } ],
    "id" : 1,
    "refunds" : [ null, null ]
  }, {
    "date" : "2000-01-23",
    "lineItems" : [ {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    }, {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    } ],
    "id" : 1,
    "refunds" : [ null, null ]
  } ],
  "createdBy" : "createdBy",
  "recurringEvent" : {
    "frequencyOccurrence" : "frequencyOccurrence",
    "nextOccurrenceDate" : "2000-01-23",
    "endDate" : "2000-01-23",
    "occurrenceCount" : 6,
    "description" : "description",
    "id" : 9,
    "recurringEventFrequency" : "recurringEventFrequency",
    "recurringEventEndType" : "recurringEventEndType",
    "enabled" : true
  },
  "supplier" : {
    "archived" : true,
    "country" : "country",
    "expenseType" : {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    },
    "vatRegistrationNumber" : "vatRegistrationNumber",
    "contactName" : "contactName",
    "companyName" : "companyName",
    "deletable" : true,
    "id" : 5
  },
  "expenseLedgerIsOpen" : true,
  "totalRefundsAmount" : 4.965218492984954,
  "createdByRecurringEvent" : true,
  "id" : 5,
  "status" : "status",
  "outstandingBalance" : 5.025004791520295
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Expense is successfully fetched ExpenseDto

404

Expense not found and cannot be received

400

Expense cannot be received

Get expenses total

Up
get /total

Query parameters

supplierId (optional)
Query Parameter — format: int64
expenseType (optional)
Query Parameter
attachment (optional)
Query Parameter
paymentMethod (optional)
Query Parameter
startDate (optional)
Query Parameter — format: date
endDate (optional)
Query Parameter — format: date
status (required)
Query Parameter
paymentStartDate (optional)
Query Parameter — format: date
paymentEndDate (optional)
Query Parameter — format: date

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

Example data

Content-Type: application/json
{
  "overpaid" : 1.4658129805029452,
  "grossAmount" : 0.8008281904610115,
  "underpaid" : 6.027456183070403
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Expenses total is calculated ExpensesTotalDto

Update an existing expense

Up
put /{expenseId}

Path parameters

expenseId (required)
Path Parameter — format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Request body

body ExpenseDto (optional)
Body Parameter

Security

oauth2-authorisation-code
Type: oauth2 Scopes: update:all

Return type

Example data

Content-Type: application/json
{
  "supplierReference" : "supplierReference",
  "recharged" : true,
  "note" : "note",
  "reconciled" : true,
  "attachments" : [ {
    "fileName" : "fileName",
    "id" : 8,
    "fileContents" : "fileContents"
  }, {
    "fileName" : "fileName",
    "id" : 8,
    "fileContents" : "fileContents"
  } ],
  "supplierPayments" : [ {
    "date" : "2000-01-23",
    "paymentTarget" : {
      "bankAccount" : {
        "defaultBankAccount" : true,
        "bankName" : "bankName",
        "displayableName" : "displayableName",
        "id" : 1
      },
      "paymentMethod" : {
        "paymentMethodName" : "paymentMethodName",
        "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
      },
      "creditCard" : {
        "defaultCreditCard" : true,
        "displayableName" : "displayableName",
        "id" : 1
      }
    },
    "amount" : 7.386281948385884,
    "reconciled" : true,
    "id" : 4
  }, {
    "date" : "2000-01-23",
    "paymentTarget" : {
      "bankAccount" : {
        "defaultBankAccount" : true,
        "bankName" : "bankName",
        "displayableName" : "displayableName",
        "id" : 1
      },
      "paymentMethod" : {
        "paymentMethodName" : "paymentMethodName",
        "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
      },
      "creditCard" : {
        "defaultCreditCard" : true,
        "displayableName" : "displayableName",
        "id" : 1
      }
    },
    "amount" : 7.386281948385884,
    "reconciled" : true,
    "id" : 4
  } ],
  "editable" : true,
  "rechargedClient" : {
    "name" : "name",
    "id" : 9
  },
  "deletable" : true,
  "totalCreditsAmount" : 1.1730742509559433,
  "postingDate" : "2000-01-23",
  "expenseLineItems" : [ {
    "expenseType" : "expenseType",
    "amount" : {
      "netAmount" : 9.301444243932576,
      "grossAmount" : 7.061401241503109,
      "vatAmount" : 3.616076749251911
    },
    "vatType" : "vatType",
    "description" : "description",
    "id" : 2,
    "employee" : {
      "forename" : "forename",
      "surname" : "surname",
      "displayableName" : "displayableName",
      "id" : 2
    }
  }, {
    "expenseType" : "expenseType",
    "amount" : {
      "netAmount" : 9.301444243932576,
      "grossAmount" : 7.061401241503109,
      "vatAmount" : 3.616076749251911
    },
    "vatType" : "vatType",
    "description" : "description",
    "id" : 2,
    "employee" : {
      "forename" : "forename",
      "surname" : "surname",
      "displayableName" : "displayableName",
      "id" : 2
    }
  } ],
  "creditNotes" : [ {
    "date" : "2000-01-23",
    "lineItems" : [ {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    }, {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    } ],
    "id" : 1,
    "refunds" : [ null, null ]
  }, {
    "date" : "2000-01-23",
    "lineItems" : [ {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    }, {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    } ],
    "id" : 1,
    "refunds" : [ null, null ]
  } ],
  "createdBy" : "createdBy",
  "recurringEvent" : {
    "frequencyOccurrence" : "frequencyOccurrence",
    "nextOccurrenceDate" : "2000-01-23",
    "endDate" : "2000-01-23",
    "occurrenceCount" : 6,
    "description" : "description",
    "id" : 9,
    "recurringEventFrequency" : "recurringEventFrequency",
    "recurringEventEndType" : "recurringEventEndType",
    "enabled" : true
  },
  "supplier" : {
    "archived" : true,
    "country" : "country",
    "expenseType" : {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    },
    "vatRegistrationNumber" : "vatRegistrationNumber",
    "contactName" : "contactName",
    "companyName" : "companyName",
    "deletable" : true,
    "id" : 5
  },
  "expenseLedgerIsOpen" : true,
  "totalRefundsAmount" : 4.965218492984954,
  "createdByRecurringEvent" : true,
  "id" : 5,
  "status" : "status",
  "outstandingBalance" : 5.025004791520295
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Expense is successfully updated ExpenseDto

404

Expense not found and cannot be updated

Fetch open accounting periods

Up
get /ledgers

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

Example data

Content-Type: application/json
[ {
  "endDate" : "2000-01-23",
  "startDate" : "2000-01-23",
  "status" : "status"
}, {
  "endDate" : "2000-01-23",
  "startDate" : "2000-01-23",
  "status" : "status"
} ]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

opened accounting periods are gathered and put to the body of the response

Fetch all payment methods

Up
get /payment-methods

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

Example data

Content-Type: application/json
{
  "paymentMethods" : [ {
    "paymentMethodName" : "paymentMethodName",
    "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
  }, {
    "paymentMethodName" : "paymentMethodName",
    "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Fetch all payment methods PaymentMethodsDto

Fetch persons related to current client id

Up
get /persons

Query parameters

date (required)
Query Parameter — format: date
role (optional)
Query Parameter

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

array[PersonDto]

Example data

Content-Type: application/json
[ {
  "forename" : "forename",
  "surname" : "surname",
  "displayableName" : "displayableName",
  "id" : 2
}, {
  "forename" : "forename",
  "surname" : "surname",
  "displayableName" : "displayableName",
  "id" : 2
} ]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

persons related to current client id

Delete recurring expense

Up
delete /recurring-expenses/{id}

Path parameters

id (required)
Path Parameter — format: int64

Security

oauth2-authorisation-code
Type: oauth2 Scopes: update:all

Return type

Long

Example data

Content-Type: application/json
0

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Recurring expense is successfully deleted Long

404

Recurring expense cannot be allocated

400

Recurring expense cannot be deleted

Get recurring expense

Up
get /recurring-expenses/{id}

Path parameters

id (required)
Path Parameter — format: int64

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

Example data

Content-Type: application/json
{
  "supplierReference" : "supplierReference",
  "recharged" : true,
  "note" : "note",
  "reconciled" : true,
  "attachments" : [ {
    "fileName" : "fileName",
    "id" : 8,
    "fileContents" : "fileContents"
  }, {
    "fileName" : "fileName",
    "id" : 8,
    "fileContents" : "fileContents"
  } ],
  "supplierPayments" : [ {
    "date" : "2000-01-23",
    "paymentTarget" : {
      "bankAccount" : {
        "defaultBankAccount" : true,
        "bankName" : "bankName",
        "displayableName" : "displayableName",
        "id" : 1
      },
      "paymentMethod" : {
        "paymentMethodName" : "paymentMethodName",
        "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
      },
      "creditCard" : {
        "defaultCreditCard" : true,
        "displayableName" : "displayableName",
        "id" : 1
      }
    },
    "amount" : 7.386281948385884,
    "reconciled" : true,
    "id" : 4
  }, {
    "date" : "2000-01-23",
    "paymentTarget" : {
      "bankAccount" : {
        "defaultBankAccount" : true,
        "bankName" : "bankName",
        "displayableName" : "displayableName",
        "id" : 1
      },
      "paymentMethod" : {
        "paymentMethodName" : "paymentMethodName",
        "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
      },
      "creditCard" : {
        "defaultCreditCard" : true,
        "displayableName" : "displayableName",
        "id" : 1
      }
    },
    "amount" : 7.386281948385884,
    "reconciled" : true,
    "id" : 4
  } ],
  "editable" : true,
  "rechargedClient" : {
    "name" : "name",
    "id" : 9
  },
  "deletable" : true,
  "totalCreditsAmount" : 1.1730742509559433,
  "postingDate" : "2000-01-23",
  "expenseLineItems" : [ {
    "expenseType" : "expenseType",
    "amount" : {
      "netAmount" : 9.301444243932576,
      "grossAmount" : 7.061401241503109,
      "vatAmount" : 3.616076749251911
    },
    "vatType" : "vatType",
    "description" : "description",
    "id" : 2,
    "employee" : {
      "forename" : "forename",
      "surname" : "surname",
      "displayableName" : "displayableName",
      "id" : 2
    }
  }, {
    "expenseType" : "expenseType",
    "amount" : {
      "netAmount" : 9.301444243932576,
      "grossAmount" : 7.061401241503109,
      "vatAmount" : 3.616076749251911
    },
    "vatType" : "vatType",
    "description" : "description",
    "id" : 2,
    "employee" : {
      "forename" : "forename",
      "surname" : "surname",
      "displayableName" : "displayableName",
      "id" : 2
    }
  } ],
  "creditNotes" : [ {
    "date" : "2000-01-23",
    "lineItems" : [ {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    }, {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    } ],
    "id" : 1,
    "refunds" : [ null, null ]
  }, {
    "date" : "2000-01-23",
    "lineItems" : [ {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    }, {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    } ],
    "id" : 1,
    "refunds" : [ null, null ]
  } ],
  "createdBy" : "createdBy",
  "recurringEvent" : {
    "frequencyOccurrence" : "frequencyOccurrence",
    "nextOccurrenceDate" : "2000-01-23",
    "endDate" : "2000-01-23",
    "occurrenceCount" : 6,
    "description" : "description",
    "id" : 9,
    "recurringEventFrequency" : "recurringEventFrequency",
    "recurringEventEndType" : "recurringEventEndType",
    "enabled" : true
  },
  "supplier" : {
    "archived" : true,
    "country" : "country",
    "expenseType" : {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    },
    "vatRegistrationNumber" : "vatRegistrationNumber",
    "contactName" : "contactName",
    "companyName" : "companyName",
    "deletable" : true,
    "id" : 5
  },
  "expenseLedgerIsOpen" : true,
  "totalRefundsAmount" : 4.965218492984954,
  "createdByRecurringEvent" : true,
  "id" : 5,
  "status" : "status",
  "outstandingBalance" : 5.025004791520295
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Recurring expense is successfully returned ExpenseDto

404

Recurring expense is not found for customer

Get recurring expenses for client

Up
get /recurring-expenses
The default sorting criteria is date,desc,companyName,asc.

Query parameters

page (optional)
Query Parameter — The index of the page to retrieve, based at 0. format: int32
size (optional)
Query Parameter — Number of records returned per page. Maximum value allowed is 200. default: 20 format: int32
sort (optional)
Query Parameter — Sorting criteria by a given <code>field</code>. format: <field>[,asc|desc]

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

Example data

Content-Type: application/json
{
  "number" : 2,
  "size" : 1,
  "last" : true,
  "numberOfElements" : 7,
  "totalPages" : 0,
  "pageable" : {
    "paged" : true,
    "pageNumber" : 1,
    "offset" : 3,
    "pageSize" : 6,
    "unpaged" : true
  },
  "sort" : {
    "unsorted" : true,
    "sorted" : true,
    "empty" : true
  },
  "content" : [ {
    "supplierName" : "supplierName",
    "totalAmount" : 5.637376656633329,
    "nextOccurrenceDate" : "2000-01-23",
    "description" : "description",
    "id" : 5,
    "status" : "status"
  }, {
    "supplierName" : "supplierName",
    "totalAmount" : 5.637376656633329,
    "nextOccurrenceDate" : "2000-01-23",
    "description" : "description",
    "id" : 5,
    "status" : "status"
  } ],
  "first" : true,
  "totalElements" : 6,
  "empty" : true
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Recurring expenses successfully returned. PageRecurringExpenseDto

New recurring expense

Up
post /recurring-expenses

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Request body

body ExpenseDto (optional)
Body Parameter

Security

oauth2-authorisation-code
Type: oauth2 Scopes: create:all

Return type

Example data

Content-Type: application/json
{
  "supplierReference" : "supplierReference",
  "recharged" : true,
  "note" : "note",
  "reconciled" : true,
  "attachments" : [ {
    "fileName" : "fileName",
    "id" : 8,
    "fileContents" : "fileContents"
  }, {
    "fileName" : "fileName",
    "id" : 8,
    "fileContents" : "fileContents"
  } ],
  "supplierPayments" : [ {
    "date" : "2000-01-23",
    "paymentTarget" : {
      "bankAccount" : {
        "defaultBankAccount" : true,
        "bankName" : "bankName",
        "displayableName" : "displayableName",
        "id" : 1
      },
      "paymentMethod" : {
        "paymentMethodName" : "paymentMethodName",
        "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
      },
      "creditCard" : {
        "defaultCreditCard" : true,
        "displayableName" : "displayableName",
        "id" : 1
      }
    },
    "amount" : 7.386281948385884,
    "reconciled" : true,
    "id" : 4
  }, {
    "date" : "2000-01-23",
    "paymentTarget" : {
      "bankAccount" : {
        "defaultBankAccount" : true,
        "bankName" : "bankName",
        "displayableName" : "displayableName",
        "id" : 1
      },
      "paymentMethod" : {
        "paymentMethodName" : "paymentMethodName",
        "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
      },
      "creditCard" : {
        "defaultCreditCard" : true,
        "displayableName" : "displayableName",
        "id" : 1
      }
    },
    "amount" : 7.386281948385884,
    "reconciled" : true,
    "id" : 4
  } ],
  "editable" : true,
  "rechargedClient" : {
    "name" : "name",
    "id" : 9
  },
  "deletable" : true,
  "totalCreditsAmount" : 1.1730742509559433,
  "postingDate" : "2000-01-23",
  "expenseLineItems" : [ {
    "expenseType" : "expenseType",
    "amount" : {
      "netAmount" : 9.301444243932576,
      "grossAmount" : 7.061401241503109,
      "vatAmount" : 3.616076749251911
    },
    "vatType" : "vatType",
    "description" : "description",
    "id" : 2,
    "employee" : {
      "forename" : "forename",
      "surname" : "surname",
      "displayableName" : "displayableName",
      "id" : 2
    }
  }, {
    "expenseType" : "expenseType",
    "amount" : {
      "netAmount" : 9.301444243932576,
      "grossAmount" : 7.061401241503109,
      "vatAmount" : 3.616076749251911
    },
    "vatType" : "vatType",
    "description" : "description",
    "id" : 2,
    "employee" : {
      "forename" : "forename",
      "surname" : "surname",
      "displayableName" : "displayableName",
      "id" : 2
    }
  } ],
  "creditNotes" : [ {
    "date" : "2000-01-23",
    "lineItems" : [ {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    }, {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    } ],
    "id" : 1,
    "refunds" : [ null, null ]
  }, {
    "date" : "2000-01-23",
    "lineItems" : [ {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    }, {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    } ],
    "id" : 1,
    "refunds" : [ null, null ]
  } ],
  "createdBy" : "createdBy",
  "recurringEvent" : {
    "frequencyOccurrence" : "frequencyOccurrence",
    "nextOccurrenceDate" : "2000-01-23",
    "endDate" : "2000-01-23",
    "occurrenceCount" : 6,
    "description" : "description",
    "id" : 9,
    "recurringEventFrequency" : "recurringEventFrequency",
    "recurringEventEndType" : "recurringEventEndType",
    "enabled" : true
  },
  "supplier" : {
    "archived" : true,
    "country" : "country",
    "expenseType" : {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    },
    "vatRegistrationNumber" : "vatRegistrationNumber",
    "contactName" : "contactName",
    "companyName" : "companyName",
    "deletable" : true,
    "id" : 5
  },
  "expenseLedgerIsOpen" : true,
  "totalRefundsAmount" : 4.965218492984954,
  "createdByRecurringEvent" : true,
  "id" : 5,
  "status" : "status",
  "outstandingBalance" : 5.025004791520295
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

success ExpenseDto

Update recurring expense

Up
put /recurring-expenses/{id}

Path parameters

id (required)
Path Parameter — format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Request body

body ExpenseDto (optional)
Body Parameter

Security

oauth2-authorisation-code
Type: oauth2 Scopes: update:all

Return type

Example data

Content-Type: application/json
{
  "supplierReference" : "supplierReference",
  "recharged" : true,
  "note" : "note",
  "reconciled" : true,
  "attachments" : [ {
    "fileName" : "fileName",
    "id" : 8,
    "fileContents" : "fileContents"
  }, {
    "fileName" : "fileName",
    "id" : 8,
    "fileContents" : "fileContents"
  } ],
  "supplierPayments" : [ {
    "date" : "2000-01-23",
    "paymentTarget" : {
      "bankAccount" : {
        "defaultBankAccount" : true,
        "bankName" : "bankName",
        "displayableName" : "displayableName",
        "id" : 1
      },
      "paymentMethod" : {
        "paymentMethodName" : "paymentMethodName",
        "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
      },
      "creditCard" : {
        "defaultCreditCard" : true,
        "displayableName" : "displayableName",
        "id" : 1
      }
    },
    "amount" : 7.386281948385884,
    "reconciled" : true,
    "id" : 4
  }, {
    "date" : "2000-01-23",
    "paymentTarget" : {
      "bankAccount" : {
        "defaultBankAccount" : true,
        "bankName" : "bankName",
        "displayableName" : "displayableName",
        "id" : 1
      },
      "paymentMethod" : {
        "paymentMethodName" : "paymentMethodName",
        "paymentMethodDisplayableName" : "paymentMethodDisplayableName"
      },
      "creditCard" : {
        "defaultCreditCard" : true,
        "displayableName" : "displayableName",
        "id" : 1
      }
    },
    "amount" : 7.386281948385884,
    "reconciled" : true,
    "id" : 4
  } ],
  "editable" : true,
  "rechargedClient" : {
    "name" : "name",
    "id" : 9
  },
  "deletable" : true,
  "totalCreditsAmount" : 1.1730742509559433,
  "postingDate" : "2000-01-23",
  "expenseLineItems" : [ {
    "expenseType" : "expenseType",
    "amount" : {
      "netAmount" : 9.301444243932576,
      "grossAmount" : 7.061401241503109,
      "vatAmount" : 3.616076749251911
    },
    "vatType" : "vatType",
    "description" : "description",
    "id" : 2,
    "employee" : {
      "forename" : "forename",
      "surname" : "surname",
      "displayableName" : "displayableName",
      "id" : 2
    }
  }, {
    "expenseType" : "expenseType",
    "amount" : {
      "netAmount" : 9.301444243932576,
      "grossAmount" : 7.061401241503109,
      "vatAmount" : 3.616076749251911
    },
    "vatType" : "vatType",
    "description" : "description",
    "id" : 2,
    "employee" : {
      "forename" : "forename",
      "surname" : "surname",
      "displayableName" : "displayableName",
      "id" : 2
    }
  } ],
  "creditNotes" : [ {
    "date" : "2000-01-23",
    "lineItems" : [ {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    }, {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    } ],
    "id" : 1,
    "refunds" : [ null, null ]
  }, {
    "date" : "2000-01-23",
    "lineItems" : [ {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    }, {
      "description" : "description",
      "id" : 6,
      "expenseLineItemIndex" : 7
    } ],
    "id" : 1,
    "refunds" : [ null, null ]
  } ],
  "createdBy" : "createdBy",
  "recurringEvent" : {
    "frequencyOccurrence" : "frequencyOccurrence",
    "nextOccurrenceDate" : "2000-01-23",
    "endDate" : "2000-01-23",
    "occurrenceCount" : 6,
    "description" : "description",
    "id" : 9,
    "recurringEventFrequency" : "recurringEventFrequency",
    "recurringEventEndType" : "recurringEventEndType",
    "enabled" : true
  },
  "supplier" : {
    "archived" : true,
    "country" : "country",
    "expenseType" : {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    },
    "vatRegistrationNumber" : "vatRegistrationNumber",
    "contactName" : "contactName",
    "companyName" : "companyName",
    "deletable" : true,
    "id" : 5
  },
  "expenseLedgerIsOpen" : true,
  "totalRefundsAmount" : 4.965218492984954,
  "createdByRecurringEvent" : true,
  "id" : 5,
  "status" : "status",
  "outstandingBalance" : 5.025004791520295
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Recurring expense is successfully updated ExpenseDto

404

Recurring expense is not found for customer

Create new supplier

Up
post /suppliers

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Request body

body SupplierDto (optional)
Body Parameter

Security

oauth2-authorisation-code
Type: oauth2 Scopes: create:all

Return type

Example data

Content-Type: application/json
{
  "archived" : true,
  "country" : "country",
  "expenseType" : {
    "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
    "defaultVatType" : "defaultVatType",
    "expenseTypeName" : "expenseTypeName",
    "deprecated" : true,
    "dormantAllowable" : true,
    "assignable" : true
  },
  "vatRegistrationNumber" : "vatRegistrationNumber",
  "contactName" : "contactName",
  "companyName" : "companyName",
  "deletable" : true,
  "id" : 5
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

201

new supplier is created and put to the body of the response SupplierDto

Delete supplier by its ID

Up
delete /suppliers/{supplierId}

Path parameters

supplierId (required)
Path Parameter — format: int64

Security

oauth2-authorisation-code
Type: oauth2 Scopes: delete:all

Return type

Example data

Content-Type: application/json
{
  "archived" : true,
  "country" : "country",
  "expenseType" : {
    "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
    "defaultVatType" : "defaultVatType",
    "expenseTypeName" : "expenseTypeName",
    "deprecated" : true,
    "dormantAllowable" : true,
    "assignable" : true
  },
  "vatRegistrationNumber" : "vatRegistrationNumber",
  "contactName" : "contactName",
  "companyName" : "companyName",
  "deletable" : true,
  "id" : 5
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Supplier is successfully deleted SupplierDto

Get list of suppliers.

Up
get /suppliers/all

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

Example data

Content-Type: application/json
{
  "count" : 0,
  "content" : [ {
    "archived" : true,
    "country" : "country",
    "expenseType" : {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    },
    "vatRegistrationNumber" : "vatRegistrationNumber",
    "contactName" : "contactName",
    "companyName" : "companyName",
    "deletable" : true,
    "id" : 5
  }, {
    "archived" : true,
    "country" : "country",
    "expenseType" : {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    },
    "vatRegistrationNumber" : "vatRegistrationNumber",
    "contactName" : "contactName",
    "companyName" : "companyName",
    "deletable" : true,
    "id" : 5
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

full list of suppliers SuppliersDto

Get supplier by id

Up
get /suppliers/{supplierId}

Path parameters

supplierId (required)
Path Parameter — format: int64

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

Example data

Content-Type: application/json
{
  "archived" : true,
  "country" : "country",
  "expenseType" : {
    "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
    "defaultVatType" : "defaultVatType",
    "expenseTypeName" : "expenseTypeName",
    "deprecated" : true,
    "dormantAllowable" : true,
    "assignable" : true
  },
  "vatRegistrationNumber" : "vatRegistrationNumber",
  "contactName" : "contactName",
  "companyName" : "companyName",
  "deletable" : true,
  "id" : 5
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

The supplier is successfully fetched SupplierDto

404

The supplier not found and cannot be received

400

Supplier cannot be received

Get list of suppliers.

Up
get /suppliers
The default sorting criterion is companyName,asc.

Query parameters

page (optional)
Query Parameter — The index of the page to retrieve, based at 0. format: int32
size (optional)
Query Parameter — Number of records returned per page. Maximum value allowed is 200. default: 20 format: int32
sort (optional)
Query Parameter — Sorting criteria by a given <code>field</code>. format: <field>[,asc|desc]
supplierName (optional)
Query Parameter — If provided, only the supplier with the given company name is returned

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

Example data

Content-Type: application/json
{
  "number" : 5,
  "size" : 1,
  "last" : true,
  "numberOfElements" : 5,
  "totalPages" : 0,
  "pageable" : {
    "paged" : true,
    "pageNumber" : 1,
    "offset" : 3,
    "pageSize" : 6,
    "unpaged" : true
  },
  "sort" : {
    "unsorted" : true,
    "sorted" : true,
    "empty" : true
  },
  "content" : [ {
    "archived" : true,
    "country" : "country",
    "expenseType" : {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    },
    "vatRegistrationNumber" : "vatRegistrationNumber",
    "contactName" : "contactName",
    "companyName" : "companyName",
    "deletable" : true,
    "id" : 5
  }, {
    "archived" : true,
    "country" : "country",
    "expenseType" : {
      "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
      "defaultVatType" : "defaultVatType",
      "expenseTypeName" : "expenseTypeName",
      "deprecated" : true,
      "dormantAllowable" : true,
      "assignable" : true
    },
    "vatRegistrationNumber" : "vatRegistrationNumber",
    "contactName" : "contactName",
    "companyName" : "companyName",
    "deletable" : true,
    "id" : 5
  } ],
  "first" : true,
  "totalElements" : 6,
  "empty" : true
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

a pageable list of suppliers PageSupplierDto

Update an existing supplier

Up
put /suppliers/{supplierId}

Path parameters

supplierId (required)
Path Parameter — format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Request body

body SupplierDto (optional)
Body Parameter

Security

oauth2-authorisation-code
Type: oauth2 Scopes: update:all

Return type

Example data

Content-Type: application/json
{
  "archived" : true,
  "country" : "country",
  "expenseType" : {
    "expenseTypeDisplayableName" : "expenseTypeDisplayableName",
    "defaultVatType" : "defaultVatType",
    "expenseTypeName" : "expenseTypeName",
    "deprecated" : true,
    "dormantAllowable" : true,
    "assignable" : true
  },
  "vatRegistrationNumber" : "vatRegistrationNumber",
  "contactName" : "contactName",
  "companyName" : "companyName",
  "deletable" : true,
  "id" : 5
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

The supplier is successfully updated SupplierDto

404

The supplier not found and cannot be updated

Fetch all VAT types

Up
get /vat-types

Security

oauth2-authorisation-code
Type: oauth2 Scopes: read:all

Return type

Example data

Content-Type: application/json
{
  "vatTypes" : [ {
    "name" : "name",
    "vatPercent" : 0.8008281904610115
  }, {
    "name" : "name",
    "vatPercent" : 0.8008281904610115
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Fetch all VAT types VatTypesDto

Models

[ Jump to Methods ]

Table of Contents

  1. AccountingPeriodDto
  2. AmountDto
  3. AttachmentDto
  4. BankAccountDto
  5. CreditCardDto
  6. CreditNoteDto
  7. CreditNoteLineItemDto
  8. ExpenseDto
  9. ExpenseLineItemDto
  10. ExpenseTypeDto
  11. ExpenseTypeGroupDto
  12. ExpenseTypesDto
  13. ExpensesTotalDto
  14. PageExpenseDto
  15. PageRecurringExpenseDto
  16. PageSupplierDto
  17. Pageable
  18. PaymentMethodDto
  19. PaymentMethodsDto
  20. PaymentTargetDto
  21. PersonDto
  22. RechargedClientDto
  23. RecurringEventDto
  24. RecurringExpenseDto
  25. Sort
  26. SupplierDto
  27. SupplierPaymentDto
  28. SuppliersDto
  29. VatTypeDto
  30. VatTypesDto

AccountingPeriodDto Up

startDate (optional)
date format: date
endDate (optional)
date format: date
status (optional)

AmountDto Up

grossAmount (optional)
netAmount (optional)
vatAmount (optional)

AttachmentDto Up

id (optional)
Long format: int64
fileName (optional)
fileContents (optional)

BankAccountDto Up

id (optional)
Long format: int64
bankName
displayableName
defaultBankAccount (optional)

CreditCardDto Up

id (optional)
Long format: int64
displayableName (optional)
defaultCreditCard (optional)

CreditNoteDto Up

id (optional)
Long format: int64
date (optional)
date format: date
lineItems (optional)
amount (optional)
refunds (optional)

CreditNoteLineItemDto Up

id (optional)
Long format: int64
expenseLineItemIndex (optional)
Integer format: int32
description (optional)
amount (optional)

ExpenseDto Up

id (optional)
Long format: int64
supplier (optional)
supplierReference (optional)
note (optional)
expenseLineItems (optional)
supplierPayments (optional)
creditNotes (optional)
amount (optional)
totalCreditsAmount (optional)
totalRefundsAmount (optional)
postingDate (optional)
date format: date
status (optional)
outstandingBalance (optional)
deletable (optional)
editable (optional)
reconciled (optional)
expenseLedgerIsOpen (optional)
recharged (optional)
rechargedClient (optional)
createdBy (optional)
createdByRecurringEvent (optional)
recurringEvent (optional)
attachments (optional)

ExpenseLineItemDto Up

id (optional)
Long format: int64
expenseType (optional)
vatType (optional)
description (optional)
amount (optional)
employee (optional)

ExpenseTypeDto Up

expenseTypeName (optional)
expenseTypeDisplayableName (optional)
defaultVatType (optional)
assignable (optional)
deprecated (optional)
dormantAllowable (optional)

ExpenseTypeGroupDto Up

expenseTypes (optional)
groupName (optional)
count (optional)
Integer format: int32

ExpenseTypesDto Up

expenseGroups (optional)
count (optional)
Integer format: int32

ExpensesTotalDto Up

grossAmount (optional)
underpaid (optional)
overpaid (optional)

PageExpenseDto Up

totalPages (optional)
Integer format: int32
totalElements (optional)
Long format: int64
size (optional)
Integer format: int32
content (optional)
number (optional)
Integer format: int32
sort (optional)
last (optional)
numberOfElements (optional)
Integer format: int32
pageable (optional)
first (optional)
empty (optional)

PageRecurringExpenseDto Up

totalPages (optional)
Integer format: int32
totalElements (optional)
Long format: int64
size (optional)
Integer format: int32
content (optional)
number (optional)
Integer format: int32
sort (optional)
last (optional)
numberOfElements (optional)
Integer format: int32
pageable (optional)
first (optional)
empty (optional)

PageSupplierDto Up

totalPages (optional)
Integer format: int32
totalElements (optional)
Long format: int64
size (optional)
Integer format: int32
content (optional)
number (optional)
Integer format: int32
sort (optional)
last (optional)
numberOfElements (optional)
Integer format: int32
pageable (optional)
first (optional)
empty (optional)

Pageable Up

offset (optional)
Long format: int64
sort (optional)
paged (optional)
unpaged (optional)
pageSize (optional)
Integer format: int32
pageNumber (optional)
Integer format: int32

PaymentMethodDto Up

paymentMethodName (optional)
paymentMethodDisplayableName (optional)

PaymentMethodsDto Up

paymentMethods (optional)

PaymentTargetDto Up

paymentMethod (optional)
person (optional)
bankAccount (optional)
creditCard (optional)

PersonDto Up

id (optional)
Long format: int64
forename (optional)
surname (optional)
displayableName (optional)

RechargedClientDto Up

id (optional)
Long format: int64
name (optional)

RecurringEventDto Up

id (optional)
Long format: int64
recurringEventFrequency (optional)
recurringEventEndType (optional)
frequencyOccurrence (optional)
nextOccurrenceDate (optional)
date format: date
endDate (optional)
date format: date
occurrenceCount (optional)
Integer format: int32
description (optional)
enabled (optional)

RecurringExpenseDto Up

id (optional)
Long format: int64
supplierName (optional)
totalAmount (optional)
status (optional)
nextOccurrenceDate (optional)
date format: date
description (optional)

Sort Up

empty (optional)
sorted (optional)
unsorted (optional)

SupplierDto Up

id (optional)
Long format: int64
expenseType (optional)
companyName (optional)
contactName (optional)
deletable (optional)
archived (optional)
country (optional)
vatRegistrationNumber (optional)

SupplierPaymentDto Up

id (optional)
Long format: int64
date (optional)
date format: date
amount (optional)
paymentTarget (optional)
reconciled (optional)

SuppliersDto Up

content (optional)
count (optional)
Integer format: int32

VatTypeDto Up

name (optional)
vatPercent (optional)
Double format: double

VatTypesDto Up

vatTypes (optional)