Reference

Coworkerextraservice

The coworkerextraservice object

Attributes
Id: int required, autogenerated, unique
The unique identifier for this coworkerextraservice
AutomaticallyAdded: bool optional read-only
BookingFromTime: DateTime? optional
BookingId: int? optional
BookingResourceName: string optional
BookingToTime: DateTime? optional
BookingUniqueId: Guid? optional read-only
BusinessId: Id required
ChargePeriod: Nexudus.Coworking.Core.Enums.eChargePeriod optional
CoworkerId: Id required
CoworkerProductUniqueId: Guid? optional read-only
Description: string optional read-only
DiscountAmount: decimal? optional read-only
DiscountCode: string optional read-only
DueDate: DateTime? optional
ExpireDate: DateTime? optional
ExtraServiceId: Id required
Free: bool optional
Invoiced: bool optional read-only
InvoiceDate: DateTime? optional read-only
IsFromTariff: bool optional read-only
Notes: string optional
Price: decimal? optional
PurchaseOrder: string optional
RemainingUses: int required read-only
TariffTimePassUniqueId: Guid? optional read-only
TotalUses: int required
UniqueId: Guid required, autogenerated, unique
The globally unique identifier for this coworkerextraservice
SystemId: string optional api-only
User defined data about this coworkerextraservice. This property can only be seen and updated using the API.

Json Structure Example


