Promise

Generate prediction

Changed on

If IP lookup fails or no delivery methods match, Backend uses fallback_country_iso3 when supplied. Matching IP methods take priority, even in another country. An empty prediction list after method selection does not trigger a fallback.

IP requests are limited to 60 per minute per caller IP. Excess requests return HTTP 429 with Retry-After. Country and postal code requests do not use this limit.

get/v4/promise/prediction/predict/

Request

  • The document declares no server URL.
  • Auth
    • API key in header Authorization
    • or HTTP bearer
    • or none

Query parameters

accountinteger required

Account ID

calibration'conservative' | 'balanced' | 'aggressive' | 'null' nullable

Set to true, to indicate that the prediction should be done based on the current, not yet published, promise configuration

  • conservative - conservative
  • balanced - balanced
  • aggressive - aggressive
courierstring nullable

The logistics courier to be used. Defaults to returning all configured couriers.

destination_country_iso3string nullable

ISO 3166-1 alpha-3 code of the destination country. Supply either this field or destination_ip_address.

destination_ip_addressstring nullable

Shopper IPv4 or IPv6 address for an estimated delivery location. Do not combine with destination_country_iso3 or destination_postal_code. IP lookup does not confirm a delivery address.

destination_postal_codestring nullable

Postal code of the destination. Requires destination_country_iso3.

dispatch_nowboolean

Forces the forecasted delivery date to skip any warehouse calculation and generate a prediction if the parcel is shipped at the moment of the API call, if set to 'true'

draftboolean nullable

Set to true, to indicate that the prediction should be done based on the current, not yet published, promise configuration

fallback_country_iso3string nullable

Optional ISO 3166-1 alpha-3 country for IP destinations. Used when IP lookup fails or no delivery methods match. Matching IP delivery methods take priority. The fallback uses no IP postal code or region.

language_iso2string nullable

Language code to use for localization. Plain language codes such as en or es are supported. Locale codes with country suffixes such as es_US or es-US are also accepted.

now_overridestring date-time nullable

Locks the prediction for a specified request date as a ISO 8601 date and time in UTC format like 2022-06-10T06:42:00Z. Defaults now to the current time if omitted, which is required for production usage.

service_levelstring nullable

The courier service level mapped in your Promise configuration (for example: express delivery). Defaults to returning all courier service levels.

tagstring nullable

Tag to target prediction adjustment rule

warehousestring nullable

The warehouse the delivery shipped from (input field: key). Defaults to the default warehouse for the destination.

Response

request_idstring required
successboolean required

Changes

    • info

      the endpoint scheme security HeaderToken was added to the API

    • info

      the endpoint scheme security OAuth2Authentication was added to the API

    • info

      added the new optional query request parameter destination_ip_address

    • info

      added the new optional query request parameter fallback_country_iso3

    • info

      the query request parameter destination_country_iso3 became optional

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status