Discount

The Discount service manages Discount V2 jobs and Discount V2 file jobs, including creating, updating, retrieving job configurations, and ingesting discounts through file uploads.

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
GET
/service/platform/discount/v2.0/company/{company_id}/file/sample/download
# Download discount sample file (V2).
GET

Download discount sample file (V2).

FDK Method Name: downloadDiscountSampleFileV2
Download sample discount file for Discount V2 ingestion.
Requires company/price_rules/read access scope.
Parameters
company_id
integer
Required
A `company_id` is the unique identifier of the company.
file_type
string
Output file type. CSV has limitations on data validation.
Default Value : xlsx
Enum
Response
200
400
Success
SampleFileDownload
file_url
string
URL to download the sample file.
mime_type
string
MIME type of the file.
warning
string
Warning message (if any).
Examples
Parameters
company_id:
1
file_type:
"xlsx"
GET
/service/platform/discount/v2.0/company/{company_id}/file/sample/download
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/v2.0/company/{company_id}/file
# Upload discount file (V2).
GET
/service/platform/discount/v2.0/company/{company_id}/file/{id}
# Get discount file job (V2).
DEL
/service/platform/discount/v2.0/company/{company_id}/file/{id}
# Cancel discount file job (V2).
GET
/service/platform/discount/v2.0/company/{company_id}/files
# Get discount file jobs (V2).
POST

Upload discount file (V2).

FDK Method Name: uploadDiscountFileV2
Upload a discount file to create a Discount V2 file job and start ingestion.
Requires company/price_rules/write access scope.
Parameters
company_id
integer
Required
A `company_id` is the unique identifier of the company.
Request body
file_path
string
Required
CDN URL of the discount file to ingest.
app_ids
array of string
Required
Application ids for which the file should be processed.
is_active
boolean
Whether created jobs should be marked active.
Default Value : true
Response
200
400
Success
DiscountV2File
_id
string
Unique identifier of the file job.
company_id
integer
Company identifier.
app_ids
array of string
Application ids for which the file is processed.
type
string
File job type.
Enum
file_path
string
Original file URL.
error_file_path
string
Error file URL (if any).
is_active
boolean
Whether the file job is active.
status
string
Current status of the file job.
Enum
chunk_meta
object
Map of chunk_name to chunk status (internal).
total_chunks
integer
Total chunks created for the file.
processed_chunks
integer
Number of processed chunks.
success_chunks
integer
Number of successful chunks.
failed_chunks
integer
Number of failed chunks.
success_rows
integer
Number of rows successfully processed.
failed_rows
integer
Number of rows failed.
processed_rows
integer
Number of rows processed.
total_rows
integer
Number of rows in the file.
error_meta
object (DiscountV2FileError)
Nullable
DiscountV2FileError
message
string
Summary error message.
error_details
array of object (DiscountV2FileErrorDetail)
List of per-row/per-chunk error details.
Array of DiscountV2FileErrorDetail
chunk_name
string
Chunk name (if applicable).
row_number
integer
Row number in the file.
discount_name
string
Discount name from the row.
seller_identifier
string
Seller identifier from the row.
item_code
string
Item code from the row.
brand_name
string
Brand name from the row.
value
number
Nullable
Value from the row.
error
string
Error message for this row/chunk.
error_count
integer
Count of errors (e.g. for display).
created_by
object (UserDetails)
UserDetails
username
string
Username/email.
user_id
string
User identifier.
modified_by
object (UserDetails)
UserDetails
username
string
Username/email.
user_id
string
User identifier.
created_on
string
Created timestamp.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
modified_on
string
Last modified timestamp.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
Examples
Parameters
company_id:
1
body:
body
POST
/service/platform/discount/v2.0/company/{company_id}/file
Loading...
Response
Loading...
GET

Get discount file job (V2).

