Discount

The Discount service manages discounts, including creating, updating, and retrieving configurations. It also handles discount items and validates discount files for accuracy before processing.

Discount

Discount is used to offer special pricing or promotional offers to customers.Discounts can create new discounts for customers, view details of specific discounts, and update discount configurations as needed. Discounts are promotional strategies that allow businesses to offer reduced prices or special offers on products or services."Discount" can create new discounts tailored to specific customer segments or product categories. Discount provides detailed information about existing discounts, such as discount amount, duration, and eligibility criteria. Discount allows configurations dynamically, allowing for flexibility in promotional strategies. Whether it's offering percentage-based discounts, buy-one-get-one (BOGO) offers, or limited-time promotions, the "Discount" helps to implement and manage various discount strategies effectively.

Operations
GET
/service/platform/discount/v1.0/company/{company_id}/job/
# List discounts
POST
/service/platform/discount/v1.0/company/{company_id}/job/
# Create discount
GET
/service/platform/discount/v1.0/company/{company_id}/job/{id}/
# Get discount
PUT
/service/platform/discount/v1.0/company/{company_id}/job/{id}/
# Update discount
GET

List discounts

Retrieve a list of discounts. You can also retrieve discounts using filter query parameters. There are additional optional parameters that can be specified in the parameters of the request when retrieving discount
Parameters
company_id
integer
Required
company_id
view
string
listing or calender. Default is listing.
Enum
q
string
The search query. This can be a partial or complete name of a discount.
page_no
integer
page number. Default is 1.
page_size
integer
page size. Default is 12.
archived
boolean
archived. Default is false.
Enum
month
integer
month. Default is current month.
year
integer
year. Default is current year.
type
string
basic or custom.
app_ids
array of string
application ids.
Response
200
400
Success
ListOrCalender
items
array of object (DiscountJob)
Array of DiscountJob
_id
string
name
string
company_id
integer
is_active
boolean
app_ids
array of string
job_type
string
Enum
discount_type
string
Enum
discount_level
string
value
integer
file_path
string
brand_ids
array of integer
store_ids
array of integer
zone_ids
array of string
discount_meta
object (DiscountMeta)
DiscountMeta
timer
boolean
Determines whether the discount countdown is visible or not.
hours
number
The time in hours before the discount ends when the countdown timer should start.
minutes
number
The time in minutes before the discount ends when the countdown timer should start.
validity
object (ValidityObject)
ValidityObject
start
string
| date-time
end
string
| date-time
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
modified_by
object (UserDetails)
UserDetails
username
string
user_id
string
meta
object
page
object (Page)
Page
item_total
integer
| int32
The total number of items on the page.
next_id
string
The identifier for the next page.
has_previous
boolean
Indicates whether there is a previous page.
has_next
boolean
Indicates whether there is a next page.
current
integer
| int32
The current page number.
type
string
The type of the page, such as 'PageType'.
size
integer
| int32
The number of items per page.
Examples
Parameters
company_id:
90
q:
"Contract Test Basic"
page_no:
1
page_size:
10
month:
1
year:
2090
type:
"basic"
app_ids:
"646f43ee3b7f8c2847e31fb0"
GET
/service/platform/discount/v1.0/company/{company_id}/job/
Loading...
Response
Loading...
POST

Create discount

Creates a discount. There are additional optional parameters that can be specified in the body of the request when creating a discount
Parameters
company_id
integer
Required
company_id
Request body
name
string
Required
company_id
integer
Required
is_active
boolean
Required
app_ids
array of string
Required
extension_ids
array of string
job_type
string
Required
Enum
discount_type
string
Required
Enum
discount_level
string
Required
Enum
value
integer
file_path
string
brand_ids
array of integer
store_ids
array of integer
zone_ids
array of string
validity
object (ValidityObject)
Required
ValidityObject
start
string
| date-time
Required
end
string
| date-time
Required
discount_meta
object (DiscountMeta)
DiscountMeta
timer
boolean
Required
Determines whether the discount countdown is visible or not.
hours
number
The time in hours before the discount ends when the countdown timer should start.
minutes
number
The time in minutes before the discount ends when the countdown timer should start.
Response
200
400
Success
DiscountJob
_id
string
name
string
company_id
integer
is_active
boolean
app_ids
array of string
job_type
string
Enum
discount_type
string
Enum
discount_level
string
value
integer
file_path
string
brand_ids
array of integer
store_ids
array of integer
zone_ids
array of string
discount_meta
object (DiscountMeta)
DiscountMeta
timer
boolean
Determines whether the discount countdown is visible or not.
hours
number
The time in hours before the discount ends when the countdown timer should start.
minutes
number
The time in minutes before the discount ends when the countdown timer should start.
validity
object (ValidityObject)
ValidityObject
start
string
| date-time
end
string
| date-time
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
modified_by
object (UserDetails)
UserDetails
username
string
user_id
string
meta
object
Examples
Parameters
company_id:
90
body:
body
POST
/service/platform/discount/v1.0/company/{company_id}/job/
Loading...
Response
Loading...
GET

