Cost types
Cost types
Gets all the configured cost types for a given period.
GET
https://www.moderan.net/api/domains/DOMAIN_ID/propertysets/0/sets/0/periods/PERIOD_ID/periodcosttypesshort
If you have subcosts defined, it will return subcosts. If cost type does not have subcosts, then the main cost type will be returned
Path Parameters
Name
Type
Description
DOMAIN_ID*
String
ID of customer
PERIOD_ID*
String
ID of period
[
{
"id": 93438,
"costType": {
"name": "Electricity - Day",
"id": 2618,
"metaString": "Day"
},
"replicateCostType": null,
"parentCostType": {
"name": "Electricity",
"id": 2369,
"metaString": "Electricity"
},
"distributionBasis": {
"key": "166",
"value": "Split all between selected tenants",
"originalValue": "Split all between selected tenants",
"custom": false,
"order": 2,
"subElements": []
},
"subCosts": [],
"period": {
"id": 34678,
"parentId": null,
"building": null,
"description": null,
"startDate": "2024-02-11",
"endDate": "2024-05-10",
"hasLaterPeriods": false,
"mainLocked": false,
"locked": false,
"automaticMeterLinking": false,
"tenants": []
},
"spaceSet": {
"name": "All",
"id": -1
},
"manualTariff": 0.0500000,
"distributionTotal": null,
"rentalSpace": null,
"rentalSpaceForExclusions": null,
"calculatedTariff": 0,
"groupEnabled": true,
"individualEnabled": true,
"individualSwitch": true,
"showReadingsOnInvoice": false,
"units": "kWh",
"description": null,
"description2": null,
"groupUnits": {
"key": "189",
"value": "Same as individual",
"originalValue": "Same as individual",
"custom": false,
"order": 4,
"subElements": []
},
"groupSameAsIndividual": true,
"conversionEnabled": false,
"hasSharedMeters": true,
"hasCirculationMeters": false,
"hasSharedIndividualMeters": true,
"hasTransmissionFactors": false,
"hasBillContracts": false,
"hasMeters": false,
"hasMetersName": null,
"hasIndividualReadings": false,
"hasEmissions": false,
"createdBy": null,
"modifiedBy": null,
"createdDate": null,
"modifiedDate": null
},
{
"id": 93436,
"costType": {
"name": "Gas",
"id": 2808,
"metaString": "Gas"
},
"replicateCostType": null,
"parentCostType": {
"name": "Gas",
"id": 2808,
"metaString": "Gas"
},
"distributionBasis": {
"key": "153",
"value": "Leased space",
"originalValue": "Leased space",
"custom": false,
"order": 2,
"subElements": []
},
"subCosts": [],
"period": {
"id": 34678,
"parentId": null,
"building": null,
"description": null,
"startDate": "2024-02-11",
"endDate": "2024-05-10",
"hasLaterPeriods": false,
"mainLocked": false,
"locked": false,
"automaticMeterLinking": false,
"tenants": []
},
"spaceSet": {
"name": "All",
"id": -1
},
"manualTariff": null,
"distributionTotal": null,
"rentalSpace": null,
"rentalSpaceForExclusions": null,
"calculatedTariff": 0,
"groupEnabled": false,
"individualEnabled": true,
"individualSwitch": true,
"showReadingsOnInvoice": false,
"units": "m3",
"description": null,
"description2": null,
"groupUnits": {
"key": "182",
"value": "Month",
"originalValue": "Month",
"custom": false,
"order": 1,
"subElements": []
},
"groupSameAsIndividual": false,
"conversionEnabled": false,
"hasSharedMeters": false,
"hasCirculationMeters": false,
"hasSharedIndividualMeters": false,
"hasTransmissionFactors": false,
"hasBillContracts": false,
"hasMeters": false,
"hasMetersName": null,
"hasIndividualReadings": false,
"hasEmissions": false,
"createdBy": null,
"modifiedBy": null,
"createdDate": null,
"modifiedDate": null
},
{
"id": 93437,
"costType": {
"name": "Electricity - Night",
"id": 2619,
"metaString": "Night"
},
"replicateCostType": null,
"parentCostType": {
"name": "Electricity",
"id": 2369,
"metaString": "Electricity"
},
"distributionBasis": {
"key": "166",
"value": "Split all between selected tenants",
"originalValue": "Split all between selected tenants",
"custom": false,
"order": 2,
"subElements": []
},
"subCosts": [],
"period": {
"id": 34678,
"parentId": null,
"building": null,
"description": null,
"startDate": "2024-02-11",
"endDate": "2024-05-10",
"hasLaterPeriods": false,
"mainLocked": false,
"locked": false,
"automaticMeterLinking": false,
"tenants": []
},
"spaceSet": {
"name": "All",
"id": -1
},
"manualTariff": 0.0500000,
"distributionTotal": null,
"rentalSpace": null,
"rentalSpaceForExclusions": null,
"calculatedTariff": 0,
"groupEnabled": true,
"individualEnabled": true,
"individualSwitch": true,
"showReadingsOnInvoice": false,
"units": "kWh",
"description": null,
"description2": null,
"groupUnits": {
"key": "189",
"value": "Same as individual",
"originalValue": "Same as individual",
"custom": false,
"order": 4,
"subElements": []
},
"groupSameAsIndividual": true,
"conversionEnabled": false,
"hasSharedMeters": false,
"hasCirculationMeters": false,
"hasSharedIndividualMeters": false,
"hasTransmissionFactors": false,
"hasBillContracts": false,
"hasMeters": false,
"hasMetersName": null,
"hasIndividualReadings": false,
"hasEmissions": false,
"createdBy": null,
"modifiedBy": null,
"createdDate": null,
"modifiedDate": null
}
]
To get PERIOD_ID see:
Cost types for Bills
For some cases, it is needed to get main cost types. For example if you are creating bills. Then following request needs to be used.
Gets all the main cost types for a given period.
GET
https://www.moderan.net/api/domains/DOMAIN_ID/propertysets/0/sets/0/periods/PERIOD_ID/periodmaincosttypes
Path Parameters
Name
Type
Description
DOMAIN_ID*
String
ID of customer
PERIOD_ID
String
ID of period
[
{
"id": 93434,
"costType": {
"name": "Electricity",
"id": 2369,
"metaString": "Electricity"
},
"replicateCostType": null,
"parentCostType": {
"name": "Electricity",
"id": 2369,
"metaString": "Electricity"
},
"distributionBasis": {
"key": "166",
"value": "Split all between selected tenants",
"originalValue": "Split all between selected tenants",
"custom": false,
"order": 2,
"subElements": []
},
"subCosts": [
{
"name": "Electricity - Night",
"id": 2619
},
{
"name": "Electricity - Day",
"id": 2618
}
],
"period": {
"id": 34678,
"parentId": null,
"building": null,
"description": null,
"startDate": "2024-02-11",
"endDate": "2024-05-10",
"hasLaterPeriods": false,
"mainLocked": false,
"locked": false,
"automaticMeterLinking": false,
"tenants": []
},
"spaceSet": {
"name": "All",
"id": -1
},
"manualTariff": 0.0500000,
"distributionTotal": null,
"rentalSpace": null,
"rentalSpaceForExclusions": null,
"calculatedTariff": 0,
"groupEnabled": true,
"individualEnabled": true,
"individualSwitch": true,
"showReadingsOnInvoice": false,
"units": "kWh",
"description": null,
"description2": null,
"groupUnits": {
"key": "189",
"value": "Same as individual",
"originalValue": "Same as individual",
"custom": false,
"order": 4,
"subElements": []
},
"groupSameAsIndividual": true,
"conversionEnabled": false,
"hasSharedMeters": false,
"hasCirculationMeters": false,
"hasSharedIndividualMeters": false,
"hasTransmissionFactors": false,
"hasBillContracts": false,
"hasMeters": false,
"hasMetersName": null,
"hasIndividualReadings": false,
"hasEmissions": false,
"createdBy": null,
"modifiedBy": null,
"createdDate": null,
"modifiedDate": null
},
{
"id": 93436,
"costType": {
"name": "Gas",
"id": 2808,
"metaString": "Gas"
},
"replicateCostType": null,
"parentCostType": {
"name": "Gas",
"id": 2808,
"metaString": "Gas"
},
"distributionBasis": {
"key": "153",
"value": "Leased space",
"originalValue": "Leased space",
"custom": false,
"order": 2,
"subElements": []
},
"subCosts": [],
"period": {
"id": 34678,
"parentId": null,
"building": null,
"description": null,
"startDate": "2024-02-11",
"endDate": "2024-05-10",
"hasLaterPeriods": false,
"mainLocked": false,
"locked": false,
"automaticMeterLinking": false,
"tenants": []
},
"spaceSet": {
"name": "All",
"id": -1
},
"manualTariff": null,
"distributionTotal": null,
"rentalSpace": null,
"rentalSpaceForExclusions": null,
"calculatedTariff": 0,
"groupEnabled": false,
"individualEnabled": true,
"individualSwitch": true,
"showReadingsOnInvoice": false,
"units": "m3",
"description": null,
"description2": null,
"groupUnits": {
"key": "182",
"value": "Month",
"originalValue": "Month",
"custom": false,
"order": 1,
"subElements": []
},
"groupSameAsIndividual": false,
"conversionEnabled": false,
"hasSharedMeters": false,
"hasCirculationMeters": false,
"hasSharedIndividualMeters": false,
"hasTransmissionFactors": false,
"hasBillContracts": false,
"hasMeters": false,
"hasMetersName": null,
"hasIndividualReadings": false,
"hasEmissions": false,
"createdBy": null,
"modifiedBy": null,
"createdDate": null,
"modifiedDate": null
}
]
Last updated