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/api/configurations/expiry
Response

config found.

Body
createdstring (date-time)

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-time)

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

Example: "2020-02-03T09:45:51.525Z"
version*integer (int64)

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

Example: 42
Request
const response = await fetch('/api/configurations/expiry', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "provisioningTimeOffsetInMinutes": 0
}

Update Existing or Create New Configuration:

Change the tenant wide configuration

PUT/api/configurations/expiry
Body

Desired configuration to create/update

createdstring (date-time)

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-time)

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

Example: "2020-02-03T09:45:51.525Z"
version*integer (int64)

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

Example: 42
Response

The configuration was successfully updated.

Body
createdstring (date-time)

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-time)

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

Example: "2020-02-03T09:45:51.525Z"
version*integer (int64)

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

Example: 42
Request
const response = await fetch('/api/configurations/expiry', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "provisioningTimeOffsetInMinutes": 0
    }),
});
const data = await response.json();
Response
{
  "provisioningTimeOffsetInMinutes": 0
}

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/api/expiries
Query parameters
Response

found entities in the result.

Body
id*string

Generated identifier of this entity

Example: "611c860f-3f00-4b01-9f4c-64cdee38a30e"
version*integer (int64)

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

Example: 42
processVersioninteger (int64)

the version of the process this expiry entity belongs to, needed for preventing of faulty changes via late messages

Example: 42
created*string (date-time)

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

Example: "2020-02-03T08:45:51.525Z"
lastModified*string (date-time)

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

Example: "2020-02-03T09:45:51.525Z"
processRef*string

Reference to the Process of this Entity

Example: "c4e5fb70-a893-4ffa-b7b0-e042cda6fb9f"
provisioningTime*string (date-time)

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

Example: "2020-02-03T08:45:51.525Z"
expiryTime*string (date-time)

Time where the connected process expires, if not fulfilled

Example: "2020-02-03T08:45:51.525Z"
status*ExpiryEntityStatus (enum)
ACTIVEINACTIVE
Request
const response = await fetch('/api/expiries', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "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"
  }
]

Read Specific Entity:

Get Expiry by Id

GET/api/expiries/{expiryId}
Path parameters
expiryId*string

id for the searched entity

Response

found entity in the result.

Body
id*string

Generated identifier of this entity

Example: "611c860f-3f00-4b01-9f4c-64cdee38a30e"
version*integer (int64)

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

Example: 42
processVersioninteger (int64)

the version of the process this expiry entity belongs to, needed for preventing of faulty changes via late messages

Example: 42
created*string (date-time)

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

Example: "2020-02-03T08:45:51.525Z"
lastModified*string (date-time)

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

Example: "2020-02-03T09:45:51.525Z"
processRef*string

Reference to the Process of this Entity

Example: "c4e5fb70-a893-4ffa-b7b0-e042cda6fb9f"
provisioningTime*string (date-time)

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

Example: "2020-02-03T08:45:51.525Z"
expiryTime*string (date-time)

Time where the connected process expires, if not fulfilled

Example: "2020-02-03T08:45:51.525Z"
status*ExpiryEntityStatus (enum)
ACTIVEINACTIVE
Request
const response = await fetch('/api/expiries/{expiryId}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "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/api/expiries
Body
processRef*string

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

Example: "c4e5fb70-a893-4ffa-b7b0-e042cda6fb9f"
provisioningTime*string (date-time)

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

Example: "2020-02-03T08:45:51.525Z"
status*ExpiryEntityStatus (enum)
ACTIVEINACTIVE
Response

created entity in the result.

Body
id*string

Generated identifier of this entity

Example: "611c860f-3f00-4b01-9f4c-64cdee38a30e"
version*integer (int64)

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

Example: 42
processVersioninteger (int64)

the version of the process this expiry entity belongs to, needed for preventing of faulty changes via late messages

Example: 42
created*string (date-time)

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

Example: "2020-02-03T08:45:51.525Z"
lastModified*string (date-time)

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

Example: "2020-02-03T09:45:51.525Z"
processRef*string

Reference to the Process of this Entity

Example: "c4e5fb70-a893-4ffa-b7b0-e042cda6fb9f"
provisioningTime*string (date-time)

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

Example: "2020-02-03T08:45:51.525Z"
expiryTime*string (date-time)

Time where the connected process expires, if not fulfilled

Example: "2020-02-03T08:45:51.525Z"
status*ExpiryEntityStatus (enum)
ACTIVEINACTIVE
Request
const response = await fetch('/api/expiries', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "processRef": "c4e5fb70-a893-4ffa-b7b0-e042cda6fb9f",
      "provisioningTime": "2020-02-03T08:45:51.525Z",
      "status": "ACTIVE"
    }),
});
const data = await response.json();
Response
{
  "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/api/expiries/{expiryId}
Path parameters
expiryId*string

id of the entity to be changed

Body
version*integer

version of the entity you want to alter

provisioningTimestring (date-time)

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

Example: "2020-02-03T08:45:51.525Z"
statusExpiryEntityStatus (enum)
ACTIVEINACTIVE
Response

changed entity in the result.

Body
id*string

Generated identifier of this entity

Example: "611c860f-3f00-4b01-9f4c-64cdee38a30e"
version*integer (int64)

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

Example: 42
processVersioninteger (int64)

the version of the process this expiry entity belongs to, needed for preventing of faulty changes via late messages

Example: 42
created*string (date-time)

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

Example: "2020-02-03T08:45:51.525Z"
lastModified*string (date-time)

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

Example: "2020-02-03T09:45:51.525Z"
processRef*string

Reference to the Process of this Entity

Example: "c4e5fb70-a893-4ffa-b7b0-e042cda6fb9f"
provisioningTime*string (date-time)

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

Example: "2020-02-03T08:45:51.525Z"
expiryTime*string (date-time)

Time where the connected process expires, if not fulfilled

Example: "2020-02-03T08:45:51.525Z"
status*ExpiryEntityStatus (enum)
ACTIVEINACTIVE
Request
const response = await fetch('/api/expiries/{expiryId}', {
    method: 'PATCH',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "version": 0
    }),
});
const data = await response.json();
Response
{
  "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