---
agentTools:
  projectIndex: https://wonderment.readme.io/llms.txt
---

# Get delivery date predictions for shipping methods

# Delivery Promise API

The Delivery Promise API enables the gathering of delivery predictions for customers shopping on a website. The primary use case for this would be to display estimations on a product page for headless stores, but it could also be used in mobile apps and similar applications.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Delivery Promise API",
    "version": "1.0.0",
    "description": "API for predicting delivery dates for shipping methods."
  },
  "servers": [
    {
      "url": "/delivery-promise"
    }
  ],
  "paths": {
    "/predictions": {
      "get": {
        "summary": "Get delivery date predictions for shipping methods",
        "tags": [
          "Delivery Promise"
        ],
        "parameters": [
          {
            "name": "zip",
            "in": "query",
            "description": "Destination zip code",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipping_methods",
            "in": "query",
            "description": "Array of shipping method names to get predictions for",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "variant_ids",
            "in": "query",
            "description": "Array of product variant IDs",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with delivery predictions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "predictions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "shippingMethod": {
                            "type": "string",
                            "description": "Name of the shipping method"
                          },
                          "estimatedDeliveryDate": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Median estimated delivery date"
                          },
                          "minDate": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Earliest estimated delivery date"
                          },
                          "maxDate": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Latest estimated delivery date"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No predictions found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 104,
      "1": 119,
      "2": 228,
      "3": 133,
      "4": 137,
      "5": 187,
      "6": 179,
      "7": 81,
      "8": 128,
      "9": 246,
      "10": 46,
      "11": 240
    }
  }
}
```