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 File Download

Download discount-related files. Retrieve files containing discount data for further analysis or use. You can initiate download jobs, monitor their progress, and cancel them if needed, ensuring that you have access to the necessary discount files when required.

Operations
POST
/service/platform/discount/v1.0/company/{company_id}/file/{type}/download/
# Download discount file.
GET
/service/platform/discount/v1.0/company/{company_id}/file/download/{id}/
# Get download job.
DEL
/service/platform/discount/v1.0/company/{company_id}/file/download/{id}/
# Cancel download job.
POST

Download discount file.

Validate file.
Requires company/price_rules/read access scope.
Parameters
company_id
integer
Required
company_id
type
string
Required
type
Enum
Request body
app_id
string
Required
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_id
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
factory_type_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
end
string
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
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
Examples
Parameters
company_id:
90
body:
body
POST
/service/platform/discount/v1.0/company/{company_id}/file/{type}/download/
Loading...
Response
Loading...
GET

Get download job.

Download file Job.
Requires company/price_rules/read access scope.
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_id
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
factory_type_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
end
string
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
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
Examples
Parameters
company_id:
90
id:
"651b00ef29aedf98f98a8cbd"
GET
/service/platform/discount/v1.0/company/{company_id}/file/download/{id}/
Loading...
Response
Loading...
DEL

Cancel download job.

Cancel download Job.
Requires company/price_rules/write access scope.
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 File Validation

Validate discount files. Check the accuracy and integrity of files containing discount-related data before they are processed. Initiate validation jobs, monitor their progress, and cancel them if needed.

Operations
POST
/service/platform/discount/v1.0/company/{company_id}/file/validation/
# Validate discount file.
GET
/service/platform/discount/v1.0/company/{company_id}/file/validation/{id}/
# Get validation job.
DEL
/service/platform/discount/v1.0/company/{company_id}/file/validation/{id}/
# Cancel validation job.
POST

Validate discount file.

Validate file.
Requires company/price_rules/write access scope.
Parameters
company_id
integer
Required
company_id
discount
string
discount
Request body
name
string
Required
is_active
boolean
Required
company_id
integer
Required
app_id
string
Required
job_type
string
Required
Enum
discount_type
string
Enum
discount_level
string
Required
file_path
string
brand_ids
array of integer
store_ids
array of integer
validity
object (ValidityObject)
Required
ValidityObject
start
string
Required
end
string
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_id
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
factory_type_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
end
string
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
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
Examples
Parameters
company_id:
90
discount:
"6512735aa98e0ed14ef1f1fd"
body:
body
POST
/service/platform/discount/v1.0/company/{company_id}/file/validation/
Loading...
Response
Loading...
GET

Get validation job.

Validate file.
Requires company/price_rules/read access scope.
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_id
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
factory_type_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
end
string
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
created_on
string
| date-time
modified_on
string
| date-time
created_by
object (UserDetails)
UserDetails
username
string
user_id
string
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
Examples
Parameters
company_id:
90
id:
"6519669e7fc0cd03ce111ab9"
GET
/service/platform/discount/v1.0/company/{company_id}/file/validation/{id}/
Loading...
Response
Loading...
DEL

Cancel validation job.

Validate file.
Requires company/price_rules/write access scope.
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...

Discount Items Management

Update or insert discount items. Discount items are specific products or services that are eligible for a discount.

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

Upsert discount items.

Create custom discounts.
Requires company/price_rules/write access scope.
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
store_code
string
price_zone
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...

Discount Management

Manage discounts within your application. You can retrieve a list of discounts, create new discounts, fetch details of a specific discount, and update existing discount configurations. Discounts are used to offer special pricing or promotional offers to your customers, enhancing their shopping experience.

Operations
GET
/service/platform/discount/v1.0/company/{company_id}/job/
# Get 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 by ID.
PUT
/service/platform/discount/v1.0/company/{company_id}/job/{id}/
# Update discount.
GET

Get discounts.

Retrieve a list of available discounts.
Requires company/price_rules/read access scope.
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_id
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
factory_type_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
end
string
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
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
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.
total
integer
| int32
Total number of items.
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.

Create discount.
Requires company/price_rules/write access scope.
Parameters
company_id
integer
Required
company_id
Request body
name
string
Required
company_id
integer
Required
is_active
boolean
Required
app_id
string
Required
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
factory_type_ids
array of string
validity
object (ValidityObject)
Required
ValidityObject
start
string
Required
end
string
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_id
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
factory_type_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
end
string
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
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
Examples
Parameters
company_id:
90
body:
body
POST
/service/platform/discount/v1.0/company/{company_id}/job/
Loading...
Response
Loading...
GET

Get discount by ID.

Retrieve detailed information about a specific discount.
Requires company/price_rules/read access scope.
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_id
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
factory_type_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
end
string
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
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
Examples
Parameters
company_id:
90
id:
"64a7c915c160922f34ba4f12"
GET
/service/platform/discount/v1.0/company/{company_id}/job/{id}/
Loading...
Response
Loading...
PUT

Update discount.

Create discount.
Requires company/price_rules/write access scope.
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_id
string
Required
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
factory_type_ids
array of string
validity
object (ValidityObject)
Required
ValidityObject
start
string
Required
end
string
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_id
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
factory_type_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
end
string
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
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
Examples
Parameters
company_id:
90
id:
"64a7c915c160922f34ba4f12"
body:
body
PUT
/service/platform/discount/v1.0/company/{company_id}/job/{id}/
Loading...
Response
Loading...