- Introduction
- Authentication
- Errors
- Change Logs
- Promotion
- Loyalty
- Wallet
- PIM
- Merchant
- How to
Start Transaction
Production
Production
POST
https://api.b2b.retter.io/5p1hp1d2t/CALL/Promotion/startTransaction/{B2B_PROMOTION_PROJECT_ID}
Promotion
Last modified:2024-10-17 13:27:01
Request
Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Path Params
B2B_PROMOTION_PROJECT_ID
string
required
Header Params
x-api-key
string
required
Body Params application/json
cart
object
required
subOrders
array [object {3}]
required
items
array [object {3}]
optional
user
object
required
userId
string
required
pointCurrency
string
optional
usePoint
number
optional
storeId
string
optional
storeName
string
optional
transactionId
string
required
Example
{
"cart": {
"subOrders": [
{
"id": "string",
"subOrderId": "string",
"price": 0
}
],
"items": [
{
"id": "string",
"qty": 0,
"totalPrice": 0
}
]
},
"user": {
"userId": "string"
},
"pointCurrency": "string",
"usePoint": 0,
"storeId": "string",
"storeName": "string",
"transactionId": "string"
}
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://api.b2b.retter.io/5p1hp1d2t/CALL/Promotion/startTransaction/' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw ''
Responses
🟢200OK
application/json
Body
runWithLoyalty
boolean
deprecated
message
string
optional
transactionId
string
optional
userId
string
optional
couponId
string
optional
transaction
object
optional
transactionId
string
optional
promotions
array [object {6}]
optional
couponId
string
optional
transactionTimeout
integer
optional
cart
object
optional
Example
{
"runWithLoyalty": true,
"message": "string",
"transactionId": "string",
"userId": "string",
"couponId": "string",
"transaction": {
"transactionId": "string",
"promotions": [
{
"id": "string",
"promotionTemplateId": "string",
"giftAmount": 0,
"tag": "string",
"promotionType": "string",
"userMessage": "string"
}
],
"couponId": "string",
"transactionTimeout": 0,
"cart": {
"subOrders": [
{
"merchantId": "string",
"subOrderId": "string",
"id": "string",
"price": 0,
"itemType": "string",
"priceAfterPromotion": 0,
"displayPrice": 0,
"promotionDiscount": 0,
"appliedPromotions": [
{
"id": "string",
"promotionTemplateId": "string",
"giftAmount": 0
}
]
}
],
"items": [
{
"merchantId": "string",
"id": "string",
"qty": 0,
"attributes": {
"shortName": "string",
"longName": "string",
"brand": "string",
"categories": [
{
"id": "string",
"name": "string"
}
],
"images": [
"string"
],
"productLimit": 0,
"logisticTags": [
{}
],
"etiketler": [
"string"
]
},
"price": 0,
"totalPrice": 0,
"itemType": "string",
"promotionDiscount": 0,
"priceAfterPromotion": 0,
"appliedPromotions": [
{
"id": "string",
"promotionTemplateId": "string",
"giftAmount": 0
}
],
"totalPromotionDiscount": 0,
"totalPriceAfterPromotion": 0,
"totalDisplayPrice": 0
}
]
}
}
}
🟠400Bad Request
🟠403Forbidden
🟠404Record Not Found
Modified at 2024-10-17 13:27:01