FDK Method Name: getDiscountFileJobV2
Get a Discount V2 file job status including progress and absolute file URLs.
Requires company/price_rules/read access scope.
Parameters
company_id
integer
Required
A `company_id` is the unique identifier of the company.
id
string
Required
File job ID.
Response
200
400
Success
DiscountV2FileStatusDetails
_id
string
File job id.
progress
integer
Progress percentage (0-100).
percentage
string
Nullable
Progress percentage (0-100).
company_id
integer
Company identifier.
app_ids
array of string
Application ids for which the file is processed.
type
string
File job type.
Enum
file_path
string
Absolute file URL.
error_file_path
string
Absolute error file URL (if any).
is_active
boolean
Whether the file job is active.
status
string
Current status of the file job.
Enum
total_chunks
integer
Total chunks created for the file.
processed_chunks
integer
Number of processed chunks.
failed_chunks
integer
Number of failed chunks.
success_chunks
integer
Number of chunks processed successfully.
success_rows
integer
Number of rows successfully processed.
failed_rows
integer
Number of rows failed.
processed_rows
integer
Number of rows processed so far.
total_rows
integer
Total number of rows in the file.
error_meta
object (DiscountV2FileError)
Nullable
DiscountV2FileError
message
string
Summary error message.
error_details
array of object (DiscountV2FileErrorDetail)
List of per-row/per-chunk error details.
Array of DiscountV2FileErrorDetail
chunk_name
string
Chunk name (if applicable).
row_number
integer
Row number in the file.
discount_name
string
Discount name from the row.
seller_identifier
string
Seller identifier from the row.
item_code
string
Item code from the row.
brand_name
string
Brand name from the row.
value
number
Nullable
Value from the row.
error
string
Error message for this row/chunk.
error_count
integer
Count of errors (e.g. for display).
created_by
object (UserDetails)
UserDetails
username
string
Username/email.
user_id
string
User identifier.
modified_by
object (UserDetails)
UserDetails
username
string
Username/email.
user_id
string
User identifier.
created_on
string
Created timestamp.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
modified_on
string
Last modified timestamp.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
Examples
Parameters
company_id:
1
id:
"698a286cfaafa4e9e47d82f6"
GET
/service/platform/discount/v2.0/company/{company_id}/file/{id}
Loading...
Response
Loading...
DEL

Cancel discount file job (V2).

FDK Method Name: cancelDiscountFileJobV2
Cancel a running Discount V2 file job.
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
File job ID.
Response
200
400
Success
CancelJobResponseSchema
success
boolean
Whether the job was cancelled successfully.
Examples
Parameters
company_id:
1
id:
"698a286cfaafa4e9e47d82f6"
DEL
/service/platform/discount/v2.0/company/{company_id}/file/{id}
Loading...
Response
Loading...
GET

Get discount file jobs (V2).

FDK Method Name: getDiscountFileJobsV2
Retrieve Discount V2 file job history.
Requires company/price_rules/read access scope.
Parameters
company_id
integer
Required
A `company_id` is the unique identifier of the company.
page_no
integer
Page number. Default is 1.
Default Value : 1
page_size
integer
Page size. Default is 10.
Default Value : 10
search
string
Search by file job id.
stage
string
Filter by file job status.
Enum
Response
200
Success
DiscountV2FileList
items
array of object (DiscountV2FileStatusDetails)
File jobs list.
Array of DiscountV2FileStatusDetails
_id
string
File job id.
progress
integer
Progress percentage (0-100).
percentage
string
Nullable
Progress percentage (0-100).
company_id
integer
Company identifier.
app_ids
array of string
Application ids for which the file is processed.
type
string
File job type.
Enum
file_path
string
Absolute file URL.
error_file_path
string
Absolute error file URL (if any).
is_active
boolean
Whether the file job is active.
status
string
Current status of the file job.
Enum
total_chunks
integer
Total chunks created for the file.
processed_chunks
integer
Number of processed chunks.
failed_chunks
integer
Number of failed chunks.
success_chunks
integer
Number of chunks processed successfully.
success_rows
integer
Number of rows successfully processed.
failed_rows
integer
Number of rows failed.
processed_rows
integer
Number of rows processed so far.
total_rows
integer
Total number of rows in the file.
error_meta
object (DiscountV2FileError)
Nullable
DiscountV2FileError
message
string
Summary error message.
error_details
array of object (DiscountV2FileErrorDetail)
List of per-row/per-chunk error details.
Array of DiscountV2FileErrorDetail
chunk_name
string
Chunk name (if applicable).
row_number
integer
Row number in the file.
discount_name
string
Discount name from the row.
seller_identifier
string
Seller identifier from the row.
item_code
string
Item code from the row.
brand_name
string
Brand name from the row.
value
number
Nullable
Value from the row.
error
string
Error message for this row/chunk.
error_count
integer
Count of errors (e.g. for display).
created_by
object (UserDetails)
UserDetails
username
string
Username/email.
user_id
string
User identifier.
modified_by
object (UserDetails)
UserDetails
username
string
Username/email.
user_id
string
User identifier.
created_on
string
Created timestamp.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
modified_on
string
Last modified timestamp.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
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.
next
string
Nullable
Cursor token for the next page (alias for next_id used by search services).
item_count
integer
| int32
The number of items returned on the current 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.
limit
integer
| int32
The maximum number of items to be returned per page.
total
integer
| int32
Total number of items.
Examples
Parameters
company_id:
1
page_no:
1
page_size:
5
stage:
"pending"
GET
/service/platform/discount/v2.0/company/{company_id}/files
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
POST
/service/platform/discount/v2.0/company/{company_id}/job/
# Create discount (V2).
GET
/service/platform/discount/v2.0/company/{company_id}/jobs/
# Get discounts (V2).
GET
/service/platform/discount/v2.0/company/{company_id}/job/{id}/
# Get discount by ID (V2).
PUT
/service/platform/discount/v2.0/company/{company_id}/job/{id}/
# Update discount (V2).
PUT
/service/platform/discount/v2.0/company/{company_id}/job/bulk/update
# Bulk update discount jobs (V2).
POST

