Skip to main content
POST
/
v3
/
credits
/
definitions
Add Credit Definition
curl --request POST \
  --url http://localhost/api/v3/credits/definitions \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "handle": "<string>",
  "type": "gift_card",
  "region_id": 123,
  "timezone": "<string>",
  "period": 123,
  "period_type": "days",
  "absolute_expiry": "<string>",
  "release_period": 123,
  "release_period_type": "days",
  "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": [
    "<string>"
  ],
  "value": 123,
  "max_value": 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": "sequential",
  "credit_number_range_start": "<string>",
  "credit_number_range_end": "<string>",
  "credit_number_length": 2,
  "security_code_type": "pin4",
  "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>"
  ],
  "custom_fields": [
    {
      "namespace": "<string>",
      "handle": "<string>",
      "type": "string",
      "value": "<string>"
    }
  ]
}
'
{
  "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>",
        "version": "<string>",
        "is_index": "<string>"
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.omneo.io/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json
name
string
required
handle
string
required
type
enum<string>
required
Available options:
gift_card,
store_credit,
refund,
allowance,
voucher,
other
region_id
integer | null
timezone
string
period
integer
period_type
enum<string>
Available options:
days,
weeks,
months,
years,
absolute_date,
absolute_week,
absolute_month
absolute_expiry
string | null
release_period
integer | null
release_period_type
enum<string> | null
Available options:
days,
weeks,
months,
years,
absolute_date,
absolute_week,
absolute_month
release_period_absolute_expiry
string | null
is_published
boolean
is_archived
boolean
icon
string | null
image_url
string<uri> | null
primary_colour
string | null
Pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$
secondary_colour
string | null
Pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$
description
string | null
internal_notes
string | null
short_description
string | null
long_description
string | null
terms_conditions
string | null
earn_instructions
string | null
meta
string[] | null
value
number | null
max_value
number | null
currency
string | null
Pattern: ^[A-Z]+$
require_creator
boolean
require_assigned
boolean
is_extendable
boolean
is_assignable
boolean
is_releasable
boolean
is_reassignable
boolean
require_security_code
boolean
extend_days
integer | null
credit_number_range_type
enum<string> | null
Available options:
sequential,
random,
other
credit_number_range_start
string | null
Pattern: ^\d+$
credit_number_range_end
string | null
Pattern: ^\d+$
credit_number_length
integer | null
Required range: x >= 1
security_code_type
enum<string> | null
Available options:
pin4,
pin6,
alnum6,
other
use_custom_numbers
boolean
notify_schedule_offset
integer | null
issue_target_id
integer | null
expiry_target_id
integer | null
release_target_id
integer | null
remind_target_id
integer | null
extend_target_id
integer | null
notify_issue_offset_days
integer | null
notify_issue_offset_hour
integer | null
notify_remind_offset_days
integer | null
notify_remind_offset_hour
integer | null
tags
string[]
custom_fields
object[]

Response

CreditDefinition

data
CreditDefinition · object
required