Developer documentation

Modifications

Use the Modifications API to create, retrieve, and manage inventory adjustments (stock corrections, defects).

Modifications are used to adjust product inventory for one or more products. A reason for a modification can be a stock correction or a defect product.

Response models

These response models describe the objects returned by this resource.

The modification model

FieldDescription
id
stringOptional
Read-only.
reference
stringOptional
-
reason
stringOptional
-
status
stringOptional
-
note
stringOptional
-

The modification line model

FieldDescription
variant
VariantOptional
-
location
objectOptional
-
quantity
integerOptional
-

List all modifications

GET/wms/modifications/

Retrieves a collection of modifications

Try it

Send a live request against the development middleware using your current API test session.

GET

Request attributes

FieldDescription
status
stringOptional
Filter by status. Options: `created`, `approved`, or `disapproved`.
limit
integerOptional
Limit the number of results. Default is 50.
page
integerOptional
The page number to retrieve.
direction
stringOptional
Sort direction. Options: `asc` or `desc`. Default is `desc`.
sort
stringOptional
Sort field. Options: `createdAt` or `status`. Default is `createdAt`.
Request examplecURL
curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/modifications/
Response exampleJSON
[
  {
    "id": "cd708aa1-2e45-402f-b92b-55bc8c97b5db",
    "created_at": "2022-04-25T08:32:52+00:00",
    "reference": "MOD00000000006",
    "reason": "CORRECTION",
    "status": "approved",
    "note": "Coffee spilled over jacket"
  },
  {
    "id": "058508a3-f7eb-4e99-b134-6f22002ede43",
    "created_at": "2021-12-22T09:08:28+00:00",
    "reference": "MOD00000000004",
    "reason": "CORRECTION",
    "status": "created",
    "note": "Create correction"
  }
]

Retrieve a modification

GET/wms/modifications/:id/

Retrieve a single modification.

Try it

Send a live request against the development middleware using your current API test session.

GET

Path parameters

Request examplecURL
curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/modifications/e710389a-5505-49d4-9b99-8314f3543427
Response exampleJSON
{
  "id": "cd708aa1-2e45-402f-b92b-55bc8c97b5db",
  "created_at": "2022-04-25T08:32:52+00:00",
  "reference": "MOD00000000006",
  "reason": "CORRECTION",
  "status": "approved",
  "note": "Koffie over het jacket heen gevallen",
  "modification_lines": [
    {
      "variant": {
        "id": "f9cc7e9c-7ac2-45df-b4a3-1a19321c144d",
        "article_code": "green_jacket",
        "name": "Green",
        "description": "The best green jacket ever created",
        "ean": "123",
        "sku": null,
        "hs_tariff_code": "123456789",
        "height": 40,
        "depth": 40,
        "width": 40,
        "weight": 400,
        "expirable": false,
        "country_of_origin": "NL",
        "using_serial_numbers": false,
        "value": 50.45
      },
      "location": {
        "id": "ecb6ad58-4e43-401f-a0e1-51a5fa53704d"
      },
      "quantity": -1
    }
  ]
}

Create a modification

POST/wms/modification/

This endpoint allows you to add a new modification

Try it

Send a live request against the development middleware using your current API test session.

POST

Request attributes

FieldDescriptionExample value
note
stringRequired
Human-readable note describing the modification.
reason
stringRequired
Reason code. Options: `LOST`, `DEFECTIVE`, or `CORRECTION`.
modification_lines
array of modification linesRequired
One or more stock modification lines.Not editable here
Request examplecURL
curl -X POST 'https://eu-dev.middleware.ewarehousing-solutions.com/wms/modifications/' \
            -H 'Content-Type: application/json' \
            --data-raw '{
            "note": "Koffie over het jacket heen gevallen",
            "reason": "CORRECTION",
            "modification_lines": [
                {
                    "quantity": -1,
                    "variant": "f2894c16-399e-4ca1-9151-489775a6519c",
                    "location": "a875f7fb-415c-4c0b-bc84-c1f2de25a246"
                }
            ]
        }'
Response exampleJSON
{
  "id": "cd708aa1-2e45-402f-b92b-55bc8c97b5db",
  "created_at": "2022-04-25T08:32:52+00:00",
  "reference": "MOD00000000006",
  "reason": "CORRECTION",
  "status": "created",
  "note": "Koffie over het jacket heen gevallen",
  "modification_lines": [
    {
      "variant": {
        "id": "f2894c16-399e-4ca1-9151-489775a6519c",
        "article_code": "green_jacket",
        "name": "Green",
        "description": "The best green jacket ever created",
        "ean": "123",
        "sku": null,
        "hs_tariff_code": "123456789",
        "height": 40,
        "depth": 40,
        "width": 40,
        "weight": 400,
        "expirable": false,
        "country_of_origin": "NL",
        "using_serial_numbers": false,
        "value": 50.45
      },
      "location": {
        "id": "a875f7fb-415c-4c0b-bc84-c1f2de25a246"
      },
      "quantity": -1
    }
  ]
}