Table of Contents

Struct LoadRecordsRequest

Namespace
Vonage.Reports.LoadRecords
Assembly
Vonage.dll

Represents a request to load records synchronously from the Reports API.

[Builder(new string[] { })]
public readonly struct LoadRecordsRequest : IVonageRequest
Implements
Inherited Members

Properties

AccountId

Sets the account ID (API key) to search records for.

[Mandatory(1)]
public string AccountId { get; }

Property Value

string

Examples

.WithAccountId("12aa3456")

AccountRef

Sets the account reference filter. Optional for SMS.

public Maybe<string> AccountRef { get; }

Property Value

Maybe<string>

Examples

.WithAccountRef("customer1234")

CallId

Sets the unique call identifier filter. Optional for AMD, ASR, VOICE-CALL, VOICE-FAILED, and WEBSOCKET-CALL.

public Maybe<string> CallId { get; }

Property Value

Maybe<string>

Examples

.WithCallId("dfc0c915f38ae6701d7d114cde2556b1-1")

Channel

Sets the verification channel filter. Optional for VERIFY-V2.

public Maybe<RecordChannel> Channel { get; }

Property Value

Maybe<RecordChannel>

Examples

.WithChannel(RecordChannel.SilentAuth)

ConversationId

Sets the conversation ID filter. Optional for CONVERSATION-EVENT, CONVERSATION-MESSAGE, and IN-APP-VOICE.

public Maybe<string> ConversationId { get; }

Property Value

Maybe<string>

Examples

.WithConversationId("CON-aaaaaaaa-bbbb-cccc-dddd-0123456789ab")

CorrelationId

Sets the correlation ID filter for Network API events. Optional for NETWORK-API-EVENT.

public Maybe<string> CorrelationId { get; }

Property Value

Maybe<string>

Examples

.WithCorrelationId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")

Country

Sets the ISO two-letter country code filter. Optional for SMS, VOICE-CALL, VOICE-FAILED, ASR, MESSAGES, VERIFY-API, VERIFY-V2, NUMBER-INSIGHT, NUMBER-INSIGHT-V2, and NETWORK-API-EVENT.

public Maybe<string> Country { get; }

Property Value

Maybe<string>

Examples

.WithCountry("GB")

Cursor

Sets the pagination cursor for retrieving the next page of results (date-based queries only).

public Maybe<string> Cursor { get; }

Property Value

Maybe<string>

Examples

.WithCursor("MTY0OTQ3ODAwMDAwMA")

DateEnd

Sets the end of the reporting period (exclusive). Defaults to the current time if not provided.

public Maybe<DateTimeOffset> DateEnd { get; }

Property Value

Maybe<DateTimeOffset>

Examples

.WithDateEnd(DateTimeOffset.Parse("2024-02-07T14:22:08+00:00"))

DateStart

Sets the start of the reporting period (inclusive). Defaults to seven days ago if not provided.

public Maybe<DateTimeOffset> DateStart { get; }

Property Value

Maybe<DateTimeOffset>

Examples

.WithDateStart(DateTimeOffset.Parse("2024-02-01T00:00:00+00:00"))

Direction

Sets the direction filter. Required for SMS and MESSAGES; optional for VOICE-CALL, VOICE-FAILED, and ASR.

public Maybe<RecordDirection> Direction { get; }

Property Value

Maybe<RecordDirection>

Examples

.WithDirection(RecordDirection.Outbound)

From

Sets the sender ID or number filter. Optional for SMS, MESSAGES, VOICE-CALL, VOICE-FAILED, and ASR.

public Maybe<string> From { get; }

Property Value

Maybe<string>

Examples

.WithFrom("447700900001")

Id

Sets the UUID of the message or call to search for. Accepts a comma-separated list of up to 20 UUIDs.

public Maybe<string> Id { get; }

Property Value

Maybe<string>

Examples

.WithId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")

IncludeMessage

Includes the message content in the response. Optional for SMS and MESSAGES.

public Maybe<bool> IncludeMessage { get; }

Property Value

Maybe<bool>

Examples

.WithIncludeMessage(true)

Iv

Sets the initialization vector for encrypted cursor pagination (date-based queries only).

public Maybe<string> Iv { get; }

Property Value

Maybe<string>

Examples

.WithIv("8a2c4e6f-12d3-45b6-78c9-0a1b2c3d4e5f")

LegId

Sets the unique leg identifier filter. Optional for IN-APP-VOICE.

public Maybe<string> LegId { get; }

Property Value

Maybe<string>

Examples

