Tariff

The tariff object

Attributes
Id: int required, autogenerated, unique
The unique identifier for this tariff
AdvanceInvoiceCycles: int? optional
Archived: bool optional
AutoCancelAfter: int? optional
AutoRaiseInvoices: bool optional
BookingMinuteMonthLimit: int? optional
BookingMinuteWeekLimit: int? optional
BusinessId: Id required
CancellationLimitDays: int? optional
CancellationPeriod: int required
CancelMemeberAccountAfter: int? optional
ChargeAndExtend: int? optional
CheckinMonthLimit: int? optional
CheckinPricePlanLimit: int? optional
CheckinWeekLimit: int? optional
CurrencyId: Id required
DefaultContractTerm: int? optional
DefaultInvoicingDay: int? optional
Description: string optional
DiscountCharges: decimal? optional
DiscountExtraServices: decimal? optional
DiscountTimePasses: decimal? optional
DisplayOrder: int required
ExemptTaxRateId: Id optional
FinancialAccountId: Id optional
GroupName: string optional
HoursMonthLimit: int? optional
HoursPricePlanLimit: int? optional
HoursWeekLimit: int? optional
InvoiceEvery: int required
InvoiceEveryWeeks: int required
Name: string required
Price: decimal required
ProrateCancellations: bool optional
ProrateDayOfMonth: int? optional
ProrateDaysBefore: int? optional
RaiseInvoiceEvery: int? optional
RaiseInvoiceEveryWeeks: int? optional
ReducedTaxRateId: Id optional
SignUpFee: decimal? optional
Starred: bool optional
SubscribersLimit: int? optional
TaxRateId: Id optional
TermsAndConditions: string optional
UseTimePasses: bool optional
Visible: bool optional
UniqueId: Guid required, autogenerated, unique
The globally unique identifier for this tariff
SystemId: string optional api-only
User defined data about this tariff. This property can only be seen and updated using the API.

Json Structure Example


