Reference

Coworkerledgerentry

The coworkerledgerentry object

Attributes
Id: int required, autogenerated, unique
The unique identifier for this coworkerledgerentry
Balance: decimal required
BusinessId: Id required
Code: string required
ConnectedTransactionGuid: Guid? optional
CoworkerId: Id required
CoworkerInvoiceId: Id optional
Credit: decimal required
Debit: decimal required
Description: string required
PaymentGatewayName: Nexudus.Coworking.Core.Enums.ePaymentProvider? optional
PaymentMethodNumber: string optional
TransactionDate: DateTime? optional
UniqueId: Guid required, autogenerated, unique
The globally unique identifier for this coworkerledgerentry
SystemId: string optional api-only
User defined data about this coworkerledgerentry. This property can only be seen and updated using the API.

Json Structure Example


{
  "Id": 1234567,
  "Balance": 1.2,
  "BusinessId": 12345678,
  "Code": "00001",
  "ConnectedTransactionGuid": ,
  "CoworkerId": 12345678,
  "CoworkerInvoiceId": 12345678,
  "Credit": 1.2,
  "Debit": 1.2,
  "Description": "Descripción",
  "PaymentGatewayName": 1,
  "PaymentMethodNumber": "0",
  "TransactionDate": ,
  "UniqueId": "ae352cd4-0c13-4cc5-91ea-3fe3a27c4f8b",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Find a CoworkerLedgerEntry

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

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

🔒 Requires role "CoworkerLedgerEntry-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=TransactionDate
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 coworkerledgerentry records based on their different properties.
Id number
?Id=12345678
CoworkerLedgerEntry_Balance decimal
?CoworkerLedgerEntry_Balance=...
CoworkerLedgerEntry_Business Business
?CoworkerLedgerEntry_Business=...
CoworkerLedgerEntry_Code string
?CoworkerLedgerEntry_Code=...
CoworkerLedgerEntry_ConnectedTransactionGuid Guid?
?CoworkerLedgerEntry_ConnectedTransactionGuid=...
CoworkerLedgerEntry_Coworker Coworker
?CoworkerLedgerEntry_Coworker=...
CoworkerLedgerEntry_CoworkerInvoice CoworkerInvoice
?CoworkerLedgerEntry_CoworkerInvoice=...
CoworkerLedgerEntry_Credit decimal
?CoworkerLedgerEntry_Credit=...
CoworkerLedgerEntry_Debit decimal
?CoworkerLedgerEntry_Debit=...
CoworkerLedgerEntry_Description string
?CoworkerLedgerEntry_Description=...
CoworkerLedgerEntry_PaymentGatewayName Nexudus.Coworking.Core.Enums.ePaymentProvider?
?CoworkerLedgerEntry_PaymentGatewayName=...
CoworkerLedgerEntry_PaymentMethodNumber string
?CoworkerLedgerEntry_PaymentMethodNumber=...
CoworkerLedgerEntry_TransactionDate DateTime?
?CoworkerLedgerEntry_TransactionDate=...
CoworkerLedgerEntry_BusinessName string
?CoworkerLedgerEntry_BusinessName=...
CoworkerLedgerEntry_BusinessCurrency_Code string
?CoworkerLedgerEntry_BusinessCurrency_Code=...
CoworkerLedgerEntry_CoworkerFullName string
?CoworkerLedgerEntry_CoworkerFullName=...
CoworkerLedgerEntry_CoworkerInvoiceInvoiceNumber string
?CoworkerLedgerEntry_CoworkerInvoiceInvoiceNumber=...
CoworkerLedgerEntry_CoworkerInvoiceTotalAmount string
?CoworkerLedgerEntry_CoworkerInvoiceTotalAmount=...
CoworkerLedgerEntry_CoworkerInvoiceBillToName string
?CoworkerLedgerEntry_CoworkerInvoiceBillToName=...
CoworkerLedgerEntry_CoworkerInvoicePaid string
?CoworkerLedgerEntry_CoworkerInvoicePaid=...
CoworkerLedgerEntry_CoworkerInvoicePaidOn string
?CoworkerLedgerEntry_CoworkerInvoicePaidOn=...
CoworkerLedgerEntry_CoworkerInvoiceRefunded string
?CoworkerLedgerEntry_CoworkerInvoiceRefunded=...
CoworkerLedgerEntry_CoworkerInvoiceRefundedOn string
?CoworkerLedgerEntry_CoworkerInvoiceRefundedOn=...
CoworkerLedgerEntry_CoworkerInvoiceDueDate string
?CoworkerLedgerEntry_CoworkerInvoiceDueDate=...
CoworkerLedgerEntry_CoworkerInvoiceDraft string
?CoworkerLedgerEntry_CoworkerInvoiceDraft=...

Range search querystring parameters
Lets you search coworkerledgerentry records based on a range of date or numeric values.
To_CoworkerLedgerEntry_CreatedOn date
?To_CoworkerLedgerEntry_CreatedOn=2010-01-01T20:32
From_CoworkerLedgerEntry_CreatedOn date
?From_CoworkerLedgerEntry_CreatedOn=2010-01-01T20:32
To_CoworkerLedgerEntry_UpdatedOn date
?To_CoworkerLedgerEntry_UpdatedOn=2010-01-01T20:32
From_CoworkerLedgerEntry_UpdatedOn date
?From_CoworkerLedgerEntry_UpdatedOn=2010-01-01T20:32
To_CoworkerLedgerEntry_Debit number
?To_CoworkerLedgerEntry_Debit=0
From_CoworkerLedgerEntry_Debit number
?From_CoworkerLedgerEntry_Debit=10
To_CoworkerLedgerEntry_Credit number
?To_CoworkerLedgerEntry_Credit=0
From_CoworkerLedgerEntry_Credit number
?From_CoworkerLedgerEntry_Credit=10
To_CoworkerLedgerEntry_TransactionDate date
?To_CoworkerLedgerEntry_TransactionDate=2010-01-01T20:32
From_CoworkerLedgerEntry_TransactionDate date
?From_CoworkerLedgerEntry_TransactionDate=2010-01-01T20:32
To_CoworkerLedgerEntry_Balance number
?To_CoworkerLedgerEntry_Balance=0
From_CoworkerLedgerEntry_Balance number
?From_CoworkerLedgerEntry_Balance=10

Example request

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

Example response


{
    "Records": [{
        "Id": 1234567,
        "Business": ,
        "Coworker": ,
        "CoworkerInvoice": ,
        "Description": "Descripción",
        "Code": "00001",
        "Debit": 1.2,
        "Credit": 1.2,
        "PaymentGatewayName": 1,
        "PaymentMethodNumber": "0",
        "TransactionDate": ,
        "Balance": 1.2,
        "ConnectedTransactionGuid": ,
        "CoworkerLedgerEntryBusinessName": "...",
        "CoworkerLedgerEntryBusinessCurrency_Code": "...",
        "CoworkerLedgerEntryCoworkerFullName": "...",
        "CoworkerLedgerEntryCoworkerInvoiceInvoiceNumber": "...",
        "CoworkerLedgerEntryCoworkerInvoiceTotalAmount": "...",
        "CoworkerLedgerEntryCoworkerInvoiceBillToName": "...",
        "CoworkerLedgerEntryCoworkerInvoicePaid": "...",
        "CoworkerLedgerEntryCoworkerInvoicePaidOn": "...",
        "CoworkerLedgerEntryCoworkerInvoiceRefunded": "...",
        "CoworkerLedgerEntryCoworkerInvoiceRefundedOn": "...",
        "CoworkerLedgerEntryCoworkerInvoiceDueDate": "...",
        "CoworkerLedgerEntryCoworkerInvoiceDraft": "...",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "4cf92e3f-8706-4628-a36e-12224c7c05df",
        "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 CoworkerLedgerEntries by IDs

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

🔒 Requires role "CoworkerLedgerEntry-List"

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

Example request

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

Example response


{
    "Records": [{
        "Id": 1234567,
        "Business": ,
        "Coworker": ,
        "CoworkerInvoice": ,
        "Description": "Descripción",
        "Code": "00001",
        "Debit": 1.2,
        "Credit": 1.2,
        "PaymentGatewayName": 1,
        "PaymentMethodNumber": "0",
        "TransactionDate": ,
        "Balance": 1.2,
        "ConnectedTransactionGuid": ,
        "CoworkerLedgerEntryBusinessName": "...",
        "CoworkerLedgerEntryBusinessCurrency_Code": "...",
        "CoworkerLedgerEntryCoworkerFullName": "...",
        "CoworkerLedgerEntryCoworkerInvoiceInvoiceNumber": "...",
        "CoworkerLedgerEntryCoworkerInvoiceTotalAmount": "...",
        "CoworkerLedgerEntryCoworkerInvoiceBillToName": "...",
        "CoworkerLedgerEntryCoworkerInvoicePaid": "...",
        "CoworkerLedgerEntryCoworkerInvoicePaidOn": "...",
        "CoworkerLedgerEntryCoworkerInvoiceRefunded": "...",
        "CoworkerLedgerEntryCoworkerInvoiceRefundedOn": "...",
        "CoworkerLedgerEntryCoworkerInvoiceDueDate": "...",
        "CoworkerLedgerEntryCoworkerInvoiceDraft": "...",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "908109f8-188e-46b8-8f47-157ee4c8b931",
        "SystemId": "{ metadata: { id: 887766, processed: true } }"
    }],
    "CurrentPageSize": 25,
    "CurrentPage": 1,
    "CurrentOrderField": "TransactionDate",
    "CurrentSortDirection": 1,
    "FirstItem": 1,
    "HasNextPage": true,
    "HasPreviousPage": false,
    "LastItem": 1,
    "PageNumber": 1,
    "PageSize": 25,
    "TotalItems": 1,
    "TotalPages": 1
}


Get single CoworkerLedgerEntry by Id

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

🔒 Requires role "CoworkerLedgerEntry-Read"

URL parameters
Id: number requried

Example request

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

Example response


{
  "Id": 1234567,
  "Balance": 1.2,
  "BusinessId": 12345678,
  "Code": "00001",
  "ConnectedTransactionGuid": ,
  "CoworkerId": 12345678,
  "CoworkerInvoiceId": 12345678,
  "Credit": 1.2,
  "Debit": 1.2,
  "Description": "Descripción",
  "PaymentGatewayName": 1,
  "PaymentMethodNumber": "0",
  "TransactionDate": ,
  "CreatedOn": "2018-07-03T06:23:01Z",
  "UpdatedOn": "2020-01-01T21:57:21Z",
  "UpdatedBy": "System",
  "UniqueId": "dd7a9b04-e94a-43bc-a886-774ada8f6c0d",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Create new CoworkerLedgerEntry

Creates a new coworkerledgerentry.
POST https://spaces.nexudus.com/api/billing/coworkerledgerentries

🔒 Requires role "CoworkerLedgerEntry-Create"

Body parameters
BusinessId: number required
CoworkerId: number required
CoworkerInvoiceId: number optional
Description: string required
Code: string required
Debit: decimal required
Credit: decimal required
PaymentGatewayName: Nexudus.Coworking.Core.Enums.ePaymentProvider? optional
PaymentMethodNumber: string optional
TransactionDate: DateTime? optional
Balance: decimal required
ConnectedTransactionGuid: Guid? optional

Example request

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

{
    "BusinessId": 12345678,
    "CoworkerId": 12345678,
    "CoworkerInvoiceId": 12345678,
    "Description": "Descripción",
    "Code": "00001",
    "Debit": 1.2,
    "Credit": 1.2,
    "PaymentGatewayName": 1, //(check Enumerated values section below)
    "PaymentMethodNumber": "0",
    "TransactionDate": ,
    "Balance": 1.2,
    "ConnectedTransactionGuid": ,
}


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 CoworkerLedgerEntry

Updates an existing coworkerledgerentry.
PUT https://spaces.nexudus.com/api/billing/coworkerledgerentries

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

🔒 Requires role "CoworkerLedgerEntry-Edit"

Body parameters
Id: number required
The unique Id of the coworkerledgerentry to update.
BusinessId: number cleared if missing
CoworkerId: number cleared if missing
CoworkerInvoiceId: number cleared if missing
Description: string cleared if missing
Code: string cleared if missing
Debit: decimal cleared if missing
Credit: decimal cleared if missing
PaymentMethodNumber: string cleared if missing
TransactionDate: DateTime? cleared if missing
Balance: decimal cleared if missing
ConnectedTransactionGuid: Guid? cleared if missing

Example request

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

{
    "Id": 12345678,
    "BusinessId": 12345678,
    "CoworkerId": 12345678,
    "CoworkerInvoiceId": 12345678,
    "Description": "Descripción",
    "Code": "00001",
    "Debit": 1.2,
    "Credit": 1.2,
    "PaymentGatewayName": 1, //(check Enumerated values section below)
    "PaymentMethodNumber": "0",
    "TransactionDate": ,
    "Balance": 1.2,
    "ConnectedTransactionGuid": ,
}


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 CoworkerLedgerEntry

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

🔒 Requires role "CoworkerLedgerEntry-Delete"

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

Example request

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

Example request

GET https://spaces.nexudus.com/api/billing/coworkerledgerentries/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 coworkerledgerentry record IDs.
POST https://spaces.nexudus.com/api/billing/coworkerledgerentries/runacommand
🔒 Requires role "CoworkerLedgerEntry-Edit"

Example request

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

PaymentGatewayName

GET /api/utils/enums?name=ePaymentProvider

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.