Create discount (V2).

FDK Method Name: createDiscountV2
Create a Discount V2 job.
Requires company/price_rules/write access scope.
Parameters
company_id
integer
Required
A `company_id` is the unique identifier of the company.
Request body
name
string
Name of the discount job.
app_ids
array of string
Application ids where the discount applies.
job_type
string
Type of discount job.
Enum
discount_type
string
Discount calculation type.
Enum
value
number
Discount value.
is_active
boolean
Active flag.
stage
string
Stage for maker-checker flow.
Enum
_schedule
object (DiscountScheduleV2)
Schedule of the discount.
DiscountScheduleV2
start
string
Required
Schedule start date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
end
string
Required
Schedule end date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
priority
integer
Priority of the discount. Higher value means higher priority.
cron
string
Cron expression (if applicable).
next_schedule
array of object (DiscountScheduleNextV2)
Next schedules generated by cron (if applicable).
Array of DiscountScheduleNextV2
start
string
Next schedule start date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
end
string
Next schedule end date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
priority
integer
Priority for the upcoming schedule window.
last_priority
integer
Nullable
Last applied priority (internal field).
discount_meta
object (DiscountMetaV2)
Timer metadata for countdown discounts.
DiscountMetaV2
timer
boolean
Determines whether the discount countdown is visible or not.
hours
integer
Countdown threshold hours.
minutes
integer
Countdown threshold minutes.
filter
object (DiscountFilterSchema)
Filters (for job_type=filters).
DiscountFilterSchema
brand_ids
object (InclusionExclusion)
Brand id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
store_ids
object (InclusionExclusion)
Store id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l1_category_ids
object (InclusionExclusion)
L1 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l2_category_ids
object (InclusionExclusion)
L2 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l3_category_ids
object (InclusionExclusion)
L3 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
factory_type_ids
object (InclusionExclusionObjectId)
Factory/price zone filters.
InclusionExclusionObjectId
include
array of string
Included ids.
exclude
array of string
Excluded ids.
rule
string
Rule expression (if used).
tags
array of string
Tags for discount job.
override_priority
boolean
Whether to override priority behavior.
_custom_json
object (CustomJSON)
Custom JSON blob.
CustomJSON
data
object
Arbitrary key-value payload. When omitted, root may contain arbitrary keys.
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
Response
200
400
Success
DiscountJobV2
_id
string
Unique identifier of the discount job.
name
string
Name of the discount job.
company_id
integer
Company identifier.
app_ids
array of string
Application ids where the discount applies.
job_type
string
Type of discount job (product, sku, or filters).
Enum
discount_type
string
Discount calculation type.
Enum
value
number
Nullable
Discount value (required for flat/percentage/final depending on job type).
is_active
boolean
Whether the job is active. Activation also depends on stage=approved.
stage
string
Maker-checker stage of the job.
Enum
_schedule
object (DiscountScheduleV2)
Schedule of the discount.
DiscountScheduleV2
start
string
Schedule start date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
end
string
Schedule end date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
priority
integer
Priority of the discount. Higher value means higher priority.
cron
string
Cron expression (if applicable).
next_schedule
array of object (DiscountScheduleNextV2)
Next schedules generated by cron (if applicable).
Array of DiscountScheduleNextV2
start
string
Next schedule start date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
end
string
Next schedule end date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
priority
integer
Priority for the upcoming schedule window.
last_priority
integer
Nullable
Last applied priority (internal field).
discount_meta
object (DiscountMetaV2)
Timer metadata for countdown discounts.
DiscountMetaV2
timer
boolean
Determines whether the discount countdown is visible or not.
hours
integer
Countdown threshold hours.
minutes
integer
Countdown threshold minutes.
filter
object (DiscountFilterSchema)
Filters (for job_type=filters).
DiscountFilterSchema
brand_ids
object (InclusionExclusion)
Brand id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
store_ids
object (InclusionExclusion)
Store id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l1_category_ids
object (InclusionExclusion)
L1 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l2_category_ids
object (InclusionExclusion)
L2 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l3_category_ids
object (InclusionExclusion)
L3 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
factory_type_ids
object (InclusionExclusionObjectId)
Factory/price zone filters.
InclusionExclusionObjectId
include
array of string
Included ids.
exclude
array of string
Excluded ids.
rule
string
Nullable
Rule expression (if used).
tags
array of string
Tags for discount job.
override_priority
boolean
Whether to override priority behavior.
_custom_json
object (CustomJSON)
Custom JSON blob.
CustomJSON
data
object
Arbitrary key-value payload. When omitted, root may contain arbitrary keys.
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
file_id
string
Nullable
Associated file job id (for file-created jobs).
file_url
string
Nullable
Associated file URL (for file-created jobs).
batch_meta
object (DiscountJobBatchMetaV2)
Batch processing metadata (for file-created jobs).
DiscountJobBatchMetaV2
total_batches
integer
Total number of batches expected for this job.
processed_batches
array of integer
Batch indices that have been processed successfully.
last_processed_batch
integer
The chronologically last processed batch index.
processed_count
integer
The number of batches that have been processed successfully.
failed_count
integer
The number of batches that have failed.
status
string
Batch processing status.
Enum
error
string
Nullable
Error message if batch processing failed.
meta
object (DiscountJobMetaV2)
Internal scheduling meta (TriggerHappy job ids).
DiscountJobMetaV2
triggerhappy_start_job
string
Nullable
TriggerHappy job id for start schedule.
triggerhappy_end_job
string
Nullable
TriggerHappy job id for end schedule.
comment
string
Comment associated with stage transitions.
created_by
object (UserDetails)
UserDetails
username
string
Username/email.
user_id
string
User identifier.
modified_by
object (UserDetails)
UserDetails
username
string
Username/email.
user_id
string
User identifier.
created_on
string
Created timestamp in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
modified_on
string
Last modified timestamp in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
Examples
Parameters
company_id:
1
body:
body
POST
/service/platform/discount/v2.0/company/{company_id}/job/
Loading...
Response
Loading...
GET

