v1

latestOpenAPI 3.0.02026-07-24161215397.4 KB
Fees

Add a new fee

Add a new fee

Required scopes: flex.community.fees.create

post/api/v2/organizations/{orgSlug}/fees

Path parameters

orgSlugstring required

organization slug

Query parameters

shouldUseCoinsboolean

Used to determine whether the fee you want to add should use coins valid for one-off fees. In order for this to work the fee you're adding must have a plan selected.

Request body

propertiesobject

An object that contains all custom properties that can be applied to the item.

namestring required

The name of the fee.

issueDatestring required

The issue date of the fee.

locationstring required

The _id of the location of the fee.

planstring required

The _id of the plan of the fee.

pricenumber required

The price of the fee.

memberstring

The _id of the member associated with the fee.

companystring

The _id of the company associated with the fee.

quantitynumber

The quantity of the fee. If ommited, the quantity will be set to 1.

shouldBillInAdvanceboolean

If true, the one-off charge is billed in advance (respecting its date). By default one-off charges are not billed in advance.

isPersonalboolean

If true, the one-off charge is billed to the assigned member and not to the company.

Example request

{
  "properties": {
    "customProperty1": "value1",
    "customProperty2": "value2"
  },
  "name": "Day Pass",
  "issueDate": "2025-03-03T00:00:00.000Z",
  "location": "603dfbc260f4054084125d30",
  "plan": "603dfbc260f4054084125d30",
  "price": 20,
  "member": "603dfbc260f4054084125d30",
  "company": "603dfbc260f4054084125d30",
  "quantity": 2,
  "shouldBillInAdvance": true,
  "isPersonal": true
}

Response

propertiesobject

An object that contains all custom properties that can be applied to the item.

_idstring

The _id of the fee.

namestring

The name of the fee.

pricenumber

The unit price of the item described by the fee.

quantitynumber

The quantity described by the one-off charge.

companystring

The _id of the company that the fee is associated with.

memberstring

The _id of the member that the fee is associated with.

locationstring

A reference to the location the fee is issued for.

planstring

A reference to the price plan assigned to the fee. It is used to determine the sales account when generating an invoice.

planType'Plan' | 'ResourceRate'

The type of the plan assigned to the fee.

issueDatestring

The date the fee was issued.

status'approved' | 'awaiting_approval'

The status of the fee.

discountstring

A reference to a discount definition.

discountAmountnumber

Manually granted discount for the specific fee.

calculatedDiscountAmountnumber

The actual discount amount coming from a discount defintion or from a manually granted discount.

discountedPricenumber

The final fee unit price after granting the discount.

isRefundableboolean

If true, the one-off charge is counted as deposit and can be refunded later on.

isPersonalboolean

If true, the one-off charge is billed to the assigned member and not to the company.

shouldBillInAdvanceboolean

If true, the one-off charge is billed in advance (respecting its date). By default one-off charges are not billed in advance.

shouldUseCoinsboolean

In order for a fee to use coins you need to set this to true. By default it's set to false.

sourcestring

The source of the fee.

createdAtstring date-time

The date when the fee has been created.

createdBystring

The user that created the fee.

modifiedAtstring date-time

The user that did the last modification to the fee. If no update is made this field will match the "createdBy" field.

modifiedBystring

The user that last updated the fee.

Example response

{
  "properties": {
    "customProperty1": "value1",
    "customProperty2": "value2"
  },
  "_id": "603dfbc260f4054084125d30",
  "name": "Example Fee Name",
  "price": 20,
  "quantity": 2,
  "company": "603dfbc260f4054084125d30",
  "member": "603dfbc260f4054084125d30",
  "location": "603dfbc260f4054084125d30",
  "plan": "603dfbc260f4054084125d30",
  "issueDate": "2025-03-03T00:00:00.000Z",
  "discount": "603dfbc260f4054084125d33",
  "discountAmount": 5,
  "calculatedDiscountAmount": 5,
  "discountedPrice": 5,
  "isRefundable": true,
  "isPersonal": true,
  "shouldBillInAdvance": true,
  "shouldUseCoins": true,
  "coins": [
    {
      "_id": "594932ea518f3f150d306c89",
      "count": 2
    }
  ],
  "payment": {
    "_id": "603dfbc260f4054084125d30",
    "creditNote": "603dfbc260f4054084125d30"
  },
  "source": "admin",
  "createdAt": "2024-04-12T00:00:00.000Z",
  "createdBy": "6080186f490fcf6e0537ec27",
  "modifiedAt": "2024-05-12T00:00:00.000Z",
  "modifiedBy": "6080186f490fcf6e0537ec54"
}