Reference

Extraservice

The extraservice object

Attributes
Id: int required, autogenerated, unique
The unique identifier for this extraservice
ApplyChargeToVisitors: bool optional
BusinessId: Id required
ChargePeriod: Nexudus.Coworking.Core.Enums.eChargePeriod optional
CreditPrice: decimal? optional
CurrencyId: Id required
Description: string optional
DisplayOrder: int required
ExemptTaxRateId: Id optional
FinancialAccountId: Id optional
FixedCostLength: int? optional
FixedCostPrice: decimal? optional
FromTime: int? optional
IsBookingCredit: bool optional
IsDefaultPrice: bool optional
IsPrintingCredit: bool optional
MaximumPrice: decimal? optional
MaxLength: int? optional
MinLength: int? optional
Name: string required
OnlyForContacts: bool optional
OnlyForMembers: bool optional
OnlyWithinAvailableTimes: bool optional
Price: decimal required
ReducedTaxRateId: Id optional
ResourceTypeNames: string optional
TaxRateId: Id optional
ToTime: int? optional
UsePerNightPricing: bool optional
Visible: bool optional
UniqueId: Guid required, autogenerated, unique
The globally unique identifier for this extraservice
SystemId: string optional api-only
User defined data about this extraservice. This property can only be seen and updated using the API.

Json Structure Example


