Reference

Emailqueueitem

The emailqueueitem object

Attributes
Id: int required, autogenerated, unique
The unique identifier for this emailqueueitem
Body: string optional
BusinessId: Id required
CCEmails: string optional
CCOEmails: string optional
Delivered: bool optional
EmailAccountId: Id optional
FromEmail: string optional
FromUserId: Id optional
Header: string optional
LastSendError: string optional
SendDate: DateTime? optional
Sent: bool optional
SentAttempts: int required
ToEmails: string required
UniqueId: Guid required, autogenerated, unique
The globally unique identifier for this emailqueueitem
SystemId: string optional api-only
User defined data about this emailqueueitem. This property can only be seen and updated using the API.

Json Structure Example


{
  "Id": 1234567,
  "Body": "Body",
  "BusinessId": 12345678,
  "CCEmails": "CCEmails",
  "CCOEmails": "CCOEmails",
  "Delivered": false,
  "EmailAccountId": 12345678,
  "FromEmail": "FromEmails",
  "FromUserId": 12345678,
  "Header": "Header",
  "LastSendError": "Abc123456",
  "SendDate": ,
  "Sent": false,
  "SentAttempts": ,
  "ToEmails": "ToEmails",
  "UniqueId": "f3f38f3d-ecc7-425e-80ce-e19c18ee2ab2",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Find a EmailQueueItem

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

GET https://spaces.nexudus.com/api/sys/emailqueueitems?...

๐Ÿ”’ Requires role "EmailQueueItem-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 emailqueueitem records based on their different properties.
Id number
?Id=12345678
EmailQueueItem_Body string
?EmailQueueItem_Body=...
EmailQueueItem_Business Business
?EmailQueueItem_Business=...
EmailQueueItem_CCEmails string
?EmailQueueItem_CCEmails=...
EmailQueueItem_CCOEmails string
?EmailQueueItem_CCOEmails=...
EmailQueueItem_Delivered bool
?EmailQueueItem_Delivered=...
EmailQueueItem_EmailAccount EmailAccount
?EmailQueueItem_EmailAccount=...
EmailQueueItem_FromEmail string
?EmailQueueItem_FromEmail=...
EmailQueueItem_FromUser User
?EmailQueueItem_FromUser=...
EmailQueueItem_Header string
?EmailQueueItem_Header=...
EmailQueueItem_LastSendError string
?EmailQueueItem_LastSendError=...
EmailQueueItem_SendDate DateTime?
?EmailQueueItem_SendDate=...
EmailQueueItem_Sent bool
?EmailQueueItem_Sent=...
EmailQueueItem_SentAttempts int
?EmailQueueItem_SentAttempts=...
EmailQueueItem_ToEmails string
?EmailQueueItem_ToEmails=...

Range search querystring parameters
Lets you search emailqueueitem records based on a range of date or numeric values.
To_EmailQueueItem_CreatedOn date
?To_EmailQueueItem_CreatedOn=2010-01-01T20:32
From_EmailQueueItem_CreatedOn date
?From_EmailQueueItem_CreatedOn=2010-01-01T20:32
To_EmailQueueItem_UpdatedOn date
?To_EmailQueueItem_UpdatedOn=2010-01-01T20:32
From_EmailQueueItem_UpdatedOn date
?From_EmailQueueItem_UpdatedOn=2010-01-01T20:32
To_EmailQueueItem_SentAttempts number
?To_EmailQueueItem_SentAttempts=0
From_EmailQueueItem_SentAttempts number
?From_EmailQueueItem_SentAttempts=10
To_EmailQueueItem_SendDate date
?To_EmailQueueItem_SendDate=2010-01-01T20:32
From_EmailQueueItem_SendDate date
?From_EmailQueueItem_SendDate=2010-01-01T20:32

Example request

GET https://spaces.nexudus.com/api/sys/emailqueueitems?EmailQueueItem_Header=...
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example response


{
    "Records": [{
        "Id": 1234567,
        "Business": ,
        "EmailAccount": ,
        "FromUser": ,
        "Header": "Header",
        "Body": "Body",
        "FromEmail": "FromEmails",
        "ToEmails": "ToEmails",
        "CCEmails": "CCEmails",
        "CCOEmails": "CCOEmails",
        "Sent": false,
        "SentAttempts": ,
        "Delivered": false,
        "LastSendError": "Abc123456",
        "SendDate": ,
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "62c7d1c9-ed2f-4996-a731-4c8bb3a49a05",
        "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 EmailQueueItems by IDs

Gets one or more emailqueueitem records based on their Id.
GET https://spaces.nexudus.com/api/sys/emailqueueitems?EmailQueueItem_Id=[:id1,:id2,...]

๐Ÿ”’ Requires role "EmailQueueItem-List"

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

Example request

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

Example response


{
    "Records": [{
        "Id": 1234567,
        "Business": ,
        "EmailAccount": ,
        "FromUser": ,
        "Header": "Header",
        "Body": "Body",
        "FromEmail": "FromEmails",
        "ToEmails": "ToEmails",
        "CCEmails": "CCEmails",
        "CCOEmails": "CCOEmails",
        "Sent": false,
        "SentAttempts": ,
        "Delivered": false,
        "LastSendError": "Abc123456",
        "SendDate": ,
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "a2e33920-d91e-4393-8039-04d5e087100a",
        "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 EmailQueueItem by Id

Gets one emailqueueitem record by its Id.
GET https://spaces.nexudus.com/api/sys/emailqueueitems/:Id

๐Ÿ”’ Requires role "EmailQueueItem-Read"

URL parameters
Id: number requried

Example request

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

Example response


{
  "Id": 1234567,
  "Body": "Body",
  "BusinessId": 12345678,
  "CCEmails": "CCEmails",
  "CCOEmails": "CCOEmails",
  "Delivered": false,
  "EmailAccountId": 12345678,
  "FromEmail": "FromEmails",
  "FromUserId": 12345678,
  "Header": "Header",
  "LastSendError": "Abc123456",
  "SendDate": ,
  "Sent": false,
  "SentAttempts": ,
  "ToEmails": "ToEmails",
  "CreatedOn": "2018-07-03T06:23:01Z",
  "UpdatedOn": "2020-01-01T21:57:21Z",
  "UpdatedBy": "System",
  "UniqueId": "00b8b4b7-7343-4594-b67f-e06a174b4c02",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Create new EmailQueueItem

Creates a new emailqueueitem.
POST https://spaces.nexudus.com/api/sys/emailqueueitems

๐Ÿ”’ Requires role "EmailQueueItem-Create"

Body parameters
BusinessId: number required
EmailAccountId: number optional
FromUserId: number optional
Header: string optional
Body: string optional
FromEmail: string optional
ToEmails: string required
CCEmails: string optional
CCOEmails: string optional
Sent: bool optional
SentAttempts: int required
Delivered: bool optional
LastSendError: string optional
SendDate: DateTime? optional

Example request

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

{
    "BusinessId": 12345678,
    "EmailAccountId": 12345678,
    "FromUserId": 12345678,
    "Header": "Header",
    "Body": "Body",
    "FromEmail": "FromEmails",
    "ToEmails": "ToEmails",
    "CCEmails": "CCEmails",
    "CCOEmails": "CCOEmails",
    "Sent": false,
    "SentAttempts": ,
    "Delivered": false,
    "LastSendError": "Abc123456",
    "SendDate": ,
}


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"
        },
    ]
}


Commands

Commands allow to perform actions against one or more emailqueueitem 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 emailqueueitem records.
GET https://spaces.nexudus.com/api/sys/emailqueueitems/commands

Example request

GET https://spaces.nexudus.com/api/sys/emailqueueitems/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 emailqueueitem record IDs.
POST https://spaces.nexudus.com/api/sys/emailqueueitems/runacommand
๐Ÿ”’ Requires role "EmailQueueItem-Edit"

Example request

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