Skip to main content

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
view
string
Optional
listing or calender. Default is listing.
Enum
q
string
Optional
The search query. This can be a partial or complete name of a discount.
pageNo
integer
Optional
page number. Default is 1.
pageSize
integer
Optional
page size. Default is 12.
archived
boolean
Optional
archived. Default is false.
Enum
month
integer
Optional
month. Default is current month.
year
integer
Optional
year. Default is current year.
type
string
Optional
basic or custom.
appIds
array of string
Optional
application ids.
Response
200
400
Success
ListOrCalender
items
array of object (DiscountJob)
Array of DiscountJob
page
object (Page)
Page
Examples
Parameters
q:
"Contract Test Basic"
pageNo:
1
pageSize:
10
month:
1
year:
2090
type:
"basic"
appIds:
"646f43ee3b7f8c2847e31fb0"
Was this section helpful?
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
body
object (CreateUpdateDiscount)
CreateUpdateDiscount
name
string
company_id
integer
is_active
boolean
app_ids
array of string
extension_ids
array of string
Optional
job_type
string
Enum
discount_type
string
Enum
discount_level
string
Enum
value
integer
Optional
file_path
string
Optional
brand_ids
array of integer
Optional
store_ids
array of integer
Optional
zone_ids
array of string
Optional
validity
object (ValidityObject)
ValidityObject
discount_meta
object (DiscountMeta)
Optional
DiscountMeta
Response
200
400
Success
DiscountJob
_id
string
name
string
company_id
integer
is_active
boolean
app_ids
array of string
Optional
job_type
string
Optional
discount_type
string
Optional
discount_level
string
Optional
value
integer
Optional
file_path
string
Optional
brand_ids
array of integer
Optional
store_ids
array of integer
Optional
zone_ids
array of string
Optional
discount_meta
object (DiscountMeta)
Optional
DiscountMeta
validity
object (ValidityObject)
ValidityObject
created_on
string
modified_on
string
created_by
object (UserDetails)
UserDetails
modified_by
object (UserDetails)
UserDetails
meta
object
Optional
Examples
Parameters
body:
body
Was this section helpful?
POST
/service/platform/discount/v1.0/company/{company_id}/job/
Loading...
Response
Loading...
GET

Get discount