{
  "Id": 1234567,
  "ApplyChargeToVisitors": false,
  "BusinessId": 12345678,
  "ChargePeriod": 1,
  "CreditPrice": ,
  "CurrencyId": 12345678,
  "Description": "Description",
  "DisplayOrder": ,
  "ExemptTaxRateId": 12345678,
  "FinancialAccountId": 12345678,
  "FixedCostLength": ,
  "FixedCostPrice": ,
  "FromTime": ,
  "IsBookingCredit": false,
  "IsDefaultPrice": false,
  "IsPrintingCredit": false,
  "MaximumPrice": ,
  "MaxLength": ,
  "MinLength": ,
  "Name": "Name",
  "OnlyForContacts": false,
  "OnlyForMembers": false,
  "OnlyWithinAvailableTimes": false,
  "Price": 1.2,
  "ReducedTaxRateId": 12345678,
  "ResourceTypeNames": "Abc123456",
  "TaxRateId": 12345678,
  "ToTime": ,
  "UsePerNightPricing": false,
  "Visible": false,
  "UniqueId": "86fea502-31a1-4fc0-ae87-34124cda6a0c",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Find a ExtraService

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

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

πŸ”’ Requires role "ExtraService-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=DisplayOrder
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 extraservice records based on their different properties.
Id number
?Id=12345678
ExtraService_ApplyChargeToVisitors bool
?ExtraService_ApplyChargeToVisitors=...
ExtraService_Business Business
?ExtraService_Business=...
ExtraService_ChargePeriod Nexudus.Coworking.Core.Enums.eChargePeriod
?ExtraService_ChargePeriod=...
ExtraService_CreditPrice decimal?
?ExtraService_CreditPrice=...
ExtraService_Currency Currency
?ExtraService_Currency=...
ExtraService_Description string
?ExtraService_Description=...
ExtraService_DisplayOrder int
?ExtraService_DisplayOrder=...
ExtraService_ExemptTaxRate TaxRate
?ExtraService_ExemptTaxRate=...
ExtraService_FinancialAccount FinancialAccount
?ExtraService_FinancialAccount=...
ExtraService_FixedCostLength int?
?ExtraService_FixedCostLength=...
ExtraService_FixedCostPrice decimal?
?ExtraService_FixedCostPrice=...
ExtraService_FromTime int?
?ExtraService_FromTime=...
ExtraService_IsBookingCredit bool
?ExtraService_IsBookingCredit=...
ExtraService_IsDefaultPrice bool
?ExtraService_IsDefaultPrice=...
ExtraService_IsPrintingCredit bool
?ExtraService_IsPrintingCredit=...
ExtraService_MaximumPrice decimal?
?ExtraService_MaximumPrice=...
ExtraService_MaxLength int?
?ExtraService_MaxLength=...
ExtraService_MinLength int?
?ExtraService_MinLength=...
ExtraService_Name string
?ExtraService_Name=...
ExtraService_OnlyForContacts bool
?ExtraService_OnlyForContacts=...
ExtraService_OnlyForMembers bool
?ExtraService_OnlyForMembers=...
ExtraService_OnlyWithinAvailableTimes bool
?ExtraService_OnlyWithinAvailableTimes=...
ExtraService_Price decimal
?ExtraService_Price=...
ExtraService_ReducedTaxRate TaxRate
?ExtraService_ReducedTaxRate=...
ExtraService_ResourceTypeNames string
?ExtraService_ResourceTypeNames=...
ExtraService_TaxRate TaxRate
?ExtraService_TaxRate=...
ExtraService_ToTime int?
?ExtraService_ToTime=...
ExtraService_UsePerNightPricing bool
?ExtraService_UsePerNightPricing=...
ExtraService_Visible bool
?ExtraService_Visible=...
ExtraService_CurrencyCode string
?ExtraService_CurrencyCode=...
ExtraService_ResourceTypes List of ResourceType
?ExtraService_ResourceTypes=...
ExtraService_Tariffs List of Tariff
?ExtraService_Tariffs=...

Range search querystring parameters
Lets you search extraservice records based on a range of date or numeric values.
To_ExtraService_CreatedOn date
?To_ExtraService_CreatedOn=2010-01-01T20:32
From_ExtraService_CreatedOn date
?From_ExtraService_CreatedOn=2010-01-01T20:32
To_ExtraService_UpdatedOn date
?To_ExtraService_UpdatedOn=2010-01-01T20:32
From_ExtraService_UpdatedOn date
?From_ExtraService_UpdatedOn=2010-01-01T20:32
To_ExtraService_DisplayOrder number
?To_ExtraService_DisplayOrder=0
From_ExtraService_DisplayOrder number
?From_ExtraService_DisplayOrder=10
To_ExtraService_Price number
?To_ExtraService_Price=0
From_ExtraService_Price number
?From_ExtraService_Price=10
To_ExtraService_CreditPrice number
?To_ExtraService_CreditPrice=0
From_ExtraService_CreditPrice number
?From_ExtraService_CreditPrice=10
To_ExtraService_MaximumPrice number
?To_ExtraService_MaximumPrice=0
From_ExtraService_MaximumPrice number
?From_ExtraService_MaximumPrice=10
To_ExtraService_FromTime number
?To_ExtraService_FromTime=0
From_ExtraService_FromTime number
?From_ExtraService_FromTime=10
To_ExtraService_ToTime number
?To_ExtraService_ToTime=0
From_ExtraService_ToTime number
?From_ExtraService_ToTime=10
To_ExtraService_MinLength number
?To_ExtraService_MinLength=0
From_ExtraService_MinLength number
?From_ExtraService_MinLength=10
To_ExtraService_MaxLength number
?To_ExtraService_MaxLength=0
From_ExtraService_MaxLength number
?From_ExtraService_MaxLength=10
To_ExtraService_FixedCostLength number
?To_ExtraService_FixedCostLength=0
From_ExtraService_FixedCostLength number
?From_ExtraService_FixedCostLength=10
To_ExtraService_FixedCostPrice number
?To_ExtraService_FixedCostPrice=0
From_ExtraService_FixedCostPrice number
?From_ExtraService_FixedCostPrice=10

Example request

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

Example response


{
    "Records": [{
        "Id": 1234567,
        "Business": ,
        "Name": "Name",
        "Description": "Description",
        "Visible": false,
        "DisplayOrder": ,
        "Price": 1.2,
        "CreditPrice": ,
        "ChargePeriod": 1,
        "MaximumPrice": ,
        "IsDefaultPrice": false,
        "UsePerNightPricing": false,
        "Currency": ,
        "TaxRate": ,
        "ReducedTaxRate": ,
        "ExemptTaxRate": ,
        "FinancialAccount": ,
        "FromTime": ,
        "ToTime": ,
        "MinLength": ,
        "MaxLength": ,
        "OnlyWithinAvailableTimes": false,
        "FixedCostLength": ,
        "FixedCostPrice": ,
        "OnlyForContacts": false,
        "OnlyForMembers": false,
        "IsBookingCredit": false,
        "IsPrintingCredit": false,
        "ApplyChargeToVisitors": false,
        "ResourceTypeNames": "Abc123456",
        "ExtraServiceCurrencyCode": "...",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "f8ef932d-5046-437b-95ab-bb7a2b82b9a6",
        "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 ExtraServices by IDs

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

πŸ”’ Requires role "ExtraService-List"

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

Example request

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

Example response


{
    "Records": [{
        "Id": 1234567,
        "Business": ,
        "Name": "Name",
        "Description": "Description",
        "Visible": false,
        "DisplayOrder": ,
        "Price": 1.2,
        "CreditPrice": ,
        "ChargePeriod": 1,
        "MaximumPrice": ,
        "IsDefaultPrice": false,
        "UsePerNightPricing": false,
        "Currency": ,
        "TaxRate": ,
        "ReducedTaxRate": ,
        "ExemptTaxRate": ,
        "FinancialAccount": ,
        "FromTime": ,
        "ToTime": ,
        "MinLength": ,
        "MaxLength": ,
        "OnlyWithinAvailableTimes": false,
        "FixedCostLength": ,
        "FixedCostPrice": ,
        "OnlyForContacts": false,
        "OnlyForMembers": false,
        "IsBookingCredit": false,
        "IsPrintingCredit": false,
        "ApplyChargeToVisitors": false,
        "ResourceTypeNames": "Abc123456",
        "ExtraServiceCurrencyCode": "...",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "77ffc150-6728-4ab2-a805-9d8b5f06d415",
        "SystemId": "{ metadata: { id: 887766, processed: true } }"
    }],
    "CurrentPageSize": 25,
    "CurrentPage": 1,
    "CurrentOrderField": "DisplayOrder",
    "CurrentSortDirection": 1,
    "FirstItem": 1,
    "HasNextPage": true,
    "HasPreviousPage": false,
    "LastItem": 1,
    "PageNumber": 1,
    "PageSize": 25,
    "TotalItems": 1,
    "TotalPages": 1
}


Get single ExtraService by Id

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

πŸ”’ Requires role "ExtraService-Read"

URL parameters
Id: number requried

Example request

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

Example response


{
  "Id": 1234567,
  "ApplyChargeToVisitors": false,
  "BusinessId": 12345678,
  "ChargePeriod": 1,
  "CreditPrice": ,
  "CurrencyId": 12345678,
  "Description": "Description",
  "DisplayOrder": ,
  "ExemptTaxRateId": 12345678,
  "FinancialAccountId": 12345678,
  "FixedCostLength": ,
  "FixedCostPrice": ,
  "FromTime": ,
  "IsBookingCredit": false,
  "IsDefaultPrice": false,
  "IsPrintingCredit": false,
  "MaximumPrice": ,
  "MaxLength": ,
  "MinLength": ,
  "Name": "Name",
  "OnlyForContacts": false,
  "OnlyForMembers": false,
  "OnlyWithinAvailableTimes": false,
  "Price": 1.2,
  "ReducedTaxRateId": 12345678,
  "ResourceTypeNames": "Abc123456",
  "TaxRateId": 12345678,
  "ToTime": ,
  "UsePerNightPricing": false,
  "Visible": false,
  "CreatedOn": "2018-07-03T06:23:01Z",
  "UpdatedOn": "2020-01-01T21:57:21Z",
  "UpdatedBy": "System",
  "UniqueId": "3037d04c-15fb-44d1-8490-df8ffefec222",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Create new ExtraService

Creates a new extraservice.
POST https://spaces.nexudus.com/api/billing/extraservices

πŸ”’ Requires role "ExtraService-Create"

Body parameters
BusinessId: number required
Name: string required
Description: string optional
Visible: bool optional
DisplayOrder: int required
Price: decimal required
CreditPrice: decimal? optional
ChargePeriod: Nexudus.Coworking.Core.Enums.eChargePeriod optional
MaximumPrice: decimal? optional
IsDefaultPrice: bool optional
UsePerNightPricing: bool optional
CurrencyId: number required
TaxRateId: number optional
ReducedTaxRateId: number optional
ExemptTaxRateId: number optional
FinancialAccountId: number optional
FromTime: int? optional
ToTime: int? optional
MinLength: int? optional
MaxLength: int? optional
OnlyWithinAvailableTimes: bool optional
FixedCostLength: int? optional
FixedCostPrice: decimal? optional
OnlyForContacts: bool optional
OnlyForMembers: bool optional
IsBookingCredit: bool optional
IsPrintingCredit: bool optional
ApplyChargeToVisitors: bool optional
ResourceTypeNames: string optional

Example request

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

{
    "BusinessId": 12345678,
    "Name": "Name",
    "Description": "Description",
    "Visible": false,
    "DisplayOrder": ,
    "ResourceTypes": [12345678, 87654321],
    "Price": 1.2,
    "CreditPrice": ,
    "ChargePeriod": 1, //(check Enumerated values section below)
    "MaximumPrice": ,
    "IsDefaultPrice": false,
    "UsePerNightPricing": false,
    "CurrencyId": 12345678,
    "TaxRateId": 12345678,
    "ReducedTaxRateId": 12345678,
    "ExemptTaxRateId": 12345678,
    "FinancialAccountId": 12345678,
    "FromTime": ,
    "ToTime": ,
    "MinLength": ,
    "MaxLength": ,
    "OnlyWithinAvailableTimes": false,
    "FixedCostLength": ,
    "FixedCostPrice": ,
    "Tariffs": [12345678, 87654321],
    "OnlyForContacts": false,
    "OnlyForMembers": false,
    "IsBookingCredit": false,
    "IsPrintingCredit": false,
    "ApplyChargeToVisitors": false,
    "ResourceTypeNames": "Abc123456",
}


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 ExtraService

Updates an existing extraservice.
PUT https://spaces.nexudus.com/api/billing/extraservices

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

πŸ”’ Requires role "ExtraService-Edit"

Body parameters
Id: number required
The unique Id of the extraservice to update.
BusinessId: number cleared if missing
Name: string cleared if missing
Description: string cleared if missing
Visible: bool cleared if missing
DisplayOrder: int cleared if missing
Price: decimal cleared if missing
CreditPrice: decimal? cleared if missing
ChargePeriod: Nexudus.Coworking.Core.Enums.eChargePeriod cleared if missing
MaximumPrice: decimal? cleared if missing
IsDefaultPrice: bool cleared if missing
UsePerNightPricing: bool 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
FromTime: int? cleared if missing
ToTime: int? cleared if missing
MinLength: int? cleared if missing
MaxLength: int? cleared if missing
OnlyWithinAvailableTimes: bool cleared if missing
FixedCostLength: int? cleared if missing
FixedCostPrice: decimal? cleared if missing
OnlyForContacts: bool cleared if missing
OnlyForMembers: bool cleared if missing
IsBookingCredit: bool cleared if missing
IsPrintingCredit: bool cleared if missing
ApplyChargeToVisitors: bool cleared if missing
ResourceTypeNames: string cleared if missing

Example request

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

{
    "Id": 12345678,
    "BusinessId": 12345678,
    "Name": "Name",
    "Description": "Description",
    "Visible": false,
    "DisplayOrder": ,
    "ResourceTypes": [12345678, 87654321],
    "Price": 1.2,
    "CreditPrice": ,
    "ChargePeriod": 1, //(check Enumerated values section below)
    "MaximumPrice": ,
    "IsDefaultPrice": false,
    "UsePerNightPricing": false,
    "CurrencyId": 12345678,
    "TaxRateId": 12345678,
    "ReducedTaxRateId": 12345678,
    "ExemptTaxRateId": 12345678,
    "FinancialAccountId": 12345678,
    "FromTime": ,
    "ToTime": ,
    "MinLength": ,
    "MaxLength": ,
    "OnlyWithinAvailableTimes": false,
    "FixedCostLength": ,
    "FixedCostPrice": ,
    "Tariffs": [12345678, 87654321],
    "OnlyForContacts": false,
    "OnlyForMembers": false,
    "IsBookingCredit": false,
    "IsPrintingCredit": false,
    "ApplyChargeToVisitors": false,
    "ResourceTypeNames": "Abc123456",
}


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 ExtraService

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

πŸ”’ Requires role "ExtraService-Delete"

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

Example request

DELETE https://spaces.nexudus.com/api/billing/extraservices/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 extraservice 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 extraservice records.
GET https://spaces.nexudus.com/api/billing/extraservices/commands

Example request

GET https://spaces.nexudus.com/api/billing/extraservices/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 extraservice record IDs.
POST https://spaces.nexudus.com/api/billing/extraservices/runacommand
πŸ”’ Requires role "ExtraService-Edit"

Example request

POST https://spaces.nexudus.com/api/billing/extraservices/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
}


Enumerated values

ChargePeriod

GET /api/utils/enums?name=eChargePeriod

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.