Get discounts (V2).

FDK Method Name: getDiscountsV2
Retrieve a list of available Discount V2 jobs (listing or calendar view).
Requires company/price_rules/read access scope.
Parameters
company_id
integer
Required
A `company_id` is the unique identifier of the company.
view
string
listing or calendar. Default is listing.
Enum
q
string
The search query. This can be a partial or complete name of a discount job.
page_no
integer
Page number. Default is 1.
Default Value : 1
page_size
integer
Page size. Default is 12.
Default Value : 12
stage
string
Filter jobs by stage. Expired jobs are returned only when stage=expired is explicitly passed.
Enum
is_active
boolean
Filter jobs by active status.
start_date
string
| date-time
Filter jobs by schedule start date (UTC ISO date-time).
end_date
string
| date-time
Filter jobs by schedule end date (UTC ISO date-time).
app_ids
string
Filter by application ids (comma-separated string).
job_type
string
Filter by job types (comma-separated string).
discount_type
string
Filter by discount types (comma-separated string).
brand_ids
string
Filter by `filter.brand_ids.include` (comma-separated string).
store_ids
string
Filter by `filter.store_ids.include` (comma-separated string).
l1_category_ids
string
Filter by `filter.l1_category_ids.include` (comma-separated string).
l2_category_ids
string
Filter by `filter.l2_category_ids.include` (comma-separated string).
l3_category_ids
string
Filter by `filter.l3_category_ids.include` (comma-separated string).
factory_type_ids
string
Filter by `filter.factory_type_ids.include` (comma-separated string).
Response
200
400
Success
ListOrCalenderV2
items
array of object (DiscountJobV2)
Discount V2 jobs list.
Array of DiscountJobV2
_id
string
Unique identifier of the discount job.
name
string
Name of the discount job.
company_id
integer
Company identifier.
app_ids
array of string
Application ids where the discount applies.
job_type
string
Type of discount job (product, sku, or filters).
Enum
discount_type
string
Discount calculation type.
Enum
value
number
Nullable
Discount value (required for flat/percentage/final depending on job type).
is_active
boolean
Whether the job is active. Activation also depends on stage=approved.
stage
string
Maker-checker stage of the job.
Enum
_schedule
object (DiscountScheduleV2)
Schedule of the discount.
DiscountScheduleV2
start
string
Schedule start date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
end
string
Schedule end date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
priority
integer
Priority of the discount. Higher value means higher priority.
cron
string
Cron expression (if applicable).
next_schedule
array of object (DiscountScheduleNextV2)
Next schedules generated by cron (if applicable).
Array of DiscountScheduleNextV2
start
string
Next schedule start date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
end
string
Next schedule end date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
priority
integer
Priority for the upcoming schedule window.
last_priority
integer
Nullable
Last applied priority (internal field).
discount_meta
object (DiscountMetaV2)
Timer metadata for countdown discounts.
DiscountMetaV2
timer
boolean
Determines whether the discount countdown is visible or not.
hours
integer
Countdown threshold hours.
minutes
integer
Countdown threshold minutes.
filter
object (DiscountFilterSchema)
Filters (for job_type=filters).
DiscountFilterSchema
brand_ids
object (InclusionExclusion)
Brand id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
store_ids
object (InclusionExclusion)
Store id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l1_category_ids
object (InclusionExclusion)
L1 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l2_category_ids
object (InclusionExclusion)
L2 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l3_category_ids
object (InclusionExclusion)
L3 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
factory_type_ids
object (InclusionExclusionObjectId)
Factory/price zone filters.
InclusionExclusionObjectId
include
array of string
Included ids.
exclude
array of string
Excluded ids.
rule
string
Nullable
Rule expression (if used).
tags
array of string
Tags for discount job.
override_priority
boolean
Whether to override priority behavior.
_custom_json
object (CustomJSON)
Custom JSON blob.
CustomJSON
data
object
Arbitrary key-value payload. When omitted, root may contain arbitrary keys.
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
file_id
string
Nullable
Associated file job id (for file-created jobs).
file_url
string
Nullable
Associated file URL (for file-created jobs).
batch_meta
object (DiscountJobBatchMetaV2)
Batch processing metadata (for file-created jobs).
DiscountJobBatchMetaV2
total_batches
integer
Total number of batches expected for this job.
processed_batches
array of integer
Batch indices that have been processed successfully.
last_processed_batch
integer
The chronologically last processed batch index.
processed_count
integer
The number of batches that have been processed successfully.
failed_count
integer
The number of batches that have failed.
status
string
Batch processing status.
Enum
error
string
Nullable
Error message if batch processing failed.
meta
object (DiscountJobMetaV2)
Internal scheduling meta (TriggerHappy job ids).
DiscountJobMetaV2
triggerhappy_start_job
string
Nullable
TriggerHappy job id for start schedule.
triggerhappy_end_job
string
Nullable
TriggerHappy job id for end schedule.
comment
string
Comment associated with stage transitions.
created_by
object (UserDetails)
UserDetails
username
string
Username/email.
user_id
string
User identifier.
modified_by
object (UserDetails)
UserDetails
username
string
Username/email.
user_id
string
User identifier.
created_on
string
Created timestamp in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
modified_on
string
Last modified timestamp in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
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.
next
string
Nullable
Cursor token for the next page (alias for next_id used by search services).
item_count
integer
| int32
The number of items returned on the current 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.
limit
integer
| int32
The maximum number of items to be returned per page.
total
integer
| int32
Total number of items.
view
string
View returned by the API.
Enum
Examples
Parameters
company_id:
1
view:
"listing"
q:
"Winter"
page_no:
1
page_size:
12
stage:
"draft"
is_active:
true
start_date:
"2023-12-10T06:12:03Z"
end_date:
"2032-12-10T06:12:03Z"
job_type:
"filters"
discount_type:
"percentage"
GET
/service/platform/discount/v2.0/company/{company_id}/jobs/
Loading...
Response
Loading...
GET