Retrieve a single discount by its id.
Parameters
id
string
unique id.
Response
200
400
Success
DiscountJob
_id
string
name
string
company_id
integer
is_active
boolean
app_ids
array of string
Optional
job_type
string
Optional
discount_type
string
Optional
discount_level
string
Optional
value
integer
Optional
file_path
string
Optional
brand_ids
array of integer
Optional
store_ids
array of integer
Optional
zone_ids
array of string
Optional
discount_meta
object (DiscountMeta)
Optional
DiscountMeta
validity
object (ValidityObject)
ValidityObject
created_on
string
modified_on
string
created_by
object (UserDetails)
UserDetails
modified_by
object (UserDetails)
UserDetails
meta
object
Optional
Examples
Parameters
id:
"64a7c915c160922f34ba4f12"
Was this section helpful?
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
id
string
id
body
object (CreateUpdateDiscount)
CreateUpdateDiscount
name
string
company_id
integer
is_active
boolean
app_ids
array of string
extension_ids
array of string
Optional
job_type
string
Enum
discount_type
string
Enum
discount_level
string
Enum
value
integer
Optional
file_path
string
Optional
brand_ids
array of integer
Optional
store_ids
array of integer
Optional
zone_ids
array of string
Optional
validity
object (ValidityObject)
ValidityObject
discount_meta
object (DiscountMeta)
Optional
DiscountMeta
Response
200
400
Success
DiscountJob
_id
string
name
string
company_id
integer
is_active
boolean
app_ids
array of string
Optional
job_type
string
Optional
discount_type
string
Optional
discount_level
string
Optional
value
integer
Optional
file_path
string
Optional
brand_ids
array of integer
Optional
store_ids
array of integer
Optional
zone_ids
array of string
Optional
discount_meta
object (DiscountMeta)
Optional
DiscountMeta
validity
object (ValidityObject)
ValidityObject
created_on
string
modified_on
string
created_by
object (UserDetails)
UserDetails
modified_by
object (UserDetails)
UserDetails
meta
object
Optional
Examples
Parameters
id:
"64a7c915c160922f34ba4f12"
body:
body
Was this section helpful?
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
discount
string
Optional
discount
body
object (FileJobRequest)
FileJobRequest
name
string
is_active
boolean
company_id
integer
app_ids
array of string
Optional
job_type
string
Optional
discount_type
string
Optional
discount_level
string
Optional
file_path
string
Optional
brand_ids
array of integer
Optional
store_ids
array of integer
Optional
validity
object (ValidityObject)
ValidityObject
meta
object
Optional
Response
200
400
Success
FileJobResponse
stage
string
total
integer
failed
integer
company_id
integer
body
object (FileJobBody)
Optional
FileJobBody
type
string
Enum
file_type
string
Optional
Enum
_id
string
A unique identifier to distinguish and identify a job.
file_path
string
Optional
progress
integer
Optional
extension_ids
array of string
Optional
zone_ids
array of string
Optional
created_on
string
Optional
modified_on
string
Optional
created_by
object (UserDetails)
Optional
UserDetails
Examples
Parameters
discount:
"6512735aa98e0ed14ef1f1fd"
body:
body
Was this section helpful?
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
type
string
type
Enum
body
object (DownloadFileJob)
DownloadFileJob
brand_ids
array of integer
Optional
store_ids
array of integer
Optional
Response
200
400
Success
FileJobResponse
stage
string
total
integer
failed
integer
company_id
integer
body
object (FileJobBody)
Optional
FileJobBody
type
string
Enum
file_type
string
Optional
Enum
_id
string
A unique identifier to distinguish and identify a job.
file_path
string
Optional
progress
integer
Optional
extension_ids
array of string
Optional
zone_ids
array of string
Optional
created_on
string
Optional
modified_on
string
Optional
created_by
object (UserDetails)
Optional
UserDetails
Examples
Parameters
body:
body
Was this section helpful?
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
id
string
id
Response
200
400
Success
FileJobResponse
stage
string
total
integer
failed
integer
company_id
integer
body
object (FileJobBody)
Optional
FileJobBody
type
string
Enum
file_type
string
Optional
Enum
_id
string
A unique identifier to distinguish and identify a job.
file_path
string
Optional
progress
integer
Optional
extension_ids
array of string
Optional
zone_ids
array of string
Optional
created_on
string
Optional
modified_on
string
Optional
created_by
object (UserDetails)
Optional
UserDetails
Examples
Parameters
id:
"6519669e7fc0cd03ce111ab9"
Was this section helpful?
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
id
string
id
Response
200
400
Success
CancelJobResponse
success
boolean
Examples
Parameters
id:
"6519669e7fc0cd03ce111ab9"
Was this section helpful?
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
id
string
id
Response
200
400
Success
FileJobResponse
stage
string
total
integer
failed
integer
company_id
integer
body
object (FileJobBody)
Optional
FileJobBody
type
string
Enum
file_type
string
Optional
Enum
_id
string
A unique identifier to distinguish and identify a job.
file_path
string
Optional
progress
integer
Optional
extension_ids
array of string
Optional
zone_ids
array of string
Optional
created_on
string
Optional
modified_on
string
Optional
created_by
object (UserDetails)
Optional
UserDetails
Examples
Parameters
id:
"651b00ef29aedf98f98a8cbd"
Was this section helpful?
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
id
string
id
Response
200
400
Success
CancelJobResponse
success
boolean
Examples
Parameters
id:
"651b00ef29aedf98f98a8cbd"
Was this section helpful?
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
id
string
Job ID of the discount.
body
object (BulkDiscount)
BulkDiscount
company_id
integer
items
array of object (DiscountItems)
Array of DiscountItems
Response
200
400
Success
Properties
success
boolean
Optional
Examples
Parameters
id:
"603f54c3f6f7fd000925925b"
body:
body
Was this section helpful?
POST
/service/platform/discount/v1.0/company/{company_id}/job/{id}/items/
Loading...
Response
Loading...