76 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			HTTP
		
	
	
		
			Executable File
		
	
	
			
		
		
	
	
			76 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			HTTP
		
	
	
		
			Executable File
		
	
	
@token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwMDAvYXBpL3YxL2FkbWluL2xvZ2luIiwiaWF0IjoxNzAzNTYzMjk1LCJleHAiOjE3MDM2NDk2OTUsIm5iZiI6MTcwMzU2MzI5NSwianRpIjoicEs0bGJxSEtEMTVwdndVYSIsInN1YiI6IjEiLCJwcnYiOiJkMmZmMjkzMzlhOGEzZTgyYzM1ODJhNWE4ZTczOWRmMTc4OWJiMTJmIn0.VvhrVE8noDywaMJne17XyeDzpnJrQC-bVLHFgkDgAIk
 | 
						|
###
 | 
						|
GET http://localhost:8000/api/v1/admin/discount/get
 | 
						|
?page=1
 | 
						|
&from_date=1695307952
 | 
						|
&to_date=1701635729
 | 
						|
&order_by_id=desc
 | 
						|
# &date_used=1702615520
 | 
						|
# &code=123456
 | 
						|
# &status=0
 | 
						|
# @eg. status=0|1
 | 
						|
# &email=quitz
 | 
						|
# @eg. email=admin@gmail.com
 | 
						|
# &value=
 | 
						|
&discount_type_id=1
 | 
						|
# @eg. discount_type_id= 1|2 # 1: price, 2: percent
 | 
						|
# @fetch. "http://localhost:8000/api/v1/admin/discount-type/all"
 | 
						|
&search=
 | 
						|
# @eg. search=code|email|value
 | 
						|
Accept: application/json
 | 
						|
Content-Type: application/json
 | 
						|
Authorization: Bearer {{token}}
 | 
						|
###
 | 
						|
POST http://localhost:8000/api/v1/admin/discount/create
 | 
						|
Accept: application/json
 | 
						|
Content-Type: application/json
 | 
						|
Authorization: Bearer {{token}}
 | 
						|
{
 | 
						|
    "discount_type_id": 2,
 | 
						|
    "value": "99"
 | 
						|
}
 | 
						|
###
 | 
						|
POST http://localhost:8000/api/v1/admin/discount/update
 | 
						|
Content-Type: application/json
 | 
						|
Authorization: Bearer {{token}}
 | 
						|
Accept: application/json
 | 
						|
{
 | 
						|
    "id": 1,
 | 
						|
    "date_used": "1702866337"
 | 
						|
}
 | 
						|
###
 | 
						|
GET http://localhost:8000/api/v1/admin/discount/delete?id=1
 | 
						|
Content-Type: application/json
 | 
						|
Accept: application/json
 | 
						|
Authorization: Bearer {{token}}
 | 
						|
###
 | 
						|
POST http://localhost:8000/api/v1/admin/discount/updates
 | 
						|
Content-Type: application/json
 | 
						|
Accept: application/json
 | 
						|
Authorization: Bearer {{token}}
 | 
						|
{
 | 
						|
    "discounts": [
 | 
						|
        {
 | 
						|
            "id": 1,
 | 
						|
            "discount_type_id": 1,
 | 
						|
            "value": "100",
 | 
						|
            "status": "1"
 | 
						|
        }
 | 
						|
    ]
 | 
						|
}
 | 
						|
###
 | 
						|
POST http://localhost:8000/api/v1/admin/discount/deletes
 | 
						|
Content-Type: application/json
 | 
						|
Accept: application/json
 | 
						|
Authorization: Bearer {{token}}
 | 
						|
{
 | 
						|
    "discounts": [
 | 
						|
        {
 | 
						|
            "id": 1
 | 
						|
        },
 | 
						|
        {
 | 
						|
            "id": 2
 | 
						|
        }
 | 
						|
    ]
 | 
						|
}
 |