PlaceOrder API
Use the PlaceOrder API to place the order for a voucher via the Rewards API
Base URL :
curl -X POST {OAUTH_URL}/v1/oauth/api
-H 'Authorization: Bearer eyJ0b2tlbkNvbnRlbnQiOnsiaXNzdWVkRm9yIjoiRnJlc2h3b3JrcyIsInNjb3BlIjoiIiwiaXNzdWVkQXQiOjE1NTk4MDQ1Nzg1ODIsImV4cGlyZXNBdCI6IjIwMTktMDYtMjFUMDc6MDI6NTguNTgyWiIsInRva2VuX3R5cGUiOiJVU0VSIn0sImFfdCI6ImV5SmxibU1pT2lKQk1USTRRMEpsETFVoVE1qVTJJaXdpWVd4bklqb2lSVU5FU0MxRlV5SXNJbXRwWkNJNkltVnVZeUlzSW1Wd2F5STZleUpyZEhraU9pSkZReUlzSW1OeWRpSTZJbEF0TWpVMklpd2llQ0k2SWpoMmJVTkVRMUZQZW1wQlNHWndabXQ0TVhjNVluZHphM1JhZWtRek0ySXRZamx0VVhSclEyRnhNV3NpTENKNUlqb2lZMGR0V2kxdWIySjBWbUptTVdGdVNraDBUMmxoWW5VMFZHUlVhRzVVYmpCYWRuWnJabGMwYzBWb2N5SjlmUS4uU1h3TlNUSWhFUXNlN0htaXpPUmFIQS5NRzBVUy1lek1IOEFsbWFLc2ZTY3Nwa2FlYzBIcW9FcUV1YXRoNHRSTTRpeVg2dFByX1ZjTnlsdnk5YjlGLTZHR01DbjY1TjYwYnpIUUJtRVZvZGRYVWlvQS1kTkpuaE9KdThHczRfeW9pM042VGFOdWhjRENCUGtwWk1CeTlDRjJBaEh4UGotQkd0SzdEamhNbjBBQXpTM1VhTE11eUdrTmNwSGxQSUxNcFlVM'
--header 'Content-Type: application/json'
-d '{
"query": "plumProAPI.mutation.placeOrder",
"tag": "plumProAPI",
"variables": {
"data":{
"productId":15365,
"quantity": 1,
"denomination": 20,
"email":"",
"contact":"+1-5234567890",
"tag":"",
"poNumber":"PO12662",
"notifyReceiverEmail":0,
"notifyAdminEmail":0
}
}
}
200 : Success
200 : Successreturns list of vouchers filtered by the applicable filters
400 : Failure
400 : FailureValidation error in place order
401 : Failure
401 : FailureClinets not allowed to place international orders
403 : Failure
403 : FailureFor procuring amazon vouchers , one needs to get amazon KYC done.
404 : Failure
404 : Failure Invalid denomination for the product
422: Failure
422: FailureFailed to process order
409 : Failure
409 : FailureClient not allowed to place more than 10 orders
502 : Failure
502 : Failure Failed to fetch currency details of the client.
500: Failure
500: FailureInternal server error
Parameters
Body Parameters
Body ParametersProperty
Type
Description
productId*
Integer
ProductId of the product to be ordered
quantity*
Integer
Quantity of the product to be ordered
denomination
Integer
Denomination of the product to be ordered
email
String
Email on which the product should be delivered
contact
String
Mobile number the product should be delivered to in the format specified, Optional for products except Paytm
tag
String
A comment or reference data parameter
poNumber
String
Client-side orderId or reference id
notifyAdminEmail*
Integer
Send 1 if order reference need to be emailed to Admin user
notifyReceiverEmail*
Integer
Send 1 if the product should be delivered via email to the receiver
Body Parameters
Body ParametersProperty
Type
Description
status
Integer
0 (Failure) / 1 (Successful)
orderId
Integer
Order id of the order
tag
String
Order’s tag
amountCharged
Integer
Amount charged for the order in Client’s base currency
Currency Code
String
Base currency code of the client
currencyValue
Float
Currency Value will be showing the exchange rate between the base currency of the account and product currency
discountPercent
Float
Percentage of discount if any
orderDiscount
Float
Discount amount based on discount Percent
orderTotal
Float
Order total of the order excluding the discount
deliveryStatus
String
Product delivery status of the order
vouchers
Array
Array of vouchers ordered
vouchers.productid
Integer
Product Id of the product,
vouchers.voucherCode
String
Voucher Code or url based on the type parameter
vouchers.pin
String
Pin for the voucher if applicable
vouchers.validity
String
The validity of the voucher
vouchers.amount
String
Denomination of the voucher ordered
vouchers.currency
String
The currency of the ordered product
vouchers.currencyValue
Float
Value compared to INR
vouchers.orderStatus
String
Order place status of the order
vouchers.country
String
Countries that the product can be redeemed in
vouchers.type
String
Type of vouchers,For eg: pin, codePin, url
Last updated
Was this helpful?