This section is the extension of Discount section, it give's control over the company discounts.
To be active discount it must be attached to specific company (group) -
and then it will get applied at checkout.
Admin logged in -can attach any discount to any company, or remove any discount attachment from any company.
User logged in - can see any discount attached to his company (in case he is registered to a company) and in case there is discount attachment for his company.
Update exact row from company_discounts DB table using company_discount_id
raw(json)
Success
Unauthorized
Forbidden
{- "company": "Crymbo",
- "discount_id": "WlBPdmtSY2hITGM9",
- "expiry_date": "2023-07-26 08:53:53"
}
{- "api_message": "<string>",
- "api_data": {
- "discount": {
- "id": "<string>",
- "user_id": "<string>",
- "discount_id": "<string>",
- "status": true,
- "is_gross": true,
- "expiry_date": "<datetime string>",
- "created_at": "<datetime string>",
- "updated_at": "<datetime string>",
- "is_one_time": true,
- "currency": "<string>",
- "volumes": {
- "discount": [
- {
- "volume": 1,
- "type": "<string>",
- "amount": 1
}
]
}
}
}
}
Getting discounts list attached to company
Success
Unauthorized
Forbidden
{- "api_message": "<string>",
- "api_data": [
- {
- "id": "<string>",
- "user_id": "<string>",
- "discount_id": "<string>",
- "status": true,
- "is_gross": true,
- "expiry_date": "<datetime string>",
- "created_at": "<datetime string>",
- "updated_at": "<datetime string>",
- "is_one_time": true,
- "currency": "<string>",
- "volumes": {
- "discount": [
- {
- "volume": 1,
- "type": "<string>",
- "amount": 1
}
]
}
}
]
}
Attach a discount to a specified company.
Success
Unauthorized
Forbidden
Unprocessable Content
Internal Server Error
{- "company": "Crymbo",
- "discount_id": "WlBPdmtSY2hITGM9",
- "expiry_date": "2023-07-26 08:53:53"
}
{- "api_message": "<string>",
- "api_data": {
- "discount": {
- "id": "<string>",
- "user_id": "<string>",
- "discount_id": "<string>",
- "status": true,
- "is_gross": true,
- "expiry_date": "<datetime string>",
- "created_at": "<datetime string>",
- "updated_at": "<datetime string>",
- "is_one_time": true,
- "currency": "<string>",
- "volumes": {
- "discount": [
- {
- "volume": 1,
- "type": "<string>",
- "amount": 1
}
]
}
}
}
}