Delivery promise

The delivery promise endpoint supports the last step of the checkout journey. It can be requested when the consumer has already decided on what to buy and is about to make the purchase. At this point, the delivery method (for example, the click-and-collect facility or the consumer's address), the items in the cart, and the delivery preferences are known.

Since all relevant information is known, order routing can already be performed, and a preliminary reservation can be made.

Request and response

When sending a promise order, a routing decision is performed, and the respective stock is reserved. The response provides information on where fulfillment can be performed, when fulfillment is expected to be completed, and when delivery is expected to be completed.

If the consumer decides to buy, the promised order becomes a fulfillment order. If the consumer decides against the purchase, the stock reservation is removed after a configurable timeframe.

Create promise order

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body

PromiseRequest

customAttributesobjectOptional

Attributes that can be added to the order. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.

orderDatestring · date-timeRequired

The date this order was created at the supplying system.

Example: 2020-02-03T08:45:50.525Z
statusstring · enumOptional

The state of the order. Initially it is OPEN.

Possible values:
tenantOrderIdstringOptional

Field can be used as a reference number in foreign systems, for example as a reference to the source system's identifier for this order.

Example: R456728546
Responses
post
/api/promises/deliverypromise

Since this endpoint can be used in complex networks with combinatorial optimization, a resourceInvestment value can be passed in the request. This parameter accepts values between 0.0 and 1.0 and controls how much time the optimizer has to determine the best result.

For time-critical requests, we recommend a value < 0.5. For non-time-critical requests, we recommend a value of up to 1.0.

To determine the optimal value for your network, contact our support team.

Example uses

When a consumer reaches the final checkout page and enters their details, you can trigger the delivery promise endpoint to create the order in fulfillmenttools with a temporary status of PROMISED. The stock will be reserved, but no pick jobs have been created yet.

Then, multiple scenarios could happen:

  • If the consumer submits the order, you could use the CONFIRM_PROMISE action in the order action using the promised order ID, and update the status to OPEN. A pick job will then be created, and the order can be fulfilled.

The orderId is the orderRef you received in the promise response.

  • If the consumer leaves the checkout without placing an order and doesn't return, you can set a timeframe in the invalidAfterTime field of the promises configuration. This will automatically delete the order, and the stock will be released after this period.

  • If the consumer leaves the checkout without placing an order and returns before the defined timeframe has passed, you can use EXTEND_PROMISE in the order action to give the customer more time to complete checkout.

The orderID is the orderRef you received in the promise response.

Promises configuration

In the promises configuration, you can define the duration for all promises to be kept. Once this timeframe passes for each promise, the order will be automatically deleted and the stock released.

The time period uses the ISO 8601 duration format. The duration needs to be a multiple of 60 seconds.

The default duration is 8 hours (PT8H).

List promises

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

Promises configuration was found & you were allowed to access it. The result is in the body.

application/json

PromisesConfiguration

createdstring · date-timeOptional

The date this entity was created at the platform. This value is generated by the service.

Example: 2020-02-03T08:45:51.525Z
lastModifiedstring · date-timeOptional

The date this entity was modified last. This value is generated by the service.

Example: 2020-02-03T09:45:51.525Z
versioninteger · int64Required

The version of the document to be used in optimistic locking mechanisms.

Example: 42
idstringOptional
invalidAfterTimestringRequired

Default amount of time in ISO 8601 duration format after which an promised order becomes invalid and is cancelled. The duration need to be a multiple of 60 seconds.

Default: PT8HPattern: ^P(?:(\d+W)|(\d+Y)?(\d+M)?(\d+D)?(?:T(\d+H)?(\d+M)?(\d+S)?)?)$
get
/api/configurations/promises

Change promises config

put
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body

PromisesConfiguration

createdstring · date-timeOptional

The date this entity was created at the platform. This value is generated by the service.

Example: 2020-02-03T08:45:51.525Z
lastModifiedstring · date-timeOptional

The date this entity was modified last. This value is generated by the service.

Example: 2020-02-03T09:45:51.525Z
versioninteger · int64Required

The version of the document to be used in optimistic locking mechanisms.

Example: 42
idstringOptional
invalidAfterTimestringRequired

Default amount of time in ISO 8601 duration format after which an promised order becomes invalid and is cancelled. The duration need to be a multiple of 60 seconds.

Default: PT8HPattern: ^P(?:(\d+W)|(\d+Y)?(\d+M)?(\d+D)?(?:T(\d+H)?(\d+M)?(\d+S)?)?)$
Responses
200

The promisesConfiguration was successfully put.

application/json

PromisesConfiguration

createdstring · date-timeOptional

The date this entity was created at the platform. This value is generated by the service.

Example: 2020-02-03T08:45:51.525Z
lastModifiedstring · date-timeOptional

The date this entity was modified last. This value is generated by the service.

Example: 2020-02-03T09:45:51.525Z
versioninteger · int64Required

The version of the document to be used in optimistic locking mechanisms.

Example: 42
idstringOptional
invalidAfterTimestringRequired

Default amount of time in ISO 8601 duration format after which an promised order becomes invalid and is cancelled. The duration need to be a multiple of 60 seconds.

Default: PT8HPattern: ^P(?:(\d+W)|(\d+Y)?(\d+M)?(\d+D)?(?:T(\d+H)?(\d+M)?(\d+S)?)?)$
put
/api/configurations/promises

Last updated