Order Rules (Admin)
Product order rules can be used to allow and block a user to purchase some products depending on some situations:
Time: You can define some order rule to allow user of purchasing only in some specific time range
Purchase Limit: You can define how much tokens the user can purchase
The permission to purchase is defined by some whitelist which can be created inside the ID service. That whitelists can be linked into each order rule and defines if some user can or not purchase some product.
Whitelists can specify users by email, wallet address or users who owns some token.
Service Methods
Creates some order rule inside a company product
Rest API reference:
null
No content
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
POST /admin/companies/{companyId}/products/{productId}/order-rules HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 103
{
"startAt": null,
"endAt": null,
"purchaseLimit": null,
"whitelistId": "123e4567-e89b-12d3-a456-426614174000"
}
No content
Lists all orders rules from some company product
Rest API reference:
1
10
createdAt
Possible values: No content
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
GET /admin/companies/{companyId}/products/{productId}/order-rules HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
No content
Gets one specific product order rule by id
Rest API reference:
No content
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
GET /admin/companies/{companyId}/products/{productId}/order-rules/{orderRuleId} HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
No content
Updates some specific product order rule
Rest API reference:
null
No content
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
PATCH /admin/companies/{companyId}/products/{productId}/order-rules/{orderRuleId} HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 103
{
"startAt": null,
"endAt": null,
"purchaseLimit": null,
"whitelistId": "123e4567-e89b-12d3-a456-426614174000"
}
No content
Deletes some specific product order rule
Rest API reference:
No content
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
DELETE /admin/companies/{companyId}/products/{productId}/order-rules/{orderRuleId} HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
No content
Last updated