Create a custom promotion
1 min
POST
https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/custom-promotion
Body Parameters
- bodypayment.pricing.promotions.CustomerCustomPromotion.in
- promotionpayment.pricing.promotions.Promotion.in
- payment.pricing.promotions.pre_created.AbsoluteProductAutomaticPromotion.in
- idstringrequiredDescription
- typestringDescriptionDefaultabsolute_product_automatic_promotion
- promotionNamestringrequiredDescription
- descriptionstring
- lockingStatuscom.amberflo.service.common.LockingStatus.in
- dimensionConstraintMapmap<string, string>
- customerTagsmap<string, string>
- isHiddenboolean
- discountnumber
- totalMaxDiscountnumber
- targetProductIdstring
- payment.pricing.promotions.pre_created.AbsoluteProductItemAutomaticPromotion.in
- idstringrequiredDescription
- typestringDescriptionDefaultabsolute_product_item_automatic_promotion
- promotionNamestringrequiredDescription
- descriptionstring
- lockingStatuscom.amberflo.service.common.LockingStatus.in
- dimensionConstraintMapmap<string, string>
- customerTagsmap<string, string>
- isHiddenboolean
- discountnumber
- totalMaxDiscountnumber
- targetProductItemIdstring
- isRegExbooleanDescription
- payment.pricing.promotions.pre_created.AbsoluteProductItemSalesEventPromotion.in
- idstringrequiredDescription
- typestringDescriptionDefaultabsolute_product_item_sales_event_promotion
- promotionNamestringrequiredDescription
- descriptionstring
- lockingStatuscom.amberflo.service.common.LockingStatus.in
- dimensionConstraintMapmap<string, string>Description
- customerTagsmap<string, string>Description
- acceptablePromotionTimeRangepayment.common.TimeRange.inDescription
- startTimeInSecondsinteger<int64>
- endTimeInSecondsinteger<int64>
- recurrenceIntervalpayment.pricing.promotions.PromotionRecurrenceInterval.inDescription
- intervalLengthpayment.pricing.promotions.PromotionRecurringIntervalLength.inDescription
- Max depth limit reached
- intervalLengthCountinteger<int32>Description
- maxRecurrenceinteger<int32>Description
- discountnumberDescription
- targetProductItemIdstringDescription
- isRegExbooleanDescription
- payment.pricing.promotions.pre_created.AbsoluteProductSalesEventPromotion.in
- idstringrequiredDescription
- typestringDescriptionDefaultabsolute_product_sales_event_promotion
- promotionNamestringrequiredDescription
- descriptionstring
- lockingStatuscom.amberflo.service.common.LockingStatus.in
- Max depth limit reached
- dimensionConstraintMapmap<string, string>Description
- customerTagsmap<string, string>Description
- acceptablePromotionTimeRangepayment.common.TimeRange.inDescription
- Max depth limit reached
- recurrenceIntervalpayment.pricing.promotions.PromotionRecurrenceInterval.inDescription
- Max depth limit reached
- discountnumberDescription
- targetProductIdstringDescription
- payment.pricing.promotions.pre_created.FreeTrialPromotion.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.GenericItemPromotion.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.GenericProductPromotion.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.ProductAbsolutePartnerDiscount.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.ProductItemAbsolutePartnerDiscount.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.RelativeProductItemPartnerDiscount.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.RelativeProductAutomaticPromotion.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.RelativeProductItemAutomaticPromotion.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.RelativeProductItemSalesEventPromotion.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.ProductRelativePartnerDiscount.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.RelativeProductSalesEventPromotion.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.TieredAbsoluteProductAutomaticPromotion.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.TieredAbsoluteProductItemAutomaticPromotion.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.TieredRelativeProductAutomaticPromotion.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.TieredRelativeProductItemAutomaticPromotion.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedAbsoluteProductItemDiscount.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedAbsoluteProductDiscount.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedRelativeProductItemDiscount.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedRelativeProductDiscount.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.RelativeProductFullDiscount.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedTieredAbsoluteProductItemDiscount.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedTieredAbsoluteProductDiscount.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedTieredRelativeProductItemDiscount.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedTieredRelativeProductDiscount.in
- Max depth limit reached
- payment.pricing.promotions.pre_created.AbsolutePlanPromotion.in
- Max depth limit reached
- customerAppliedPromotionpayment.pricing.customer.CustomerAppliedPromotion.in
- idstringDescription
- productIdstringDescription
- customerIdstringDescription
- promotionIdstringDescription
- appliedTimeInSecondsinteger<int64>Description
- addedTimeInSecondsinteger<int64>Description
- removedTimeInSecondsinteger<int64>Description
- relationIdstringDescription
- appliedTimeRangepayment.common.TimeRange.inDescription
- startTimeInSecondsinteger<int64>
- endTimeInSecondsinteger<int64>
- prioritynumberDescription
- removalContextmap<string, string>Description
- commitmentIdstringDescription
- entityProductInvoicespayment.billing.detailed.EntityProductInvoice.in[]Description
- invoiceUristring
- createdTimeInSecondsinteger<int64>
- amountnumber
- invoiceAmountnumber
- amountLeftInCyclenumberDescription
- totalAmountLeftnumberDescription
Responses
200
- payment.pricing.promotions.CustomerCustomPromotion.out
- promotionpayment.pricing.promotions.Promotion.out
- payment.pricing.promotions.pre_created.AbsoluteProductAutomaticPromotion.out
- idstringrequiredDescription
- typestringDescriptionDefaultabsolute_product_automatic_promotion
- promotionNamestringrequiredDescription
- descriptionstring
- lockingStatuscom.amberflo.service.common.LockingStatus.out
- lastUpdateTimeInMillisinteger<int64>Description
- dimensionConstraintMapmap<string, string>
- customerTagsmap<string, string>
- isHiddenboolean
- discountnumber
- totalMaxDiscountnumber
- targetProductIdstring
- payment.pricing.promotions.pre_created.AbsoluteProductItemAutomaticPromotion.out
- idstringrequiredDescription
- typestringDescriptionDefaultabsolute_product_item_automatic_promotion
- promotionNamestringrequiredDescription
- descriptionstring
- lockingStatuscom.amberflo.service.common.LockingStatus.out
- lastUpdateTimeInMillisinteger<int64>Description
- dimensionConstraintMapmap<string, string>
- customerTagsmap<string, string>
- isHiddenboolean
- discountnumber
- totalMaxDiscountnumber
- targetProductItemIdstring
- isRegExbooleanDescription
- payment.pricing.promotions.pre_created.AbsoluteProductItemSalesEventPromotion.out
- idstringrequiredDescription
- typestringDescriptionDefaultabsolute_product_item_sales_event_promotion
- promotionNamestringrequiredDescription
- descriptionstring
- lockingStatuscom.amberflo.service.common.LockingStatus.out
- lastUpdateTimeInMillisinteger<int64>Description
- dimensionConstraintMapmap<string, string>Description
- customerTagsmap<string, string>Description
- acceptablePromotionTimeRangepayment.common.TimeRange.outDescription
- startTimeInSecondsinteger<int64>
- endTimeInSecondsinteger<int64>
- recurrenceIntervalpayment.pricing.promotions.PromotionRecurrenceInterval.outDescription
- intervalLengthpayment.pricing.promotions.PromotionRecurringIntervalLength.outDescription
- Max depth limit reached
- intervalLengthCountinteger<int32>Description
- maxRecurrenceinteger<int32>Description
- discountnumberDescription
- targetProductItemIdstringDescription
- isRegExbooleanDescription
- payment.pricing.promotions.pre_created.AbsoluteProductSalesEventPromotion.out
- idstringrequiredDescription
- typestringDescriptionDefaultabsolute_product_sales_event_promotion
- promotionNamestringrequiredDescription
- descriptionstring
- lockingStatuscom.amberflo.service.common.LockingStatus.out
- Max depth limit reached
- lastUpdateTimeInMillisinteger<int64>Description
- dimensionConstraintMapmap<string, string>Description
- customerTagsmap<string, string>Description
- acceptablePromotionTimeRangepayment.common.TimeRange.outDescription
- Max depth limit reached
- recurrenceIntervalpayment.pricing.promotions.PromotionRecurrenceInterval.outDescription
- Max depth limit reached
- discountnumberDescription
- targetProductIdstringDescription
- payment.pricing.promotions.pre_created.FreeTrialPromotion.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.GenericItemPromotion.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.GenericProductPromotion.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.ProductAbsolutePartnerDiscount.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.ProductItemAbsolutePartnerDiscount.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.RelativeProductItemPartnerDiscount.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.RelativeProductAutomaticPromotion.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.RelativeProductItemAutomaticPromotion.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.RelativeProductItemSalesEventPromotion.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.ProductRelativePartnerDiscount.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.RelativeProductSalesEventPromotion.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.TieredAbsoluteProductAutomaticPromotion.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.TieredAbsoluteProductItemAutomaticPromotion.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.TieredRelativeProductAutomaticPromotion.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.TieredRelativeProductItemAutomaticPromotion.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedAbsoluteProductItemDiscount.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedAbsoluteProductDiscount.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedRelativeProductItemDiscount.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedRelativeProductDiscount.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.RelativeProductFullDiscount.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedTieredAbsoluteProductItemDiscount.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedTieredAbsoluteProductDiscount.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedTieredRelativeProductItemDiscount.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.TimeLimitedTieredRelativeProductDiscount.out
- Max depth limit reached
- payment.pricing.promotions.pre_created.AbsolutePlanPromotion.out
- Max depth limit reached
- customerAppliedPromotionpayment.pricing.customer.CustomerAppliedPromotion.out
- idstringDescription
- productIdstringDescription
- customerIdstringDescription
- promotionIdstringDescription
- appliedTimeInSecondsinteger<int64>Description
- addedTimeInSecondsinteger<int64>Description
- removedTimeInSecondsinteger<int64>Description
- relationIdstringDescription
- appliedTimeRangepayment.common.TimeRange.outDescription
- startTimeInSecondsinteger<int64>
- endTimeInSecondsinteger<int64>
- prioritynumberDescription
- removalContextmap<string, string>Description
- commitmentIdstringDescription
- entityProductInvoicespayment.billing.detailed.EntityProductInvoice.out[]Description
- invoiceUristring
- createdTimeInSecondsinteger<int64>
- amountnumber
- invoiceAmountnumber
- amountLeftInCyclenumberDescription
- totalAmountLeftnumberDescription
curl
curl --request POST \
--url https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/custom-promotion \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"promotion": {
"id": "",
"type": "absolute_product_automatic_promotion",
"promotionName": ""
}
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"promotion": {
"id": "",
"type": "absolute_product_automatic_promotion",
"promotionName": ""
}
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/custom-promotion", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/custom-promotion")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"promotion": {
"id": "",
"type": "absolute_product_automatic_promotion",
"promotionName": ""
}
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/custom-promotion"
payload = json.dumps({
"promotion": {
"id": "",
"type": "absolute_product_automatic_promotion",
"promotionName": ""
}
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Successful request
{
"promotion": {},
"customerAppliedPromotion": {
"id": "",
"productId": "",
"customerId": "",
"promotionId": "",
"appliedTimeInSeconds": "",
"addedTimeInSeconds": "",
"removedTimeInSeconds": "",
"relationId": "",
"appliedTimeRange": {
"startTimeInSeconds": "",
"endTimeInSeconds": ""
},
"priority": 0,
"removalContext": "",
"commitmentId": "",
"entityProductInvoices": [
{
"invoiceUri": "",
"createdTimeInSeconds": "",
"amount": 0,
"invoiceAmount": 0
}
],
"amountLeftInCycle": 0,
"totalAmountLeft": 0
}
}