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
page
object (Page)
Page
Examples
Parameters
companyId:
90
q:
"Contract Test Basic"
pageNo:
1
pageSize:
10
month:
1
year:
2090
type:
"basic"
appIds:
"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
discount_meta
object (DiscountMeta)
DiscountMeta
Response
200
400
Success
DiscountJob
_id
string
name
string
company_id
integer
is_active
boolean
app_ids
array of string
job_type
string
discount_type
string
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
validity
object (ValidityObject)
ValidityObject
created_on
string
modified_on
string
created_by
object (UserDetails)
UserDetails
modified_by
object (UserDetails)
UserDetails
meta
object
Examples
Parameters
companyId:
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
discount_type
string
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
validity
object (ValidityObject)
ValidityObject
created_on
string
modified_on
string
created_by
object (UserDetails)
UserDetails
modified_by
object (UserDetails)
UserDetails
meta
object
Examples
Parameters
companyId:
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
discount_meta
object (DiscountMeta)
DiscountMeta
Response
200
400
Success
DiscountJob
_id
string
name
string
company_id
integer
is_active
boolean
app_ids
array of string
job_type
string
discount_type
string
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
validity
object (ValidityObject)
ValidityObject
created_on
string
modified_on
string
created_by
object (UserDetails)
UserDetails
modified_by
object (UserDetails)
UserDetails
meta
object
Examples
Parameters
companyId:
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
discount_type
string
discount_level
string
file_path
string
brand_ids
array of integer
store_ids
array of integer
validity
object (ValidityObject)
Required
ValidityObject
meta
object
Response
200
400
Success
FileJobResponse
stage
string
total
integer
failed
integer
company_id
integer
body
object (FileJobBody)
FileJobBody
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
modified_on
string
created_by
object (UserDetails)
UserDetails
Examples
Parameters
companyId:
"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
FileJobResponse
stage
string
total
integer
failed
integer
company_id
integer
body
object (FileJobBody)
FileJobBody
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
modified_on
string
created_by
object (UserDetails)
UserDetails
Examples
Parameters
companyId:
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
FileJobResponse
stage
string
total
integer
failed
integer
company_id
integer
body
object (FileJobBody)
FileJobBody
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
modified_on
string
created_by
object (UserDetails)
UserDetails
Examples
Parameters
companyId:
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
CancelJobResponse
success
boolean
Examples
Parameters
companyId:
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
FileJobResponse
stage
string
total
integer
failed
integer
company_id
integer
body
object (FileJobBody)
FileJobBody
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
modified_on
string
created_by
object (UserDetails)
UserDetails
Examples
Parameters
companyId:
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
CancelJobResponse
success
boolean
Examples
Parameters
companyId:
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
Response
200
400
Success
Properties
success
boolean
Examples
Parameters
companyId:
90
id:
"603f54c3f6f7fd000925925b"
body:
body
POST
/service/platform/discount/v1.0/company/{company_id}/job/{id}/items/
Loading...
Response
Loading...