Get discount by ID (V2).

FDK Method Name: getDiscountV2
Retrieve detailed information about a specific Discount V2 job.
Requires company/price_rules/read 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.
Response
200
400
Success
DiscountJobV2
_id
string
Unique identifier of the discount job.
name
string
Name of the discount job.
company_id
integer
Company identifier.
app_ids
array of string
Application ids where the discount applies.
job_type
string
Type of discount job (product, sku, or filters).
Enum
discount_type
string
Discount calculation type.
Enum
value
number
Nullable
Discount value (required for flat/percentage/final depending on job type).
is_active
boolean
Whether the job is active. Activation also depends on stage=approved.
stage
string
Maker-checker stage of the job.
Enum
_schedule
object (DiscountScheduleV2)
Schedule of the discount.
DiscountScheduleV2
start
string
Schedule start date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
end
string
Schedule end date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
priority
integer
Priority of the discount. Higher value means higher priority.
cron
string
Cron expression (if applicable).
next_schedule
array of object (DiscountScheduleNextV2)
Next schedules generated by cron (if applicable).
Array of DiscountScheduleNextV2
start
string
Next schedule start date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
end
string
Next schedule end date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
priority
integer
Priority for the upcoming schedule window.
last_priority
integer
Nullable
Last applied priority (internal field).
discount_meta
object (DiscountMetaV2)
Timer metadata for countdown discounts.
DiscountMetaV2
timer
boolean
Determines whether the discount countdown is visible or not.
hours
integer
Countdown threshold hours.
minutes
integer
Countdown threshold minutes.
filter
object (DiscountFilterSchema)
Filters (for job_type=filters).
DiscountFilterSchema
brand_ids
object (InclusionExclusion)
Brand id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
store_ids
object (InclusionExclusion)
Store id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l1_category_ids
object (InclusionExclusion)
L1 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l2_category_ids
object (InclusionExclusion)
L2 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l3_category_ids
object (InclusionExclusion)
L3 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
factory_type_ids
object (InclusionExclusionObjectId)
Factory/price zone filters.
InclusionExclusionObjectId
include
array of string
Included ids.
exclude
array of string
Excluded ids.
rule
string
Nullable
Rule expression (if used).
tags
array of string
Tags for discount job.
override_priority
boolean
Whether to override priority behavior.
_custom_json
object (CustomJSON)
Custom JSON blob.
CustomJSON
data
object
Arbitrary key-value payload. When omitted, root may contain arbitrary keys.
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
file_id
string
Nullable
Associated file job id (for file-created jobs).
file_url
string
Nullable
Associated file URL (for file-created jobs).
batch_meta
object (DiscountJobBatchMetaV2)
Batch processing metadata (for file-created jobs).
DiscountJobBatchMetaV2
total_batches
integer
Total number of batches expected for this job.
processed_batches
array of integer
Batch indices that have been processed successfully.
last_processed_batch
integer
The chronologically last processed batch index.
processed_count
integer
The number of batches that have been processed successfully.
failed_count
integer
The number of batches that have failed.
status
string
Batch processing status.
Enum
error
string
Nullable
Error message if batch processing failed.
meta
object (DiscountJobMetaV2)
Internal scheduling meta (TriggerHappy job ids).
DiscountJobMetaV2
triggerhappy_start_job
string
Nullable
TriggerHappy job id for start schedule.
triggerhappy_end_job
string
Nullable
TriggerHappy job id for end schedule.
comment
string
Comment associated with stage transitions.
created_by
object (UserDetails)
UserDetails
username
string
Username/email.
user_id
string
User identifier.
modified_by
object (UserDetails)
UserDetails
username
string
Username/email.
user_id
string
User identifier.
created_on
string
Created timestamp in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
modified_on
string
Last modified timestamp in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
Examples
Parameters
company_id:
1
id:
"6989f3ed7bbd286976a6167a"
GET
/service/platform/discount/v2.0/company/{company_id}/job/{id}/
Loading...
Response
Loading...
PUT

