---
schema_version: "1"
id: 36d4b5811915b0d44f28bbf9e46b82aed2ebc0c2d9bf0ccbd479014a8151b178
title: DateTimeSlot SPI
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/retail-cloud/reference/generated-api-specs/datetimeslot-spi.md
canonical_url: https://developer.salesforce.com/docs/commerce/retail-cloud/references/datetimeslot-spi
source_site: developer.salesforce.com
content_type: documentation
content_hash: ec4e7dc2ed75823c1f2553a87b9c2b83f5ed3d414a35ad1b05a6858a934ae7ba
products:
  - Point of Sale for Developers
  - Salesforce APIs
---
DateTimeSlot SPI

# DateTimeSlot SPI

[Download specification](https://developer.salesforce.com/static/commercecloud/retail-cloud/datetimeslot-spi/datetimeslot-spi-oas-public.yaml)

Merchant SPI to implement and provide an endpoint for the POS to get delivery/pickup dates and time slots for applicable items in the order. Merchants must provide an implementation of this API if they want the POS to trigger and get applicable delivery and pickup dates via their endpoint.

**Version:** 2.3.4

## Tags

### DateTimeSlot SPI

[Download specification](https://developer.salesforce.com/static/commercecloud/retail-cloud/datetimeslot-spi/datetimeslot-spi-oas-public.yaml)

Merchant SPI to implement and provide an endpoint for the POS to get delivery/pickup dates and time slots for applicable items in the order. Merchants must provide an implementation of this API if they want the POS to trigger and get applicable delivery and pickup dates via their endpoint.

## Operations

### POST Retrieve date-time slots.

`POST /merchant/spi/sample/endpoint/sa/datetime/slots/from/external/system`

Operation ID: `getDeliveryDates`. Tags: DateTimeSlot SPI.

Retrieve delivery or pickup dates and time slots from merchant's system. Merchants must implement this endpoint per this specification and then configure it in CMS under **CMS** > **Store Management** > **Integration** > **Custom API Connectors** > **Create**. Make sure to create the endpoint in CMS with the following details:

1.  Under **API Config**:
    *   **API Key:** `DATE_PICKER`
    *   **API Endpoint:** Provide the external endpoint
2.  Under **JSON Config**:
    *   **Integration Type:** `HTTP_POST`
    *   **JSON Headers:** Provide the header for the API. Headers can be Content-Type, Authorization attributes like clientId/password, for example: {"Content-Type":"application/json","client\_id":"myClientId","client\_secret":"myClientSecret"}.

#### Request body

Media type: `application/json`. Schema: `SpiDeliveryDatesRequest`.

#### Responses

*   **default** Default response.
    
    Media type: `application/json`. Schema: `SpiDateTimesResponse`.
    

## Schemas

### SpiDeliveryDatesRequest

Request object to get delivery/pickup dates for products belonging to the same group, that is, products with the same shipping address, delivery group, or fulfillment type.

*   `products` (_array of SpiProduct_, required) The list of products in this group for which the delivery / pickup dates are to be returned in the response.
*   `datePickerType` (_string_, required) The type of action for which the dates are to be selected. Valid values: DELIVERY & PICKUP.  
    Allowed values: `DELIVERY`, `PICKUP`.
*   `shippingMethodId` (_string_, nullable) The shipping method ID in case the shipping method is selected for delivery items.
*   `address` (_SPIAddress_)

### SpiDateTimesResponse

Response object that contains a set of delivery/pickup date and time slots for the products sent in the request.

*   `errorMessage` (_string_, nullable) Error message shown to the user.  
    Example: `Invalid request. Please check the request and try again.`.
*   `errorCode` (_string_, nullable) Error code shown to the user.  
    Example: `INTERNAL_ERROR`.
*   `dateTimeSlots` (_array of SpiDateTimeSlot_, required) The list of delivery/pickup date time slots for the products.
*   `availableDate` (_integer (int64)_, required) The first available date in epoch milliseconds that is eligible for delivery/pickup.
*   `dateTimeSlotType` (_string_, required) The type of date time slots provided. Valid values: Delivery & Pickup.  
    Allowed values: `Delivery`, `Pickup`.
*   `willCallDate` (_SpiDateTimeSlot_)
*   `error` (_boolean_)

### SpiProduct

The list of products in this group for which the delivery/pickup dates are to be returned in the response.

*   `productId` (_string_, required) Product ID.
*   `quantity` (_integer (int32)_, required) Product Quantity.
*   `gtin` (_string_) Product GTIN.

### SPIAddress

The full address of the destination of transaction.

*   `firstName` (_string_) Customer first name saved for address.
*   `lastName` (_string_) Customer last name saved for address.
*   `addressLine1` (_string_, required) Address Line 1.
*   `addressLine2` (_string_) Address Line 2.
*   `city` (_string_, required) City.
*   `state` (_string_) State.
*   `postalCode` (_string_, required) Postal Code.
*   `countryCode` (_string_, required) Country Code.
*   `phone` (_string_) Phone.
*   `storeId` (_string_) Store ID if it is store address.
*   `emailAddress` (_string_) Customer Email Address.

### SpiDateTimeSlot

The backup delivery/pickup date in case slots are not available or unknown. (Default value can also be set in Store settings using property 'deliveryDatePickerWillCall' ).

*   `slotId` (_string_, required) Slot ID, unique value for this delivery/pickup day/date.
*   `slotDate` (_integer (int64)_, required) Delivery date in epoch.
*   `selectedTimeSlot` (_string_, required) The default selected time slot for the delivery/pickup date.  
    Example: `09:00 - 12:00`.
*   `availableTimeSlots` (_array of string_, nullable) The list of other time slots available for delivery/pickup.
*   `shippingMethodId` (_string_, nullable) Shipping Method ID for this slot in case of delivery item.