# Fax Outbound UDR Report

This example retrieves outbound fax Usage Detail Records (UDRs) for a given period. Each record covers the full lifecycle from job submission through final transmission, including call metrics, retries, processing timeline, delivery status, and billing fields.

For complete field definitions and advanced options, see the [GraphQL API Reference](https://developers.retarus.com/common/sdl).

## Query

```graphql
query faxOutUdrReport (
  $customerId: String!
  $filterFax: FaxOutColumnUdrFilters
  $datePeriod: DatePeriod!
  $pageIndex: Int
  $pageSize: Int
  $sort: SortDirection
) {
  faxOutUdrReport(
    customerId: $customerId
    datePeriod: $datePeriod
    filter: $filterFax
    page: $pageIndex
    size: $pageSize
    sort: $sort      
  ) {
    content {
      faxId
      jobId
      accountId
      accountName
      accountServerId
      accountService
      attemptPages
      attemptSeqNo
      baudRate
      billedCountry
      callConnectedAt
      callDuration
      calledCountry
      calledCsId
      calledNumber
      calledZone
      callEndedAt
      callingTsId
      callInviteAt
      docPages
      faxCustomerRef
      jobArchivePurgeAt
      jobBillingCode
      jobBillingInfo
      jobCustomerId
      jobCustomerRef
      jobCustomerResolution
      jobCustomerStartFaxAt
      jobCustomerTags
      jobExpress
      jobPersonalized
      jobSubmissionDc
      jobSubmittedAt
      keyTimestamp
      lastAttemptEndedAt
      lastAttemptSeqNo
      maxPageTransmitted
      processingFinalAt
      statusCode
      statusName
      statusReason
      sumCallDurations
      sumPagesTransmitted
      timeToFirstDial
      virtualPagesBilled
    }
    pageIndex
    pageSize
    hasMoreElements
  }
}
```

## Variables

```json
{
	"customerId": "XXXXX",
	"datePeriod": {
		"fromIncluded": "2025-06-04T08:00:00.000Z",
		"toExcluded": "2025-06-04T08:54:00.000Z"
	},
	"filterFax": {
		"statusName": { "values": ["OK"] },
		"jobBillingCode": { "notValues": ["ITS999"] }
	},
	"pageIndex": 0,
	"pageSize": 3,
	"sort": "ASC"
}
```

> **Filter**  The `filterFax` value above returns only successful transmissions (`statusName` = `OK`) and excludes billing code `ITS999`. See [Filtering](/common/graphql-examples#filtering) for how `values` (logical OR) and `notValues` (logical AND NOT) combine.


## Response

```json
{
	"data": {
		"faxOutUdrReport": {
			"content": [
				{
					"faxId": "MN683FFD052XXXXXXXXXXX",
					"jobId": "MF68XXXXXXXXXXX5AA0000",
					"accountId": "outbound_fax_account_id@example.com",
					"accountName": "outbound_fax_account_name@example.com",
					"accountServerId": "Mail2Fax_00032983219",
					"accountService": "M2F",
					"attemptPages": 1,
					"attemptSeqNo": 1,
					"baudRate": 33600,
					"billedCountry": "DEU",
					"callConnectedAt": "2025-06-04T08:00:10Z",
					"callDuration": 14000,
					"calledCountry": "DEU",
					"calledCsId": "+49611*********",
					"calledNumber": "+49611*********",
					"calledZone": 1,
					"callEndedAt": "2025-06-04T08:00:24Z",
					"callingTsId": "+49611*********",
					"callInviteAt": "2025-06-04T08:00:10Z",
					"docPages": 1,
					"faxCustomerRef": "RoundTrip_04.06.2025 10:00:03",
					"jobArchivePurgeAt": "2025-06-18T08:00:05Z",
					"jobBillingCode": "ITS065",
					"jobBillingInfo": "",
					"jobCustomerId": "XXXXX",
					"jobCustomerRef": "RoundTrip_04.06.2025 10:00:03",
					"jobCustomerResolution": "204x196",
					"jobCustomerStartFaxAt": "2025-06-04T08:00:05Z",
					"jobCustomerTags": null,
					"jobExpress": false,
					"jobPersonalized": false,
					"jobSubmissionDc": "FRAIX1",
					"jobSubmittedAt": "2025-06-04T08:00:02Z",
					"keyTimestamp": "2025-06-04T08:00:24Z",
					"lastAttemptEndedAt": "2025-06-04T08:00:24Z",
					"lastAttemptSeqNo": 1,
					"maxPageTransmitted": 1,
					"processingFinalAt": "2025-06-04T08:00:28.599Z",
					"statusCode": "2.1.0",
					"statusName": "OK",
					"statusReason": "OK",
					"sumCallDurations": 14000,
					"sumPagesTransmitted": 1,
					"timeToFirstDial": 5000,
					"virtualPagesBilled": 0
				}
				// more items ...
			],
			"pageIndex": 0,
			"pageSize": 3,
			"hasMoreElements": true
		}
	}
}
```

> **Note**  Additional records (up to the requested `pageSize`) are omitted for brevity.


## Field reference

| **Field** | **Description** |
|  --- | --- |
| `faxId` | Unique identifier for this specific fax transmission attempt |
| `jobId` | Unique identifier for the overall fax job (may include multiple transmission attempts) |
| `accountId` | Customer account identifier used for job submission |
| `accountName` | Display name of the customer account |
| `accountServerId` | Internal server identifier for the account |
| `accountService` | Service type used for transmission |
| `attemptPages` | Number of pages transmitted in this specific attempt |
| `attemptSeqNo` | Sequence number of this transmission attempt (1 for first attempt, 2 for retry, etc.) |
| `baudRate` | Fax transmission speed in bits per second |
| `billedCountry` | ISO 3166-1 alpha-3 country code used for billing |
| `callConnectedAt` | UTC timestamp when the call was established |
| `callDuration` | Call duration in milliseconds (connect → disconnect) for this attempt |
| `calledCountry` | ISO 3166-1 alpha-3 country code of the destination number |
| `calledCsId` | Called subscriber identifier from the fax protocol |
| `calledNumber` | Destination fax number in international format |
| `calledZone` | Billing zone classification for the destination number |
| `callEndedAt` | UTC timestamp when the call was ended |
| `callingTsId` | Calling terminal subscriber identifier sent in the fax header |
| `callInviteAt` | UTC timestamp when the call initiation began |
| `docPages` | Total number of pages in the submitted document |
| `faxCustomerRef` | Customer-provided reference for this fax |
| `jobArchivePurgeAt` | UTC timestamp when job archive data will be automatically deleted |
| `jobBillingCode` | Cost center or department code for billing |
| `jobBillingInfo` | Additional billing information or notes |
| `jobCustomerId` | Customer identifier associated with the job |
| `jobCustomerRef` | Customer-provided reference for the job |
| `jobCustomerResolution` | Requested fax resolution as `horizontal` x `vertical` DPI |
| `jobCustomerStartFaxAt` | UTC timestamp when the customer requested fax transmission to begin |
| `jobCustomerTags` | Customer-defined tags (null if none) |
| `jobExpress` | Whether priority/express transmission was requested |
| `jobPersonalized` | Whether personalized content was used |
| `jobSubmissionDc` | Data center where the job was submitted |
| `jobSubmittedAt` | UTC timestamp when the job was submitted to the system |
| `keyTimestamp` | Primary record timestamp used for chronological sorting |
| `lastAttemptEndedAt` | UTC timestamp when the final transmission attempt ended |
| `lastAttemptSeqNo` | Sequence number of the last transmission attempt |
| `maxPageTransmitted` | Highest page number successfully transmitted across all attempts |
| `processingFinalAt` | UTC timestamp when all job processing was completed |
| `statusCode` | Detailed status code indicating the transmission result |
| `statusName` | Human-readable transmission status |
| `statusReason` | Reason/details for the final status |
| `sumCallDurations` | Total call time in milliseconds across all attempts |
| `sumPagesTransmitted` | Total pages successfully transmitted across all attempts |
| `timeToFirstDial` | Time in milliseconds from job submission to first dial attempt |
| `virtualPagesBilled` | Number of pages used for billing |