Update discount (V2).

FDK Method Name: updateDiscountV2
Update an existing Discount V2 job.
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
name
string
Name of the discount job.
app_ids
array of string
Application ids where the discount applies.
job_type
string
Type of discount job.
Enum
discount_type
string
Discount calculation type.
Enum
value
number
Discount value.
is_active
boolean
Active flag.
stage
string
Stage for maker-checker flow.
Enum
_schedule
object (DiscountScheduleV2)
Schedule of the discount.
DiscountScheduleV2
start
string
Required
Schedule start date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
end
string
Required
Schedule end date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
priority
integer
Priority of the discount. Higher value means higher priority.
cron
string
Cron expression (if applicable).
next_schedule
array of object (DiscountScheduleNextV2)
Next schedules generated by cron (if applicable).
Array of DiscountScheduleNextV2
start
string
Next schedule start date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
end
string
Next schedule end date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
priority
integer
Priority for the upcoming schedule window.
last_priority
integer
Nullable
Last applied priority (internal field).
discount_meta
object (DiscountMetaV2)
Timer metadata for countdown discounts.
DiscountMetaV2
timer
boolean
Determines whether the discount countdown is visible or not.
hours
integer
Countdown threshold hours.
minutes
integer
Countdown threshold minutes.
filter
object (DiscountFilterSchema)
Filters (for job_type=filters).
DiscountFilterSchema
brand_ids
object (InclusionExclusion)
Brand id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
store_ids
object (InclusionExclusion)
Store id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l1_category_ids
object (InclusionExclusion)
L1 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l2_category_ids
object (InclusionExclusion)
L2 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l3_category_ids
object (InclusionExclusion)
L3 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
factory_type_ids
object (InclusionExclusionObjectId)
Factory/price zone filters.
InclusionExclusionObjectId
include
array of string
Included ids.
exclude
array of string
Excluded ids.
rule
string
Rule expression (if used).
tags
array of string
Tags for discount job.
override_priority
boolean
Whether to override priority behavior.
_custom_json
object (CustomJSON)
Custom JSON blob.
CustomJSON
data
object
Arbitrary key-value payload. When omitted, root may contain arbitrary keys.
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
comment
string
Comment used for stage transitions and deactivation.
created_by
object (UserDetails)
UserDetails
username
string
Required
Username/email.
user_id
string
Required
User identifier.
modified_by
object (UserDetails)
UserDetails
username
string
Required
Username/email.
user_id
string
Required
User identifier.
created_on
string
Created timestamp in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
modified_on
string
Last modified timestamp in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
actions
string
Action(s) for maker-checker flow (e.g., approveReject).
oneOf Schema from below
Response
200
400
Success
DiscountJobV2
_id
string
Unique identifier of the discount job.
name
string
Name of the discount job.
company_id
integer
Company identifier.
app_ids
array of string
Application ids where the discount applies.
job_type
string
Type of discount job (product, sku, or filters).
Enum
discount_type
string
Discount calculation type.
Enum
value
number
Nullable
Discount value (required for flat/percentage/final depending on job type).
is_active
boolean
Whether the job is active. Activation also depends on stage=approved.
stage
string
Maker-checker stage of the job.
Enum
_schedule
object (DiscountScheduleV2)
Schedule of the discount.
DiscountScheduleV2
start
string
Schedule start date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
end
string
Schedule end date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
priority
integer
Priority of the discount. Higher value means higher priority.
cron
string
Cron expression (if applicable).
next_schedule
array of object (DiscountScheduleNextV2)
Next schedules generated by cron (if applicable).
Array of DiscountScheduleNextV2
start
string
Next schedule start date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
end
string
Next schedule end date-time in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
priority
integer
Priority for the upcoming schedule window.
last_priority
integer
Nullable
Last applied priority (internal field).
discount_meta
object (DiscountMetaV2)
Timer metadata for countdown discounts.
DiscountMetaV2
timer
boolean
Determines whether the discount countdown is visible or not.
hours
integer
Countdown threshold hours.
minutes
integer
Countdown threshold minutes.
filter
object (DiscountFilterSchema)
Filters (for job_type=filters).
DiscountFilterSchema
brand_ids
object (InclusionExclusion)
Brand id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
store_ids
object (InclusionExclusion)
Store id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l1_category_ids
object (InclusionExclusion)
L1 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l2_category_ids
object (InclusionExclusion)
L2 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
l3_category_ids
object (InclusionExclusion)
L3 category id filters.
InclusionExclusion
include
array of integer
Included ids.
exclude
array of integer
Excluded ids.
factory_type_ids
object (InclusionExclusionObjectId)
Factory/price zone filters.
InclusionExclusionObjectId
include
array of string
Included ids.
exclude
array of string
Excluded ids.
rule
string
Nullable
Rule expression (if used).
tags
array of string
Tags for discount job.
override_priority
boolean
Whether to override priority behavior.
_custom_json
object (CustomJSON)
Custom JSON blob.
CustomJSON
data
object
Arbitrary key-value payload. When omitted, root may contain arbitrary keys.
additionalProperties
Allows you to attach properties in addition to the ones mentioned above. Any additional properties are allowed.
file_id
string
Nullable
Associated file job id (for file-created jobs).
file_url
string
Nullable
Associated file URL (for file-created jobs).
batch_meta
object (DiscountJobBatchMetaV2)
Batch processing metadata (for file-created jobs).
DiscountJobBatchMetaV2
total_batches
integer
Total number of batches expected for this job.
processed_batches
array of integer
Batch indices that have been processed successfully.
last_processed_batch
integer
The chronologically last processed batch index.
processed_count
integer
The number of batches that have been processed successfully.
failed_count
integer
The number of batches that have failed.
status
string
Batch processing status.
Enum
error
string
Nullable
Error message if batch processing failed.
meta
object (DiscountJobMetaV2)
Internal scheduling meta (TriggerHappy job ids).
DiscountJobMetaV2
triggerhappy_start_job
string
Nullable
TriggerHappy job id for start schedule.
triggerhappy_end_job
string
Nullable
TriggerHappy job id for end schedule.
comment
string
Comment associated with stage transitions.
created_by
object (UserDetails)
UserDetails
username
string
Username/email.
user_id
string
User identifier.
modified_by
object (UserDetails)
UserDetails
username
string
Username/email.
user_id
string
User identifier.
created_on
string
Created timestamp in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
modified_on
string
Last modified timestamp in UTC.
Pattern : ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$
Examples
Parameters
company_id:
1
id:
"6989f3ed7bbd286976a6167a"
body:
body
PUT
/service/platform/discount/v2.0/company/{company_id}/job/{id}/
Loading...
Response
Loading...
PUT

Bulk update discount jobs (V2).

FDK Method Name: bulkUpdateDiscountJobsV2
Bulk update multiple Discount V2 jobs (stage transitions).
Requires company/price_rules/write access scope.
Parameters
company_id
integer
Required
A `company_id` is the unique identifier of the company.
Request body
job_ids
array of string
Required
List of job ids to update (max 50).
Maximum Items : 50
stage
string
Required
Target stage for the jobs.
Enum
comment
string
Comment for stage transition (required for certain transitions).
Response
200
400
Success
BulkUpdateDiscountV2JobsResult
results
object (BulkUpdateDiscountV2JobsResults)
BulkUpdateDiscountV2JobsResults
items
array of object (BulkUpdateJobStatusV2)
Array of per-job results.
Array of BulkUpdateJobStatusV2
name
string
Job name.
status
string
Update status for the job.
Enum
id
string
Job id.
error
string
Error message (only when status=failed).
status
string
Overall bulk update result.
Enum
message
string
Human readable summary.
Examples
Parameters
company_id:
1
body:
body
PUT
/service/platform/discount/v2.0/company/{company_id}/job/bulk/update
Loading...
Response
Loading...