Add Share
curl --request POST \
--url https://api.{tenant}.getomneo.com/api/v3/shares \
--header 'Content-Type: application/json' \
--data '
{
"profile_id": "<string>",
"source_id": 123,
"code": "<string>",
"timezone": "<string>",
"period": 123,
"absolute_expiry": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"remaining_quantity": 123,
"quantity": "1",
"meta": [
"<string>"
],
"is_cloneable": true
}
'import requests
url = "https://api.{tenant}.getomneo.com/api/v3/shares"
payload = {
"profile_id": "<string>",
"source_id": 123,
"code": "<string>",
"timezone": "<string>",
"period": 123,
"absolute_expiry": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"remaining_quantity": 123,
"quantity": "1",
"meta": ["<string>"],
"is_cloneable": True
}
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>',
source_id: 123,
code: '<string>',
timezone: '<string>',
period: 123,
absolute_expiry: '<string>',
expires_at: '2023-11-07T05:31:56Z',
remaining_quantity: 123,
quantity: '1',
meta: ['<string>'],
is_cloneable: true
})
};
fetch('https://api.{tenant}.getomneo.com/api/v3/shares', 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/shares",
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>',
'source_id' => 123,
'code' => '<string>',
'timezone' => '<string>',
'period' => 123,
'absolute_expiry' => '<string>',
'expires_at' => '2023-11-07T05:31:56Z',
'remaining_quantity' => 123,
'quantity' => '1',
'meta' => [
'<string>'
],
'is_cloneable' => true
]),
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/shares"
payload := strings.NewReader("{\n \"profile_id\": \"<string>\",\n \"source_id\": 123,\n \"code\": \"<string>\",\n \"timezone\": \"<string>\",\n \"period\": 123,\n \"absolute_expiry\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"remaining_quantity\": 123,\n \"quantity\": \"1\",\n \"meta\": [\n \"<string>\"\n ],\n \"is_cloneable\": true\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/shares")
.header("Content-Type", "application/json")
.body("{\n \"profile_id\": \"<string>\",\n \"source_id\": 123,\n \"code\": \"<string>\",\n \"timezone\": \"<string>\",\n \"period\": 123,\n \"absolute_expiry\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"remaining_quantity\": 123,\n \"quantity\": \"1\",\n \"meta\": [\n \"<string>\"\n ],\n \"is_cloneable\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/shares")
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 \"source_id\": 123,\n \"code\": \"<string>\",\n \"timezone\": \"<string>\",\n \"period\": 123,\n \"absolute_expiry\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"remaining_quantity\": 123,\n \"quantity\": \"1\",\n \"meta\": [\n \"<string>\"\n ],\n \"is_cloneable\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"profile_id": "<string>",
"source_type": "<string>",
"source_id": 123,
"handle": "<string>",
"code": "<string>",
"timezone": "<string>",
"period": 123,
"period_type": "<string>",
"absolute_expiry": "<string>",
"expires_at": "<string>",
"quantity": 123,
"remaining_quantity": 123,
"meta": [
"<unknown>"
],
"is_cloneable": true,
"source": {},
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Share
Add Share
A POST to the /shares endpoint allows your application to create a share.
POST
/
v3
/
shares
Add Share
curl --request POST \
--url https://api.{tenant}.getomneo.com/api/v3/shares \
--header 'Content-Type: application/json' \
--data '
{
"profile_id": "<string>",
"source_id": 123,
"code": "<string>",
"timezone": "<string>",
"period": 123,
"absolute_expiry": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"remaining_quantity": 123,
"quantity": "1",
"meta": [
"<string>"
],
"is_cloneable": true
}
'import requests
url = "https://api.{tenant}.getomneo.com/api/v3/shares"
payload = {
"profile_id": "<string>",
"source_id": 123,
"code": "<string>",
"timezone": "<string>",
"period": 123,
"absolute_expiry": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"remaining_quantity": 123,
"quantity": "1",
"meta": ["<string>"],
"is_cloneable": True
}
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>',
source_id: 123,
code: '<string>',
timezone: '<string>',
period: 123,
absolute_expiry: '<string>',
expires_at: '2023-11-07T05:31:56Z',
remaining_quantity: 123,
quantity: '1',
meta: ['<string>'],
is_cloneable: true
})
};
fetch('https://api.{tenant}.getomneo.com/api/v3/shares', 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/shares",
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>',
'source_id' => 123,
'code' => '<string>',
'timezone' => '<string>',
'period' => 123,
'absolute_expiry' => '<string>',
'expires_at' => '2023-11-07T05:31:56Z',
'remaining_quantity' => 123,
'quantity' => '1',
'meta' => [
'<string>'
],
'is_cloneable' => true
]),
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/shares"
payload := strings.NewReader("{\n \"profile_id\": \"<string>\",\n \"source_id\": 123,\n \"code\": \"<string>\",\n \"timezone\": \"<string>\",\n \"period\": 123,\n \"absolute_expiry\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"remaining_quantity\": 123,\n \"quantity\": \"1\",\n \"meta\": [\n \"<string>\"\n ],\n \"is_cloneable\": true\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/shares")
.header("Content-Type", "application/json")
.body("{\n \"profile_id\": \"<string>\",\n \"source_id\": 123,\n \"code\": \"<string>\",\n \"timezone\": \"<string>\",\n \"period\": 123,\n \"absolute_expiry\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"remaining_quantity\": 123,\n \"quantity\": \"1\",\n \"meta\": [\n \"<string>\"\n ],\n \"is_cloneable\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/shares")
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 \"source_id\": 123,\n \"code\": \"<string>\",\n \"timezone\": \"<string>\",\n \"period\": 123,\n \"absolute_expiry\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"remaining_quantity\": 123,\n \"quantity\": \"1\",\n \"meta\": [\n \"<string>\"\n ],\n \"is_cloneable\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"profile_id": "<string>",
"source_type": "<string>",
"source_id": 123,
"handle": "<string>",
"code": "<string>",
"timezone": "<string>",
"period": 123,
"period_type": "<string>",
"absolute_expiry": "<string>",
"expires_at": "<string>",
"quantity": 123,
"remaining_quantity": 123,
"meta": [
"<unknown>"
],
"is_cloneable": true,
"source": {},
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Body
application/json
Available options:
profile, product, transaction, reward, benefit, point, user, tenant, list, listItem, target, automation, trigger, aggregation, comms_attribute, appearance_attribute, webhook, identity, tier, address, location, product_variant, benefit_definition, reward_definition, tier_definition, transaction_item, order, redemption, tier_point, interaction, status, organisation, role_definition, credit_definition, credit, product_list_reservation, appointment_definition, appointment, question, questionnaire, questionnaire_answer, questionnaire_submission, rating, custom_attribute, dates_attribute, connection Available options:
days, weeks, months, years, absolute_date, absolute_week, absolute_month Available options:
1 Required range:
x >= 1Response
Share
Show child attributes
Show child attributes
⌘I