Edit Credit
curl --request PUT \
--url https://api.{tenant}.getomneo.com/api/v3/credits/{credit} \
--header 'Content-Type: application/json' \
--data '
{
"issued_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"released_at": "2023-11-07T05:31:56Z",
"recipient_first_name": "<string>",
"recipient_email": "jsmith@example.com",
"message": "<string>",
"profile_id": "<string>",
"creator_profile_id": "<string>",
"extended_at": "2023-11-07T05:31:56Z",
"value_initial": 1,
"value_remaining": 1,
"external_id": "<string>",
"external_namespace": "<string>",
"credit_number": "<string>",
"security_code": "<string>",
"location_id": 123,
"location_external_id": "<string>",
"location_external_code": "<string>",
"locked": true,
"lock_expires_at": "2023-11-07T05:31:56Z",
"is_imported": true,
"meta": [
"<string>"
]
}
'import requests
url = "https://api.{tenant}.getomneo.com/api/v3/credits/{credit}"
payload = {
"issued_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"released_at": "2023-11-07T05:31:56Z",
"recipient_first_name": "<string>",
"recipient_email": "jsmith@example.com",
"message": "<string>",
"profile_id": "<string>",
"creator_profile_id": "<string>",
"extended_at": "2023-11-07T05:31:56Z",
"value_initial": 1,
"value_remaining": 1,
"external_id": "<string>",
"external_namespace": "<string>",
"credit_number": "<string>",
"security_code": "<string>",
"location_id": 123,
"location_external_id": "<string>",
"location_external_code": "<string>",
"locked": True,
"lock_expires_at": "2023-11-07T05:31:56Z",
"is_imported": True,
"meta": ["<string>"]
}
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({
issued_at: '2023-11-07T05:31:56Z',
expires_at: '2023-11-07T05:31:56Z',
released_at: '2023-11-07T05:31:56Z',
recipient_first_name: '<string>',
recipient_email: 'jsmith@example.com',
message: '<string>',
profile_id: '<string>',
creator_profile_id: '<string>',
extended_at: '2023-11-07T05:31:56Z',
value_initial: 1,
value_remaining: 1,
external_id: '<string>',
external_namespace: '<string>',
credit_number: '<string>',
security_code: '<string>',
location_id: 123,
location_external_id: '<string>',
location_external_code: '<string>',
locked: true,
lock_expires_at: '2023-11-07T05:31:56Z',
is_imported: true,
meta: ['<string>']
})
};
fetch('https://api.{tenant}.getomneo.com/api/v3/credits/{credit}', 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/{credit}",
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([
'issued_at' => '2023-11-07T05:31:56Z',
'expires_at' => '2023-11-07T05:31:56Z',
'released_at' => '2023-11-07T05:31:56Z',
'recipient_first_name' => '<string>',
'recipient_email' => 'jsmith@example.com',
'message' => '<string>',
'profile_id' => '<string>',
'creator_profile_id' => '<string>',
'extended_at' => '2023-11-07T05:31:56Z',
'value_initial' => 1,
'value_remaining' => 1,
'external_id' => '<string>',
'external_namespace' => '<string>',
'credit_number' => '<string>',
'security_code' => '<string>',
'location_id' => 123,
'location_external_id' => '<string>',
'location_external_code' => '<string>',
'locked' => true,
'lock_expires_at' => '2023-11-07T05:31:56Z',
'is_imported' => true,
'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/credits/{credit}"
payload := strings.NewReader("{\n \"issued_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"released_at\": \"2023-11-07T05:31:56Z\",\n \"recipient_first_name\": \"<string>\",\n \"recipient_email\": \"jsmith@example.com\",\n \"message\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"creator_profile_id\": \"<string>\",\n \"extended_at\": \"2023-11-07T05:31:56Z\",\n \"value_initial\": 1,\n \"value_remaining\": 1,\n \"external_id\": \"<string>\",\n \"external_namespace\": \"<string>\",\n \"credit_number\": \"<string>\",\n \"security_code\": \"<string>\",\n \"location_id\": 123,\n \"location_external_id\": \"<string>\",\n \"location_external_code\": \"<string>\",\n \"locked\": true,\n \"lock_expires_at\": \"2023-11-07T05:31:56Z\",\n \"is_imported\": true,\n \"meta\": [\n \"<string>\"\n ]\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/credits/{credit}")
.header("Content-Type", "application/json")
.body("{\n \"issued_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"released_at\": \"2023-11-07T05:31:56Z\",\n \"recipient_first_name\": \"<string>\",\n \"recipient_email\": \"jsmith@example.com\",\n \"message\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"creator_profile_id\": \"<string>\",\n \"extended_at\": \"2023-11-07T05:31:56Z\",\n \"value_initial\": 1,\n \"value_remaining\": 1,\n \"external_id\": \"<string>\",\n \"external_namespace\": \"<string>\",\n \"credit_number\": \"<string>\",\n \"security_code\": \"<string>\",\n \"location_id\": 123,\n \"location_external_id\": \"<string>\",\n \"location_external_code\": \"<string>\",\n \"locked\": true,\n \"lock_expires_at\": \"2023-11-07T05:31:56Z\",\n \"is_imported\": true,\n \"meta\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/credits/{credit}")
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 \"issued_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"released_at\": \"2023-11-07T05:31:56Z\",\n \"recipient_first_name\": \"<string>\",\n \"recipient_email\": \"jsmith@example.com\",\n \"message\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"creator_profile_id\": \"<string>\",\n \"extended_at\": \"2023-11-07T05:31:56Z\",\n \"value_initial\": 1,\n \"value_remaining\": 1,\n \"external_id\": \"<string>\",\n \"external_namespace\": \"<string>\",\n \"credit_number\": \"<string>\",\n \"security_code\": \"<string>\",\n \"location_id\": 123,\n \"location_external_id\": \"<string>\",\n \"location_external_code\": \"<string>\",\n \"locked\": true,\n \"lock_expires_at\": \"2023-11-07T05:31:56Z\",\n \"is_imported\": true,\n \"meta\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"profile_id": "<string>",
"creator_profile_id": "<string>",
"staff_id": "<string>",
"location_id": 123,
"name": "<string>",
"credit_definition_id": 123,
"timezone": "<string>",
"recipient_first_name": "<string>",
"recipient_email": "<string>",
"message": "<string>",
"issued_at": "<string>",
"expires_at": "<string>",
"released_at": "<string>",
"extended_at": "<string>",
"value_initial": "<string>",
"value_remaining": "<string>",
"external_id": "<string>",
"external_namespace": "<string>",
"credit_number": "<string>",
"security_code": "<string>",
"source_id": 123,
"source_type": "<string>",
"locked": true,
"lock_expires_at": "<string>",
"has_notified_issue": true,
"has_notified_expiry": true,
"has_notified_release": true,
"has_notified_remind": true,
"has_notified_extend": true,
"meta": [
"<unknown>"
],
"is_imported": true,
"is_system_generated": true,
"created_at": "<string>",
"updated_at": "<string>",
"definition": {
"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>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Credit
Edit Credit
A PUT to the /credits/{creditId} endpoint allows your application to edit a Credit record.
PUT
/
v3
/
credits
/
{credit}
Edit Credit
curl --request PUT \
--url https://api.{tenant}.getomneo.com/api/v3/credits/{credit} \
--header 'Content-Type: application/json' \
--data '
{
"issued_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"released_at": "2023-11-07T05:31:56Z",
"recipient_first_name": "<string>",
"recipient_email": "jsmith@example.com",
"message": "<string>",
"profile_id": "<string>",
"creator_profile_id": "<string>",
"extended_at": "2023-11-07T05:31:56Z",
"value_initial": 1,
"value_remaining": 1,
"external_id": "<string>",
"external_namespace": "<string>",
"credit_number": "<string>",
"security_code": "<string>",
"location_id": 123,
"location_external_id": "<string>",
"location_external_code": "<string>",
"locked": true,
"lock_expires_at": "2023-11-07T05:31:56Z",
"is_imported": true,
"meta": [
"<string>"
]
}
'import requests
url = "https://api.{tenant}.getomneo.com/api/v3/credits/{credit}"
payload = {
"issued_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"released_at": "2023-11-07T05:31:56Z",
"recipient_first_name": "<string>",
"recipient_email": "jsmith@example.com",
"message": "<string>",
"profile_id": "<string>",
"creator_profile_id": "<string>",
"extended_at": "2023-11-07T05:31:56Z",
"value_initial": 1,
"value_remaining": 1,
"external_id": "<string>",
"external_namespace": "<string>",
"credit_number": "<string>",
"security_code": "<string>",
"location_id": 123,
"location_external_id": "<string>",
"location_external_code": "<string>",
"locked": True,
"lock_expires_at": "2023-11-07T05:31:56Z",
"is_imported": True,
"meta": ["<string>"]
}
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({
issued_at: '2023-11-07T05:31:56Z',
expires_at: '2023-11-07T05:31:56Z',
released_at: '2023-11-07T05:31:56Z',
recipient_first_name: '<string>',
recipient_email: 'jsmith@example.com',
message: '<string>',
profile_id: '<string>',
creator_profile_id: '<string>',
extended_at: '2023-11-07T05:31:56Z',
value_initial: 1,
value_remaining: 1,
external_id: '<string>',
external_namespace: '<string>',
credit_number: '<string>',
security_code: '<string>',
location_id: 123,
location_external_id: '<string>',
location_external_code: '<string>',
locked: true,
lock_expires_at: '2023-11-07T05:31:56Z',
is_imported: true,
meta: ['<string>']
})
};
fetch('https://api.{tenant}.getomneo.com/api/v3/credits/{credit}', 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/{credit}",
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([
'issued_at' => '2023-11-07T05:31:56Z',
'expires_at' => '2023-11-07T05:31:56Z',
'released_at' => '2023-11-07T05:31:56Z',
'recipient_first_name' => '<string>',
'recipient_email' => 'jsmith@example.com',
'message' => '<string>',
'profile_id' => '<string>',
'creator_profile_id' => '<string>',
'extended_at' => '2023-11-07T05:31:56Z',
'value_initial' => 1,
'value_remaining' => 1,
'external_id' => '<string>',
'external_namespace' => '<string>',
'credit_number' => '<string>',
'security_code' => '<string>',
'location_id' => 123,
'location_external_id' => '<string>',
'location_external_code' => '<string>',
'locked' => true,
'lock_expires_at' => '2023-11-07T05:31:56Z',
'is_imported' => true,
'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/credits/{credit}"
payload := strings.NewReader("{\n \"issued_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"released_at\": \"2023-11-07T05:31:56Z\",\n \"recipient_first_name\": \"<string>\",\n \"recipient_email\": \"jsmith@example.com\",\n \"message\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"creator_profile_id\": \"<string>\",\n \"extended_at\": \"2023-11-07T05:31:56Z\",\n \"value_initial\": 1,\n \"value_remaining\": 1,\n \"external_id\": \"<string>\",\n \"external_namespace\": \"<string>\",\n \"credit_number\": \"<string>\",\n \"security_code\": \"<string>\",\n \"location_id\": 123,\n \"location_external_id\": \"<string>\",\n \"location_external_code\": \"<string>\",\n \"locked\": true,\n \"lock_expires_at\": \"2023-11-07T05:31:56Z\",\n \"is_imported\": true,\n \"meta\": [\n \"<string>\"\n ]\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/credits/{credit}")
.header("Content-Type", "application/json")
.body("{\n \"issued_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"released_at\": \"2023-11-07T05:31:56Z\",\n \"recipient_first_name\": \"<string>\",\n \"recipient_email\": \"jsmith@example.com\",\n \"message\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"creator_profile_id\": \"<string>\",\n \"extended_at\": \"2023-11-07T05:31:56Z\",\n \"value_initial\": 1,\n \"value_remaining\": 1,\n \"external_id\": \"<string>\",\n \"external_namespace\": \"<string>\",\n \"credit_number\": \"<string>\",\n \"security_code\": \"<string>\",\n \"location_id\": 123,\n \"location_external_id\": \"<string>\",\n \"location_external_code\": \"<string>\",\n \"locked\": true,\n \"lock_expires_at\": \"2023-11-07T05:31:56Z\",\n \"is_imported\": true,\n \"meta\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/credits/{credit}")
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 \"issued_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"released_at\": \"2023-11-07T05:31:56Z\",\n \"recipient_first_name\": \"<string>\",\n \"recipient_email\": \"jsmith@example.com\",\n \"message\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"creator_profile_id\": \"<string>\",\n \"extended_at\": \"2023-11-07T05:31:56Z\",\n \"value_initial\": 1,\n \"value_remaining\": 1,\n \"external_id\": \"<string>\",\n \"external_namespace\": \"<string>\",\n \"credit_number\": \"<string>\",\n \"security_code\": \"<string>\",\n \"location_id\": 123,\n \"location_external_id\": \"<string>\",\n \"location_external_code\": \"<string>\",\n \"locked\": true,\n \"lock_expires_at\": \"2023-11-07T05:31:56Z\",\n \"is_imported\": true,\n \"meta\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"profile_id": "<string>",
"creator_profile_id": "<string>",
"staff_id": "<string>",
"location_id": 123,
"name": "<string>",
"credit_definition_id": 123,
"timezone": "<string>",
"recipient_first_name": "<string>",
"recipient_email": "<string>",
"message": "<string>",
"issued_at": "<string>",
"expires_at": "<string>",
"released_at": "<string>",
"extended_at": "<string>",
"value_initial": "<string>",
"value_remaining": "<string>",
"external_id": "<string>",
"external_namespace": "<string>",
"credit_number": "<string>",
"security_code": "<string>",
"source_id": 123,
"source_type": "<string>",
"locked": true,
"lock_expires_at": "<string>",
"has_notified_issue": true,
"has_notified_expiry": true,
"has_notified_release": true,
"has_notified_remind": true,
"has_notified_extend": true,
"meta": [
"<unknown>"
],
"is_imported": true,
"is_system_generated": true,
"created_at": "<string>",
"updated_at": "<string>",
"definition": {
"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>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Path Parameters
The credit ID
Body
application/json
Required range:
x >= 0Required range:
x >= 0Response
Credit
Show child attributes
Show child attributes
⌘I