Reserve points for an in-progress order
Points wallets only. Creates a pending outgoing transfer for reference_code, without yet deducting from the confirmed balance. Call take_reserved once the order is placed, or unreserve to release it.
POST
/wallets/{id}/reserveAuthorization
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idintegerrequiredRequest body
requiredapplication/jsonreference_codestringrequiredamountintegerrequireddescriptionstringshop_idstringResponses
200Reservation created
_linksHalLinksidintegerdirectionstringAllowed:
incomingoutgoingstatestringAllowed:
pendingcompletedreverseddeletedexpiredamountintegerPositive for incoming transfers, negative for outgoing.
original_amountintegerOrder total that earned this transfer, for points earned from a purchase.
descriptionstringreference_codestringpayment_methodstringshop_idstringwallet_idintegerbalance_expires_atstring<date-time>created_onstring<date-time>422Insufficient balance, or a reservation already exists for this reference_code
Request
curl -X POST "https://api.onbolder.com/v2/wallets/0/reserve" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"reference_code": "order-9001",
"amount": 100,
"description": "Order #9001"
}'const response = await fetch("https://api.onbolder.com/v2/wallets/0/reserve", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"reference_code": "order-9001",
"amount": 100,
"description": "Order #9001"
})
});import requests
response = requests.post(
"https://api.onbolder.com/v2/wallets/0/reserve",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"reference_code": "order-9001",
"amount": 100,
"description": "Order #9001"
},
)Response
{
"_links": {
"property1": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
},
"property2": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
}
},
"id": 0,
"direction": "incoming",
"state": "pending",
"amount": 0,
"original_amount": 0,
"description": "string",
"reference_code": "string",
"payment_method": "string",
"shop_id": "string",
"wallet_id": 0,
"balance_expires_at": "2019-08-24T14:15:22Z",
"created_on": "2019-08-24T14:15:22Z"
}Insufficient balance, or a reservation already exists for this reference_code