Get discount

Retrieve a single discount by its id.
Parameters
company_id
integer
Required
company_id
id
string
Required
unique id.
Response
200
400
Success
DiscountJob
_id
string
name
string
company_id
integer
is_active
boolean
app_ids
array of string
job_type
string
Enum
discount_type
string
Enum
discount_level
string
value
integer
file_path
string
brand_ids
array of integer
store_ids
array of integer
zone_ids
array of string
discount_meta
object (DiscountMeta)
DiscountMeta
timer
boolean
Determines whether the discount countdown is visible or not.
hours
number
The time in hours before the discount ends when the countdown timer should start.
minutes
number
The time in minutes before the discount ends when the countdown timer should start.
validity
object (ValidityObject)
ValidityObject
start
string
| date-time
end
string
| date-time
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
modified_by
object (UserDetails)
UserDetails
username
string
user_id
string
meta
object
Examples
Parameters
company_id:
90
id:
"64a7c915c160922f34ba4f12"
GET
/service/platform/discount/v1.0/company/{company_id}/job/{id}/
Loading...
Response
Loading...
PUT

Update discount

Update an existing discount by its id. Discount can only be updated after 5 min from last updated time stamp (modified_on).
Parameters
company_id
integer
Required
company_id
id
string
Required
id
Request body
name
string
Required
company_id
integer
Required
is_active
boolean
Required
app_ids
array of string
Required
extension_ids
array of string
job_type
string
Required
Enum
discount_type
string
Required
Enum
discount_level
string
Required
Enum
value
integer
file_path
string
brand_ids
array of integer
store_ids
array of integer
zone_ids
array of string
validity
object (ValidityObject)
Required
ValidityObject
start
string
| date-time
Required
end
string
| date-time
Required
discount_meta
object (DiscountMeta)
DiscountMeta
timer
boolean
Required
Determines whether the discount countdown is visible or not.
hours
number
The time in hours before the discount ends when the countdown timer should start.
minutes
number
The time in minutes before the discount ends when the countdown timer should start.
Response
200
400
Success
DiscountJob
_id
string
name
string
company_id
integer
is_active
boolean
app_ids
array of string
job_type
string
Enum
discount_type
string
Enum
discount_level
string
value
integer
file_path
string
brand_ids
array of integer
store_ids
array of integer
zone_ids
array of string
discount_meta
object (DiscountMeta)
DiscountMeta
timer
boolean
Determines whether the discount countdown is visible or not.
hours
number
The time in hours before the discount ends when the countdown timer should start.
minutes
number
The time in minutes before the discount ends when the countdown timer should start.
validity
object (ValidityObject)
ValidityObject
start
string
| date-time
end
string
| date-time
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
modified_by
object (UserDetails)
UserDetails
username
string
user_id
string
meta
object
Examples
Parameters
company_id:
90
id:
"64a7c915c160922f34ba4f12"
body:
body
PUT
/service/platform/discount/v1.0/company/{company_id}/job/{id}/
Loading...
Response
Loading...

Discount File

The Discount File consolidates functionalities for managing discount-related files, including downloading and validating them. A Discount File resource facilitates the retrieval of discount-related files for analysis or use, and ensures their accuracy and proper implementation within the system. Discount File resource can download discounts information in specified file formats containing discount data for further analysis or utilization, initiate download jobs, monitor their progress, and cancel them if needed. Additionally, the Resource enables seller to validate discount files, ensuring the accuracy of discount rules and configurations applied to products or inventory. Discount File can track progress of discount validation jobs and cancel them if necessary, ensuring seamless management of discount-related processes and adherence to discount policies.

