Reference

Proposalcontract

The proposalcontract object

Attributes
Id: int required, autogenerated, unique
The unique identifier for this proposalcontract
BillingDay: int required
CancellationDate: DateTime? optional
CancellationLimitDays: int? optional
ContractTerm: DateTime? optional
DiscountCodeId: Id optional
FloorPlanDeskIds: string optional
FloorPlanDeskNames: string optional
Price: decimal? optional
ProposalId: Id required
Quantity: int required
StartDate: DateTime? optional
TariffId: Id required
UniqueId: Guid required, autogenerated, unique
The globally unique identifier for this proposalcontract
SystemId: string optional api-only
User defined data about this proposalcontract. This property can only be seen and updated using the API.

Json Structure Example


{
  "Id": 1234567,
  "BillingDay": ,
  "CancellationDate": ,
  "CancellationLimitDays": ,
  "ContractTerm": ,
  "DiscountCodeId": 12345678,
  "FloorPlanDeskIds": "Abc123456",
  "FloorPlanDeskNames": "Abc123456",
  "Price": ,
  "ProposalId": 12345678,
  "Quantity": ,
  "StartDate": ,
  "TariffId": 12345678,
  "UniqueId": "1d3e4dc8-85ad-44bd-93b1-643f1b4680e9",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Find a ProposalContract

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

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

πŸ”’ Requires role "ProposalContract-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 proposalcontract records based on their different properties.
Id number
?Id=12345678
ProposalContract_BillingDay int
?ProposalContract_BillingDay=...
ProposalContract_CancellationDate DateTime?
?ProposalContract_CancellationDate=...
ProposalContract_CancellationLimitDays int?
?ProposalContract_CancellationLimitDays=...
ProposalContract_ContractTerm DateTime?
?ProposalContract_ContractTerm=...
ProposalContract_DiscountCode DiscountCode
?ProposalContract_DiscountCode=...
ProposalContract_FloorPlanDeskIds string
?ProposalContract_FloorPlanDeskIds=...
ProposalContract_FloorPlanDeskNames string
?ProposalContract_FloorPlanDeskNames=...
ProposalContract_Price decimal?
?ProposalContract_Price=...
ProposalContract_Proposal Proposal
?ProposalContract_Proposal=...
ProposalContract_Quantity int
?ProposalContract_Quantity=...
ProposalContract_StartDate DateTime?
?ProposalContract_StartDate=...
ProposalContract_Tariff Tariff
?ProposalContract_Tariff=...
ProposalContract_ProposalCoworker_Id string
?ProposalContract_ProposalCoworker_Id=...
ProposalContract_ProposalCoworker_Email string
?ProposalContract_ProposalCoworker_Email=...
ProposalContract_ProposalCoworker_FullName string
?ProposalContract_ProposalCoworker_FullName=...
ProposalContract_TariffName string
?ProposalContract_TariffName=...
ProposalContract_TariffInvoiceEvery string
?ProposalContract_TariffInvoiceEvery=...
ProposalContract_TariffInvoiceEveryWeeks string
?ProposalContract_TariffInvoiceEveryWeeks=...
ProposalContract_TariffPrice string
?ProposalContract_TariffPrice=...
ProposalContract_TariffBusiness_Currency_Code string
?ProposalContract_TariffBusiness_Currency_Code=...
ProposalContract_Desks List of FloorPlanDesk
?ProposalContract_Desks=...

Range search querystring parameters
Lets you search proposalcontract records based on a range of date or numeric values.
To_ProposalContract_CreatedOn date
?To_ProposalContract_CreatedOn=2010-01-01T20:32
From_ProposalContract_CreatedOn date
?From_ProposalContract_CreatedOn=2010-01-01T20:32
To_ProposalContract_UpdatedOn date
?To_ProposalContract_UpdatedOn=2010-01-01T20:32
From_ProposalContract_UpdatedOn date
?From_ProposalContract_UpdatedOn=2010-01-01T20:32
To_ProposalContract_Price number
?To_ProposalContract_Price=0
From_ProposalContract_Price number
?From_ProposalContract_Price=10
To_ProposalContract_StartDate date
?To_ProposalContract_StartDate=2010-01-01T20:32
From_ProposalContract_StartDate date
?From_ProposalContract_StartDate=2010-01-01T20:32
To_ProposalContract_CancellationLimitDays number
?To_ProposalContract_CancellationLimitDays=0
From_ProposalContract_CancellationLimitDays number
?From_ProposalContract_CancellationLimitDays=10
To_ProposalContract_ContractTerm date
?To_ProposalContract_ContractTerm=2010-01-01T20:32
From_ProposalContract_ContractTerm date
?From_ProposalContract_ContractTerm=2010-01-01T20:32
To_ProposalContract_CancellationDate date
?To_ProposalContract_CancellationDate=2010-01-01T20:32
From_ProposalContract_CancellationDate date
?From_ProposalContract_CancellationDate=2010-01-01T20:32
To_ProposalContract_BillingDay number
?To_ProposalContract_BillingDay=0
From_ProposalContract_BillingDay number
?From_ProposalContract_BillingDay=10
To_ProposalContract_Quantity number
?To_ProposalContract_Quantity=0
From_ProposalContract_Quantity number
?From_ProposalContract_Quantity=10

Example request

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

Example response


{
    "Records": [{
        "Id": 1234567,
        "Proposal": ,
        "Tariff": ,
        "Price": ,
        "StartDate": ,
        "CancellationLimitDays": ,
        "ContractTerm": ,
        "CancellationDate": ,
        "BillingDay": ,
        "Quantity": ,
        "DiscountCode": ,
        "FloorPlanDeskIds": "Abc123456",
        "FloorPlanDeskNames": "Abc123456",
        "ProposalContractProposalCoworker_Id": "...",
        "ProposalContractProposalCoworker_Email": "...",
        "ProposalContractProposalCoworker_FullName": "...",
        "ProposalContractTariffName": "...",
        "ProposalContractTariffInvoiceEvery": "...",
        "ProposalContractTariffInvoiceEveryWeeks": "...",
        "ProposalContractTariffPrice": "...",
        "ProposalContractTariffBusiness_Currency_Code": "...",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "967df66f-4ca5-441a-ac98-b0bc96d6cfe6",
        "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 ProposalContracts by IDs

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

πŸ”’ Requires role "ProposalContract-List"

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

Example request

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

Example response


{
    "Records": [{
        "Id": 1234567,
        "Proposal": ,
        "Tariff": ,
        "Price": ,
        "StartDate": ,
        "CancellationLimitDays": ,
        "ContractTerm": ,
        "CancellationDate": ,
        "BillingDay": ,
        "Quantity": ,
        "DiscountCode": ,
        "FloorPlanDeskIds": "Abc123456",
        "FloorPlanDeskNames": "Abc123456",
        "ProposalContractProposalCoworker_Id": "...",
        "ProposalContractProposalCoworker_Email": "...",
        "ProposalContractProposalCoworker_FullName": "...",
        "ProposalContractTariffName": "...",
        "ProposalContractTariffInvoiceEvery": "...",
        "ProposalContractTariffInvoiceEveryWeeks": "...",
        "ProposalContractTariffPrice": "...",
        "ProposalContractTariffBusiness_Currency_Code": "...",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "2d526f4e-f8ce-411b-99f8-8fcb5c9b9cd7",
        "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 ProposalContract by Id

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

πŸ”’ Requires role "ProposalContract-Read"

URL parameters
Id: number requried

Example request

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

Example response


{
  "Id": 1234567,
  "BillingDay": ,
  "CancellationDate": ,
  "CancellationLimitDays": ,
  "ContractTerm": ,
  "DiscountCodeId": 12345678,
  "FloorPlanDeskIds": "Abc123456",
  "FloorPlanDeskNames": "Abc123456",
  "Price": ,
  "ProposalId": 12345678,
  "Quantity": ,
  "StartDate": ,
  "TariffId": 12345678,
  "CreatedOn": "2018-07-03T06:23:01Z",
  "UpdatedOn": "2020-01-01T21:57:21Z",
  "UpdatedBy": "System",
  "UniqueId": "73633164-f0ee-4652-bf20-ab174b481862",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Create new ProposalContract

Creates a new proposalcontract.
POST https://spaces.nexudus.com/api/billing/proposalcontracts

πŸ”’ Requires role "ProposalContract-Create"

Body parameters
ProposalId: number required
TariffId: number required
Price: decimal? optional
StartDate: DateTime? optional
CancellationLimitDays: int? optional
CancellationDate: DateTime? optional
BillingDay: int required
Quantity: int required
DiscountCodeId: number optional
FloorPlanDeskIds: string optional
FloorPlanDeskNames: string optional

Example request

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

{
    "ProposalId": 12345678,
    "TariffId": 12345678,
    "Desks": [12345678, 87654321],
    "Price": ,
    "StartDate": ,
    "CancellationLimitDays": ,
    "CancellationDate": ,
    "BillingDay": ,
    "Quantity": ,
    "DiscountCodeId": 12345678,
    "FloorPlanDeskIds": "Abc123456",
    "FloorPlanDeskNames": "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 ProposalContract

Updates an existing proposalcontract.
PUT https://spaces.nexudus.com/api/billing/proposalcontracts

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

πŸ”’ Requires role "ProposalContract-Edit"

Body parameters
Id: number required
The unique Id of the proposalcontract to update.
ProposalId: number cleared if missing
TariffId: number cleared if missing
Price: decimal? cleared if missing
StartDate: DateTime? cleared if missing
CancellationLimitDays: int? cleared if missing
ContractTerm: DateTime? cleared if missing
CancellationDate: DateTime? cleared if missing
BillingDay: int cleared if missing
Quantity: int cleared if missing
DiscountCodeId: number cleared if missing
FloorPlanDeskIds: string cleared if missing
FloorPlanDeskNames: string cleared if missing

Example request

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

{
    "Id": 12345678,
    "ProposalId": 12345678,
    "TariffId": 12345678,
    "Desks": [12345678, 87654321],
    "Price": ,
    "StartDate": ,
    "CancellationLimitDays": ,
    "CancellationDate": ,
    "BillingDay": ,
    "Quantity": ,
    "DiscountCodeId": 12345678,
    "FloorPlanDeskIds": "Abc123456",
    "FloorPlanDeskNames": "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 ProposalContract

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

πŸ”’ Requires role "ProposalContract-Delete"

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

Example request

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

Example request

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

Example request

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