{
  "Id": 1234567,
  "AdvanceInvoiceCycles": ,
  "Archived": false,
  "AutoCancelAfter": ,
  "AutoRaiseInvoices": false,
  "BookingMinuteMonthLimit": ,
  "BookingMinuteWeekLimit": ,
  "BusinessId": 12345678,
  "CancellationLimitDays": ,
  "CancellationPeriod": ,
  "CancelMemeberAccountAfter": ,
  "ChargeAndExtend": ,
  "CheckinMonthLimit": ,
  "CheckinPricePlanLimit": ,
  "CheckinWeekLimit": ,
  "CurrencyId": 12345678,
  "DefaultContractTerm": ,
  "DefaultInvoicingDay": ,
  "Description": "Descripción",
  "DiscountCharges": ,
  "DiscountExtraServices": ,
  "DiscountTimePasses": ,
  "DisplayOrder": ,
  "ExemptTaxRateId": 12345678,
  "FinancialAccountId": 12345678,
  "GroupName": "GroupName",
  "HoursMonthLimit": ,
  "HoursPricePlanLimit": ,
  "HoursWeekLimit": ,
  "InvoiceEvery": ,
  "InvoiceEveryWeeks": ,
  "Name": "Name",
  "Price": 1.2,
  "ProrateCancellations": false,
  "ProrateDayOfMonth": ,
  "ProrateDaysBefore": ,
  "RaiseInvoiceEvery": ,
  "RaiseInvoiceEveryWeeks": ,
  "ReducedTaxRateId": 12345678,
  "SignUpFee": ,
  "Starred": false,
  "SubscribersLimit": ,
  "TaxRateId": 12345678,
  "TermsAndConditions": "TermsAndConditions",
  "UseTimePasses": false,
  "Visible": false,
  "UniqueId": "76b18fc5-8197-4e37-8472-a152d59095ce",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Find a Tariff

This endpoint allows you to GET a list of tariffs based on one or more filter querystring parameters.

GET https://spaces.nexudus.com/api/billing/tariffs?...

🔒 Requires role "Tariff-List"

Pagination querystring parameters
Lets control how many records to return at a time and their order.
page integer optional
?page=1
size integer optional default=25
Sets the maximum number of records to return each page of results.
?size=25
orderby string optional default=Name
Sets the property to use when ordering the results of the search.
?orderby=Id
dir 'ascending' or 'descending' optional default=SortDirection.Ascending
Sets the direction to use when ordering the records.
?sort=ascending

Search querystring parameters
Lets you search tariff records based on their different properties.
Id number
?Id=12345678
Tariff_AdvanceInvoiceCycles int?
?Tariff_AdvanceInvoiceCycles=...
Tariff_Archived bool
?Tariff_Archived=...
Tariff_AutoCancelAfter int?
?Tariff_AutoCancelAfter=...
Tariff_AutoRaiseInvoices bool
?Tariff_AutoRaiseInvoices=...
Tariff_BookingMinuteMonthLimit int?
?Tariff_BookingMinuteMonthLimit=...
Tariff_BookingMinuteWeekLimit int?
?Tariff_BookingMinuteWeekLimit=...
Tariff_Business Business
?Tariff_Business=...
Tariff_CancellationLimitDays int?
?Tariff_CancellationLimitDays=...
Tariff_CancellationPeriod int
?Tariff_CancellationPeriod=...
Tariff_CancelMemeberAccountAfter int?
?Tariff_CancelMemeberAccountAfter=...
Tariff_ChargeAndExtend int?
?Tariff_ChargeAndExtend=...
Tariff_CheckinMonthLimit int?
?Tariff_CheckinMonthLimit=...
Tariff_CheckinPricePlanLimit int?
?Tariff_CheckinPricePlanLimit=...
Tariff_CheckinWeekLimit int?
?Tariff_CheckinWeekLimit=...
Tariff_Currency Currency
?Tariff_Currency=...
Tariff_DefaultContractTerm int?
?Tariff_DefaultContractTerm=...
Tariff_DefaultInvoicingDay int?
?Tariff_DefaultInvoicingDay=...
Tariff_Description string
?Tariff_Description=...
Tariff_DiscountCharges decimal?
?Tariff_DiscountCharges=...
Tariff_DiscountExtraServices decimal?
?Tariff_DiscountExtraServices=...
Tariff_DiscountTimePasses decimal?
?Tariff_DiscountTimePasses=...
Tariff_DisplayOrder int
?Tariff_DisplayOrder=...
Tariff_ExemptTaxRate TaxRate
?Tariff_ExemptTaxRate=...
Tariff_FinancialAccount FinancialAccount
?Tariff_FinancialAccount=...
Tariff_GroupName string
?Tariff_GroupName=...
Tariff_HoursMonthLimit int?
?Tariff_HoursMonthLimit=...
Tariff_HoursPricePlanLimit int?
?Tariff_HoursPricePlanLimit=...
Tariff_HoursWeekLimit int?
?Tariff_HoursWeekLimit=...
Tariff_InvoiceEvery int
?Tariff_InvoiceEvery=...
Tariff_InvoiceEveryWeeks int
?Tariff_InvoiceEveryWeeks=...
Tariff_Name string
?Tariff_Name=...
Tariff_Price decimal
?Tariff_Price=...
Tariff_ProrateCancellations bool
?Tariff_ProrateCancellations=...
Tariff_ProrateDayOfMonth int?
?Tariff_ProrateDayOfMonth=...
Tariff_ProrateDaysBefore int?
?Tariff_ProrateDaysBefore=...
Tariff_RaiseInvoiceEvery int?
?Tariff_RaiseInvoiceEvery=...
Tariff_RaiseInvoiceEveryWeeks int?
?Tariff_RaiseInvoiceEveryWeeks=...
Tariff_ReducedTaxRate TaxRate
?Tariff_ReducedTaxRate=...
Tariff_SignUpFee decimal?
?Tariff_SignUpFee=...
Tariff_Starred bool
?Tariff_Starred=...
Tariff_SubscribersLimit int?
?Tariff_SubscribersLimit=...
Tariff_TaxRate TaxRate
?Tariff_TaxRate=...
Tariff_TermsAndConditions string
?Tariff_TermsAndConditions=...
Tariff_UseTimePasses bool
?Tariff_UseTimePasses=...
Tariff_Visible bool
?Tariff_Visible=...
Tariff_BusinessName string
?Tariff_BusinessName=...
Tariff_CurrencyCode string
?Tariff_CurrencyCode=...

Range search querystring parameters
Lets you search tariff records based on a range of date or numeric values.
To_Tariff_CreatedOn date
?To_Tariff_CreatedOn=2010-01-01T20:32
From_Tariff_CreatedOn date
?From_Tariff_CreatedOn=2010-01-01T20:32
To_Tariff_UpdatedOn date
?To_Tariff_UpdatedOn=2010-01-01T20:32
From_Tariff_UpdatedOn date
?From_Tariff_UpdatedOn=2010-01-01T20:32
To_Tariff_Price number
?To_Tariff_Price=0
From_Tariff_Price number
?From_Tariff_Price=10
To_Tariff_DefaultInvoicingDay number
?To_Tariff_DefaultInvoicingDay=0
From_Tariff_DefaultInvoicingDay number
?From_Tariff_DefaultInvoicingDay=10
To_Tariff_SignUpFee number
?To_Tariff_SignUpFee=0
From_Tariff_SignUpFee number
?From_Tariff_SignUpFee=10
To_Tariff_CancellationPeriod number
?To_Tariff_CancellationPeriod=0
From_Tariff_CancellationPeriod number
?From_Tariff_CancellationPeriod=10
To_Tariff_DisplayOrder number
?To_Tariff_DisplayOrder=0
From_Tariff_DisplayOrder number
?From_Tariff_DisplayOrder=10
To_Tariff_SubscribersLimit number
?To_Tariff_SubscribersLimit=0
From_Tariff_SubscribersLimit number
?From_Tariff_SubscribersLimit=10
To_Tariff_CancellationLimitDays number
?To_Tariff_CancellationLimitDays=0
From_Tariff_CancellationLimitDays number
?From_Tariff_CancellationLimitDays=10
To_Tariff_DefaultContractTerm number
?To_Tariff_DefaultContractTerm=0
From_Tariff_DefaultContractTerm number
?From_Tariff_DefaultContractTerm=10
To_Tariff_CancelMemeberAccountAfter number
?To_Tariff_CancelMemeberAccountAfter=0
From_Tariff_CancelMemeberAccountAfter number
?From_Tariff_CancelMemeberAccountAfter=10
To_Tariff_CheckinPricePlanLimit number
?To_Tariff_CheckinPricePlanLimit=0
From_Tariff_CheckinPricePlanLimit number
?From_Tariff_CheckinPricePlanLimit=10
To_Tariff_CheckinMonthLimit number
?To_Tariff_CheckinMonthLimit=0
From_Tariff_CheckinMonthLimit number
?From_Tariff_CheckinMonthLimit=10
To_Tariff_CheckinWeekLimit number
?To_Tariff_CheckinWeekLimit=0
From_Tariff_CheckinWeekLimit number
?From_Tariff_CheckinWeekLimit=10
To_Tariff_HoursPricePlanLimit number
?To_Tariff_HoursPricePlanLimit=0
From_Tariff_HoursPricePlanLimit number
?From_Tariff_HoursPricePlanLimit=10
To_Tariff_HoursMonthLimit number
?To_Tariff_HoursMonthLimit=0
From_Tariff_HoursMonthLimit number
?From_Tariff_HoursMonthLimit=10
To_Tariff_HoursWeekLimit number
?To_Tariff_HoursWeekLimit=0
From_Tariff_HoursWeekLimit number
?From_Tariff_HoursWeekLimit=10
To_Tariff_BookingMinuteWeekLimit number
?To_Tariff_BookingMinuteWeekLimit=0
From_Tariff_BookingMinuteWeekLimit number
?From_Tariff_BookingMinuteWeekLimit=10
To_Tariff_BookingMinuteMonthLimit number
?To_Tariff_BookingMinuteMonthLimit=0
From_Tariff_BookingMinuteMonthLimit number
?From_Tariff_BookingMinuteMonthLimit=10
To_Tariff_DiscountExtraServices number
?To_Tariff_DiscountExtraServices=0
From_Tariff_DiscountExtraServices number
?From_Tariff_DiscountExtraServices=10
To_Tariff_DiscountTimePasses number
?To_Tariff_DiscountTimePasses=0
From_Tariff_DiscountTimePasses number
?From_Tariff_DiscountTimePasses=10
To_Tariff_DiscountCharges number
?To_Tariff_DiscountCharges=0
From_Tariff_DiscountCharges number
?From_Tariff_DiscountCharges=10
To_Tariff_InvoiceEvery number
?To_Tariff_InvoiceEvery=0
From_Tariff_InvoiceEvery number
?From_Tariff_InvoiceEvery=10
To_Tariff_InvoiceEveryWeeks number
?To_Tariff_InvoiceEveryWeeks=0
From_Tariff_InvoiceEveryWeeks number
?From_Tariff_InvoiceEveryWeeks=10
To_Tariff_AutoCancelAfter number
?To_Tariff_AutoCancelAfter=0
From_Tariff_AutoCancelAfter number
?From_Tariff_AutoCancelAfter=10
To_Tariff_AdvanceInvoiceCycles number
?To_Tariff_AdvanceInvoiceCycles=0
From_Tariff_AdvanceInvoiceCycles number
?From_Tariff_AdvanceInvoiceCycles=10
To_Tariff_ProrateDayOfMonth number
?To_Tariff_ProrateDayOfMonth=0
From_Tariff_ProrateDayOfMonth number
?From_Tariff_ProrateDayOfMonth=10
To_Tariff_ProrateDaysBefore number
?To_Tariff_ProrateDaysBefore=0
From_Tariff_ProrateDaysBefore number
?From_Tariff_ProrateDaysBefore=10
To_Tariff_ChargeAndExtend number
?To_Tariff_ChargeAndExtend=0
From_Tariff_ChargeAndExtend number
?From_Tariff_ChargeAndExtend=10
To_Tariff_RaiseInvoiceEvery number
?To_Tariff_RaiseInvoiceEvery=0
From_Tariff_RaiseInvoiceEvery number
?From_Tariff_RaiseInvoiceEvery=10
To_Tariff_RaiseInvoiceEveryWeeks number
?To_Tariff_RaiseInvoiceEveryWeeks=0
From_Tariff_RaiseInvoiceEveryWeeks number
?From_Tariff_RaiseInvoiceEveryWeeks=10

Example request

GET https://spaces.nexudus.com/api/billing/tariffs?Tariff_Name=...
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example response


{
    "Records": [{
        "Id": 1234567,
        "Business": ,
        "Name": "Name",
        "Price": 1.2,
        "DefaultInvoicingDay": ,
        "Visible": false,
        "UseTimePasses": false,
        "Description": "Descripción",
        "SignUpFee": ,
        "Currency": ,
        "TaxRate": ,
        "ReducedTaxRate": ,
        "ExemptTaxRate": ,
        "FinancialAccount": ,
        "TermsAndConditions": "TermsAndConditions",
        "CancellationPeriod": ,
        "DisplayOrder": ,
        "GroupName": "GroupName",
        "SubscribersLimit": ,
        "CancellationLimitDays": ,
        "DefaultContractTerm": ,
        "CancelMemeberAccountAfter": ,
        "CheckinPricePlanLimit": ,
        "CheckinMonthLimit": ,
        "CheckinWeekLimit": ,
        "HoursPricePlanLimit": ,
        "HoursMonthLimit": ,
        "HoursWeekLimit": ,
        "BookingMinuteWeekLimit": ,
        "BookingMinuteMonthLimit": ,
        "DiscountExtraServices": ,
        "DiscountTimePasses": ,
        "DiscountCharges": ,
        "InvoiceEvery": ,
        "InvoiceEveryWeeks": ,
        "AutoCancelAfter": ,
        "AdvanceInvoiceCycles": ,
        "ProrateDayOfMonth": ,
        "ProrateDaysBefore": ,
        "ProrateCancellations": false,
        "ChargeAndExtend": ,
        "AutoRaiseInvoices": false,
        "RaiseInvoiceEvery": ,
        "RaiseInvoiceEveryWeeks": ,
        "Archived": false,
        "Starred": false,
        "TariffBusinessName": "...",
        "TariffCurrencyCode": "...",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "befc28b7-ee70-4cd1-bd18-364d9c2aafca",
        "SystemId": "{ metadata: { id: 887766, processed: true } }"
    }],
    "CurrentPageSize": 25,
    "CurrentPage": 1,
    "CurrentOrderField": "Id",
    "CurrentSortDirection": 1,
    "FirstItem": 1,
    "HasNextPage": true,
    "HasPreviousPage": false,
    "LastItem": 25,
    "PageNumber": 1,
    "PageSize": 25,
    "TotalItems": 60,
    "TotalPages": 3
}


Find Tariffs by IDs

Gets one or more tariff records based on their Id.
GET https://spaces.nexudus.com/api/billing/tariffs?Tariff_Id=[:id1,:id2,...]

🔒 Requires role "Tariff-List"

Querystring parameters
Tariff_Id: array requried
?Tariff_Id=[12345678,87654651]

Example request

GET https://spaces.nexudus.com/api/billing/tariffs?Tariff_Id=[1234567,9876541]
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example response


{
    "Records": [{
        "Id": 1234567,
        "Business": ,
        "Name": "Name",
        "Price": 1.2,
        "DefaultInvoicingDay": ,
        "Visible": false,
        "UseTimePasses": false,
        "Description": "Descripción",
        "SignUpFee": ,
        "Currency": ,
        "TaxRate": ,
        "ReducedTaxRate": ,
        "ExemptTaxRate": ,
        "FinancialAccount": ,
        "TermsAndConditions": "TermsAndConditions",
        "CancellationPeriod": ,
        "DisplayOrder": ,
        "GroupName": "GroupName",
        "SubscribersLimit": ,
        "CancellationLimitDays": ,
        "DefaultContractTerm": ,
        "CancelMemeberAccountAfter": ,
        "CheckinPricePlanLimit": ,
        "CheckinMonthLimit": ,
        "CheckinWeekLimit": ,
        "HoursPricePlanLimit": ,
        "HoursMonthLimit": ,
        "HoursWeekLimit": ,
        "BookingMinuteWeekLimit": ,
        "BookingMinuteMonthLimit": ,
        "DiscountExtraServices": ,
        "DiscountTimePasses": ,
        "DiscountCharges": ,
        "InvoiceEvery": ,
        "InvoiceEveryWeeks": ,
        "AutoCancelAfter": ,
        "AdvanceInvoiceCycles": ,
        "ProrateDayOfMonth": ,
        "ProrateDaysBefore": ,
        "ProrateCancellations": false,
        "ChargeAndExtend": ,
        "AutoRaiseInvoices": false,
        "RaiseInvoiceEvery": ,
        "RaiseInvoiceEveryWeeks": ,
        "Archived": false,
        "Starred": false,
        "TariffBusinessName": "...",
        "TariffCurrencyCode": "...",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "f0bba9a7-2861-464f-b503-cd48209b0977",
        "SystemId": "{ metadata: { id: 887766, processed: true } }"
    }],
    "CurrentPageSize": 25,
    "CurrentPage": 1,
    "CurrentOrderField": "Name",
    "CurrentSortDirection": 1,
    "FirstItem": 1,
    "HasNextPage": true,
    "HasPreviousPage": false,
    "LastItem": 1,
    "PageNumber": 1,
    "PageSize": 25,
    "TotalItems": 1,
    "TotalPages": 1
}


Get single Tariff by Id

Gets one tariff record by its Id.
GET https://spaces.nexudus.com/api/billing/tariffs/:Id

🔒 Requires role "Tariff-Read"

URL parameters
Id: number requried

Example request

GET https://spaces.nexudus.com/api/billing/tariffs/1234567
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example response


{
  "Id": 1234567,
  "AdvanceInvoiceCycles": ,
  "Archived": false,
  "AutoCancelAfter": ,
  "AutoRaiseInvoices": false,
  "BookingMinuteMonthLimit": ,
  "BookingMinuteWeekLimit": ,
  "BusinessId": 12345678,
  "CancellationLimitDays": ,
  "CancellationPeriod": ,
  "CancelMemeberAccountAfter": ,
  "ChargeAndExtend": ,
  "CheckinMonthLimit": ,
  "CheckinPricePlanLimit": ,
  "CheckinWeekLimit": ,
  "CurrencyId": 12345678,
  "DefaultContractTerm": ,
  "DefaultInvoicingDay": ,
  "Description": "Descripción",
  "DiscountCharges": ,
  "DiscountExtraServices": ,
  "DiscountTimePasses": ,
  "DisplayOrder": ,
  "ExemptTaxRateId": 12345678,
  "FinancialAccountId": 12345678,
  "GroupName": "GroupName",
  "HoursMonthLimit": ,
  "HoursPricePlanLimit": ,
  "HoursWeekLimit": ,
  "InvoiceEvery": ,
  "InvoiceEveryWeeks": ,
  "Name": "Name",
  "Price": 1.2,
  "ProrateCancellations": false,
  "ProrateDayOfMonth": ,
  "ProrateDaysBefore": ,
  "RaiseInvoiceEvery": ,
  "RaiseInvoiceEveryWeeks": ,
  "ReducedTaxRateId": 12345678,
  "SignUpFee": ,
  "Starred": false,
  "SubscribersLimit": ,
  "TaxRateId": 12345678,
  "TermsAndConditions": "TermsAndConditions",
  "UseTimePasses": false,
  "Visible": false,
  "CreatedOn": "2018-07-03T06:23:01Z",
  "UpdatedOn": "2020-01-01T21:57:21Z",
  "UpdatedBy": "System",
  "UniqueId": "3cc84009-434b-4284-bb75-7ac910cb29f9",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Create new Tariff

Creates a new tariff.
POST https://spaces.nexudus.com/api/billing/tariffs

🔒 Requires role "Tariff-Create"

Body parameters
BusinessId: number required
Name: string required
Price: decimal required
DefaultInvoicingDay: int? optional
Visible: bool optional
UseTimePasses: bool optional
Description: string optional
SignUpFee: decimal? optional
CurrencyId: number required
TaxRateId: number optional
ReducedTaxRateId: number optional
ExemptTaxRateId: number optional
FinancialAccountId: number optional
TermsAndConditions: string optional
CancellationPeriod: int required
DisplayOrder: int required
GroupName: string optional
SubscribersLimit: int? optional
CancellationLimitDays: int? optional
DefaultContractTerm: int? optional
CancelMemeberAccountAfter: int? optional
CheckinPricePlanLimit: int? optional
CheckinMonthLimit: int? optional
CheckinWeekLimit: int? optional
HoursPricePlanLimit: int? optional
HoursMonthLimit: int? optional
HoursWeekLimit: int? optional
BookingMinuteWeekLimit: int? optional
BookingMinuteMonthLimit: int? optional
DiscountExtraServices: decimal? optional
DiscountTimePasses: decimal? optional
DiscountCharges: decimal? optional
InvoiceEvery: int required
InvoiceEveryWeeks: int required
AutoCancelAfter: int? optional
AdvanceInvoiceCycles: int? optional
ProrateDayOfMonth: int? optional
ProrateDaysBefore: int? optional
ProrateCancellations: bool optional
ChargeAndExtend: int? optional
AutoRaiseInvoices: bool optional
RaiseInvoiceEvery: int? optional
RaiseInvoiceEveryWeeks: int? optional
Archived: bool optional
Starred: bool optional

Example request

POST https://spaces.nexudus.com/api/billing/tariffs
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

{
    "BusinessId": 12345678,
    "Name": "Name",
    "Price": 1.2,
    "DefaultInvoicingDay": ,
    "Visible": false,
    "UseTimePasses": false,
    "Description": "Descripción",
    "SignUpFee": ,
    "CurrencyId": 12345678,
    "TaxRateId": 12345678,
    "ReducedTaxRateId": 12345678,
    "ExemptTaxRateId": 12345678,
    "FinancialAccountId": 12345678,
    "TermsAndConditions": "TermsAndConditions",
    "CancellationPeriod": ,
    "DisplayOrder": ,
    "GroupName": "GroupName",
    "SubscribersLimit": ,
    "CancellationLimitDays": ,
    "DefaultContractTerm": ,
    "CancelMemeberAccountAfter": ,
    "CheckinPricePlanLimit": ,
    "CheckinMonthLimit": ,
    "CheckinWeekLimit": ,
    "HoursPricePlanLimit": ,
    "HoursMonthLimit": ,
    "HoursWeekLimit": ,
    "BookingMinuteWeekLimit": ,
    "BookingMinuteMonthLimit": ,
    "DiscountExtraServices": ,
    "DiscountTimePasses": ,
    "DiscountCharges": ,
    "InvoiceEvery": ,
    "InvoiceEveryWeeks": ,
    "AutoCancelAfter": ,
    "AdvanceInvoiceCycles": ,
    "ProrateDayOfMonth": ,
    "ProrateDaysBefore": ,
    "ProrateCancellations": false,
    "ChargeAndExtend": ,
    "AutoRaiseInvoices": false,
    "RaiseInvoiceEvery": ,
    "RaiseInvoiceEveryWeeks": ,
    "Archived": false,
    "Starred": false,
}


Example valid response


{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "Record 'Name of the record' has been succesfully created.",
    "Value": {
        "Id": 12354678
    }
}


Example invalid response


{
    "Status": 500,
    "Message": "Name: may not be null or empty",
    "Value": null,
    "WasSuccessful": false,
    "Errors": [
        {
            "AttemptedValue": null,
            "Message": "may not be null or empty",
            "PropertyName": "Name"
        },
    ]
}


Update Tariff

Updates an existing tariff.
PUT https://spaces.nexudus.com/api/billing/tariffs

PUT requests require ALL record properties to be submitted with every request. Any missing properties will be cleared or set to false.

🔒 Requires role "Tariff-Edit"

Body parameters
Id: number required
The unique Id of the tariff to update.
BusinessId: number cleared if missing
Name: string cleared if missing
Price: decimal cleared if missing
DefaultInvoicingDay: int? cleared if missing
Visible: bool cleared if missing
UseTimePasses: bool cleared if missing
Description: string cleared if missing
SignUpFee: decimal? cleared if missing
CurrencyId: number cleared if missing
TaxRateId: number cleared if missing
ReducedTaxRateId: number cleared if missing
ExemptTaxRateId: number cleared if missing
FinancialAccountId: number cleared if missing
TermsAndConditions: string cleared if missing
CancellationPeriod: int cleared if missing
DisplayOrder: int cleared if missing
GroupName: string cleared if missing
SubscribersLimit: int? cleared if missing
CancellationLimitDays: int? cleared if missing
DefaultContractTerm: int? cleared if missing
CancelMemeberAccountAfter: int? cleared if missing
CheckinPricePlanLimit: int? cleared if missing
CheckinMonthLimit: int? cleared if missing
CheckinWeekLimit: int? cleared if missing
HoursPricePlanLimit: int? cleared if missing
HoursMonthLimit: int? cleared if missing
HoursWeekLimit: int? cleared if missing
BookingMinuteWeekLimit: int? cleared if missing
BookingMinuteMonthLimit: int? cleared if missing
DiscountExtraServices: decimal? cleared if missing
DiscountTimePasses: decimal? cleared if missing
DiscountCharges: decimal? cleared if missing
InvoiceEvery: int cleared if missing
InvoiceEveryWeeks: int cleared if missing
AutoCancelAfter: int? cleared if missing
AdvanceInvoiceCycles: int? cleared if missing
ProrateDayOfMonth: int? cleared if missing
ProrateDaysBefore: int? cleared if missing
ProrateCancellations: bool cleared if missing
ChargeAndExtend: int? cleared if missing
AutoRaiseInvoices: bool cleared if missing
RaiseInvoiceEvery: int? cleared if missing
RaiseInvoiceEveryWeeks: int? cleared if missing
Archived: bool cleared if missing
Starred: bool cleared if missing

Example request

PUT https://spaces.nexudus.com/api/billing/tariffs
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

{
    "Id": 12345678,
    "BusinessId": 12345678,
    "Name": "Name",
    "Price": 1.2,
    "DefaultInvoicingDay": ,
    "Visible": false,
    "UseTimePasses": false,
    "Description": "Descripción",
    "SignUpFee": ,
    "CurrencyId": 12345678,
    "TaxRateId": 12345678,
    "ReducedTaxRateId": 12345678,
    "ExemptTaxRateId": 12345678,
    "FinancialAccountId": 12345678,
    "TermsAndConditions": "TermsAndConditions",
    "CancellationPeriod": ,
    "DisplayOrder": ,
    "GroupName": "GroupName",
    "SubscribersLimit": ,
    "CancellationLimitDays": ,
    "DefaultContractTerm": ,
    "CancelMemeberAccountAfter": ,
    "CheckinPricePlanLimit": ,
    "CheckinMonthLimit": ,
    "CheckinWeekLimit": ,
    "HoursPricePlanLimit": ,
    "HoursMonthLimit": ,
    "HoursWeekLimit": ,
    "BookingMinuteWeekLimit": ,
    "BookingMinuteMonthLimit": ,
    "DiscountExtraServices": ,
    "DiscountTimePasses": ,
    "DiscountCharges": ,
    "InvoiceEvery": ,
    "InvoiceEveryWeeks": ,
    "AutoCancelAfter": ,
    "AdvanceInvoiceCycles": ,
    "ProrateDayOfMonth": ,
    "ProrateDaysBefore": ,
    "ProrateCancellations": false,
    "ChargeAndExtend": ,
    "AutoRaiseInvoices": false,
    "RaiseInvoiceEvery": ,
    "RaiseInvoiceEveryWeeks": ,
    "Archived": false,
    "Starred": false,
}


Example valid response


{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "Record 'Name of the record' has been succesfully updated.",
    "Value": {
        "Id": 12354678
    }
}


Example invalid response


{
    "Status": 500,
    "Message": "Name: may not be null or empty",
    "Value": null,
    "WasSuccessful": false,
    "Errors": [
        {
            "AttemptedValue": null,
            "Message": "may not be null or empty",
            "PropertyName": "Name"
        },
    ]
}


Delete Tariff

Deletes an existing tariff by its Id.
DELETE https://spaces.nexudus.com/api/billing/tariffs/:Id

🔒 Requires role "Tariff-Delete"

URL parameters
Id: number required
The unique Id of the tariff to update.

Example request

DELETE https://spaces.nexudus.com/api/billing/tariffs/12345678
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example valid response


{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "The record was deleted successfully.",
    "Value": null,
    "OpenInDialog": false,
    "RedirectURL": null,
    "JavaScript": null,
    "Errors": null
}


Commands

Commands allow to perform actions against one or more tariff records. Some commands accept only one record while others can run an action for a number of records at the same time. Each command has metadata with information about how it can be used and the amount of records, if any, it needs to run.

Get Commands

Get all commands available to run for tariff records.
GET https://spaces.nexudus.com/api/billing/tariffs/commands

Example request

GET https://spaces.nexudus.com/api/billing/tariffs/commands
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example valid response


[
	{
		"Key": "COMMAND_KEY_1",
		"Name": "Command 1 english description",
		"AppliesOnlyToMultipleEntities": false,
		"DisplayInDropdown": true,
		"DisplayInDropdownV2": true,
		"AppliesOnlyToOneEntity": false,
		"AppliesOnlyToTwoEntities": false,
		"DisplayInGrid": false,
		"NeedsEntitiesToRun": true,
		"Order": 2,
		"RequiresParameters": []
	},
	{
		"Key": "COMMAND_KEY_2",
		"Name": "Command 2 english description",
		"AppliesOnlyToMultipleEntities": false,
		"DisplayInDropdown": true,
		"DisplayInDropdownV2": true,
		"AppliesOnlyToOneEntity": true,
		"AppliesOnlyToTwoEntities": false,
		"DisplayInGrid": true,
		"NeedsEntitiesToRun": true,
		"Order": 10,
		"RequiresParameters": 
		[
			{
				"Name": "Parameter 1 description",
				"Type": "string",
			},
			{
				"Name": "Parameter 2 description",
				"Type": "Boolean",
			}
		]
	},
	...
]


Run Command

Runs a command based on its Key and one or more tariff record IDs.
POST https://spaces.nexudus.com/api/billing/tariffs/runacommand
🔒 Requires role "Tariff-Edit"

Example request

POST https://spaces.nexudus.com/api/billing/tariffs/runcommand
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

{
	"Ids":[1329961649],
	"Parameters": 
	[
		{ 
			"Type": "string"
			"Value":987654321
		},
		{
			"Type": "Boolean",
			"Value":true
		},
		...
	],
	"Key":"COMMAND_KEY_2"
}


Example valid response


{
	"Errors": null
	"JavaScript": null
	"Message": "Result description"
	"OpenInDialog": false
	"OpenInWindow": false
	"RedirectURL": null
	"Status": 200
	"UpdatedBy": "email@example.net"
	"UpdatedOn: "2020-06-04T11:40:20Z"
	"Value: {Id: 12345678}
	"WasSuccessful: true
}


Binary files

The following endpoints return binary data. Check the `ContentType` header to understand the type of file being returned in the response stream.

ContractDocument

GET https://spaces.nexudus.com/api/billing/tariffs/getcontractdocument/:id
URL parameters
Id: number required
The id of the Tariff to get the contractdocument for.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.