Orders
API endpoints for managing orders
Last updated
Was this helpful?
API endpoints for managing orders
Last updated
Was this helpful?
Was this helpful?
GET
https://wemx.app/api/v1/orders
Returns all orders on your application
{
"status": true,
"current_page": 1,
"data": [
{
"id": 2,
"user_id": 2388
https://wemx.app/api/v1/orders?include=user,payments,package
user
, payments
, package
, members
https://wemx.app/api/v1/orders?filter[status]=suspended
package_id
, status
, service
, domain
, data
, options
, price
due_date
Tip: To filter JSON columns such as data and options, you can specify the key using
?filter[data->server_id]=12
https://wemx.app/api/v1/orders?sort[created_at]=asc
first_name
, last_name
, username
, email
, balance
, created_at
asc
, desc
, random
https://wemx.app/api/v1/orders?date=30days
today
Get orders created today
yesterday
Get orders created yesterday
3days
, 7days
, 14days
, 30days
, 90days
Get orders created last x days
YYYY-MM-DD,YYY-MM-DD
Get orders created between a range of dates
GET
https://wemx.app/api/v1/orders/{order}
Retrieves a single order from the order id
package
String
Include package
members
String
Include members
payments
String
Include payments
user
String
PUT
https://wemx.app/api/v1/orders/{order}
Update a specific order. All parameters are optional, only pass the parameters that you wish to update
name
String
Name of the order
user_id
Number
Change the user that owns the order
price_id
Number
Change the price of the order
data
JSON
DELETE
https://wemx.app/api/v1/orders/{order}
Delete a order, the order must be terminated in order to delete it. Pass "force=1" to ignore this check
force
boolean
Delete order forcefully
POST
https://wemx.app/api/v1/orders/{order}/suspend
Suspend an order using from the order id
POST
https://wemx.app/api/v1/orders/{order}/unsuspend
Unsuspend a order from the order id
POST
https://wemx.app/api/v1/orders/{order}/terminate
Terminate an order from the order id
force
Boolean
Forcefully terminate the order
Include user
{
"status": true,
"data": {
"id": 2,
"user_id": 2388,
"package_id": 1,
"status": "active",
"name": "Your personal server",
"service": "universal",
"domain": null,
"price": {
"id": 2,
"package_id": 2,
"type": "single",
"period": 90,
"price": 333,
"renewal_price": 333,
"setup_fee": 0,
"cancellation_fee": 0,
"data": null,
"is_active": 1,
"created_at": "2024-01-09T19:22:17.000000Z",
"updated_at": "2024-01-09T19:22:26.000000Z"
},
"options": {
"coupon": null
},
"data": {
"example": true
},
"notes": null,
"cancelled_at": null,
"cancel_reason": null,
"last_renewed_at": "2024-01-09T19:29:59.000000Z",
"due_date": "2025-04-17T00:00:00.000000Z",
"created_at": "2024-01-09T18:29:25.000000Z",
"updated_at": "2024-01-09T19:29:59.000000Z"
}
}
Update the data parameters of an order
options
JSON
Update the options of an order
due_date
Date
Change the due date of an order, must be a date in the future
{
"success": true,
"data": {
"id": 2,
"user_id": 2388,
"package_id": 1,
"status": "active",
"name": "Your personal server",
"service": "universal",
"domain": null,
"price": {
"id": 2,
"package_id": 2,
"type": "single",
"period": 90,
"price": 333,
"renewal_price": 333,
"setup_fee": 0,
"cancellation_fee": 0,
"data": null,
"is_active": 1,
"created_at": "2024-01-09T19:22:17.000000Z",
"updated_at": "2024-01-09T19:22:26.000000Z"
},
"options": {
"coupon": null
},
"data": {
"example": true
},
"notes": null,
"cancelled_at": null,
"cancel_reason": null,
"last_renewed_at": "2024-01-09T19:29:59.000000Z",
"due_date": "2025-04-17T00:00:00.000000Z",
"created_at": "2024-01-09T18:29:25.000000Z",
"updated_at": "2024-01-09T19:29:59.000000Z"
}
}
{
"status": true,
"data": {
"id": 2,
"user_id": 2388,
"package_id": 1,
"status": "suspended",
"name": "Your personal server",
"service": "universal",
"domain": null,
"price": {
"id": 2,
"package_id": 2,
"type": "single",
"period": 90,
"price": 333,
"renewal_price": 333,
"setup_fee": 0,
"cancellation_fee": 0,
"data": null,
"is_active": 1,
"created_at": "2024-01-09T19:22:17.000000Z",
"updated_at": "2024-01-09T19:22:26.000000Z"
},
"options": {
"coupon": null
},
"data": {
"test": true
},
"notes": null,
"cancelled_at": null,
"cancel_reason": null,
"last_renewed_at": "2024-01-09T19:29:59.000000Z",
"due_date": "2025-04-17T00:00:00.000000Z",
"created_at": "2024-01-09T18:29:25.000000Z",
"updated_at": "2024-01-09T19:58:35.000000Z",
"package": {
"id": 1,
"order": 0,
"category_id": 1,
"name": "Universal",
"description": "",
"icon": "universal.png",
"service": "universal",
"status": "restricted",
"global_quantity": -1,
"client_quantity": -1,
"require_domain": 0,
"allow_coupons": 1,
"allow_notes": 1,
"data": null,
"setup_on": "payment_received",
"created_at": "2024-01-09T18:28:54.000000Z",
"updated_at": "2024-01-09T18:29:37.000000Z",
"emails": [],
"webhooks": []
}
}
}
{
"status": true,
"data": {
"id": 2,
"user_id": 2388,
"package_id": 1,
"status": "active",
"name": "Your personal server",
"service": "universal",
"domain": null,
"price": {
"id": 2,
"package_id": 2,
"type": "single",
"period": 90,
"price": 333,
"renewal_price": 333,
"setup_fee": 0,
"cancellation_fee": 0,
"data": null,
"is_active": 1,
"created_at": "2024-01-09T19:22:17.000000Z",
"updated_at": "2024-01-09T19:22:26.000000Z"
},
"options": {
"coupon": null
},
"data": {
"test": true
},
"notes": null,
"cancelled_at": null,
"cancel_reason": null,
"last_renewed_at": "2024-01-09T19:29:59.000000Z",
"due_date": "2025-04-17T00:00:00.000000Z",
"created_at": "2024-01-09T18:29:25.000000Z",
"updated_at": "2024-01-09T19:59:58.000000Z",
"package": {
"id": 1,
"order": 0,
"category_id": 1,
"name": "Universal",
"description": "",
"icon": "universal.png",
"service": "universal",
"status": "restricted",
"global_quantity": -1,
"client_quantity": -1,
"require_domain": 0,
"allow_coupons": 1,
"allow_notes": 1,
"data": null,
"setup_on": "payment_received",
"created_at": "2024-01-09T18:28:54.000000Z",
"updated_at": "2024-01-09T18:29:37.000000Z",
"emails": [],
"webhooks": []
}
}
}
{
"status": true,
"data": {
"id": 2,
"user_id": 2388,
"package_id": 1,
"status": "terminated",
"name": "Your personal server",
"service": "universal",
"domain": null,
"price": {
"id": 2,
"package_id": 2,
"type": "single",
"period": 90,
"price": 333,
"renewal_price": 333,
"setup_fee": 0,
"cancellation_fee": 0,
"data": null,
"is_active": 1,
"created_at": "2024-01-09T19:22:17.000000Z",
"updated_at": "2024-01-09T19:22:26.000000Z"
},
"options": {
"coupon": null
},
"data": {
"test": true
},
"notes": null,
"cancelled_at": null,
"cancel_reason": null,
"last_renewed_at": "2024-01-09T19:29:59.000000Z",
"due_date": "2025-04-17T00:00:00.000000Z",
"created_at": "2024-01-09T18:29:25.000000Z",
"updated_at": "2024-01-09T20:01:30.000000Z",
"package": {
"id": 1,
"order": 0,
"category_id": 1,
"name": "Universal",
"description": "",
"icon": "universal.png",
"service": "universal",
"status": "restricted",
"global_quantity": -1,
"client_quantity": -1,
"require_domain": 0,
"allow_coupons": 1,
"allow_notes": 1,
"data": null,
"setup_on": "payment_received",
"created_at": "2024-01-09T18:28:54.000000Z",
"updated_at": "2024-01-09T18:29:37.000000Z",
"emails": [],
"webhooks": []
}
}
}