# Uber Direct credential requirements

Prior to shipping with Uber Direct, you must configure credentials in the [Shipium Console](https://partner.shipium.com/login). You'll provide a client ID, client secret, and customer ID for production and for test mode.

Uber Direct's service methods and their identifiers are listed on the [Supported Carriers](https://docs.shipium.com/docs/supported-carriers#uber-direct) page.

# Additional requirements

For single-parcel shipments, the following additional fields should be nested in the `shipmentParameters` property. For [multi-parcel shipments](https://docs.shipium.com/docs/multi-parcel-shipments), they should be included in `multiParcelShipmentParameters`. While a phone number is required for both the shipper and recipient, the other fields are optional.

## Required fields

| Request field                          | Details                                                                                 |
|----------------------------------------|-----------------------------------------------------------------------------------------|
| `shipFromAddress.phoneNumber`         | **Type:** String<br>**Description:** The phone number of the contact for the origin address |
| `destinationAddress.phoneNumber`      | **Type:** String<br>**Description:** The phone number of the contact for the destination address |

## Conditional fields

| Request field                              | Details                                                                                                     |
|--------------------------------------------|-------------------------------------------------------------------------------------------------------------|
| `pickupWindow.startWindow.hour`           | **Type:** Integer (int32)<br>**Condition:** Required when including `pickupWindow`<br>**Description:** The start time hour for the pickup timeframe |
| `pickupWindow.startWindow.minute`         | **Type:** Integer (int32)<br>**Condition:** Required when including `pickupWindow`<br>**Description:** The start time minute for the pickup timeframe |
| `pickupWindow.startWindow.second`         | **Type:** Integer (int32)<br>**Condition:** Required when including `pickupWindow`<br>**Description:** The start time second for the pickup timeframe |
| `pickupWindow.startWindow.nano`           | **Type:** Integer (int32)<br>**Condition:** Required when including `pickupWindow`<br>**Description:** The start time nano for the pickup timeframe |
| `pickupWindow.endWindow.hour`             | **Type:** Integer (int32)<br>**Condition:** Required when including `pickupWindow`<br>**Description:** The end time hour for the pickup timeframe |
| `pickupWindow.endWindow.minute`           | **Type:** Integer (int32)<br>**Condition:** Required when including `pickupWindow`<br>**Description:** The end time minute for the pickup timeframe |
| `pickupWindow.endWindow.second`           | **Type:** Integer (int32)<br>**Condition:** Required when including `pickupWindow`<br>**Description:** The end time second for the pickup timeframe |
| `pickupWindow.endWindow.nano`             | **Type:** Integer (int32)<br>**Condition:** Required when including `pickupWindow`<br>**Description:** The end time nano for the pickup timeframe |

## Optional fields

| Request field                                                      | Details                                                                                                           |
|-------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| `lastMileDeliveryOptions.deliveryInstruction`                     | **Type:** String (enumeration)<br>**Values:**`Leave_At_Door` or `Meet_At_Door`<br>**Description:** Instructions passed to the carrier on how to handle the last mile of delivery |
| `lastMileDeliveryOptions.undeliverableInstruction`               | **Type:** String (enumeration)<br>**Values:**`Leave_At_Door`, `Return`, `Destroy`<br>**Description:** Instructions passed to the carrier on how to handle packages that go undelivered |
| `lastMileDeliveryOptions.tip.tipType`                             | **Type:** String (enumeration)<br>**Values:**`fixed` or `percentage`<br>**Description:** The way the tip ought to be applied; the default value is `fixed`. |
| `lastMileDeliveryOptions.tip.tipValue`                            | **Type:** Number (float)<br>**Description:** The value to be passed through as a tip amount |
| `lastMileDeliveryOptions.tip.currencyCode`                        | **Type:** String<br>**Example:**`usd`<br>**Description:** The 3-character [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) currency code of the tip |
| `lastMileDeliveryOptions.tipForLabelCreate.tipType`              | **Type:** String (enumeration)<br>**Values:**`fixed` or `percentage`<br>**Description:** The way the tip ought to be applied; the default value is `fixed`. |
| `lastMileDeliveryOptions.tipForLabelCreate.tipValue`             | **Type:** Number (float)<br>**Description:** The value to be passed through as a tip amount |
| `lastMileDeliveryOptions.tipForLabelCreate.currencyCode`         | **Type:** String<br>**Example:**`usd`<br>**Description:** The 3-character [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) currency code of the tip |
| `lastMileDeliveryOptions.deliverableActionForLabelCreate`        | **Type:** String (enumeration)<br>**Values:**`Return`, `Leave_At_Door`, `Discard` or `Meet_At_Door`<br>**Description:** Instructions passed to the carrier on how to handle a deliverable delivery |
| `lastMileDeliveryOptions.undeliverableActionForLabelCreate`      | **Type:** String (enumeration)<br>**Values:**`Return`, `Leave_At_Door`, `Discard` or `Meet_At_Door`<br>**Description:** Instructions passed to the carrier on how to handle an undeliverable delivery |
| `pickupWindow.timeZone.id`                                        | **Type:** String<br>**Description:** The string ID for the time zone for this delivery window; if no time zone is passed, the time zone will be taken from the destination address. |
| `pickupWindow.timeZone.rules.fixedOffset`                         | **Type:** Boolean<br>**Values:**`true` or `false`<br>**Description:** When `true`, this indicates that there is a fixed offset for the time zone. |
| `pickupWindow.timeZone.rules.transitions.offsetBefore.totalSeconds`| **Type:** Integer (int32)<br>**Description:** The total seconds of the offset before |
| `pickupWindow.timeZone.rules.transitions.offsetBefore.id`         | **Type:** String<br>**Description:** The string ID of the offset before |
| `pickupWindow.timeZone.rules.transitions.offsetAfter.totalSeconds` | **Type:** Integer (int32)<br>**Description:** The total seconds of the offset after |
| `pickupWindow.timeZone.rules.transitions.offsetAfter.id`          | **Type:** String<br>**Description:** The string ID of the offset after |
| `pickupWindow.timeZone.rules.transitions.duration.seconds`        | **Type:** Integer (int64)<br>**Description:** The number of seconds of the pickup window's duration |
| `pickupWindow.timeZone.rules.transitions.duration.zero`          | **Type:** Boolean<br>**Values:**`true` or `false`<br>**Description:** When `true`, this indicates that there is a zero-value duration for the pickup window. |
| `pickupWindow.timeZone.rules.transitions.duration.nano`          | **Type:** Integer (int32)<br>**Description:** The number of nanos of the pickup window's duration |
| `pickupWindow.timeZone.rules.transitions.duration.negative`      | **Type:** Boolean<br>**Values:**`true` or `false`<br>**Description:** When `true`, this indicates that there is a negative duration for the pickup window. |
| `pickupWindow.timeZone.rules.transitions.duration.units.durationEstimated` | **Type:** Boolean<br>**Values:**`true` or `false`<br>**Description:** When `true`, this indicates that the duration units are estimated. |
| `pickupWindow.timeZone.rules.transitions.duration.units.timeBased` | **Type:** Boolean<br>**Values:**`true` or `false`<br>**Description:** When `true`, this indicates that the duration units are time based. |
| `pickupWindow.timeZone.rules.transitions.duration.units.dateBased` | **Type:** Boolean<br>**Values:**`true` or `false`<br>**Description:** When `true`, this indicates that the duration units are date based. |
| `pickupWindow.timeZone.rules.transitions.gap`                    | **Type:** Boolean<br>**Values:**`true` or `false`<br>**Description:** When `true`, this indicates that there is a gap in the pickup window. |
| `pickupWindow.timeZone.rules.transitions.dateTimeAfter`          | **Type:** String (date-time)<br>**Description:** The date-time after the pickup window |
| `pickupWindow.timeZone.rules.transitions.dateTimeBefore`         | **Type:** String (date-time)<br>**Description:** The date-time before the pickup window |
| `pickupWindow.timeZone.rules.transitions.overlap`                | **Type:** Boolean<br>**Values:**`true` or `false`<br>**Description:** When `true`, this indicates that there is overlap in the pickup window. |
| `pickupWindow.timeZone.rules.transitions.instant`                | **Type:** String (date-time)<br>**Description:** The date-time instant of the pickup window |
| `pickupWindow.timeZone.rules.transitionRules.month`              | **Type:** String (enumeration)<br>**Values:**`January`, `February`, `March`, `April`, `May`, `June`, `July`, `August`, `September`, `October`, `November`, `December`<br>**Description:** The month of the transition rule |
| `pickupWindow.timeZone.rules.transitionRules.timeDefinition`     | **Type:** String (enumeration)<br>**Values:**`utc`, `wall`, `standard`<br>**Description:** The time definition of the transition rule |
| `pickupWindow.timeZone.rules.transitionRules.standardOffset.totalSeconds` | **Type:** Integer (int32)<br>**Description:** The total seconds of the standard offset |
| `pickupWindow.timeZone.rules.transitionRules.standardOffset.id`  | **Type:** String<br>**Description:** The string ID for the standard offset |
| `pickupWindow.timeZone.rules.transitionRules.offsetBefore.totalSeconds` | **Type:** Integer (int32)<br>**Description:** The total seconds of the offset before |
| `pickupWindow.timeZone.rules.transitionRules.offsetBefore.id`     | **Type:** String<br>**Description:** The string ID of the offset before |
| `pickupWindow.timeZone.rules.transitionRules.offsetAfter.totalSeconds` | **Type:** Integer (int32)<br>**Description:** The total seconds of the offset after |
| `pickupWindow.timeZone.rules.transitionRules.offsetAfter.id`      | **Type:** String<br>**Description:** The string ID of the offset after |
| `pickupWindow.timeZone.rules.transitionRules.dayOfWeek`          | **Type:** String (enumeration)<br>**Values:**`Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`<br>**Description:** The weekday of the transition rule |
| `pickupWindow.timeZone.rules.transitionRules.dayOfMonthIndicator` | **Type:** Integer (int32)<br>**Description:** The number of the day of the month of the transition rule |
| `pickupWindow.timeZone.rules.transitionRules.localTime.hour`     | **Type:** Integer (int32)<br>**Description:** The hour of the local time that ends the pickup window |
| `pickupWindow.timeZone.rules.transitionRules.localTime.minute`   | **Type:** Integer (int32)<br>**Description:** The minute of the local time that ends the pickup window |
| `pickupWindow.timeZone.rules.transitionRules.localTime.second`   | **Type:** Integer (int32)<br>**Description:** The second of the local time that ends the pickup window |
| `pickupWindow.timeZone.rules.transitionRules.localTime.nano`     | **Type:** Integer (int32)<br>**Description:** The nano of the local time that ends the pickup window |
| `pickupWindow.timeZone.rules.transitionRules.midnightEndOfDay`   | **Type:** Boolean<br>**Values:**`true` or `false`<br>**Description:** When `true`, this indicates that the pickup window ends at midnight. |

A snippet of the JSON request for the API call with the required and optional fields is included. This example is for a single-parcel shipment. A multi-parcel shipment would be included in `multiParcelShipmentParameters`.
