Locked orders

There are use-cases where not every order should be fulfilled as soon as possible. In some cases it might me necessary to do some manual checks on an order, e.g. customer verification or fraud detection. Locked orders are routed to a facility but do not result in a pickJob until they are unlocked.

Create locked Orders

How to create a Click-and-Collect locked order:
curl -sSL -X POST 'https://your.api.fulfillmenttools.com/api/orders' \
  --header 'Authorization: Bearer <TOKEN>' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "consumer": {
    "addresses": [
      {
        "salutation": "Mr.",
        "firstName": "Test",
        "lastName": "Customer",
        "street": "Domstr.",
        "houseNumber": "20",
        "postalCode": "50668",
        "city": "Köln",
        "country": "DE"
      }
    ],
    "email": "customer@mail.com"
  },
  "orderDate": "2023-03-06T17:30:00Z",
  "status": "LOCKED",
  "statusReasons": [{
        "status": "LOCKED",
        "reason": "Fraud check necessary."
  }],
  "tenantOrderId": "order-111",
  "customAttributes": {
    "someInternalId": "xyz-123"
  },
  "deliveryPreferences": {
    "targetTime": "2023-03-08T14:00:00Z",
    "collect": [
      {
        "paid": true,
        "facilityRef": "<facility-id>"
      }
    ]
  },
  "orderLineItems": [
    {
      "quantity": 2,
      "article": {
        "tenantArticleId": "111222333",
        "title": "T-Shirt",
        "imageUrl": "https://loremflickr.com/320/240/shirt",
        "attributes": [
          {
            "key": "%%subtitle%%",
            "value": "Super Brand",
            "category": "descriptive",
            "priority": 100
          },
          {
            "key": "Color",
            "value": "white",
            "category": "descriptive",
            "priority": 101
          },
          {
            "key": "Size",
            "value": "M",
            "category": "descriptive",
            "priority": 102
          }
        ]
      },
      "scannableCodes": [
        "5714500878421"
      ],
      "customAttributes": {
        "someInternalId": "0815"
      }
    }
  ]
}'

Some details on the example:

  • A locked order has the same details and properties as a order that should be fulfilled the standard way.

  • The status is LOCKED which means, that there are no further operational entities, e.g. pick jobs are created.

  • In the optional statusReasons, you can set a reason per status you set the order in.

Unlock locked orders

To unlock an order, call the orders action UNLOCK:

curl -sSL -X POST 'https://ocff-weirdweasel-git.api.fulfillmenttools.com/api/orders/YOUR-ORDER-ID/actions' \
  --header 'Authorization: Bearer <TOKEN>' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "name": "UNLOCK",
    "version": 1
}'

Last updated