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/
Response models
These response models describe the objects returned by this resource.
The transfer model
| Field | Description |
|---|---|
idstringOptional | Read-only. |
to_customeruuidOptional | - |
created_atdatetimeOptional | Read-only. |
external_referencestringOptional | - |
statusstringOptional | Read-only. Possible statuses: created | requested | processing | denied | accepted | cancelled |
The transfer line model
| Field | Description |
|---|---|
idstringOptional | Read-only. |
from_variantobjectOptional | Read-only. The resolved source variant object (matched from the article_code provided in the request) |
to_variantobjectOptional | Read-only. The resolved destination variant object (created or matched for the destination customer) |
quantityintegerOptional | - |
finalized_quantityintegerOptional | Read-only. |
List all transfers
/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.
Request attributes
| Field | Description |
|---|---|
fromdateOptional | Accepts a date in the format YYYY-MM-DD. |
todateOptional | Accepts a date in the format YYYY-MM-DD. |
limitintegerOptional | Limit the number of results. Default is 50. |
pageintegerOptional | The page number to retrieve. |
directionstringOptional | Sort direction. Options: `asc` or `desc`. |
sortstringOptional | Sorting field for the transfer collection. |
curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/customer-to-customer-transfers/[
{
"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
/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.
Path parameters
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'{
"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
/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.
Request attributes
| Field | Description | Example value |
|---|---|---|
customeruuidRequired | The source customer in whose context the transfer is created. | |
external_referencestringRequired | External reference for the transfer. | |
customer_to_customer_transfer_linesarray of transfer linesRequired | At least 1 line. | See nested fields below |
Expand customer_to_customer_transfer_lines→customer_to_customer_transfer_lines[].article_codestringRequiredUniversal identifier that matches against variant article_code, EAN, or SKU to identify the source variant. customer_to_customer_transfer_lines[].quantityintegerRequiredQuantity to transfer. | ||
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
}
]
}'{
"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
/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.
Path parameters
Request attributes
| Field | Description | Example value |
|---|---|---|
external_referencestringOptional | Updated external reference. |
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
/wms/customer-to-customer-transfers/:id/requestMoves the transfer to status
requested
.
curl -X PUT https://eu-dev.middleware.ewarehousing-solutions.com/wms/customer-to-customer-transfers/8a6f0bc3-5a3c-4e3a-9f7e-1e2b3c4d5e6f/requestCancel a transfer
/wms/customer-to-customer-transfers/:id/cancelCancels the transfer.
Request attributes
| Field | Description | Example value |
|---|---|---|
notestringOptional | Cancellation note. |
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"}'