Reference

Resourceaccessrule

The resourceaccessrule object

Attributes
Id: int required, autogenerated, unique
The unique identifier for this resourceaccessrule
Active: bool optional
ApplyRuleFrom: DateTime? optional
ApplyRuleTo: DateTime? optional
BookInAdvanceLimit: int? optional
IntervalLimit: int? optional
LateBookingLimit: int? optional
LateCancellationLimit: int? optional
MaxBookingLength: int? optional
MinBookingLength: int? optional
Name: string required
NoReturnPolicy: int? optional
NoReturnPolicyAllResources: int? optional
NoReturnPolicyAllUsers: int? optional
OnlyForContacts: bool optional
OnlyForMembers: bool optional
RejectWithMessage: string optional
ResourceId: Id required
UniqueId: Guid required, autogenerated, unique
The globally unique identifier for this resourceaccessrule
SystemId: string optional api-only
User defined data about this resourceaccessrule. This property can only be seen and updated using the API.

Json Structure Example


{
  "Id": 1234567,
  "Active": false,
  "ApplyRuleFrom": ,
  "ApplyRuleTo": ,
  "BookInAdvanceLimit": ,
  "IntervalLimit": ,
  "LateBookingLimit": ,
  "LateCancellationLimit": ,
  "MaxBookingLength": ,
  "MinBookingLength": ,
  "Name": "Rule Name",
  "NoReturnPolicy": ,
  "NoReturnPolicyAllResources": ,
  "NoReturnPolicyAllUsers": ,
  "OnlyForContacts": false,
  "OnlyForMembers": false,
  "RejectWithMessage": "0",
  "ResourceId": 12345678,
  "UniqueId": "3596fde6-8827-4d9b-aad7-4deca2a42060",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Find a ResourceAccessRule

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

GET https://spaces.nexudus.com/api/spaces/resourceaccessrules?...

πŸ”’ Requires role "ResourceAccessRule-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=Id
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 resourceaccessrule records based on their different properties.
Id number
?Id=12345678
ResourceAccessRule_Active bool
?ResourceAccessRule_Active=...
ResourceAccessRule_ApplyRuleFrom DateTime?
?ResourceAccessRule_ApplyRuleFrom=...
ResourceAccessRule_ApplyRuleTo DateTime?
?ResourceAccessRule_ApplyRuleTo=...
ResourceAccessRule_BookInAdvanceLimit int?
?ResourceAccessRule_BookInAdvanceLimit=...
ResourceAccessRule_IntervalLimit int?
?ResourceAccessRule_IntervalLimit=...
ResourceAccessRule_LateBookingLimit int?
?ResourceAccessRule_LateBookingLimit=...
ResourceAccessRule_LateCancellationLimit int?
?ResourceAccessRule_LateCancellationLimit=...
ResourceAccessRule_MaxBookingLength int?
?ResourceAccessRule_MaxBookingLength=...
ResourceAccessRule_MinBookingLength int?
?ResourceAccessRule_MinBookingLength=...
ResourceAccessRule_Name string
?ResourceAccessRule_Name=...
ResourceAccessRule_NoReturnPolicy int?
?ResourceAccessRule_NoReturnPolicy=...
ResourceAccessRule_NoReturnPolicyAllResources int?
?ResourceAccessRule_NoReturnPolicyAllResources=...
ResourceAccessRule_NoReturnPolicyAllUsers int?
?ResourceAccessRule_NoReturnPolicyAllUsers=...
ResourceAccessRule_OnlyForContacts bool
?ResourceAccessRule_OnlyForContacts=...
ResourceAccessRule_OnlyForMembers bool
?ResourceAccessRule_OnlyForMembers=...
ResourceAccessRule_RejectWithMessage string
?ResourceAccessRule_RejectWithMessage=...
ResourceAccessRule_Resource Resource
?ResourceAccessRule_Resource=...
ResourceAccessRule_Tariffs List of Tariff
?ResourceAccessRule_Tariffs=...
ResourceAccessRule_Members List of Coworker
?ResourceAccessRule_Members=...
ResourceAccessRule_EventCategories List of CalendarEventCategory
?ResourceAccessRule_EventCategories=...

Range search querystring parameters
Lets you search resourceaccessrule records based on a range of date or numeric values.
To_ResourceAccessRule_CreatedOn date
?To_ResourceAccessRule_CreatedOn=2010-01-01T20:32
From_ResourceAccessRule_CreatedOn date
?From_ResourceAccessRule_CreatedOn=2010-01-01T20:32
To_ResourceAccessRule_UpdatedOn date
?To_ResourceAccessRule_UpdatedOn=2010-01-01T20:32
From_ResourceAccessRule_UpdatedOn date
?From_ResourceAccessRule_UpdatedOn=2010-01-01T20:32
To_ResourceAccessRule_ApplyRuleFrom date
?To_ResourceAccessRule_ApplyRuleFrom=2010-01-01T20:32
From_ResourceAccessRule_ApplyRuleFrom date
?From_ResourceAccessRule_ApplyRuleFrom=2010-01-01T20:32
To_ResourceAccessRule_ApplyRuleTo date
?To_ResourceAccessRule_ApplyRuleTo=2010-01-01T20:32
From_ResourceAccessRule_ApplyRuleTo date
?From_ResourceAccessRule_ApplyRuleTo=2010-01-01T20:32
To_ResourceAccessRule_BookInAdvanceLimit number
?To_ResourceAccessRule_BookInAdvanceLimit=0
From_ResourceAccessRule_BookInAdvanceLimit number
?From_ResourceAccessRule_BookInAdvanceLimit=10
To_ResourceAccessRule_LateBookingLimit number
?To_ResourceAccessRule_LateBookingLimit=0
From_ResourceAccessRule_LateBookingLimit number
?From_ResourceAccessRule_LateBookingLimit=10
To_ResourceAccessRule_LateCancellationLimit number
?To_ResourceAccessRule_LateCancellationLimit=0
From_ResourceAccessRule_LateCancellationLimit number
?From_ResourceAccessRule_LateCancellationLimit=10
To_ResourceAccessRule_IntervalLimit number
?To_ResourceAccessRule_IntervalLimit=0
From_ResourceAccessRule_IntervalLimit number
?From_ResourceAccessRule_IntervalLimit=10
To_ResourceAccessRule_MaxBookingLength number
?To_ResourceAccessRule_MaxBookingLength=0
From_ResourceAccessRule_MaxBookingLength number
?From_ResourceAccessRule_MaxBookingLength=10
To_ResourceAccessRule_MinBookingLength number
?To_ResourceAccessRule_MinBookingLength=0
From_ResourceAccessRule_MinBookingLength number
?From_ResourceAccessRule_MinBookingLength=10
To_ResourceAccessRule_NoReturnPolicy number
?To_ResourceAccessRule_NoReturnPolicy=0
From_ResourceAccessRule_NoReturnPolicy number
?From_ResourceAccessRule_NoReturnPolicy=10
To_ResourceAccessRule_NoReturnPolicyAllResources number
?To_ResourceAccessRule_NoReturnPolicyAllResources=0
From_ResourceAccessRule_NoReturnPolicyAllResources number
?From_ResourceAccessRule_NoReturnPolicyAllResources=10
To_ResourceAccessRule_NoReturnPolicyAllUsers number
?To_ResourceAccessRule_NoReturnPolicyAllUsers=0
From_ResourceAccessRule_NoReturnPolicyAllUsers number
?From_ResourceAccessRule_NoReturnPolicyAllUsers=10

Example request

GET https://spaces.nexudus.com/api/spaces/resourceaccessrules?ResourceAccessRule_Name=...
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example response


{
    "Records": [{
        "Id": 1234567,
        "Resource": ,
        "Name": "Rule Name",
        "Active": false,
        "OnlyForContacts": false,
        "ApplyRuleFrom": ,
        "ApplyRuleTo": ,
        "BookInAdvanceLimit": ,
        "LateBookingLimit": ,
        "LateCancellationLimit": ,
        "IntervalLimit": ,
        "MaxBookingLength": ,
        "MinBookingLength": ,
        "NoReturnPolicy": ,
        "NoReturnPolicyAllResources": ,
        "NoReturnPolicyAllUsers": ,
        "RejectWithMessage": "0",
        "OnlyForMembers": false,
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "e530246f-a501-4711-953f-8b92eacc008c",
        "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 ResourceAccessRules by IDs

Gets one or more resourceaccessrule records based on their Id.
GET https://spaces.nexudus.com/api/spaces/resourceaccessrules?ResourceAccessRule_Id=[:id1,:id2,...]

πŸ”’ Requires role "ResourceAccessRule-List"

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

Example request

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

Example response


{
    "Records": [{
        "Id": 1234567,
        "Resource": ,
        "Name": "Rule Name",
        "Active": false,
        "OnlyForContacts": false,
        "ApplyRuleFrom": ,
        "ApplyRuleTo": ,
        "BookInAdvanceLimit": ,
        "LateBookingLimit": ,
        "LateCancellationLimit": ,
        "IntervalLimit": ,
        "MaxBookingLength": ,
        "MinBookingLength": ,
        "NoReturnPolicy": ,
        "NoReturnPolicyAllResources": ,
        "NoReturnPolicyAllUsers": ,
        "RejectWithMessage": "0",
        "OnlyForMembers": false,
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "d8e4b8f5-1427-4f1c-bd3b-a079510faf4f",
        "SystemId": "{ metadata: { id: 887766, processed: true } }"
    }],
    "CurrentPageSize": 25,
    "CurrentPage": 1,
    "CurrentOrderField": "Id",
    "CurrentSortDirection": 1,
    "FirstItem": 1,
    "HasNextPage": true,
    "HasPreviousPage": false,
    "LastItem": 1,
    "PageNumber": 1,
    "PageSize": 25,
    "TotalItems": 1,
    "TotalPages": 1
}


Get single ResourceAccessRule by Id

Gets one resourceaccessrule record by its Id.
GET https://spaces.nexudus.com/api/spaces/resourceaccessrules/:Id

πŸ”’ Requires role "ResourceAccessRule-Read"

URL parameters
Id: number requried

Example request

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

Example response


{
  "Id": 1234567,
  "Active": false,
  "ApplyRuleFrom": ,
  "ApplyRuleTo": ,
  "BookInAdvanceLimit": ,
  "IntervalLimit": ,
  "LateBookingLimit": ,
  "LateCancellationLimit": ,
  "MaxBookingLength": ,
  "MinBookingLength": ,
  "Name": "Rule Name",
  "NoReturnPolicy": ,
  "NoReturnPolicyAllResources": ,
  "NoReturnPolicyAllUsers": ,
  "OnlyForContacts": false,
  "OnlyForMembers": false,
  "RejectWithMessage": "0",
  "ResourceId": 12345678,
  "CreatedOn": "2018-07-03T06:23:01Z",
  "UpdatedOn": "2020-01-01T21:57:21Z",
  "UpdatedBy": "System",
  "UniqueId": "27d2dff1-f663-4f18-acec-834181679e3b",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Create new ResourceAccessRule

Creates a new resourceaccessrule.
POST https://spaces.nexudus.com/api/spaces/resourceaccessrules

πŸ”’ Requires role "ResourceAccessRule-Create"

Body parameters
ResourceId: number required
Name: string required
Active: bool optional
OnlyForContacts: bool optional
ApplyRuleFrom: DateTime? optional
ApplyRuleTo: DateTime? optional
BookInAdvanceLimit: int? optional
LateBookingLimit: int? optional
LateCancellationLimit: int? optional
IntervalLimit: int? optional
MaxBookingLength: int? optional
MinBookingLength: int? optional
NoReturnPolicy: int? optional
NoReturnPolicyAllResources: int? optional
NoReturnPolicyAllUsers: int? optional
RejectWithMessage: string optional
OnlyForMembers: bool optional

Example request

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

{
    "ResourceId": 12345678,
    "Name": "Rule Name",
    "Active": false,
    "OnlyForContacts": false,
    "ApplyRuleFrom": ,
    "ApplyRuleTo": ,
    "BookInAdvanceLimit": ,
    "LateBookingLimit": ,
    "LateCancellationLimit": ,
    "IntervalLimit": ,
    "MaxBookingLength": ,
    "MinBookingLength": ,
    "NoReturnPolicy": ,
    "NoReturnPolicyAllResources": ,
    "NoReturnPolicyAllUsers": ,
    "RejectWithMessage": "0",
    "OnlyForMembers": false,
    "Tariffs": [12345678, 87654321],
    "Members": [12345678, 87654321],
    "EventCategories": [12345678, 87654321],
}


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 ResourceAccessRule

Updates an existing resourceaccessrule.
PUT https://spaces.nexudus.com/api/spaces/resourceaccessrules

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

πŸ”’ Requires role "ResourceAccessRule-Edit"

Body parameters
Id: number required
The unique Id of the resourceaccessrule to update.
ResourceId: number cleared if missing
Name: string cleared if missing
Active: bool cleared if missing
OnlyForContacts: bool cleared if missing
ApplyRuleFrom: DateTime? cleared if missing
ApplyRuleTo: DateTime? cleared if missing
BookInAdvanceLimit: int? cleared if missing
LateBookingLimit: int? cleared if missing
LateCancellationLimit: int? cleared if missing
IntervalLimit: int? cleared if missing
MaxBookingLength: int? cleared if missing
MinBookingLength: int? cleared if missing
NoReturnPolicy: int? cleared if missing
NoReturnPolicyAllResources: int? cleared if missing
NoReturnPolicyAllUsers: int? cleared if missing
RejectWithMessage: string cleared if missing
OnlyForMembers: bool cleared if missing

Example request

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

{
    "Id": 12345678,
    "ResourceId": 12345678,
    "Name": "Rule Name",
    "Active": false,
    "OnlyForContacts": false,
    "ApplyRuleFrom": ,
    "ApplyRuleTo": ,
    "BookInAdvanceLimit": ,
    "LateBookingLimit": ,
    "LateCancellationLimit": ,
    "IntervalLimit": ,
    "MaxBookingLength": ,
    "MinBookingLength": ,
    "NoReturnPolicy": ,
    "NoReturnPolicyAllResources": ,
    "NoReturnPolicyAllUsers": ,
    "RejectWithMessage": "0",
    "OnlyForMembers": false,
    "Tariffs": [12345678, 87654321],
    "Members": [12345678, 87654321],
    "EventCategories": [12345678, 87654321],
}


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 ResourceAccessRule

Deletes an existing resourceaccessrule by its Id.
DELETE https://spaces.nexudus.com/api/spaces/resourceaccessrules/:Id

πŸ”’ Requires role "ResourceAccessRule-Delete"

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

Example request

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

Example request

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

Example request

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


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.