- LIGHTHOUSE Rest API Walkthrough
- Lighthouse APIs
- Authentication
- TransactionStatus
- xcAssetDetail
- Shopping Cart
- xcAuthorizedProduct
- xcCFAMapping
- xcCFAMaster
- xcCFAStock
- xcDistributorDetail
- xcGetPromotionDetail
- xcHSNMaster
- xcJourneyPlan
- xcSubDistributorMargin
- xcOrganizationHierarchy
- xcGetOrganizationHierarchy
- xcOutlet
- xcOutletPriceMapping
- xcPricingControl
- xcPricingPlan
- xcProduct
- xcRouteDetail
- xcTerritoryHierarchy
- xcUserList
- xdARCollection
- xdAROpenItems
- xdCreditDebitNote
- xdCreditDetails
- xdDMSARCollection
- xdEmptieDispatchAdvice
- xdGetPurchaseOrder
- xdGRNDetails
- xdLocationCreditDetails
- xdOpenItems
- xdPendingInvoice
- xdPoFillRate
- xdPOStatus
- xdProduct
- xdPromotion
- xdPurchaseInvoice
- xdSalesInvoice
- xdSalesOrder
- xdSalesOrderStatusUpdate
- xdSalesReturn
- xdStockTransfer
- xdWarehouseStock
- xdInterDTStockIn
- xdInterDTStockOut
- xdGetPOShoppingCart
- xdReturnOrder
- xdDMSStockAdjustment
- xcDistributorPriceMapping
- xdLocationDetails
- xdBeatDetails
- xdVehicleDetails
- xdHHTMaster
- xdPricingPlan
- xdPrimaryPrice
- xdAuthorizedProduct
- xdWarehouseInventory
- xdCustomerMaster
- xdPromotionDefinition
- xdJourneyPlan
- xdRouteSetupV2
- xdCustomerTarget
- xdRouteTarget
- xdSalesInvoice
- xdSchemeAchievement
- xdVanLoad
- xdVanStock
- xdOrderHistoryV1
- xnBeatMaster
- xdSupervisorDetails
- xnRouteSetup
- xdVisitSummaryList
- xdGetNewCustomerRequest
- xdCustomerInventory
- xdGetUploadSyncKeys
- xdGetLoadRequest
- xdGetCustomerGeoCode
- xdDMSVanOffLoad
- xdGetRetailerContactInfo
- xdRouteSetupV2
- xdGetSalesman
- xdCustomer
- xdSetLoadRequest
- xdLoadOut
- xdLoadOutStatus
- xcPromotion
- xcProductHierarchy
- xdIQData
- xdSetReturnHistoryV1
- xdSetDNPlanInfo
- xnJourneyPlanTemplate
- xdGetBeatMaster
- xcGetListSchemes
- xcGetSchemeIsDuplicate
- xcUpdateShortClosure
- xcCreateScheme
- xcGetListBundleSchemes
- xdPODURL
- xdGetPromoAccrualDetails
- xcExclusionList
- xdProductMaster
- TerritoryRoute
- TerritoryRoute Copy
/api/xd/1.0/set_promotion_definition_v1
Developing
POST
/api/xd/1.0/set_promotion_definition_v1
Request
Body Params application/json
promotion_control
arrayĀ [object {32}]Ā
required
tenant_code
stringĀ
required
<= 48 characters
promotion_code
stringĀ
required
<= 100 characters
promotion_description
stringĀ
required
<= 200 characters
promotion_remarks
stringĀ
optional
<= 1000 characters
promotion_type_code
integerĀ
required
range_basis
integerĀ
required
amount_basis
integerĀ
optional
exclusion_option
integerĀ
required
promotion_indicator
stringĀ
required
<= 6 characters
condition_type
stringĀ
optional
<= 50 characters
sub_condition_type
stringĀ
optional
<= 50 characters
promotion_product_level
integerĀ
optional
enable_base_set
integerĀ
optional
enable_foc_set
integerĀ
optional
pro_rata
stringĀ
optional
<= 2 characters
allow_promotion_quota
integerĀ
required
allow_location_quota
integerĀ
optional
allow_cap_quota
integerĀ
optional
promotion_quota
numberĀ <float>
required
promotion_quota_code
stringĀ
optional
<= 100 characters
minimum_sku
integerĀ
optional
display_type
integerĀ
optional
application_type
integerĀ
optional
disable_gift_icon
integerĀ
optional
allow_qps
integerĀ
optional
promotion_mechanics
stringĀ
optional
<= 50 characters
apply_promotion_as_coupon
integerĀ
optional
exclusion_group_code
stringĀ
optional
<= 100 characters
exclusion_group_list_for_net_value
stringĀ
optional
<= 1000 characters
promotion_assignments
arrayĀ [object {7}]Ā
optional
promo_groups
arrayĀ [object {9}]Ā
optional
customer_promotion_mappings
arrayĀ [object {21}]Ā
optional
Example
{
"promotion_control": [
{
"tenant_code": "string",
"promotion_code": "string",
"promotion_description": "string",
"promotion_remarks": "string",
"promotion_type_code": 0,
"range_basis": 0,
"amount_basis": 0,
"exclusion_option": 0,
"promotion_indicator": "string",
"condition_type": "string",
"sub_condition_type": "string",
"promotion_product_level": 0,
"enable_base_set": 0,
"enable_foc_set": 0,
"pro_rata": "string",
"allow_promotion_quota": 0,
"allow_location_quota": 0,
"allow_cap_quota": 0,
"promotion_quota": 0,
"promotion_quota_code": "string",
"minimum_sku": 0,
"display_type": 0,
"application_type": 0,
"disable_gift_icon": 0,
"allow_qps": 0,
"promotion_mechanics": "string",
"apply_promotion_as_coupon": 0,
"exclusion_group_code": "string",
"exclusion_group_list_for_net_value": "string",
"promotion_assignments": [
{
"tenant_code": "string",
"promotion_code": "string",
"range_low": 0,
"range_high": 0,
"repeating_range": 0,
"promotion_amount": 0,
"slab_number": 0
}
],
"promo_groups": [
{
"tenant_code": "string",
"promotion_code": "string",
"group_type": "string",
"product_hierarchy_code": "string",
"item_code": "string",
"units_of_measure": "string",
"item_type_code": "string",
"quantity": 0,
"set_code": "string"
}
],
"customer_promotion_mappings": [
{
"tenant_code": "string",
"location_code": "string",
"customer_code": "string",
"category_code1": "string",
"category_code2": "string",
"category_code3": "string",
"category_code4": "string",
"category_code5": "string",
"category_code6": "string",
"category_code7": "string",
"category_code8": "string",
"category_code9": "string",
"customer_hierarchy_code": "string",
"segment_code": "string",
"exclusion_customer_codes": "string",
"promotion_code": "string",
"start_date": "2024-04-16T11:04:00.730Z",
"end_date": "2024-04-16T11:04:00.730Z",
"active_indicator": 0,
"sequence_number": 0,
"group_sequence_no": 0
}
]
}
]
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://testapi.com/api/xd/1.0/set_promotion_definition_v1' \
--header 'Content-Type: application/json' \
--data-raw '{
"promotion_control": [
{
"tenant_code": "string",
"promotion_code": "string",
"promotion_description": "string",
"promotion_remarks": "string",
"promotion_type_code": 0,
"range_basis": 0,
"amount_basis": 0,
"exclusion_option": 0,
"promotion_indicator": "string",
"condition_type": "string",
"sub_condition_type": "string",
"promotion_product_level": 0,
"enable_base_set": 0,
"enable_foc_set": 0,
"pro_rata": "string",
"allow_promotion_quota": 0,
"allow_location_quota": 0,
"allow_cap_quota": 0,
"promotion_quota": 0,
"promotion_quota_code": "string",
"minimum_sku": 0,
"display_type": 0,
"application_type": 0,
"disable_gift_icon": 0,
"allow_qps": 0,
"promotion_mechanics": "string",
"apply_promotion_as_coupon": 0,
"exclusion_group_code": "string",
"exclusion_group_list_for_net_value": "string",
"promotion_assignments": [
{
"tenant_code": "string",
"promotion_code": "string",
"range_low": 0,
"range_high": 0,
"repeating_range": 0,
"promotion_amount": 0,
"slab_number": 0
}
],
"promo_groups": [
{
"tenant_code": "string",
"promotion_code": "string",
"group_type": "string",
"product_hierarchy_code": "string",
"item_code": "string",
"units_of_measure": "string",
"item_type_code": "string",
"quantity": 0,
"set_code": "string"
}
],
"customer_promotion_mappings": [
{
"tenant_code": "string",
"location_code": "string",
"customer_code": "string",
"category_code1": "string",
"category_code2": "string",
"category_code3": "string",
"category_code4": "string",
"category_code5": "string",
"category_code6": "string",
"category_code7": "string",
"category_code8": "string",
"category_code9": "string",
"customer_hierarchy_code": "string",
"segment_code": "string",
"exclusion_customer_codes": "string",
"promotion_code": "string",
"start_date": "2024-04-16T11:04:00.730Z",
"end_date": "2024-04-16T11:04:00.730Z",
"active_indicator": 0,
"sequence_number": 0,
"group_sequence_no": 0
}
]
}
]
}'
Responses
š¢200OK
application/json
Body
status
integerĀ
required
message
stringĀ
required
transaction_id
stringĀ
required
record_count
integerĀ
required
Example
{
"status": 0,
"message": "string",
"transaction_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"record_count": 0
}
Modified atĀ 2024-04-16 11:18:39