Expiry

This page is outdated. Please go to our new documentation under https://docs.fulfillmenttools.com/documentation.

The Expiry feature ensures seamless management of orders by automatically canceling them if they're not collected within a specified timeframe. This empowers our customers to free up reserved items and streamline their processes effectively.

How it works When an order is placed, a specified fulfillment time is set. If the purchase isn't collected within this timeframe, the expiry feature kicks in, automatically canceling the order and releasing the reserved items.

To activate this feature, the "provisioningTime" value must be passed through the order into the platform. Alternatively, an expiry entity can be created via our API.

Configuration

Configure the expiry feature by defining a buffer time which is added to the provisioning time to determine the expiry time.

Read Current Configuration:

Get the current configuration

get
Responses
200
config found.
application/json
get
GET /api/configurations/expiry HTTP/1.1
Host: 
Accept: */*
{
  "provisioningTimeOffsetInMinutes": 1,
  "created": "2020-02-03T08:45:51.525Z",
  "lastModified": "2020-02-03T09:45:51.525Z",
  "version": 42
}

Update Existing or Create New Configuration:

Change the tenant wide configuration

put
Body
provisioningTimeOffsetInMinutesintegerRequired
Responses
200
The configuration was successfully updated.
application/json
put
PUT /api/configurations/expiry HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 129

{
  "provisioningTimeOffsetInMinutes": 1,
  "created": "2020-02-03T08:45:51.525Z",
  "lastModified": "2020-02-03T09:45:51.525Z",
  "version": 42
}
{
  "provisioningTimeOffsetInMinutes": 1,
  "created": "2020-02-03T08:45:51.525Z",
  "lastModified": "2020-02-03T09:45:51.525Z",
  "version": 42
}

Expiry Entity

An expiry entity contains all the necessary information to manage the expiration process efficiently. It's closely linked to the order and the process. Once created, the expiry entity is regularly checked, and if the expiry time is reached, the associated process expires.

Read Existing Expiry Entities:

Get expiries by filter parameter

get
Query parameters
statusstring · enumOptional

Status to filter the results

Possible values:
processRefstringOptional

ProcessRef to filter the results

startDatestring · date-timeOptional

StartDate to filter the results. Expiry Date of results is after or equals the given value

Example: 2020-02-03T08:45:51.525Z
endDatestringOptional

EndDate to filter the results. Expiry Date of results is before or equals the given value

startAfterIdstringOptional

entity to start after

sizeintegerOptional

number of entities to show

Default: 25
Responses
200
found entities in the result.
application/json
get
GET /api/expiries HTTP/1.1
Host: 
Accept: */*
[]

Read Specific Entity:

Get Expiry by Id

get
Path parameters
expiryIdstringRequired

id for the searched entity

Responses
200
found entity in the result.
application/json
get
GET /api/expiries/{expiryId} HTTP/1.1
Host: 
Accept: */*
{
  "id": "611c860f-3f00-4b01-9f4c-64cdee38a30e",
  "version": 42,
  "processVersion": 42,
  "created": "2020-02-03T08:45:51.525Z",
  "lastModified": "2020-02-03T09:45:51.525Z",
  "processRef": "c4e5fb70-a893-4ffa-b7b0-e042cda6fb9f",
  "provisioningTime": "2020-02-03T08:45:51.525Z",
  "expiryTime": "2020-02-03T08:45:51.525Z",
  "status": "ACTIVE"
}

Create New Entity:

Create Expiry

post
Body
processRefstringRequired

Reference to the Process for which this expiry entity will be created

Example: c4e5fb70-a893-4ffa-b7b0-e042cda6fb9f
provisioningTimestring · date-timeRequired

Planned time where this entity should be provided or handed over to the customer

Example: 2020-02-03T08:45:51.525Z
statusstring · enumRequiredPossible values:
Responses
200
created entity in the result.
application/json
post
POST /api/expiries HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 117

{
  "processRef": "c4e5fb70-a893-4ffa-b7b0-e042cda6fb9f",
  "provisioningTime": "2020-02-03T08:45:51.525Z",
  "status": "ACTIVE"
}
{
  "id": "611c860f-3f00-4b01-9f4c-64cdee38a30e",
  "version": 42,
  "processVersion": 42,
  "created": "2020-02-03T08:45:51.525Z",
  "lastModified": "2020-02-03T09:45:51.525Z",
  "processRef": "c4e5fb70-a893-4ffa-b7b0-e042cda6fb9f",
  "provisioningTime": "2020-02-03T08:45:51.525Z",
  "expiryTime": "2020-02-03T08:45:51.525Z",
  "status": "ACTIVE"
}

Note: There can only be one expiry entity for each process

Update Existing Entity:

Update Expiry

patch
Path parameters
expiryIdstringRequired

id of the entity to be changed

Body
versionintegerRequired

version of the entity you want to alter

provisioningTimestring · date-timeOptional

Planned time where this entity should be provided or handed over to the customer

Example: 2020-02-03T08:45:51.525Z
statusstring · enumOptionalPossible values:
Responses
200
changed entity in the result.
application/json
patch
PATCH /api/expiries/{expiryId} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "version": 1,
  "provisioningTime": "2020-02-03T08:45:51.525Z",
  "status": "ACTIVE"
}
{
  "id": "611c860f-3f00-4b01-9f4c-64cdee38a30e",
  "version": 42,
  "processVersion": 42,
  "created": "2020-02-03T08:45:51.525Z",
  "lastModified": "2020-02-03T09:45:51.525Z",
  "processRef": "c4e5fb70-a893-4ffa-b7b0-e042cda6fb9f",
  "provisioningTime": "2020-02-03T08:45:51.525Z",
  "expiryTime": "2020-02-03T08:45:51.525Z",
  "status": "ACTIVE"
}

Note: If updated, the expiry time will be recalculated based on the new information.

This comprehensive expiry feature ensures efficient order management and seamless process automation for our customers.

Last updated

Was this helpful?