.WithLegId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")

Locale

Sets the language/locale filter. Optional for VERIFY-API and VERIFY-V2.

public Maybe<string> Locale { get; }

Property Value

Maybe<string>

Examples

.WithLocale("en-gb")

MeetingId

Sets the meeting ID filter. Optional for VIDEO-API.

public Maybe<string> MeetingId { get; }

Property Value

Maybe<string>

Examples

.WithMeetingId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")

Network

Sets the mobile network code filter. Optional for SMS, VOICE-CALL, VOICE-FAILED, ASR, VERIFY-API, VERIFY-V2, NUMBER-INSIGHT, NUMBER-INSIGHT-V2, and NETWORK-API-EVENT.

public Maybe<string> Network { get; }

Property Value

Maybe<string>

Examples

.WithNetwork("12345")

Number

Sets the phone number for lookup. Optional for NUMBER-INSIGHT and NUMBER-INSIGHT-V2.

public Maybe<string> Number { get; }

Property Value

Maybe<string>

Examples

.WithNumber("447700900000")

NumberType

Sets the number type filter. Optional for VERIFY-API.

public Maybe<string> NumberType { get; }

Property Value

Maybe<string>

Examples

.WithNumberType("mobile")

ParentRequestId

Sets the parent request ID filter. Optional for VERIFY-V2.

public Maybe<string> ParentRequestId { get; }

Property Value

Maybe<string>

Examples

.WithParentRequestId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")

Product

Sets the product to return records for.

[Mandatory(0)]
public ReportProduct Product { get; }

Property Value

ReportProduct

Examples

.WithProduct(ReportProduct.Sms)

ProductName

Sets the product name filter for Network API events. Optional for NETWORK-API-EVENT.

public Maybe<string> ProductName { get; }

Property Value

Maybe<string>

Examples

.WithProductName("simswap")

ProductPath

Sets the API path filter for Network API events. Optional for NETWORK-API-EVENT.

public Maybe<string> ProductPath { get; }

Property Value

Maybe<string>

Examples

.WithProductPath("/camara/sim-swap/v040/check")

Provider

Sets the messaging provider filter. Optional for MESSAGES.

public Maybe<MessagesProvider> Provider { get; }

Property Value

Maybe<MessagesProvider>

Examples

.WithProvider(MessagesProvider.WhatsApp)

RequestSessionId

Sets the request session ID filter for Network API events. Optional for NETWORK-API-EVENT.

public Maybe<string> RequestSessionId { get; }

Property Value

Maybe<string>

Examples

.WithRequestSessionId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")

RequestType

Sets the request type filter. Optional for NUMBER-INSIGHT-V2 and NETWORK-API-EVENT.

public Maybe<string> RequestType { get; }

Property Value

Maybe<string>

Examples

.WithRequestType("fraud-score")

Risk

Sets the risk assessment level filter. Optional for NUMBER-INSIGHT-V2.

public Maybe<string> Risk { get; }

Property Value

Maybe<string>

Examples

.WithRisk("high")

SessionId

Sets the session ID filter. Optional for VIDEO-API.

public Maybe<string> SessionId { get; }

Property Value

Maybe<string>

Examples

.WithSessionId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")

ShowConcatenated

Includes the concatenated field in the report. Optional for SMS with direction outbound.

public Maybe<bool> ShowConcatenated { get; }

Property Value

Maybe<bool>

Examples

.WithShowConcatenated(false)

Status

Sets the status filter. Optional for SMS, CONVERSATION-EVENT, IN-APP-VOICE, MESSAGES, VOICE-CALL, VERIFY-V2, and NUMBER-INSIGHT-V2.

public Maybe<string> Status { get; }

Property Value

Maybe<string>

Examples

.WithStatus("delivered")

Swapped

Filters by whether the number has been ported or swapped. Optional for NUMBER-INSIGHT-V2.

public Maybe<bool> Swapped { get; }

Property Value

Maybe<bool>

Examples

.WithSwapped(true)

To

Sets the recipient phone number filter. Optional for SMS, VOICE-CALL, VOICE-FAILED, ASR, MESSAGES, VERIFY-API, and VERIFY-V2.

public Maybe<string> To { get; }

Property Value

Maybe<string>

Examples

.WithTo("447700900000")

Methods

Build()

public static IBuilderForProduct Build()

Returns

IBuilderForProduct

BuildRequestMessage()

Converts the request to a HttpRequest.

public HttpRequestMessage BuildRequestMessage()

Returns

HttpRequestMessage

The Http request.