Skip to main content
POST
/
v3
/
rewards
/
extend
Extend Reward
curl --request POST \
  --url https://api.{tenant}.getomneo.com/api/v3/rewards/extend \
  --header 'Content-Type: application/json' \
  --data '
{
  "profile_id": "<string>",
  "ids": [
    123
  ],
  "extend_days": 123,
  "extend_date": "2023-11-07T05:31:56Z"
}
'
import requests

url = "https://api.{tenant}.getomneo.com/api/v3/rewards/extend"

payload = {
"profile_id": "<string>",
"ids": [123],
"extend_days": 123,
"extend_date": "2023-11-07T05:31:56Z"
}
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({
profile_id: '<string>',
ids: [123],
extend_days: 123,
extend_date: '2023-11-07T05:31:56Z'
})
};

fetch('https://api.{tenant}.getomneo.com/api/v3/rewards/extend', 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/extend",
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([
'profile_id' => '<string>',
'ids' => [
123
],
'extend_days' => 123,
'extend_date' => '2023-11-07T05:31:56Z'
]),
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/extend"

payload := strings.NewReader("{\n \"profile_id\": \"<string>\",\n \"ids\": [\n 123\n ],\n \"extend_days\": 123,\n \"extend_date\": \"2023-11-07T05:31:56Z\"\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/rewards/extend")
.header("Content-Type", "application/json")
.body("{\n \"profile_id\": \"<string>\",\n \"ids\": [\n 123\n ],\n \"extend_days\": 123,\n \"extend_date\": \"2023-11-07T05:31:56Z\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.{tenant}.getomneo.com/api/v3/rewards/extend")

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 \"profile_id\": \"<string>\",\n \"ids\": [\n 123\n ],\n \"extend_days\": 123,\n \"extend_date\": \"2023-11-07T05:31:56Z\"\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>",
        "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,
        "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>",
"errors": {}
}
Extending a reward modifies the expiry date according to the specified parameters in the payload. The Extend Reward endpoint allows developers to specify either an extend_days or extend_date Provide an array of ID’s and search the specified profile_id for eligible rewards. Each eligible reward will be extended according to either the extend_days or extend_date
AttributeDescription
profile_id STRINGThe profile ID containing the rewards to extend
ids ARRAYAn array of reward id’s. Each reward id specified will be extended.
extend_days INTEGERThe amount of days to extend. This will be added to the existing expires_at date to calculate the new expiry Cannot be specified if anextend_date is provided
extend_date DATE-TIMEThis date-time string will replace the existing expires_at value **Cannot be specified ifextend_days is provided **
Eligible Rewards for extensionRewards can only be extended once This means the extended_at field must be null to be eligible for an extension

Body

application/json
profile_id
string
required
ids
integer[]
required
Minimum array length: 1
extend_days
integer | null
extend_date
string<date-time> | null

Response

Array of Reward

data
Reward · object[]
required