Developer documentation

Customer to Customer Transfers

Use the Customer to Customer Transfers API to create, retrieve, and process transfers between customers. Access is restricted to users with the required roles.

Customer to Customer Transfers allow you to move stock from a variant owned by customer A to a variant owned by customer B. The API supports creating, retrieving, and requesting these transfers.

Access needs to be granted. Without access, the API returns 403 Forbidden. You can request access via your eWarehousing contact.

How do I get a customer_id?

To create a Customer to Customer Transfer you need two customer IDs:

  • customer: the source customer (the context in which you create the transfer, this one is placed in the request header X-Customer-Code)
  • to_customer: the destination customer (who will receive the stock)

You can retrieve these IDs via the Customers API. See the Customers page for more details and examples.

  • List all customers: GET /wms/customers/
  • Retrieve a specific customer: GET /wms/customers/:id/

Go to the Customers documentation

Response models

These response models describe the objects returned by this resource.

The transfer model

FieldDescription
id
stringOptional
Read-only.
to_customer
uuidOptional
-
created_at
datetimeOptional
Read-only.
external_reference
stringOptional
-
status
stringOptional
Read-only. Possible statuses: created | requested | processing | denied | accepted | cancelled

The transfer line model

FieldDescription
id
stringOptional
Read-only.
from_variant
objectOptional
Read-only. The resolved source variant object (matched from the article_code provided in the request)
to_variant
objectOptional
Read-only. The resolved destination variant object (created or matched for the destination customer)
quantity
integerOptional
-
finalized_quantity
integerOptional
Read-only.

List all transfers

GET/wms/customer-to-customer-transfers/

Retrieve a collection of transfers. By default you get base information; expand the response using the Expand header.

Try it

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

GET

Request attributes

FieldDescription
from
dateOptional
Accepts a date in the format YYYY-MM-DD.
to
dateOptional
Accepts a date in the format YYYY-MM-DD.
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`.
sort
stringOptional
Sorting field for the transfer collection.
Request examplecURL
curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/customer-to-customer-transfers/
Response exampleJSON
[
  {
    "id": "8a6f0bc3-5a3c-4e3a-9f7e-1e2b3c4d5e6f",
    "to_customer": "53b5a543-129a-403c-9a6e-3d9c525ffa5b",
    "created_at": "2025-01-10T12:45:00+00:00",
    "external_reference": "TEST-C2C-ROLE-001",
    "status": "requested"
  }
]

Retrieve a transfer

GET/wms/customer-to-customer-transfers/:id/

Retrieve details for a specific transfer. Use the Expand header to include lines in the response.

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/customer-to-customer-transfers/8a6f0bc3-5a3c-4e3a-9f7e-1e2b3c4d5e6f \
  -H 'Expand: customer_to_customer_transfer_lines'
Response exampleJSON
{
  "id": "8a6f0bc3-5a3c-4e3a-9f7e-1e2b3c4d5e6f",
  "to_customer": "53b5a543-129a-403c-9a6e-3d9c525ffa5b",
  "created_at": "2025-01-10T12:45:00+00:00",
  "external_reference": "TEST-C2C-ROLE-001",
  "status": "requested",
  "customer_to_customer_transfer_lines": [
    {
      "id": "2e7f2c3d-1c2b-4a5d-9e6f-7a8b9c0d1e2f",
      "from_variant": {
        "id": "f2894c16-399e-4ca1-9151-489775a6519c"
      },
      "to_variant": {
        "id": "87557e7a-4f4d-44eb-bbf1-c9d83df90099"
      },
      "quantity": 5,
      "finalized_quantity": 0
    }
  ]
}

Create a transfer

POST/wms/customer-to-customer-transfers/

Create a new customer-to-customer transfer.

Request vs Response: you send article_code in the request, but the API returns resolved from_variant and to_variant objects in the response.
Expand is only used to control the response body. It is not required to send Expand for creating a transfer.

Try it

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

POST

Request attributes

FieldDescriptionExample value
customer
uuidRequired
The source customer in whose context the transfer is created.
external_reference
stringRequired
External reference for the transfer.
customer_to_customer_transfer_lines
array of transfer linesRequired
At least 1 line.See nested fields below
Expand customer_to_customer_transfer_lines
customer_to_customer_transfer_lines[].article_codestringRequired

Universal identifier that matches against variant article_code, EAN, or SKU to identify the source variant.

customer_to_customer_transfer_lines[].quantityintegerRequired

Quantity to transfer.

Request examplecURL
curl -X POST 'https://eu-dev.middleware.ewarehousing-solutions.com/wms/customer-to-customer-transfers/' \
  -H 'Content-Type: application/json' \
  --data-raw '{
    "customer": "53b5a543-129a-403c-9a6e-3d9c525ffa5b",
    "external_reference": "TEST-C2C-ROLE-001",
    "to_customer": "53b5a543-129a-403c-9a6e-3d9c525ffa5b",
    "customer_to_customer_transfer_lines": [
      {
        "article_code": "VBP_A",
        "quantity": 5
      }
    ]
  }'
Response exampleJSON
{
  "id": "8a6f0bc3-5a3c-4e3a-9f7e-1e2b3c4d5e6f",
  "to_customer": "53b5a543-129a-403c-9a6e-3d9c525ffa5b",
  "created_at": "2025-01-10T12:45:00+00:00",
  "external_reference": "TEST-C2C-ROLE-001",
  "status": "created",
  "customer_to_customer_transfer_lines": [
    {
      "id": "2e7f2c3d-1c2b-4a5d-9e6f-7a8b9c0d1e2f",
      "from_variant": {
        "id": "f2894c16-399e-4ca1-9151-489775a6519c"
      },
      "to_variant": {
        "id": "87557e7a-4f4d-44eb-bbf1-c9d83df90099"
      },
      "quantity": 5,
      "finalized_quantity": 0
    }
  ]
}

Update a transfer

PATCH/wms/customer-to-customer-transfers/:id/

Update transfer metadata as long as the transfer has not been requested yet.

After performing the request action, a transfer can no longer be updated. Attempts will result in HTTP 412 Precondition Failed.

Try it

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

PATCH

Path parameters

Request attributes

FieldDescriptionExample value
external_reference
stringOptional
Updated external reference.
Request examplecURL
curl -X PATCH https://eu-dev.middleware.ewarehousing-solutions.com/wms/customer-to-customer-transfers/8a6f0bc3-5a3c-4e3a-9f7e-1e2b3c4d5e6f/ \
  -H 'Content-Type: application/json' \
  --data-raw '{
    "external_reference": "TEST-C2C-ROLE-001-UPDATED"
  }'

Request a transfer

PUT/wms/customer-to-customer-transfers/:id/request

Moves the transfer to status

requested
.

Request examplecURL
curl -X PUT https://eu-dev.middleware.ewarehousing-solutions.com/wms/customer-to-customer-transfers/8a6f0bc3-5a3c-4e3a-9f7e-1e2b3c4d5e6f/request

Cancel a transfer

PUT/wms/customer-to-customer-transfers/:id/cancel

Cancels the transfer.

Request attributes

FieldDescriptionExample value
note
stringOptional
Cancellation note.
Request examplecURL
curl -X PUT https://eu-dev.middleware.ewarehousing-solutions.com/wms/customer-to-customer-transfers/8a6f0bc3-5a3c-4e3a-9f7e-1e2b3c4d5e6f/cancel \
    -H 'Content-Type: application/json' \
    --data-raw '{"note": "Cancel for testing"}'