---
schema_version: "1"
id: 6475b9f6ac7e12b87b0cc589ad910a79ec2977b640d69eaa93a276bbd0c02395
title: ConnectApi.RankAverageDistanceInputRepresentation
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_connectapi_input_rank_average_distance.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_rank_average_distance.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: a5570aac96798d2ae3b7ee057eb6ed71a4f54cb93d45746c14ae86eaf11d60f8
description: An order recipient’s geographic location and information about sets of inventory locations that can fulfill the order.
---
# ConnectApi.RankAverageDistanceInputRepresentation

An order recipient’s geographic location and information about sets of inventory locations that can fulfill the order.

| Property | Type | Description | Required or Optional | Available Version |
| --- | --- | --- | --- | --- |
| deliveryCountryCode | String | The country code of the order recipient. | Required | 51.0 |
| deliveryPostalCode | String | The postal code of the order recipient. | Required | 51.0 |
| distanceUnit | String | Specify mi or km to return average distances in miles or kilometers, respectively. |  | 51.0 |
| sortResult | String | Specify ASC or DESC to rank the results by average shipping distance in ascending or descending order, respectively. |  | 51.0 |
| targetLocations | [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<[ConnectApi.​TargetLocation​InputRepresentation](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_target_location.htm "A set of inventory locations that together can fulfill an order.")\> | Each element is a set of inventory locations that can combine to fulfill the order. | At least one element is required | 51.0 |