The Withdrawal Button module provides a read-only REST API for retrieving withdrawal data. This is useful for integrating withdrawal information with external systems such as ERP, CRM, or custom dashboards.
Authentication
All endpoints require admin-level authentication using a Bearer token.
Authorization: Bearer <admin-token>
To obtain a token:
curl -X POST https://your-store.com/rest/V1/integration/admin/token \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "password123"}'
ACL Resource
All endpoints require the Magmodules_WithdrawalButton::withdrawal_view ACL resource.
Endpoints
Get Withdrawal by ID
Retrieves a single withdrawal with its items.
GET /rest/V1/withdrawal/:id
Parameters:
| Parameter | Type | Description |
|---|---|---|
id |
integer | The withdrawal entity ID |
Response:
{
"entity_id": 42,
"order_id": 100,
"increment_id": "000000100",
"store_id": 1,
"customer_email": "customer@example.com",
"customer_name": "John Doe",
"reason": "Changed my mind",
"status": "confirmed",
"reference_code": "WD-A3F2B1",
"created_at": "2026-06-20 14:30:00",
"updated_at": "2026-06-20 14:30:00",
"confirmed_at": "2026-06-20 14:30:00",
"processed_at": null,
"action_taken": "none",
"admin_user_id": null,
"items": [
{
"entity_id": 1,
"withdrawal_id": 42,
"order_item_id": 150,
"sku": "24-MB01",
"product_name": "Joust Duffle Bag",
"qty_withdrawn": 1.0000,
"price": 34.0000
}
]
}
List Withdrawals
Retrieves a paginated list of withdrawals matching the given search criteria.
GET /rest/V1/withdrawal?searchCriteria[...]=...
Common Search Criteria Parameters:
| Parameter | Example | Description |
|---|---|---|
searchCriteria[filterGroups][0][filters][0][field] |
status |
Field to filter on |
searchCriteria[filterGroups][0][filters][0][value] |
confirmed |
Value to match |
searchCriteria[filterGroups][0][filters][0][conditionType] |
eq |
Condition (eq, neq, in, like, gt, lt, etc.) |
searchCriteria[pageSize] |
20 |
Results per page |
searchCriteria[currentPage] |
1 |
Page number |
searchCriteria[sortOrders][0][field] |
created_at |
Sort field |
searchCriteria[sortOrders][0][direction] |
DESC |
Sort direction |
Example: Get all confirmed withdrawals:
curl -X GET "https://your-store.com/rest/V1/withdrawal?\
searchCriteria[filterGroups][0][filters][0][field]=status&\
searchCriteria[filterGroups][0][filters][0][value]=confirmed&\
searchCriteria[filterGroups][0][filters][0][conditionType]=eq&\
searchCriteria[pageSize]=10" \
-H "Authorization: Bearer <token>"
Example: Get withdrawals for a specific order:
curl -X GET "https://your-store.com/rest/V1/withdrawal?\
searchCriteria[filterGroups][0][filters][0][field]=order_id&\
searchCriteria[filterGroups][0][filters][0][value]=100&\
searchCriteria[filterGroups][0][filters][0][conditionType]=eq" \
-H "Authorization: Bearer <token>"
Response:
{
"items": [
{
"entity_id": 42,
"order_id": 100,
"increment_id": "000000100",
...
"items": [...]
}
],
"search_criteria": {
"filter_groups": [...],
"page_size": 10,
"current_page": 1
},
"total_count": 1
}
Status Values
| Status | Description |
|---|---|
pending |
Initial record created by magic link token generation (pre-submission) |
confirmed |
Customer has submitted the withdrawal request |
processed |
Admin has processed the withdrawal (canceled or credit memo created) |
rejected |
Admin has rejected the withdrawal request |
Action Taken Values
| Action | Description |
|---|---|
none |
No automated action taken (or not yet processed) |
canceled |
Order was canceled |
credit_memo |
A credit memo was created (full or partial) |
Error Responses
| HTTP Code | Reason |
|---|---|
| 401 | Missing or invalid Bearer token |
| 403 | Token lacks withdrawal_view ACL permission |
| 404 | Withdrawal with the given ID does not exist |
Need More Help?
Documentation:
- All Help Articles - Complete documentation overview
Support:
- Contact Support - Get help from our team
For a complete overview of features and configuration options, see Withdrawal Button.