Operations
POST
/service/platform/discount/v1.0/company/{company_id}/file/validation/
# Validate discount file
POST
/service/platform/discount/v1.0/company/{company_id}/file/{type}/download/
# Get discount file
GET
/service/platform/discount/v1.0/company/{company_id}/file/validation/{id}/
# List validation job discount
DEL
/service/platform/discount/v1.0/company/{company_id}/file/validation/{id}/
# deletel validation job discount
GET
/service/platform/discount/v1.0/company/{company_id}/file/download/{id}/
# List discount download job
DEL
/service/platform/discount/v1.0/company/{company_id}/file/download/{id}/
# delete discount download job
POST

Validate discount file

Validates the discount file for any discrepancies. like item should be valid etc..
Parameters
company_id
integer
Required
company_id
discount
string
discount
Request body
name
string
Required
is_active
boolean
Required
company_id
integer
Required
app_ids
array of string
job_type
string
Enum
discount_type
string
Enum
discount_level
string
file_path
string
brand_ids
array of integer
store_ids
array of integer
validity
object (ValidityObject)
Required
ValidityObject
start
string
| date-time
Required
end
string
| date-time
Required
meta
object
Response
200
400
Success
FileJobResponseSchema
stage
string
total
integer
failed
integer
company_id
integer
body
object (FileJobBody)
FileJobBody
name
string
company_id
integer
is_active
boolean
app_ids
array of string
job_type
string
Enum
discount_type
string
Enum
discount_level
string
value
integer
file_path
string
brand_ids
array of integer
store_ids
array of integer
extension_ids
array of string
zone_ids
array of string
discount_meta
object (DiscountMeta)
DiscountMeta
timer
boolean
Determines whether the discount countdown is visible or not.
hours
number
The time in hours before the discount ends when the countdown timer should start.
minutes
number
The time in minutes before the discount ends when the countdown timer should start.
validity
object (ValidityObject)
ValidityObject
start
string
| date-time
end
string
| date-time
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
modified_by
object (UserDetails)
UserDetails
username
string
user_id
string
meta
object
type
string
Enum
file_type
string
Enum
_id
string
A unique identifier to distinguish and identify a job.
file_path
string
progress
integer
extension_ids
array of string
zone_ids
array of string
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
Examples
Parameters
company_id:
90
discount:
"6512735aa98e0ed14ef1f1fd"
body:
body
POST
/service/platform/discount/v1.0/company/{company_id}/file/validation/
Loading...
Response
Loading...
POST

Get discount file

Retrieve a discount file by its type, it could be product or inventory.
Parameters
company_id
integer
Required
company_id
type
string
Required
type
Enum
Request body
brand_ids
array of integer
store_ids
array of integer
Response
200
400
Success
FileJobResponseSchema
stage
string
total
integer
failed
integer
company_id
integer
body
object (FileJobBody)
FileJobBody
name
string
company_id
integer
is_active
boolean
app_ids
array of string
job_type
string
Enum
discount_type
string
Enum
discount_level
string
value
integer
file_path
string
brand_ids
array of integer
store_ids
array of integer
extension_ids
array of string
zone_ids
array of string
discount_meta
object (DiscountMeta)
DiscountMeta
timer
boolean
Determines whether the discount countdown is visible or not.
hours
number
The time in hours before the discount ends when the countdown timer should start.
minutes
number
The time in minutes before the discount ends when the countdown timer should start.
validity
object (ValidityObject)
ValidityObject
start
string
| date-time
end
string
| date-time
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
modified_by
object (UserDetails)
UserDetails
username
string
user_id
string
meta
object
type
string
Enum
file_type
string
Enum
_id
string
A unique identifier to distinguish and identify a job.
file_path
string
progress
integer
extension_ids
array of string
zone_ids
array of string
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
Examples
Parameters
company_id:
90
body:
body
POST
/service/platform/discount/v1.0/company/{company_id}/file/{type}/download/
Loading...
Response
Loading...
GET

List validation job discount

Retrieve a validation job of a discount by its id.
Parameters
company_id
integer
Required
company_id
id
string
Required
id
Response
200
400
Success
FileJobResponseSchema
stage
string
total
integer
failed
integer
company_id
integer
body
object (FileJobBody)
FileJobBody
name
string
company_id
integer
is_active
boolean
app_ids
array of string
job_type
string
Enum
discount_type
string
Enum
discount_level
string
value
integer
file_path
string
brand_ids
array of integer
store_ids
array of integer
extension_ids
array of string
zone_ids
array of string
discount_meta
object (DiscountMeta)
DiscountMeta
timer
boolean
Determines whether the discount countdown is visible or not.
hours
number
The time in hours before the discount ends when the countdown timer should start.
minutes
number
The time in minutes before the discount ends when the countdown timer should start.
validity
object (ValidityObject)
ValidityObject
start
string
| date-time
end
string
| date-time
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
modified_by
object (UserDetails)
UserDetails
username
string
user_id
string
meta
object
type
string
Enum
file_type
string
Enum
_id
string
A unique identifier to distinguish and identify a job.
file_path
string
progress
integer
extension_ids
array of string
zone_ids
array of string
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
Examples
Parameters
company_id:
90
id:
"6519669e7fc0cd03ce111ab9"
GET
/service/platform/discount/v1.0/company/{company_id}/file/validation/{id}/
Loading...
Response
Loading...
DEL

