Orders (Admin)
Orders are always created by some user who want to purchase some product. So, in terms of order administration, we only have data visualisation and the possibility to cancel or force deliver of some order.
Solving failed orders
When we have some kind of trouble in the token transfer, the order will be moved to a "failed" status. With that status, an administrator need to solve this fail situation with 2 alternatives:
Cancel the order: It will cancel the order payment and unlock the order product to be purchased again from an other user
Try to deliver again: The system will retry product deliver. It is very common to do if the operator wallet address of the company have no funds to transfer token when the order failed.
Service Methods
Lists all company orders
Rest API reference:
List orders
2022-01-30T10:30:40-03:00
1
Example: 1
10
Example: 10
pix
Possible values: stripe
Possible values: super_sales
GET /admin/companies/{companyId}/orders HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-14T22:39:02.221Z",
"updatedAt": "2025-07-14T22:39:02.221Z",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"company": {},
"userId": "123e4567-e89b-12d3-a456-426614174000",
"user": {},
"destinationWalletAddress": "text",
"addressId": "123e4567-e89b-12d3-a456-426614174000",
"address": {},
"status": "pending",
"deliverDate": "2025-07-14T22:39:02.221Z",
"expiresIn": "2025-07-14T22:39:02.221Z",
"deliverId": "B61JHC",
"products": [
{}
],
"payments": [
{}
]
}
],
"meta": {
"itemCount": 1,
"totalItems": 1,
"itemsPerPage": 1,
"totalPages": 1,
"currentPage": 1
},
"links": {
"first": "http://example.com?page=1",
"prev": "http://example.com?page=1",
"next": "http://example.com?page=2",
"last": "http://example.com?page=3"
}
}
Cancels some company order
Rest API reference:
Cancel an order
PATCH /admin/companies/{companyId}/orders/{orderId}/cancel HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
No content
Force deliver of some company order (it will also force a deliver retry)
Rest API reference:
Force delivery of order token
PATCH /admin/companies/{companyId}/orders/{orderId}/force-deliver HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
No content
Last updated