{
  "Id": 1234567,
  "AutomaticallyAdded": false,
  "BookingFromTime": ,
  "BookingId": ,
  "BookingResourceName": "Abc123456",
  "BookingToTime": ,
  "BookingUniqueId": ,
  "BusinessId": 12345678,
  "ChargePeriod": 1,
  "CoworkerId": 12345678,
  "CoworkerProductUniqueId": ,
  "Description": "Description",
  "DiscountAmount": ,
  "DiscountCode": "Discount Code",
  "DueDate": ,
  "ExpireDate": ,
  "ExtraServiceId": 12345678,
  "Free": false,
  "Invoiced": false,
  "InvoiceDate": ,
  "IsFromTariff": false,
  "Notes": "Notes",
  "Price": ,
  "PurchaseOrder": "PurchaseOrder",
  "RemainingUses": ,
  "TariffTimePassUniqueId": ,
  "TotalUses": ,
  "UniqueId": "d190c375-db0d-447c-8f60-e425fa8d54dd",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Find a CoworkerExtraService

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

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

πŸ”’ Requires role "CoworkerExtraService-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 coworkerextraservice records based on their different properties.
Id number
?Id=12345678
CoworkerExtraService_AutomaticallyAdded bool
?CoworkerExtraService_AutomaticallyAdded=...
CoworkerExtraService_BookingFromTime DateTime?
?CoworkerExtraService_BookingFromTime=...
CoworkerExtraService_BookingId int?
?CoworkerExtraService_BookingId=...
CoworkerExtraService_BookingResourceName string
?CoworkerExtraService_BookingResourceName=...
CoworkerExtraService_BookingToTime DateTime?
?CoworkerExtraService_BookingToTime=...
CoworkerExtraService_BookingUniqueId Guid?
?CoworkerExtraService_BookingUniqueId=...
CoworkerExtraService_Business Business
?CoworkerExtraService_Business=...
CoworkerExtraService_ChargePeriod Nexudus.Coworking.Core.Enums.eChargePeriod
?CoworkerExtraService_ChargePeriod=...
CoworkerExtraService_Coworker Coworker
?CoworkerExtraService_Coworker=...
CoworkerExtraService_CoworkerProductUniqueId Guid?
?CoworkerExtraService_CoworkerProductUniqueId=...
CoworkerExtraService_Description string
?CoworkerExtraService_Description=...
CoworkerExtraService_DiscountAmount decimal?
?CoworkerExtraService_DiscountAmount=...
CoworkerExtraService_DiscountCode string
?CoworkerExtraService_DiscountCode=...
CoworkerExtraService_DueDate DateTime?
?CoworkerExtraService_DueDate=...
CoworkerExtraService_ExpireDate DateTime?
?CoworkerExtraService_ExpireDate=...
CoworkerExtraService_ExtraService ExtraService
?CoworkerExtraService_ExtraService=...
CoworkerExtraService_Free bool
?CoworkerExtraService_Free=...
CoworkerExtraService_Invoiced bool
?CoworkerExtraService_Invoiced=...
CoworkerExtraService_InvoiceDate DateTime?
?CoworkerExtraService_InvoiceDate=...
CoworkerExtraService_IsFromTariff bool
?CoworkerExtraService_IsFromTariff=...
CoworkerExtraService_Notes string
?CoworkerExtraService_Notes=...
CoworkerExtraService_Price decimal?
?CoworkerExtraService_Price=...
CoworkerExtraService_PurchaseOrder string
?CoworkerExtraService_PurchaseOrder=...
CoworkerExtraService_RemainingUses int
?CoworkerExtraService_RemainingUses=...
CoworkerExtraService_TariffTimePassUniqueId Guid?
?CoworkerExtraService_TariffTimePassUniqueId=...
CoworkerExtraService_TotalUses int
?CoworkerExtraService_TotalUses=...
CoworkerExtraService_ExtraServiceName string
?CoworkerExtraService_ExtraServiceName=...
CoworkerExtraService_ExtraServiceCurrency_Code string
?CoworkerExtraService_ExtraServiceCurrency_Code=...

Range search querystring parameters
Lets you search coworkerextraservice records based on a range of date or numeric values.
To_CoworkerExtraService_CreatedOn date
?To_CoworkerExtraService_CreatedOn=2010-01-01T20:32
From_CoworkerExtraService_CreatedOn date
?From_CoworkerExtraService_CreatedOn=2010-01-01T20:32
To_CoworkerExtraService_UpdatedOn date
?To_CoworkerExtraService_UpdatedOn=2010-01-01T20:32
From_CoworkerExtraService_UpdatedOn date
?From_CoworkerExtraService_UpdatedOn=2010-01-01T20:32
To_CoworkerExtraService_RemainingUses number
?To_CoworkerExtraService_RemainingUses=0
From_CoworkerExtraService_RemainingUses number
?From_CoworkerExtraService_RemainingUses=10
To_CoworkerExtraService_TotalUses number
?To_CoworkerExtraService_TotalUses=0
From_CoworkerExtraService_TotalUses number
?From_CoworkerExtraService_TotalUses=10
To_CoworkerExtraService_Price number
?To_CoworkerExtraService_Price=0
From_CoworkerExtraService_Price number
?From_CoworkerExtraService_Price=10
To_CoworkerExtraService_ExpireDate date
?To_CoworkerExtraService_ExpireDate=2010-01-01T20:32
From_CoworkerExtraService_ExpireDate date
?From_CoworkerExtraService_ExpireDate=2010-01-01T20:32
To_CoworkerExtraService_DueDate date
?To_CoworkerExtraService_DueDate=2010-01-01T20:32
From_CoworkerExtraService_DueDate date
?From_CoworkerExtraService_DueDate=2010-01-01T20:32
To_CoworkerExtraService_InvoiceDate date
?To_CoworkerExtraService_InvoiceDate=2010-01-01T20:32
From_CoworkerExtraService_InvoiceDate date
?From_CoworkerExtraService_InvoiceDate=2010-01-01T20:32
To_CoworkerExtraService_DiscountAmount number
?To_CoworkerExtraService_DiscountAmount=0
From_CoworkerExtraService_DiscountAmount number
?From_CoworkerExtraService_DiscountAmount=10
To_CoworkerExtraService_BookingId number
?To_CoworkerExtraService_BookingId=0
From_CoworkerExtraService_BookingId number
?From_CoworkerExtraService_BookingId=10
To_CoworkerExtraService_BookingFromTime date
?To_CoworkerExtraService_BookingFromTime=2010-01-01T20:32
From_CoworkerExtraService_BookingFromTime date
?From_CoworkerExtraService_BookingFromTime=2010-01-01T20:32
To_CoworkerExtraService_BookingToTime date
?To_CoworkerExtraService_BookingToTime=2010-01-01T20:32
From_CoworkerExtraService_BookingToTime date
?From_CoworkerExtraService_BookingToTime=2010-01-01T20:32

Example request

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

Example response


{
    "Records": [{
        "Id": 1234567,
        "Coworker": ,
        "Business": ,
        "ExtraService": ,
        "Description": "Description",
        "Notes": "Notes",
        "RemainingUses": ,
        "TotalUses": ,
        "Free": false,
        "Price": ,
        "ExpireDate": ,
        "DueDate": ,
        "PurchaseOrder": "PurchaseOrder",
        "ChargePeriod": 1,
        "Invoiced": false,
        "InvoiceDate": ,
        "IsFromTariff": false,
        "TariffTimePassUniqueId": ,
        "CoworkerProductUniqueId": ,
        "BookingUniqueId": ,
        "AutomaticallyAdded": false,
        "DiscountCode": "Discount Code",
        "DiscountAmount": ,
        "BookingId": ,
        "BookingFromTime": ,
        "BookingToTime": ,
        "BookingResourceName": "Abc123456",
        "CoworkerExtraServiceExtraServiceName": "...",
        "CoworkerExtraServiceExtraServiceCurrency_Code": "...",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "5a44f267-8bdf-4a9a-b548-0923618099e3",
        "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 CoworkerExtraServices by IDs

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

πŸ”’ Requires role "CoworkerExtraService-List"

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

Example request

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

Example response


{
    "Records": [{
        "Id": 1234567,
        "Coworker": ,
        "Business": ,
        "ExtraService": ,
        "Description": "Description",
        "Notes": "Notes",
        "RemainingUses": ,
        "TotalUses": ,
        "Free": false,
        "Price": ,
        "ExpireDate": ,
        "DueDate": ,
        "PurchaseOrder": "PurchaseOrder",
        "ChargePeriod": 1,
        "Invoiced": false,
        "InvoiceDate": ,
        "IsFromTariff": false,
        "TariffTimePassUniqueId": ,
        "CoworkerProductUniqueId": ,
        "BookingUniqueId": ,
        "AutomaticallyAdded": false,
        "DiscountCode": "Discount Code",
        "DiscountAmount": ,
        "BookingId": ,
        "BookingFromTime": ,
        "BookingToTime": ,
        "BookingResourceName": "Abc123456",
        "CoworkerExtraServiceExtraServiceName": "...",
        "CoworkerExtraServiceExtraServiceCurrency_Code": "...",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "7a593ab3-e564-40db-9ab4-ab153acac34c",
        "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 CoworkerExtraService by Id

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

πŸ”’ Requires role "CoworkerExtraService-Read"

URL parameters
Id: number requried

Example request

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

Example response


{
  "Id": 1234567,
  "AutomaticallyAdded": false,
  "BookingFromTime": ,
  "BookingId": ,
  "BookingResourceName": "Abc123456",
  "BookingToTime": ,
  "BookingUniqueId": ,
  "BusinessId": 12345678,
  "ChargePeriod": 1,
  "CoworkerId": 12345678,
  "CoworkerProductUniqueId": ,
  "Description": "Description",
  "DiscountAmount": ,
  "DiscountCode": "Discount Code",
  "DueDate": ,
  "ExpireDate": ,
  "ExtraServiceId": 12345678,
  "Free": false,
  "Invoiced": false,
  "InvoiceDate": ,
  "IsFromTariff": false,
  "Notes": "Notes",
  "Price": ,
  "PurchaseOrder": "PurchaseOrder",
  "RemainingUses": ,
  "TariffTimePassUniqueId": ,
  "TotalUses": ,
  "CreatedOn": "2018-07-03T06:23:01Z",
  "UpdatedOn": "2020-01-01T21:57:21Z",
  "UpdatedBy": "System",
  "UniqueId": "48db69ac-da15-419e-b9cf-19c8419c123f",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Create new CoworkerExtraService

Creates a new coworkerextraservice.
POST https://spaces.nexudus.com/api/billing/coworkerextraservices

πŸ”’ Requires role "CoworkerExtraService-Create"

Body parameters
CoworkerId: number required
BusinessId: number required
ExtraServiceId: number required
Notes: string optional
TotalUses: int required
Free: bool optional
Price: decimal? optional
ExpireDate: DateTime? optional
DueDate: DateTime? optional
PurchaseOrder: string optional
ChargePeriod: Nexudus.Coworking.Core.Enums.eChargePeriod optional
BookingId: int? optional
BookingFromTime: DateTime? optional
BookingToTime: DateTime? optional
BookingResourceName: string optional

Example request

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

{
    "CoworkerId": 12345678,
    "BusinessId": 12345678,
    "ExtraServiceId": 12345678,
    "Notes": "Notes",
    "TotalUses": ,
    "Free": false,
    "Price": ,
    "ExpireDate": ,
    "DueDate": ,
    "PurchaseOrder": "PurchaseOrder",
    "ChargePeriod": 1, //(check Enumerated values section below)
    "BookingId": ,
    "BookingFromTime": ,
    "BookingToTime": ,
    "BookingResourceName": "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 CoworkerExtraService

Updates an existing coworkerextraservice.
PUT https://spaces.nexudus.com/api/billing/coworkerextraservices

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

πŸ”’ Requires role "CoworkerExtraService-Edit"

Body parameters
Id: number required
The unique Id of the coworkerextraservice to update.
CoworkerId: number cleared if missing
BusinessId: number cleared if missing
ExtraServiceId: number cleared if missing
Notes: string cleared if missing
TotalUses: int cleared if missing
Free: bool cleared if missing
Price: decimal? cleared if missing
ExpireDate: DateTime? cleared if missing
DueDate: DateTime? cleared if missing
PurchaseOrder: string cleared if missing
ChargePeriod: Nexudus.Coworking.Core.Enums.eChargePeriod cleared if missing
BookingId: int? cleared if missing
BookingFromTime: DateTime? cleared if missing
BookingToTime: DateTime? cleared if missing
BookingResourceName: string cleared if missing

Example request

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

{
    "Id": 12345678,
    "CoworkerId": 12345678,
    "BusinessId": 12345678,
    "ExtraServiceId": 12345678,
    "Notes": "Notes",
    "TotalUses": ,
    "Free": false,
    "Price": ,
    "ExpireDate": ,
    "DueDate": ,
    "PurchaseOrder": "PurchaseOrder",
    "ChargePeriod": 1, //(check Enumerated values section below)
    "BookingId": ,
    "BookingFromTime": ,
    "BookingToTime": ,
    "BookingResourceName": "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 CoworkerExtraService

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

πŸ”’ Requires role "CoworkerExtraService-Delete"

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

Example request

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

Example request

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

Example request

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