deletel validation job discount

Cancel validation job of a discount by its id.
Parameters
company_id
integer
Required
company_id
id
string
Required
id
Response
200
400
Success
CancelJobResponseSchema
success
boolean
Examples
Parameters
company_id:
90
id:
"6519669e7fc0cd03ce111ab9"
DEL
/service/platform/discount/v1.0/company/{company_id}/file/validation/{id}/
Loading...
Response
Loading...
GET

List discount download job

Retrieve a discount download job by its id.
Parameters
company_id
integer
Required
company_id
id
string
Required
id
Response
200
400
Success
FileJobResponseSchema
stage
string
total
integer
failed
integer
company_id
integer
body
object (FileJobBody)
FileJobBody
name
string
company_id
integer
is_active
boolean
app_ids
array of string
job_type
string
Enum
discount_type
string
Enum
discount_level
string
value
integer
file_path
string
brand_ids
array of integer
store_ids
array of integer
extension_ids
array of string
zone_ids
array of string
discount_meta
object (DiscountMeta)
DiscountMeta
timer
boolean
Determines whether the discount countdown is visible or not.
hours
number
The time in hours before the discount ends when the countdown timer should start.
minutes
number
The time in minutes before the discount ends when the countdown timer should start.
validity
object (ValidityObject)
ValidityObject
start
string
| date-time
end
string
| date-time
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
modified_by
object (UserDetails)
UserDetails
username
string
user_id
string
meta
object
type
string
Enum
file_type
string
Enum
_id
string
A unique identifier to distinguish and identify a job.
file_path
string
progress
integer
extension_ids
array of string
zone_ids
array of string
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
Examples
Parameters
company_id:
90
id:
"651b00ef29aedf98f98a8cbd"
GET
/service/platform/discount/v1.0/company/{company_id}/file/download/{id}/
Loading...
Response
Loading...
DEL

delete discount download job

Cancel a discount download job by its id.
Parameters
company_id
integer
Required
company_id
id
string
Required
id
Response
200
400
Success
CancelJobResponseSchema
success
boolean
Examples
Parameters
company_id:
1
id:
"651b00ef29aedf98f98a8cbd"
DEL
/service/platform/discount/v1.0/company/{company_id}/file/download/{id}/
Loading...
Response
Loading...

Discount Items

The Discount items focuses on managing discounts specifically for individual products or services within a business. A Discount item, within this context, refers to a specific product or service that is eligible for a discount or promotional offer. Discount items can effortlessly manage discounts for specific products or services using the update or insert functionality provided. Discount can be used for new discount items or update existing ones with ease. "Discount items" resource to tailor discounts to specific products or services, enhancing promotional strategies and customer engagement.

Operations
POST
/service/platform/discount/v1.0/company/{company_id}/job/{id}/items/
# Upsert discount items
POST

Upsert discount items

Enables users to create custom discounts in bulk by providing the multiple products in requestBody. It allows for the efficient creation of multiple discounts simultaneously, streamlining the discount management process.
Parameters
company_id
integer
Required
A `company_id` is the unique identifier of the company.
id
string
Required
Job ID of the discount.
Request body
company_id
integer
Required
items
array of object (DiscountItems)
Required
Array of DiscountItems
item_code
string
brand_name
string
seller_identifier
string
discount_type
string
Required
Enum
value
number
Required
discount_meta
object (DiscountMeta)
DiscountMeta
timer
boolean
Required
Determines whether the discount countdown is visible or not.
hours
number
The time in hours before the discount ends when the countdown timer should start.
minutes
number
The time in minutes before the discount ends when the countdown timer should start.
Response
200
400
Success
Properties
success
boolean
Examples
Parameters
company_id:
90
id:
"603f54c3f6f7fd000925925b"
body:
body
POST
/service/platform/discount/v1.0/company/{company_id}/job/{id}/items/
Loading...
Response
Loading...