Skip to main content
POST
/
v3
/
profiles
/
{profile}
/
redeem
Add Reward, Point, or Credit Redemption
curl --request POST \
  --url https://api.{tenant}.getomneo.com/api/v3/profiles/{profile}/redeem \
  --header 'Content-Type: application/json' \
  --data '
{
  "currency": "<string>",
  "strict": true,
  "amount": 123,
  "meta": [
    "<string>"
  ],
  "transaction_external_id": "<string>",
  "transaction_receipt_ref": "<string>",
  "location_id": 123,
  "strategies": [],
  "benefits": [
    {
      "id": 123,
      "handle": "<string>",
      "quantity": 123
    }
  ]
}
'
import requests

url = "https://api.{tenant}.getomneo.com/api/v3/profiles/{profile}/redeem"

payload = {
"currency": "<string>",
"strict": True,
"amount": 123,
"meta": ["<string>"],
"transaction_external_id": "<string>",
"transaction_receipt_ref": "<string>",
"location_id": 123,
"strategies": [],
"benefits": [
{
"id": 123,
"handle": "<string>",
"quantity": 123
}
]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
currency: '<string>',
strict: true,
amount: 123,
meta: ['<string>'],
transaction_external_id: '<string>',
transaction_receipt_ref: '<string>',
location_id: 123,
strategies: [],
benefits: [{id: 123, handle: '<string>', quantity: 123}]
})
};

fetch('https://api.{tenant}.getomneo.com/api/v3/profiles/{profile}/redeem', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{tenant}.getomneo.com/api/v3/profiles/{profile}/redeem",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'currency' => '<string>',
'strict' => true,
'amount' => 123,
'meta' => [
'<string>'
],
'transaction_external_id' => '<string>',
'transaction_receipt_ref' => '<string>',
'location_id' => 123,
'strategies' => [

],
'benefits' => [
[
'id' => 123,
'handle' => '<string>',
'quantity' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.{tenant}.getomneo.com/api/v3/profiles/{profile}/redeem"

payload := strings.NewReader("{\n \"currency\": \"<string>\",\n \"strict\": true,\n \"amount\": 123,\n \"meta\": [\n \"<string>\"\n ],\n \"transaction_external_id\": \"<string>\",\n \"transaction_receipt_ref\": \"<string>\",\n \"location_id\": 123,\n \"strategies\": [],\n \"benefits\": [\n {\n \"id\": 123,\n \"handle\": \"<string>\",\n \"quantity\": 123\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.{tenant}.getomneo.com/api/v3/profiles/{profile}/redeem")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"<string>\",\n \"strict\": true,\n \"amount\": 123,\n \"meta\": [\n \"<string>\"\n ],\n \"transaction_external_id\": \"<string>\",\n \"transaction_receipt_ref\": \"<string>\",\n \"location_id\": 123,\n \"strategies\": [],\n \"benefits\": [\n {\n \"id\": 123,\n \"handle\": \"<string>\",\n \"quantity\": 123\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.{tenant}.getomneo.com/api/v3/profiles/{profile}/redeem")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"<string>\",\n \"strict\": true,\n \"amount\": 123,\n \"meta\": [\n \"<string>\"\n ],\n \"transaction_external_id\": \"<string>\",\n \"transaction_receipt_ref\": \"<string>\",\n \"location_id\": 123,\n \"strategies\": [],\n \"benefits\": [\n {\n \"id\": 123,\n \"handle\": \"<string>\",\n \"quantity\": 123\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": "<string>",
    "profile_id": "<string>",
    "total_localised": "<string>",
    "total": "<string>",
    "location_id": "<string>",
    "balances": {
      "reward_balance": "<string>",
      "credit_balance": "<string>",
      "point_balance": "<string>",
      "point_balance_dollars": "<string>",
      "benefit_balance": "<string>",
      "combined_balance_dollars": "<string>",
      "localised": {
        "reward_balance": "<string>",
        "point_balance_dollars": "<string>",
        "combined_balance_dollars": "<string>"
      },
      "currency": {
        "id": 123,
        "from": "<string>",
        "to": "<string>",
        "rate": 123,
        "is_system": true,
        "created_at": "<string>",
        "updated_at": "<string>"
      }
    },
    "meta": "<string>",
    "transaction_external_id": "<string>",
    "transaction_receipt_ref": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "location": {
      "id": "<string>",
      "type": "<string>",
      "name": "<string>",
      "description": "<string>",
      "phone": "<string>",
      "email": "<string>",
      "external_id": "<string>",
      "is_published": "<string>",
      "is_permanently_closed": "<string>"
    },
    "currency": {
      "id": 123,
      "from": "<string>",
      "to": "<string>",
      "rate": 123,
      "is_system": true,
      "created_at": "<string>",
      "updated_at": "<string>"
    }
  }
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>",
"errors": {}
}

Path Parameters

profile
string<uuid>
required

The profile ID

Body

application/json
currency
string
strict
boolean
amount
number | null
meta
string[] | null
transaction_external_id
string | null
transaction_receipt_ref
string | null
location_id
integer | null
strategies
enum<string>[]

Default to false

Minimum array length: 1
Available options:
points,
rewards,
benefits,
credits
benefits
object[] | null

Response

Return the redemption.

SuccessfulRedemption

data
SuccessfulRedemption · object
required