All Discounts
Testing Env
https://www.testecommerce.vodoerp.com
Testing Env
https://www.testecommerce.vodoerp.com
GET
/{{discounts}}
Last modified:2025-05-18 15:24:07
Key | Value | Description | Type |
---|---|---|---|
apikey | 5f28583f26a1a | API key for authentication; contact support to obtain. Required | string |
apiconnection | appmobile | Connection type; contact support to obtain. Required | string |
secure-business-key | 140356399db2b2c32f0.25237063 | Business-specific key; contact support for valid values. Required | string |
lang | ar | Language preference: ar for Arabic, en for English. Optional | string |
Key | Value | Description | Type |
---|---|---|---|
list | (empty) | Show all data without pagination. Optional | string |
per_page | 10 | Number of items per page. Optional | string |
page | 2 | Page number for pagination. Optional | string |
keyword | (empty) | Filter by search term. Optional | string |
code | (empty) | Filter by discount code. Optional | string |
type | (empty) | Filter by discount type. Optional | string |
min_reward | (empty) | Minimum reward value filter. Optional | string |
max_reward | (empty) | Maximum reward value filter. Optional | string |
min_allowed_usage | (empty) | Minimum allowed usage filter. Optional | string |
max_allowed_usage | (empty) | Maximum allowed usage filter. Optional | string |
start_date | 2025-01-01 00:00:00 | Filter by start date. Optional | string |
end_date | 2025-01-01 00:00:00 | Filter by end date. Optional | string |
status | 1 | Filter by status: 1 (active), 0 (inactive). Optional | string |
login_required | 1 | Filter by login requirement: 1 (yes), 0 (no). Optional | string |
sort_order | id__desc | Sort by: id__desc , code__asc , start_date__desc , etc. Optional | string |
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://www.testecommerce.vodoerp.com/api/v1/discounts?list=&per_page=10&page=2&keyword=&code=&type=&min_reward=&max_reward=&min_allowed_usage=&max_allowed_usage=&start_date=2025-01-01 00:00:00&end_date=2025-01-01 00:00:00&status=1&login_required=1&sort_order=id__desc' \
--header 'apikey: 5f28583f26a1a' \
--header 'apiconnection: appmobile' \
--header 'secure-business-key: 4765066450c0bd66325.48403130' \
--header 'Accept-Language: ar' \
--header 'Content-Type: application/json' \
--data-raw '{}'
Response Response Example
{
"status": true,
"message": "Discounts data",
"data": {
"current_page": 1,
"data": [
{
"id": 13,
"business_id": 47,
"code": "DIS550",
"reward": "50.00",
"type": 2,
"allowed_usage": 100,
"used": 1,
"description": "خصم 50% على جميع المنتجات",
"status": 1,
"login_required": 0,
"start_date": null,
"end_date": null,
"employees": null,
"job_positions": null,
"countries": null,
"cities": null,
"platforms": null,
"devices": null,
"min_cart_value": "100.00",
"customer_categories": null,
"customer_status": null,
"customer_login_start_date": null,
"customer_login_end_date": null,
"branches": null,
"created_at": "2025-02-19T11:14:22.000000Z",
"updated_at": "2025-02-19T12:02:35.000000Z"
},
{
"id": 12,
"business_id": 47,
"code": "DISCOUNT8h45454550",
"reward": "50.00",
"type": 2,
"allowed_usage": 100,
"used": null,
"description": "خصم 50% على جميع المنتجات",
"status": 1,
"login_required": 1,
"start_date": "2025-01-31T21:00:00.000000Z",
"end_date": "2025-02-28T21:00:00.000000Z",
"employees": [
5,
9
],
"job_positions": [
7,
3
],
"countries": [
78
],
"cities": [
5,
7,
9
],
"platforms": [
1,
2
],
"devices": [
1
],
"min_cart_value": "100.00",
"customer_categories": [
10,
15
],
"customer_status": 1,
"customer_login_start_date": "2024-12-31T21:00:00.000000Z",
"customer_login_end_date": "2025-01-30T21:00:00.000000Z",
"branches": [
2,
4
],
"created_at": "2025-02-19T11:11:09.000000Z",
"updated_at": "2025-02-19T11:11:09.000000Z"
},
{
"id": 11,
"business_id": 47,
"code": "DISCOUNT84454550",
"reward": "50.00",
"type": 2,
"allowed_usage": 100,
"used": null,
"description": "خصم 50% على جميع المنتجات",
"status": 1,
"login_required": 1,
"start_date": "2025-01-31T21:00:00.000000Z",
"end_date": "2025-02-28T21:00:00.000000Z",
"employees": [
5,
9
],
"job_positions": [
7,
3
],
"countries": [
78
],
"cities": [
5,
7,
9
],
"platforms": [
1,
2
],
"devices": [
1
],
"min_cart_value": "100.00",
"customer_categories": [
10,
15
],
"customer_status": 1,
"customer_login_start_date": "2024-12-31T21:00:00.000000Z",
"customer_login_end_date": "2025-01-30T21:00:00.000000Z",
"branches": [
2,
4
],
"created_at": "2025-02-06T12:03:25.000000Z",
"updated_at": "2025-02-06T12:03:25.000000Z"
}
],
"first_page_url": "http://localhost:8000/api/v1/discounts?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://localhost:8000/api/v1/discounts?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://localhost:8000/api/v1/discounts?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "http://localhost:8000/api/v1/discounts",
"per_page": 20,
"prev_page_url": null,
"to": 3,
"total": 3
}
}
Request
Query Params
list
string
optional
per_page
string
optional
Example:
10
page
string
optional
Example:
2
keyword
string
optional
code
string
optional
type
string
optional
min_reward
string
optional
max_reward
string
optional
min_allowed_usage
string
optional
max_allowed_usage
string
optional
start_date
string
optional
Example:
2025-01-01 00:00:00
end_date
string
optional
Example:
2025-01-01 00:00:00
status
string
optional
Example:
1
login_required
string
optional
Example:
1
sort_order
string
optional
'id__desc',
'id__asc',
'code__desc',
'code__asc',
'start_date__desc',
'start_date__asc',
'end_date__desc',
'end_date__asc',
'login_required__desc',
'login_required__asc',
'allowed_usage__desc',
'allowed_usage__asc',
'type__desc',
'type__asc',
'status__desc',
'status__asc',
'reward__desc',
'reward__asc'
Example:
id__desc
Header Params
apikey
string
required
Example:
5f28583f26a1a
apiconnection
string
required
Example:
appmobile
secure-business-key
string
required
728106399db2b289783.89154521
2680667168f2f8a68f6.12561200
140356399db2b2c32f0.25237063
96701678e330f31f768.22400604
14807664478836358b0.31329842
Example:
{{secure_business_key}}
Accept-Language
string
required
Example:
ar
Body Params application/json