Skip to main content
POST
/
v3
/
points
Add Point
curl --request POST \
  --url https://api.{tenant}.getomneo.com/api/v3/points \
  --header 'Content-Type: application/json' \
  --data '
{
  "profile_id": "<string>",
  "point_definition_id": 123,
  "value_initial": 123,
  "value_remaining": 123,
  "issued_at": "2023-11-07T05:31:56Z",
  "accrued_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "meta": [
    "<string>"
  ]
}
'
import requests

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

payload = {
"profile_id": "<string>",
"point_definition_id": 123,
"value_initial": 123,
"value_remaining": 123,
"issued_at": "2023-11-07T05:31:56Z",
"accrued_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"meta": ["<string>"]
}
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>',
point_definition_id: 123,
value_initial: 123,
value_remaining: 123,
issued_at: '2023-11-07T05:31:56Z',
accrued_at: '2023-11-07T05:31:56Z',
expires_at: '2023-11-07T05:31:56Z',
description: '<string>',
meta: ['<string>']
})
};

fetch('https://api.{tenant}.getomneo.com/api/v3/points', 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/points",
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>',
'point_definition_id' => 123,
'value_initial' => 123,
'value_remaining' => 123,
'issued_at' => '2023-11-07T05:31:56Z',
'accrued_at' => '2023-11-07T05:31:56Z',
'expires_at' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'meta' => [
'<string>'
]
]),
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/points"

payload := strings.NewReader("{\n \"profile_id\": \"<string>\",\n \"point_definition_id\": 123,\n \"value_initial\": 123,\n \"value_remaining\": 123,\n \"issued_at\": \"2023-11-07T05:31:56Z\",\n \"accrued_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"meta\": [\n \"<string>\"\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/points")
.header("Content-Type", "application/json")
.body("{\n \"profile_id\": \"<string>\",\n \"point_definition_id\": 123,\n \"value_initial\": 123,\n \"value_remaining\": 123,\n \"issued_at\": \"2023-11-07T05:31:56Z\",\n \"accrued_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"meta\": [\n \"<string>\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

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

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 \"point_definition_id\": 123,\n \"value_initial\": 123,\n \"value_remaining\": 123,\n \"issued_at\": \"2023-11-07T05:31:56Z\",\n \"accrued_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"meta\": [\n \"<string>\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": 123,
    "profile_id": "<string>",
    "linked_profile_id": "<string>",
    "value_initial": "<string>",
    "value_remaining": "<string>",
    "value_initial_currency": 123,
    "value_remaining_currency": 123,
    "issued_at": "<string>",
    "accrued_at": "<string>",
    "expires_at": "<string>",
    "status": "<string>",
    "definition": {
      "id": 123,
      "name": "<string>",
      "handle": "<string>",
      "region_id": 123,
      "region": {
        "id": 123,
        "name": "<string>",
        "handle": "<string>"
      },
      "currency": "<string>",
      "description": "<string>",
      "notes": "<string>",
      "is_reassignable": true,
      "issue_period": 123,
      "issue_period_type": "<string>",
      "issue_absolute_expiry": "<string>",
      "tags": [
        "<string>"
      ],
      "created_at": "<string>",
      "updated_at": "<string>"
    },
    "created_at": "<string>",
    "updated_at": "<string>",
    "source_type": "<string>",
    "source": null,
    "rate": {
      "id": 123,
      "handle": "<string>",
      "type": "<string>",
      "location": "<string>",
      "code": "<string>",
      "name": "<string>",
      "rate": "<string>",
      "is_default": true,
      "is_archived": true,
      "region_id": 123,
      "region": {
        "id": 123,
        "name": "<string>",
        "handle": "<string>"
      },
      "location_id": 123,
      "location_object": {
        "id": "<string>",
        "name": "<string>",
        "handle": "<string>"
      },
      "country_iso_2": "<string>",
      "profile_conditions": [
        "<unknown>"
      ],
      "product_conditions": [
        "<unknown>"
      ],
      "start_time": "<string>",
      "end_time": "<string>",
      "issue_period": 123,
      "issue_period_type": "<string>",
      "issue_absolute_expiry": "<string>",
      "earn_instructions": "<string>",
      "internal_notes": "<string>",
      "is_published": true,
      "priority": 123,
      "created_at": "<string>",
      "updated_at": "<string>"
    },
    "description": "<string>",
    "meta": [
      "<unknown>"
    ]
  }
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>",
"errors": {}
}

Body

application/json
profile_id
string
required
point_definition_id
integer
required
value_initial
number
required
value_remaining
number | null
issued_at
string<date-time> | null
accrued_at
string<date-time> | null
expires_at
string<date-time> | null
description
string | null
meta
string[] | null

Response

Point

data
Point · object
required