Browse Credit Definitions
curl --request GET \
--url https://api.{tenant}.getomneo.com/api/v3/credits/definitionsimport requests
url = "https://api.{tenant}.getomneo.com/api/v3/credits/definitions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.{tenant}.getomneo.com/api/v3/credits/definitions', 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/credits/definitions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.{tenant}.getomneo.com/api/v3/credits/definitions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.{tenant}.getomneo.com/api/v3/credits/definitions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/credits/definitions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"name": "<string>",
"handle": "<string>",
"region_id": 123,
"region": {
"id": 123,
"name": "<string>",
"handle": "<string>"
},
"timezone": "<string>",
"period": 123,
"period_type": "<string>",
"absolute_expiry": "<string>",
"release_period": 123,
"release_period_type": "<string>",
"release_period_absolute_expiry": "<string>",
"is_published": true,
"is_archived": true,
"icon": "<string>",
"image_url": "<string>",
"primary_colour": "<string>",
"secondary_colour": "<string>",
"description": "<string>",
"internal_notes": "<string>",
"short_description": "<string>",
"long_description": "<string>",
"terms_conditions": "<string>",
"earn_instructions": "<string>",
"meta": [
"<unknown>"
],
"type": "<string>",
"value": 123,
"max_value": 123,
"currency_id": 123,
"currency": "<string>",
"require_creator": true,
"require_assigned": true,
"is_extendable": true,
"is_assignable": true,
"is_releasable": true,
"is_reassignable": true,
"require_security_code": true,
"extend_days": 123,
"credit_number_range_type": "<string>",
"credit_number_range_start": "<string>",
"credit_number_range_end": "<string>",
"credit_number_length": 123,
"security_code_type": "<string>",
"use_custom_numbers": true,
"notify_schedule_offset": 123,
"issue_target_id": 123,
"expiry_target_id": 123,
"release_target_id": 123,
"remind_target_id": 123,
"extend_target_id": 123,
"notify_issue_offset_days": 123,
"notify_issue_offset_hour": 123,
"notify_remind_offset_days": 123,
"notify_remind_offset_hour": 123,
"tags": [
"<string>"
],
"created_at": "<string>",
"updated_at": "<string>",
"custom_fields": [
{
"name": "<string>",
"handle": "<string>",
"namespace": "<string>",
"value": "<string>",
"type": "<string>",
"custom_fieldable_type": "<string>",
"custom_fieldable_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"is_index": "<string>"
}
]
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}Credit Definition
Browse Credit Definitions
A GET to the /credits/definitions endpoint allows your application to retrieve all a tenants Credit Definitions.
GET
/
v3
/
credits
/
definitions
Browse Credit Definitions
curl --request GET \
--url https://api.{tenant}.getomneo.com/api/v3/credits/definitionsimport requests
url = "https://api.{tenant}.getomneo.com/api/v3/credits/definitions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.{tenant}.getomneo.com/api/v3/credits/definitions', 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/credits/definitions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.{tenant}.getomneo.com/api/v3/credits/definitions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.{tenant}.getomneo.com/api/v3/credits/definitions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/credits/definitions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"name": "<string>",
"handle": "<string>",
"region_id": 123,
"region": {
"id": 123,
"name": "<string>",
"handle": "<string>"
},
"timezone": "<string>",
"period": 123,
"period_type": "<string>",
"absolute_expiry": "<string>",
"release_period": 123,
"release_period_type": "<string>",
"release_period_absolute_expiry": "<string>",
"is_published": true,
"is_archived": true,
"icon": "<string>",
"image_url": "<string>",
"primary_colour": "<string>",
"secondary_colour": "<string>",
"description": "<string>",
"internal_notes": "<string>",
"short_description": "<string>",
"long_description": "<string>",
"terms_conditions": "<string>",
"earn_instructions": "<string>",
"meta": [
"<unknown>"
],
"type": "<string>",
"value": 123,
"max_value": 123,
"currency_id": 123,
"currency": "<string>",
"require_creator": true,
"require_assigned": true,
"is_extendable": true,
"is_assignable": true,
"is_releasable": true,
"is_reassignable": true,
"require_security_code": true,
"extend_days": 123,
"credit_number_range_type": "<string>",
"credit_number_range_start": "<string>",
"credit_number_range_end": "<string>",
"credit_number_length": 123,
"security_code_type": "<string>",
"use_custom_numbers": true,
"notify_schedule_offset": 123,
"issue_target_id": 123,
"expiry_target_id": 123,
"release_target_id": 123,
"remind_target_id": 123,
"extend_target_id": 123,
"notify_issue_offset_days": 123,
"notify_issue_offset_hour": 123,
"notify_remind_offset_days": 123,
"notify_remind_offset_hour": 123,
"tags": [
"<string>"
],
"created_at": "<string>",
"updated_at": "<string>",
"custom_fields": [
{
"name": "<string>",
"handle": "<string>",
"namespace": "<string>",
"value": "<string>",
"type": "<string>",
"custom_fieldable_type": "<string>",
"custom_fieldable_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"is_index": "<string>"
}
]
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}Filtering
This endpoint accepts
filter and sort query parameters. See Filtering, sorting, and search for paging and for the shared search_with, custom_field, and json_contains filters.Examples
curl -X GET "https://api.[tenant].getomneo.com/api/v3/credits/definitions?filter[handle]={handle}" \
-H "Authorization: Bearer ${TOKEN}"
curl -X GET "https://api.[tenant].getomneo.com/api/v3/credits/definitions?filter[name][nullable]=0" \
-H "Authorization: Bearer ${TOKEN}"
Operators
| Operator | Meaning | Example |
|---|---|---|
eq | Equal to. Applied when you give no operator. | filter[handle]={handle} |
ne | Not equal to. | filter[handle][ne]={handle} |
gt | Greater than. | filter[value][gt]=100 |
gte | Greater than or equal to. | filter[value][gte]=100 |
lt | Less than. | filter[value][lt]=250 |
lte | Less than or equal to. | filter[value][lte]=250 |
in | Matches any value in a comma separated list. | filter[region_id][in]=123,456 |
not_in | Excludes every value in a comma separated list. | filter[region_id][not_in]=123,456 |
nullable | 1 returns records where the attribute is empty. Any other value returns records where it is set. | filter[name][nullable]=1 |
not_has operator applies to related attributes, which this endpoint does not have.
Filter attributes
| Attribute | Attribute | Attribute |
|---|---|---|
name | handle | timezone |
period | period_type | absolute_expiry |
release_period | release_period_type | release_period_absolute_expiry |
is_published | is_archived | icon |
image_url | primary_colour | secondary_colour |
description | internal_notes | short_description |
long_description | terms_conditions | earn_instructions |
meta | type | value |
max_value | require_creator | require_assigned |
is_extendable | is_assignable | is_releasable |
is_reassignable | require_security_code | extend_days |
credit_number_range_type | credit_number_range_start | credit_number_range_end |
credit_number_length | security_code_type | use_custom_numbers |
notify_schedule_offset | notify_issue_offset_days | notify_issue_offset_hour |
notify_remind_offset_days | notify_remind_offset_hour | region_id |
currency |
sort key, for example ?sort=-name for descending order.
Search attributes
filter[search] runs one partial match term across name, handle. A record matches when any one of those attributes contains the term.
curl -X GET "https://api.[tenant].getomneo.com/api/v3/credits/definitions?filter[search]={term}" \
-H "Authorization: Bearer ${TOKEN}"
Custom field filters
CreditDefinition records carry custom fields, so this endpoint also acceptsfilter[custom_field][namespace:handle].
curl -X GET "https://api.[tenant].getomneo.com/api/v3/credits/definitions?filter[custom_field][{namespace}:{handle}]={value}" \
-H "Authorization: Bearer ${TOKEN}"
⌘I