Create order
Changed onUse /orders endpoint to create an order.
Orders are used to handle customers' payments of previously defined offers. Orders expire after 24 hours unless the payment is captured. Payment method is required in order entity for payment but can be added in update order and fetch in /payment-methods.
AUTHORIZATION Authorization with <glossary:JWT> is required.
Request
- Base URLhttps://mediastoreapi-sandbox.cleeng.com
- URLhttps://mediastoreapi-sandbox.cleeng.com/orders
- AuthAPI key in header Authorization
Request body
Response
200
Example response
{
"responseData": {
"success": true,
"message": "Order created successfully",
"order": {
"id": 434946589,
"customerId": 996028494,
"customer": {
"locale": "pl_PL",
"email": "example@cleeng.com"
},
"publisherId": 120355559,
"offerId": "S567921766_NL",
"offer": {
"title": "Monthly subscription (recurring) to customerName",
"price": 18.3636,
"currency": "EUR"
},
"totalPrice": 22.58,
"priceBreakdown": {
"offerPrice": 18.36,
"discountedPrice": 18.36,
"taxValue": 4.22
},
"taxRate": 0.23,
"currency": "EUR",
"country": "PL",
"expirationDate": 1580307560,
"requiredPaymentDetails": true
}
}
}Changes
- breaking
the request property
became required - breaking
the
request property type changed fromintegertostring, and format fromint32to no format - warning
deleted the
headerrequest parameterContent-Type - warning
deleted the
headerrequest parameterX-Publisher-Token - warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - info
api operation id
create-an-orderremoved and replaced withcreate-order - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- breaking