Edit Reward
curl --request PUT \
--url https://api.{tenant}.getomneo.com/api/v3/rewards/{reward} \
--header 'Content-Type: application/json' \
--data '
{
"expires_at": "2023-11-07T05:31:56Z",
"meta": [
"<string>"
],
"value_initial": 123,
"value_remaining": 123
}
'import requests
url = "https://api.{tenant}.getomneo.com/api/v3/rewards/{reward}"
payload = {
"expires_at": "2023-11-07T05:31:56Z",
"meta": ["<string>"],
"value_initial": 123,
"value_remaining": 123
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
expires_at: '2023-11-07T05:31:56Z',
meta: ['<string>'],
value_initial: 123,
value_remaining: 123
})
};
fetch('https://api.{tenant}.getomneo.com/api/v3/rewards/{reward}', 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/rewards/{reward}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'expires_at' => '2023-11-07T05:31:56Z',
'meta' => [
'<string>'
],
'value_initial' => 123,
'value_remaining' => 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/rewards/{reward}"
payload := strings.NewReader("{\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"meta\": [\n \"<string>\"\n ],\n \"value_initial\": 123,\n \"value_remaining\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.{tenant}.getomneo.com/api/v3/rewards/{reward}")
.header("Content-Type", "application/json")
.body("{\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"meta\": [\n \"<string>\"\n ],\n \"value_initial\": 123,\n \"value_remaining\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/rewards/{reward}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"meta\": [\n \"<string>\"\n ],\n \"value_initial\": 123,\n \"value_remaining\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"profile_id": "<string>",
"timezone": "<string>",
"value_initial": "<string>",
"value_remaining": "<string>",
"has_notified_issue": true,
"has_notified_expiry": true,
"has_notified_extend": true,
"expires_at": "<string>",
"issued_at": "<string>",
"is_expired": "<string>",
"is_active": "<string>",
"issued_local_at": "<string>",
"expires_local_at": "<string>",
"notify_issue_at": "<string>",
"notify_expiry_at": "<string>",
"extended_at": "<string>",
"definition": {
"id": 123,
"name": "<string>",
"handle": "<string>",
"region_id": 123,
"region": {
"id": 123,
"name": "<string>",
"handle": "<string>"
},
"currency": "<string>",
"period": 123,
"period_type": "<string>",
"absolute_expiry": "<string>",
"expiry_condition": [
"<unknown>"
],
"description": "<string>",
"short_description": "<string>",
"long_description": "<string>",
"terms_conditions": "<string>",
"earn_instructions": "<string>",
"icon": "<string>",
"image_url": "<string>",
"issue_target_id": 123,
"expiry_target_id": 123,
"extend_target_id": 123,
"notify_issue_offset": 123,
"notify_expiry_offset": 123,
"notify_schedule_offset": 123,
"notify_issue_offset_days": 123,
"notify_issue_offset_hour": 123,
"notify_remind_offset_days": 123,
"notify_remind_offset_hour": 123,
"notify_extend_offset_days": 123,
"notify_extend_offset_hour": 123,
"internal_notes": "<string>",
"type": "<string>",
"value": 123,
"max_value": 123,
"is_extendable": true,
"is_assignable": true,
"is_reassignable": true,
"is_published": true,
"extend_days": 123,
"extend_days_condition": [
"<unknown>"
],
"tags": [
"<string>"
],
"created_at": "<string>",
"updated_at": "<string>"
},
"meta": [
"<unknown>"
],
"created_at": "<string>",
"updated_at": "<string>",
"source_id": 123,
"source_type": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Reward
Edit Reward
A PUT to the /rewards/{rewardId} endpoint allows your application to edit a Reward record.
PUT
/
v3
/
rewards
/
{reward}
Edit Reward
curl --request PUT \
--url https://api.{tenant}.getomneo.com/api/v3/rewards/{reward} \
--header 'Content-Type: application/json' \
--data '
{
"expires_at": "2023-11-07T05:31:56Z",
"meta": [
"<string>"
],
"value_initial": 123,
"value_remaining": 123
}
'import requests
url = "https://api.{tenant}.getomneo.com/api/v3/rewards/{reward}"
payload = {
"expires_at": "2023-11-07T05:31:56Z",
"meta": ["<string>"],
"value_initial": 123,
"value_remaining": 123
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
expires_at: '2023-11-07T05:31:56Z',
meta: ['<string>'],
value_initial: 123,
value_remaining: 123
})
};
fetch('https://api.{tenant}.getomneo.com/api/v3/rewards/{reward}', 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/rewards/{reward}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'expires_at' => '2023-11-07T05:31:56Z',
'meta' => [
'<string>'
],
'value_initial' => 123,
'value_remaining' => 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/rewards/{reward}"
payload := strings.NewReader("{\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"meta\": [\n \"<string>\"\n ],\n \"value_initial\": 123,\n \"value_remaining\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.{tenant}.getomneo.com/api/v3/rewards/{reward}")
.header("Content-Type", "application/json")
.body("{\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"meta\": [\n \"<string>\"\n ],\n \"value_initial\": 123,\n \"value_remaining\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/rewards/{reward}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"meta\": [\n \"<string>\"\n ],\n \"value_initial\": 123,\n \"value_remaining\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"profile_id": "<string>",
"timezone": "<string>",
"value_initial": "<string>",
"value_remaining": "<string>",
"has_notified_issue": true,
"has_notified_expiry": true,
"has_notified_extend": true,
"expires_at": "<string>",
"issued_at": "<string>",
"is_expired": "<string>",
"is_active": "<string>",
"issued_local_at": "<string>",
"expires_local_at": "<string>",
"notify_issue_at": "<string>",
"notify_expiry_at": "<string>",
"extended_at": "<string>",
"definition": {
"id": 123,
"name": "<string>",
"handle": "<string>",
"region_id": 123,
"region": {
"id": 123,
"name": "<string>",
"handle": "<string>"
},
"currency": "<string>",
"period": 123,
"period_type": "<string>",
"absolute_expiry": "<string>",
"expiry_condition": [
"<unknown>"
],
"description": "<string>",
"short_description": "<string>",
"long_description": "<string>",
"terms_conditions": "<string>",
"earn_instructions": "<string>",
"icon": "<string>",
"image_url": "<string>",
"issue_target_id": 123,
"expiry_target_id": 123,
"extend_target_id": 123,
"notify_issue_offset": 123,
"notify_expiry_offset": 123,
"notify_schedule_offset": 123,
"notify_issue_offset_days": 123,
"notify_issue_offset_hour": 123,
"notify_remind_offset_days": 123,
"notify_remind_offset_hour": 123,
"notify_extend_offset_days": 123,
"notify_extend_offset_hour": 123,
"internal_notes": "<string>",
"type": "<string>",
"value": 123,
"max_value": 123,
"is_extendable": true,
"is_assignable": true,
"is_reassignable": true,
"is_published": true,
"extend_days": 123,
"extend_days_condition": [
"<unknown>"
],
"tags": [
"<string>"
],
"created_at": "<string>",
"updated_at": "<string>"
},
"meta": [
"<unknown>"
],
"created_at": "<string>",
"updated_at": "<string>",
"source_id": 123,
"source_type": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}⌘I