Commerce (Orders & Inventory) (v1-2025-04-18)

The Orders & Inventory, or Commerce, API is focused on the processing and fulfillment of Orders. Additionally, you can use this API to manage your inventory, merchandise, and online store.

Like most of the other Rhythm apps, the Commerce API includes endpoints for Query Definitions. These endpoints are commonly used to retrieve saved queries, which can then be executed using the Query endpoints of the System API.

Download OpenAPI description
Languages
Servers
Mock server
https://docs.api.rhythmsoftware.com/_mock/apis/commerce/commerce-v1/
https://commerce.api.rhythmsoftware.com/

Cancellation Fees

Cancellation Fees

Operations

Cancellations

Cancellations

Operations

Carts

Carts

Operations

Coupon Code Gen Processes

Coupon Code Gen Processes

Operations

Coupon Codes

Coupon Codes

Operations

Returns a list of records with the specified tenant_id

Request

Returns a list of records with the specified tenant_id

Path
tenantIdstringrequired

The tenant

Query
fieldsstring

The fields that you want to retrieve; if omitted, the entire object is returned

exclusiveStartKeystring

If paging, this allows you to return the next set of results

curl -i -X GET \
  'https://docs.api.rhythmsoftware.com/_mock/apis/commerce/commerce-v1/couponCodes/{tenantId}?exclusiveStartKey=string&fields=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

The records were retrieved successfully

Headers
Access-Control-Allow-Headersstring
Access-Control-Allow-Methodsstring
Access-Control-Allow-Originstring
Bodyapplication/json
Countinteger
ItemsArray of objects(CouponCode)
LastEvaluatedKeystring
Response
application/json
{ "Count": 0, "Items": [ {} ], "LastEvaluatedKey": "string" }

Creates a new coupon code record that does not already exist.

Request

This method will auto-generate an ID and create a new coupon code. If an ID is specified for the coupon code, an error will be thrown.

Path
tenantIdstringrequired

The id of the tenant being accessed.

Bodyapplication/jsonrequired

The coupon code that you would like to be saved.

contact_idstring(Contact)required

The contact

coupon_idstring(Coupon)required

The ID of the associated coupon

coupon_typestring(Coupon Type)\-coupons$required

The type of coupon

custom_field_valuesArray of objects(Custom Field Values)
eligibility_criteriaobject(Eligibility Criteria)required

The criteria to use

eligibility_criteria.​advanced_rule_error_messagestring(Advanced Rule Error Message)

The error message to show when the advanced rule fails

eligibility_criteria.​advanced_rulesobject(Advanced Rules)
eligibility_criteria.​age_restrictionsobject(Age Restrictions)
eligibility_criteria.​award_optionsobject(Award Options)
eligibility_criteria.​award_recipientsboolean(Award Recipients)

If set, only people who have received awards

eligibility_criteria.​by_locationboolean(By Location)

If true, then filter by location

eligibility_criteria.​certificantsboolean(Certificants)

If set, only people with specific certifications

eligibility_criteria.​certification_optionsCertification Options (object)(Certification Options)
One of:
eligibility_criteria.​committee_member_optionsCommittee Member Options (object)(Committee Member Options)
One of:
eligibility_criteria.​committee_membersboolean(Committee Members)

If set, active members who belong to a committee can purchase

eligibility_criteria.​custom_logic_optionsCustom Logic Options (object)(Custom Logic Options)
One of:
eligibility_criteria.​customer_typestring(Customer Type)
Enum"contact""organization"
eligibility_criteria.​donor_optionsobject(Donor Options)
eligibility_criteria.​donorsboolean(Donors)

If true, only donors

eligibility_criteria.​enable_advanced_rulesboolean(Enable Advanced Rules)

Enable advanced JSON rules

eligibility_criteria.​enable_age_restrictionsboolean(Enable Age Restrictions)

Age registrations

eligibility_criteria.​enable_custom_logicboolean(Enable Custom Logic)

If set, the order engine will call out to a custom lambda function to process/change the order immediately after bundle expansion

eligibility_criteria.​enable_entitlement_restrictionsboolean(Enable Entitlement Restrictions)

If set, then you must have certain entitlements

eligibility_criteria.​enable_expressionboolean(Enable Expression)

Whether or not to enable an expression for evaluation

eligibility_criteria.​enable_organization_restrictionsboolean(Enable Organization Restrictions)

If set, you can restrict organizations

eligibility_criteria.​enable_status_restrictionboolean(Enable Status Restriction)

If set, you can restrict by status

eligibility_criteria.​entitlement_restrictionsArray of objects
eligibility_criteria.​event_registration_optionsobject(Event Registration Options)
eligibility_criteria.​event_registrationsboolean(Event Registrations)

If set, only people who have registered for events

eligibility_criteria.​expressionstring(Expression)

The expression

eligibility_criteria.​expression_error_messagestring(Expression Error Message)

The error message to show when the expression fails

eligibility_criteria.​locationLocation (object)(Location)
One of:
eligibility_criteria.​logic_operatorstring(Logic Operator)
Enum"and""not"
eligibility_criteria.​member_optionsMember Options (object)(Member Options)
One of:
eligibility_criteria.​membersboolean(Members)

If set, active members can purchase this

eligibility_criteria.​non_membersboolean(Non Members)

If set, only nonmembers can purchase

eligibility_criteria.​organization_restrictionsobject(Organization Restrictions)
eligibility_criteria.​status_restrictionsArray of Status Restrictions (strings)(Status Restrictions)non-empty

The statuses

One of:

The statuses

non-empty
eligibility_criteria.​use_organization_for_eligibilityboolean(Use Organization For Eligibility)

If checked, a person's organization is used to check for eligibility, rather than the person themselves

enable_coupon_ownershipboolean(Enable Coupon Ownership)

Enable the idea that a coupon can be owned by a contact/organization

enable_eligibility_criteriaboolean(Enable Eligibility Criteria)

If true, eligibility criteria is applied to the coupon code

enable_restricted_contactsboolean(Enable Restricted Contacts)

If true, this coupon is restricted only to certain contacts

enable_restricted_organizationsboolean(Enable Restricted Organizations)

If true, this coupon is restricted only to certain organizations

idstring(ID)^[\w|-]+$required

The unique, string identifier of this coupon code

is_activeboolean(Is Active)

Whether or not this coupon code is active

maximum_number_of_total_usesMaximum Number Of Total Uses (integer)(Maximum Number Of Total Uses)>= 1required

The maximum number of total uses

One of:

The maximum number of total uses

>= 1
integer(Maximum Number Of Total Uses)>= 1

The maximum number of total uses

Value1
maximum_number_of_uses_per_customerMaximum Number Of Uses Per Customer (integer)(Maximum Number Of Uses Per Customer)>= 1required

The maximum number of total uses for a given customer

One of:

The maximum number of total uses for a given customer

>= 1
integer(Maximum Number Of Uses Per Customer)>= 1

The maximum number of total uses for a given customer

Value1
maximum_number_of_uses_per_organizationinteger(Maximum Number Of Uses Per Organization)>= 1

The maximum number of total uses per contacts of an organization

namestring(Name)

The name of the coupon code - used to identify the owner

notesstring(Notes)

Notes

order_idstring(Order)

The order id tied to this code

order_line_item_idstring(Order Line Item)
organization_idstring(Organization)required

The organization

owner_typeOwner Type (string)(Owner Type)required

The owner of the code

Enum"contact""organization"
One of:

The owner of the code

string(Owner Type)

The owner of the code

Enum"contact""organization"
restricted_contactsArray of objectsnon-emptyrequired
restricted_contacts[].​contact_idstring(Contact)required
restricted_organizationsArray of objectsnon-emptyrequired
restricted_organizations[].​organization_idstring(Organization)required
sys_bulk_load_atstring(Sys Bulk Load At)

If this record was loaded via bulk, the timestamp when the record was processed

sys_bulk_load_idstring(Sys Bulk Load)

If this record was loaded via bulk, the ID of the bulk load process

sys_bulk_load_pkstring(Sys Bulk Load Pk)

If this record was loaded via bulk, the tenant and key of the bulk load process used as a partition key

sys_bulk_load_record_nonumber(float)(Sys Bulk Load Record No)

If this record was loaded via bulk, the record number in the source file

sys_bulk_load_source_filestring(Sys Bulk Load Source File)

If this record was loaded via bulk, the source file

sys_calculated_field_errorstring(Sys Calculated Field Error)

The error associated with the calculated field

sys_calculated_field_errorsArray of objects
sys_configuration_snapshot_idstring(Sys Configuration Snapshot)

If a snapshot was restored/applies to this record, the ID of the snapshot

sys_created_atstring(date-time)(Sys Created At)required

The date/time that this record was created, expressed in ISO-8601 date format

sys_created_by_idstring(Sys Created By)required

The ID of the user that created this record

sys_deleted_by_idstring(Sys Deleted By)

The ID of the user that deleted (or last tried to delete) this object

sys_directivestring(Sys Directive)

Means for passing directive information into an object processing logic

sys_external_idstring(Sys External)

The ID that a record has from an external system or data import

sys_has_files_in_s3boolean(Sys Has Files In S3)

If true, this record has files in S3. If false, it doesnt, so no need to hit S3 upon deletion

sys_last_bulk_data_operation_idstring(Sys Last Bulk Data Operation)

If this record was last touched by a bulk data operation, the ID of that operation

sys_last_bulk_data_operation_sys_versionstring(Sys Last Bulk Data Operation Sys Version)

If this record was last touched by a bulk data operation, the sys_version at the time of that operation

sys_last_modified_atstring(date-time)(Sys Last Modified At)required

The date/time that this record record was last modified, expressed in ISO-8601 date format

sys_last_modified_by_idstring(Sys Last Modified By)required

The ID of the user that last modified this record

sys_last_security_contextobject(Sys Last Security Context)

The security context of the last insert, modify, or delete performed on this item

sys_lockedboolean(Sys Locked)

If set, this record is locked and cannot be changed via the API

sys_snapshot_base_versionnumber(float)(Sys Snapshot Base Version)

The version to use as a base when creating a configuration snapshot; if not set, 1 is used. Helpful when creating a sandbox

sys_versionnumber(float)(Sys Version)

A number representing the version of this record in the database

typestring(Type)

The type of coupon

Enum"multi use""single use"
valid_fromstring(date-time)(Valid From)

Date/time at which the code begins to be valid

valid_untilstring(date-time)(Valid Until)

Expiration date

curl -i -X POST \
  'https://docs.api.rhythmsoftware.com/_mock/apis/commerce/commerce-v1/couponCodes/{tenantId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "contact_id": "string",
    "coupon_id": "string",
    "coupon_type": "string",
    "custom_field_values": [
      {
        "boolean_value": true,
        "custom_field_id": "string",
        "file_url_value": "string",
        "list_value": [
          "string"
        ],
        "numeric_value": 0.1,
        "string_value": "string",
        "table_value": [
          {}
        ]
      }
    ],
    "eligibility_criteria": {
      "advanced_rule_error_message": "string",
      "advanced_rules": {},
      "age_restrictions": {
        "maximum_age": 0.1,
        "minimum_age": 0.1
      },
      "award_options": {
        "award_ids": [
          "string"
        ],
        "award_type_ids": [
          "string"
        ],
        "logic_operator": "and"
      },
      "award_recipients": true,
      "by_location": true,
      "certificants": true,
      "certification_options": {
        "logic_operator": "and",
        "program_ids": [
          "string"
        ]
      },
      "committee_member_options": {
        "committee_ids": [
          "string"
        ],
        "committee_position_ids": [
          "string"
        ],
        "committee_type_ids": [
          "string"
        ],
        "logic_operator": "and"
      },
      "committee_members": true,
      "custom_logic_options": {
        "lambda_function_id": "string"
      },
      "customer_type": "contact",
      "donor_options": {
        "donor_club_ids": [
          "string"
        ],
        "logic_operator": "and"
      },
      "donors": true,
      "enable_advanced_rules": true,
      "enable_age_restrictions": true,
      "enable_custom_logic": true,
      "enable_entitlement_restrictions": true,
      "enable_expression": true,
      "enable_organization_restrictions": true,
      "enable_status_restriction": true,
      "entitlement_restrictions": [
        {
          "quantity": 0.1,
          "type_id": "string"
        }
      ],
      "event_registration_options": {
        "event_ids": [
          "string"
        ],
        "logic_operator": "and",
        "registration_category_ids": [
          "string"
        ]
      },
      "event_registrations": true,
      "expression": "string",
      "expression_error_message": "string",
      "location": {
        "countries": [
          "string"
        ],
        "negate_logic": true
      },
      "logic_operator": "and",
      "member_options": {
        "chapter_member_options": {
          "chapter_ids": [
            "string"
          ],
          "chapter_type_ids": [
            "string"
          ],
          "logic_operator": "and"
        },
        "chapter_members": true,
        "member_package_ids": [
          "string"
        ],
        "member_status_reason_ids": [
          "string"
        ],
        "member_statuses": [
          "active"
        ],
        "member_type_ids": [
          "string"
        ],
        "section_member_options": {
          "logic_operator": "and",
          "section_ids": [
            "string"
          ],
          "section_type_ids": [
            "string"
          ]
        },
        "section_members": true
      },
      "members": true,
      "non_members": true,
      "organization_restrictions": {
        "contact_role_ids": [
          "string"
        ],
        "organization_type_ids": [
          "string"
        ]
      },
      "status_restrictions": {
        "0": "string"
      },
      "use_organization_for_eligibility": true
    },
    "enable_coupon_ownership": true,
    "enable_eligibility_criteria": true,
    "enable_restricted_contacts": true,
    "enable_restricted_organizations": true,
    "id": "string",
    "is_active": true,
    "maximum_number_of_total_uses": 1,
    "maximum_number_of_uses_per_customer": 1,
    "maximum_number_of_uses_per_organization": 1,
    "name": "string",
    "notes": "string",
    "order_id": "string",
    "order_line_item_id": "string",
    "organization_id": "string",
    "owner_type": "contact",
    "restricted_contacts": [
      {
        "contact_id": "string"
      }
    ],
    "restricted_organizations": [
      {
        "organization_id": "string"
      }
    ],
    "sys_bulk_load_at": "string",
    "sys_bulk_load_id": "string",
    "sys_bulk_load_pk": "string",
    "sys_bulk_load_record_no": 0.1,
    "sys_bulk_load_source_file": "string",
    "sys_calculated_field_error": "string",
    "sys_calculated_field_errors": [
      {
        "error": "string",
        "field": "string"
      }
    ],
    "sys_configuration_snapshot_id": "string",
    "sys_created_at": "2019-08-24T14:15:22Z",
    "sys_created_by_id": "string",
    "sys_deleted_by_id": "string",
    "sys_directive": "string",
    "sys_external_id": "string",
    "sys_has_files_in_s3": true,
    "sys_last_bulk_data_operation_id": "string",
    "sys_last_bulk_data_operation_sys_version": "string",
    "sys_last_modified_at": "2019-08-24T14:15:22Z",
    "sys_last_modified_by_id": "string",
    "sys_last_security_context": {},
    "sys_locked": true,
    "sys_snapshot_base_version": 0.1,
    "sys_version": 0.1,
    "type": "multi use",
    "valid_from": "2019-08-24T14:15:22Z",
    "valid_until": "2019-08-24T14:15:22Z"
  }'

Responses

The coupon code was saved successfully.

Headers
Access-Control-Allow-Headersstring
Access-Control-Allow-Methodsstring
Access-Control-Allow-Originstring
Bodyapplication/json
contact_idstring(Contact)required

The contact

coupon_idstring(Coupon)required

The ID of the associated coupon

coupon_typestring(Coupon Type)\-coupons$required

The type of coupon

custom_field_valuesArray of objects(Custom Field Values)
eligibility_criteriaobject(Eligibility Criteria)required

The criteria to use

eligibility_criteria.​advanced_rule_error_messagestring(Advanced Rule Error Message)

The error message to show when the advanced rule fails

eligibility_criteria.​advanced_rulesobject(Advanced Rules)
eligibility_criteria.​age_restrictionsobject(Age Restrictions)
eligibility_criteria.​award_optionsobject(Award Options)
eligibility_criteria.​award_recipientsboolean(Award Recipients)

If set, only people who have received awards

eligibility_criteria.​by_locationboolean(By Location)

If true, then filter by location

eligibility_criteria.​certificantsboolean(Certificants)

If set, only people with specific certifications

eligibility_criteria.​certification_optionsCertification Options (object)(Certification Options)
One of:
eligibility_criteria.​committee_member_optionsCommittee Member Options (object)(Committee Member Options)
One of:
eligibility_criteria.​committee_membersboolean(Committee Members)

If set, active members who belong to a committee can purchase

eligibility_criteria.​custom_logic_optionsCustom Logic Options (object)(Custom Logic Options)
One of:
eligibility_criteria.​customer_typestring(Customer Type)
Enum"contact""organization"
eligibility_criteria.​donor_optionsobject(Donor Options)
eligibility_criteria.​donorsboolean(Donors)

If true, only donors

eligibility_criteria.​enable_advanced_rulesboolean(Enable Advanced Rules)

Enable advanced JSON rules

eligibility_criteria.​enable_age_restrictionsboolean(Enable Age Restrictions)

Age registrations

eligibility_criteria.​enable_custom_logicboolean(Enable Custom Logic)

If set, the order engine will call out to a custom lambda function to process/change the order immediately after bundle expansion

eligibility_criteria.​enable_entitlement_restrictionsboolean(Enable Entitlement Restrictions)

If set, then you must have certain entitlements

eligibility_criteria.​enable_expressionboolean(Enable Expression)

Whether or not to enable an expression for evaluation

eligibility_criteria.​enable_organization_restrictionsboolean(Enable Organization Restrictions)

If set, you can restrict organizations

eligibility_criteria.​enable_status_restrictionboolean(Enable Status Restriction)

If set, you can restrict by status

eligibility_criteria.​entitlement_restrictionsArray of objects
eligibility_criteria.​event_registration_optionsobject(Event Registration Options)
eligibility_criteria.​event_registrationsboolean(Event Registrations)

If set, only people who have registered for events

eligibility_criteria.​expressionstring(Expression)

The expression

eligibility_criteria.​expression_error_messagestring(Expression Error Message)

The error message to show when the expression fails

eligibility_criteria.​locationLocation (object)(Location)
One of:
eligibility_criteria.​logic_operatorstring(Logic Operator)
Enum"and""not"
eligibility_criteria.​member_optionsMember Options (object)(Member Options)
One of:
eligibility_criteria.​membersboolean(Members)

If set, active members can purchase this

eligibility_criteria.​non_membersboolean(Non Members)

If set, only nonmembers can purchase

eligibility_criteria.​organization_restrictionsobject(Organization Restrictions)
eligibility_criteria.​status_restrictionsArray of Status Restrictions (strings)(Status Restrictions)non-empty

The statuses

One of:

The statuses

non-empty
eligibility_criteria.​use_organization_for_eligibilityboolean(Use Organization For Eligibility)

If checked, a person's organization is used to check for eligibility, rather than the person themselves

enable_coupon_ownershipboolean(Enable Coupon Ownership)

Enable the idea that a coupon can be owned by a contact/organization

enable_eligibility_criteriaboolean(Enable Eligibility Criteria)

If true, eligibility criteria is applied to the coupon code

enable_restricted_contactsboolean(Enable Restricted Contacts)

If true, this coupon is restricted only to certain contacts

enable_restricted_organizationsboolean(Enable Restricted Organizations)

If true, this coupon is restricted only to certain organizations

idstring(ID)^[\w|-]+$required

The unique, string identifier of this coupon code

is_activeboolean(Is Active)

Whether or not this coupon code is active

maximum_number_of_total_usesMaximum Number Of Total Uses (integer)(Maximum Number Of Total Uses)>= 1required

The maximum number of total uses

One of:

The maximum number of total uses

>= 1
integer(Maximum Number Of Total Uses)>= 1

The maximum number of total uses

Value1
maximum_number_of_uses_per_customerMaximum Number Of Uses Per Customer (integer)(Maximum Number Of Uses Per Customer)>= 1required

The maximum number of total uses for a given customer

One of:

The maximum number of total uses for a given customer

>= 1
integer(Maximum Number Of Uses Per Customer)>= 1

The maximum number of total uses for a given customer

Value1
maximum_number_of_uses_per_organizationinteger(Maximum Number Of Uses Per Organization)>= 1

The maximum number of total uses per contacts of an organization

namestring(Name)

The name of the coupon code - used to identify the owner

notesstring(Notes)

Notes

order_idstring(Order)

The order id tied to this code

order_line_item_idstring(Order Line Item)
organization_idstring(Organization)required

The organization

owner_typeOwner Type (string)(Owner Type)required

The owner of the code

Enum"contact""organization"
One of:

The owner of the code

string(Owner Type)

The owner of the code

Enum"contact""organization"
restricted_contactsArray of objectsnon-emptyrequired
restricted_contacts[].​contact_idstring(Contact)required
restricted_organizationsArray of objectsnon-emptyrequired
restricted_organizations[].​organization_idstring(Organization)required
sys_bulk_load_atstring(Sys Bulk Load At)

If this record was loaded via bulk, the timestamp when the record was processed

sys_bulk_load_idstring(Sys Bulk Load)

If this record was loaded via bulk, the ID of the bulk load process

sys_bulk_load_pkstring(Sys Bulk Load Pk)

If this record was loaded via bulk, the tenant and key of the bulk load process used as a partition key

sys_bulk_load_record_nonumber(float)(Sys Bulk Load Record No)

If this record was loaded via bulk, the record number in the source file

sys_bulk_load_source_filestring(Sys Bulk Load Source File)

If this record was loaded via bulk, the source file

sys_calculated_field_errorstring(Sys Calculated Field Error)

The error associated with the calculated field

sys_calculated_field_errorsArray of objects
sys_configuration_snapshot_idstring(Sys Configuration Snapshot)

If a snapshot was restored/applies to this record, the ID of the snapshot

sys_created_atstring(date-time)(Sys Created At)required

The date/time that this record was created, expressed in ISO-8601 date format

sys_created_by_idstring(Sys Created By)required

The ID of the user that created this record

sys_deleted_by_idstring(Sys Deleted By)

The ID of the user that deleted (or last tried to delete) this object

sys_directivestring(Sys Directive)

Means for passing directive information into an object processing logic

sys_external_idstring(Sys External)

The ID that a record has from an external system or data import

sys_has_files_in_s3boolean(Sys Has Files In S3)

If true, this record has files in S3. If false, it doesnt, so no need to hit S3 upon deletion

sys_last_bulk_data_operation_idstring(Sys Last Bulk Data Operation)

If this record was last touched by a bulk data operation, the ID of that operation

sys_last_bulk_data_operation_sys_versionstring(Sys Last Bulk Data Operation Sys Version)

If this record was last touched by a bulk data operation, the sys_version at the time of that operation

sys_last_modified_atstring(date-time)(Sys Last Modified At)required

The date/time that this record record was last modified, expressed in ISO-8601 date format

sys_last_modified_by_idstring(Sys Last Modified By)required

The ID of the user that last modified this record

sys_last_security_contextobject(Sys Last Security Context)

The security context of the last insert, modify, or delete performed on this item

sys_lockedboolean(Sys Locked)

If set, this record is locked and cannot be changed via the API

sys_snapshot_base_versionnumber(float)(Sys Snapshot Base Version)

The version to use as a base when creating a configuration snapshot; if not set, 1 is used. Helpful when creating a sandbox

sys_versionnumber(float)(Sys Version)

A number representing the version of this record in the database

typestring(Type)

The type of coupon

Enum"multi use""single use"
valid_fromstring(date-time)(Valid From)

Date/time at which the code begins to be valid

valid_untilstring(date-time)(Valid Until)

Expiration date

Response
application/json
{ "contact_id": "string", "coupon_id": "string", "coupon_type": "string", "custom_field_values": [ {} ], "eligibility_criteria": { "advanced_rule_error_message": "string", "advanced_rules": {}, "age_restrictions": {}, "award_options": {}, "award_recipients": true, "by_location": true, "certificants": true, "certification_options": {}, "committee_member_options": {}, "committee_members": true, "custom_logic_options": {}, "customer_type": "contact", "donor_options": {}, "donors": true, "enable_advanced_rules": true, "enable_age_restrictions": true, "enable_custom_logic": true, "enable_entitlement_restrictions": true, "enable_expression": true, "enable_organization_restrictions": true, "enable_status_restriction": true, "entitlement_restrictions": [], "event_registration_options": {}, "event_registrations": true, "expression": "string", "expression_error_message": "string", "location": {}, "logic_operator": "and", "member_options": {}, "members": true, "non_members": true, "organization_restrictions": {}, "status_restrictions": {}, "use_organization_for_eligibility": true }, "enable_coupon_ownership": true, "enable_eligibility_criteria": true, "enable_restricted_contacts": true, "enable_restricted_organizations": true, "id": "string", "is_active": true, "maximum_number_of_total_uses": 1, "maximum_number_of_uses_per_customer": 1, "maximum_number_of_uses_per_organization": 1, "name": "string", "notes": "string", "order_id": "string", "order_line_item_id": "string", "organization_id": "string", "owner_type": "contact", "restricted_contacts": [ {} ], "restricted_organizations": [ {} ], "sys_bulk_load_at": "string", "sys_bulk_load_id": "string", "sys_bulk_load_pk": "string", "sys_bulk_load_record_no": 0.1, "sys_bulk_load_source_file": "string", "sys_calculated_field_error": "string", "sys_calculated_field_errors": [ {} ], "sys_configuration_snapshot_id": "string", "sys_created_at": "2019-08-24T14:15:22Z", "sys_created_by_id": "string", "sys_deleted_by_id": "string", "sys_directive": "string", "sys_external_id": "string", "sys_has_files_in_s3": true, "sys_last_bulk_data_operation_id": "string", "sys_last_bulk_data_operation_sys_version": "string", "sys_last_modified_at": "2019-08-24T14:15:22Z", "sys_last_modified_by_id": "string", "sys_last_security_context": {}, "sys_locked": true, "sys_snapshot_base_version": 0.1, "sys_version": 0.1, "type": "multi use", "valid_from": "2019-08-24T14:15:22Z", "valid_until": "2019-08-24T14:15:22Z" }

Execute Batch Operations

Request

TAllows you to perform up to 100 parallel patch/delete operations

Path
tenantIdstringrequired

The id of the tenant being accessed.

Bodyapplication/jsonrequired

The batch request

operationsArray of objects
curl -i -X POST \
  'https://docs.api.rhythmsoftware.com/_mock/apis/commerce/commerce-v1/couponCodes/{tenantId}/batch' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "operations": [
      {
        "id": null,
        "object": {},
        "operation": "create",
        "patch_directives": {
          "0": {
            "op": "add",
            "path": "string",
            "value": "string"
          }
        }
      }
    ]
  }'

Responses

Request completed successfully.

Headers
Access-Control-Allow-Headersstring
Access-Control-Allow-Methodsstring
Access-Control-Allow-Originstring
Bodyapplication/json
error_countnumber(float)(Error Count)

Number of error results

resultsArray of objects
success_countnumber(float)(Success Count)

Number of successful results

Response
application/json
{ "error_count": 0.1, "results": [ {} ], "success_count": 0.1 }

Returns a list of records with the specified contact_id

Request

Returns a list of records with the specified contact_id

Path
tenantIdstringrequired

The tenant

contact_idstringrequired

The contact_id to use to for record lookup

Query
fieldsstring

The fields that you want to retrieve; if omitted, the entire object is returned

exclusiveStartKeystring

If paging, this allows you to return the next set of results

curl -i -X GET \
  'https://docs.api.rhythmsoftware.com/_mock/apis/commerce/commerce-v1/couponCodes/{tenantId}/contact/{contact_id}?exclusiveStartKey=string&fields=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

The records were retrieved successfully

Headers
Access-Control-Allow-Headersstring
Access-Control-Allow-Methodsstring
Access-Control-Allow-Originstring
Bodyapplication/json
Countinteger
ItemsArray of objects(CouponCode)
LastEvaluatedKeystring
Response
application/json
{ "Count": 0, "Items": [ {} ], "LastEvaluatedKey": "string" }

Returns a list of records with the specified coupon_id

Request

Returns a list of records with the specified coupon_id

Path
tenantIdstringrequired

The tenant

coupon_typestringrequired

The coupon_type to use to for record lookup

coupon_idstringrequired

The coupon_id to use to for record lookup

Query
fieldsstring

The fields that you want to retrieve; if omitted, the entire object is returned

exclusiveStartKeystring

If paging, this allows you to return the next set of results

curl -i -X GET \
  'https://docs.api.rhythmsoftware.com/_mock/apis/commerce/commerce-v1/couponCodes/{tenantId}/coupon/{coupon_type}/{coupon_id}?exclusiveStartKey=string&fields=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

The records were retrieved successfully

Headers
Access-Control-Allow-Headersstring
Access-Control-Allow-Methodsstring
Access-Control-Allow-Originstring
Bodyapplication/json
Countinteger
ItemsArray of objects(CouponCode)
LastEvaluatedKeystring
Response
application/json
{ "Count": 0, "Items": [ {} ], "LastEvaluatedKey": "string" }

Returns a list of records with the specified order_id

Request

Returns a list of records with the specified order_id

Path
tenantIdstringrequired

The tenant

order_idstringrequired

The order_id to use to for record lookup

Query
fieldsstring

The fields that you want to retrieve; if omitted, the entire object is returned

exclusiveStartKeystring

If paging, this allows you to return the next set of results

curl -i -X GET \
  'https://docs.api.rhythmsoftware.com/_mock/apis/commerce/commerce-v1/couponCodes/{tenantId}/order/{order_id}?exclusiveStartKey=string&fields=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

The records were retrieved successfully

Headers
Access-Control-Allow-Headersstring
Access-Control-Allow-Methodsstring
Access-Control-Allow-Originstring
Bodyapplication/json
Countinteger
ItemsArray of objects(CouponCode)
LastEvaluatedKeystring
Response
application/json
{ "Count": 0, "Items": [ {} ], "LastEvaluatedKey": "string" }

Returns a list of records with the specified organization_id

Request

Returns a list of records with the specified organization_id

Path
tenantIdstringrequired

The tenant

organization_idstringrequired

The organization_id to use to for record lookup

Query
fieldsstring

The fields that you want to retrieve; if omitted, the entire object is returned

exclusiveStartKeystring

If paging, this allows you to return the next set of results

curl -i -X GET \
  'https://docs.api.rhythmsoftware.com/_mock/apis/commerce/commerce-v1/couponCodes/{tenantId}/organization/{organization_id}?exclusiveStartKey=string&fields=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

The records were retrieved successfully

Headers
Access-Control-Allow-Headersstring
Access-Control-Allow-Methodsstring
Access-Control-Allow-Originstring
Bodyapplication/json
Countinteger
ItemsArray of objects(CouponCode)
LastEvaluatedKeystring
Response
application/json
{ "Count": 0, "Items": [ {} ], "LastEvaluatedKey": "string" }

Sends out a preview of the email

Request

Sends out a preview of the email

Path
tenantIdstringrequired

The tenant

Bodyapplication/jsonrequired

The domain_name to use to for record lookup

cancellation_idstring(Cancellation)
coupon_idstring(Coupon)required
coupon_typestring(Coupon Type)required
destination_email_addressstring(Destination Email Address)required
email_templateobject(Email Template)
order_idstring(Order)
order_item_line_numbernumber(float)(Order Item Line Number)
return_idstring(Return)
shipment_idstring(Shipment)required
curl -i -X POST \
  'https://docs.api.rhythmsoftware.com/_mock/apis/commerce/commerce-v1/couponCodes/{tenantId}/previewEmail' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "cancellation_id": "string",
    "coupon_id": "string",
    "coupon_type": "string",
    "destination_email_address": "string",
    "email_template": {
      "bcc": "string",
      "body": "string",
      "cc": "string",
      "from": "string",
      "from_name": "string",
      "reply_to": "string",
      "subject": "string"
    },
    "order_id": "string",
    "order_item_line_number": 0.1,
    "return_id": "string",
    "shipment_id": "string"
  }'

Responses

The record was retrieved successfully

Headers
Access-Control-Allow-Headersstring
Access-Control-Allow-Methodsstring
Access-Control-Allow-Originstring

Returns a coupon code from the system by its ID.

Request

This method will delete a coupon code with the specified ID.

Path
tenantIdstringrequired

The id of the tenant being accessed.

idstringrequired

The ID of the coupon code to delete.

curl -i -X DELETE \
  'https://docs.api.rhythmsoftware.com/_mock/apis/commerce/commerce-v1/couponCodes/{tenantId}/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

The coupon code was deleted successfully.

Headers
Access-Control-Allow-Headersstring
Access-Control-Allow-Methodsstring
Access-Control-Allow-Originstring
Bodyapplication/json
string
Response
application/json
"string"

Returns a coupon code from the system by its ID.

Request

This method will look up a coupon code by the specified ID and return it back.

Path
tenantIdstringrequired

The id of the tenant being accessed.

idstringrequired

The ID of the coupon code to return.

Query
fieldsstring

The fields that you want to retrieve; if omitted, the entire object is returned.

consistentReadstring

Indicates the API should force a consistent read on the data source.

curl -i -X GET \
  'https://docs.api.rhythmsoftware.com/_mock/apis/commerce/commerce-v1/couponCodes/{tenantId}/{id}?consistentRead=string&fields=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

The coupon code was retrieved successfully.

Headers
Access-Control-Allow-Headersstring
Access-Control-Allow-Methodsstring
Access-Control-Allow-Originstring
Bodyapplication/json
contact_idstring(Contact)required

The contact

coupon_idstring(Coupon)required

The ID of the associated coupon

coupon_typestring(Coupon Type)\-coupons$required

The type of coupon

custom_field_valuesArray of objects(Custom Field Values)
eligibility_criteriaobject(Eligibility Criteria)required

The criteria to use

eligibility_criteria.​advanced_rule_error_messagestring(Advanced Rule Error Message)

The error message to show when the advanced rule fails

eligibility_criteria.​advanced_rulesobject(Advanced Rules)
eligibility_criteria.​age_restrictionsobject(Age Restrictions)
eligibility_criteria.​award_optionsobject(Award Options)
eligibility_criteria.​award_recipientsboolean(Award Recipients)

If set, only people who have received awards

eligibility_criteria.​by_locationboolean(By Location)

If true, then filter by location

eligibility_criteria.​certificantsboolean(Certificants)

If set, only people with specific certifications

eligibility_criteria.​certification_optionsCertification Options (object)(Certification Options)
One of:
eligibility_criteria.​committee_member_optionsCommittee Member Options (object)(Committee Member Options)
One of:
eligibility_criteria.​committee_membersboolean(Committee Members)

If set, active members who belong to a committee can purchase

eligibility_criteria.​custom_logic_optionsCustom Logic Options (object)(Custom Logic Options)
One of:
eligibility_criteria.​customer_typestring(Customer Type)
Enum"contact""organization"
eligibility_criteria.​donor_optionsobject(Donor Options)
eligibility_criteria.​donorsboolean(Donors)

If true, only donors

eligibility_criteria.​enable_advanced_rulesboolean(Enable Advanced Rules)

Enable advanced JSON rules

eligibility_criteria.​enable_age_restrictionsboolean(Enable Age Restrictions)

Age registrations

eligibility_criteria.​enable_custom_logicboolean(Enable Custom Logic)

If set, the order engine will call out to a custom lambda function to process/change the order immediately after bundle expansion

eligibility_criteria.​enable_entitlement_restrictionsboolean(Enable Entitlement Restrictions)

If set, then you must have certain entitlements

eligibility_criteria.​enable_expressionboolean(Enable Expression)

Whether or not to enable an expression for evaluation

eligibility_criteria.​enable_organization_restrictionsboolean(Enable Organization Restrictions)

If set, you can restrict organizations

eligibility_criteria.​enable_status_restrictionboolean(Enable Status Restriction)

If set, you can restrict by status

eligibility_criteria.​entitlement_restrictionsArray of objects
eligibility_criteria.​event_registration_optionsobject(Event Registration Options)
eligibility_criteria.​event_registrationsboolean(Event Registrations)

If set, only people who have registered for events

eligibility_criteria.​expressionstring(Expression)

The expression

eligibility_criteria.​expression_error_messagestring(Expression Error Message)

The error message to show when the expression fails

eligibility_criteria.​locationLocation (object)(Location)
One of:
eligibility_criteria.​logic_operatorstring(Logic Operator)
Enum"and""not"
eligibility_criteria.​member_optionsMember Options (object)(Member Options)
One of:
eligibility_criteria.​membersboolean(Members)

If set, active members can purchase this

eligibility_criteria.​non_membersboolean(Non Members)

If set, only nonmembers can purchase

eligibility_criteria.​organization_restrictionsobject(Organization Restrictions)
eligibility_criteria.​status_restrictionsArray of Status Restrictions (strings)(Status Restrictions)non-empty

The statuses

One of:

The statuses

non-empty
eligibility_criteria.​use_organization_for_eligibilityboolean(Use Organization For Eligibility)

If checked, a person's organization is used to check for eligibility, rather than the person themselves

enable_coupon_ownershipboolean(Enable Coupon Ownership)

Enable the idea that a coupon can be owned by a contact/organization

enable_eligibility_criteriaboolean(Enable Eligibility Criteria)

If true, eligibility criteria is applied to the coupon code

enable_restricted_contactsboolean(Enable Restricted Contacts)

If true, this coupon is restricted only to certain contacts

enable_restricted_organizationsboolean(Enable Restricted Organizations)

If true, this coupon is restricted only to certain organizations

idstring(ID)^[\w|-]+$required

The unique, string identifier of this coupon code

is_activeboolean(Is Active)

Whether or not this coupon code is active

maximum_number_of_total_usesMaximum Number Of Total Uses (integer)(Maximum Number Of Total Uses)>= 1required

The maximum number of total uses

One of:

The maximum number of total uses

>= 1
integer(Maximum Number Of Total Uses)>= 1

The maximum number of total uses

Value1
maximum_number_of_uses_per_customerMaximum Number Of Uses Per Customer (integer)(Maximum Number Of Uses Per Customer)>= 1required

The maximum number of total uses for a given customer

One of:

The maximum number of total uses for a given customer

>= 1
integer(Maximum Number Of Uses Per Customer)>= 1

The maximum number of total uses for a given customer

Value1
maximum_number_of_uses_per_organizationinteger(Maximum Number Of Uses Per Organization)>= 1

The maximum number of total uses per contacts of an organization

namestring(Name)

The name of the coupon code - used to identify the owner

notesstring(Notes)

Notes

order_idstring(Order)

The order id tied to this code

order_line_item_idstring(Order Line Item)
organization_idstring(Organization)required

The organization

owner_typeOwner Type (string)(Owner Type)required

The owner of the code

Enum"contact""organization"
One of:

The owner of the code

string(Owner Type)

The owner of the code

Enum"contact""organization"
restricted_contactsArray of objectsnon-emptyrequired
restricted_contacts[].​contact_idstring(Contact)required
restricted_organizationsArray of objectsnon-emptyrequired
restricted_organizations[].​organization_idstring(Organization)required
sys_bulk_load_atstring(Sys Bulk Load At)

If this record was loaded via bulk, the timestamp when the record was processed

sys_bulk_load_idstring(Sys Bulk Load)

If this record was loaded via bulk, the ID of the bulk load process

sys_bulk_load_pkstring(Sys Bulk Load Pk)

If this record was loaded via bulk, the tenant and key of the bulk load process used as a partition key

sys_bulk_load_record_nonumber(float)(Sys Bulk Load Record No)

If this record was loaded via bulk, the record number in the source file

sys_bulk_load_source_filestring(Sys Bulk Load Source File)

If this record was loaded via bulk, the source file

sys_calculated_field_errorstring(Sys Calculated Field Error)

The error associated with the calculated field

sys_calculated_field_errorsArray of objects
sys_configuration_snapshot_idstring(Sys Configuration Snapshot)

If a snapshot was restored/applies to this record, the ID of the snapshot

sys_created_atstring(date-time)(Sys Created At)required

The date/time that this record was created, expressed in ISO-8601 date format

sys_created_by_idstring(Sys Created By)required

The ID of the user that created this record

sys_deleted_by_idstring(Sys Deleted By)

The ID of the user that deleted (or last tried to delete) this object

sys_directivestring(Sys Directive)

Means for passing directive information into an object processing logic

sys_external_idstring(Sys External)

The ID that a record has from an external system or data import

sys_has_files_in_s3boolean(Sys Has Files In S3)

If true, this record has files in S3. If false, it doesnt, so no need to hit S3 upon deletion

sys_last_bulk_data_operation_idstring(Sys Last Bulk Data Operation)

If this record was last touched by a bulk data operation, the ID of that operation

sys_last_bulk_data_operation_sys_versionstring(Sys Last Bulk Data Operation Sys Version)

If this record was last touched by a bulk data operation, the sys_version at the time of that operation

sys_last_modified_atstring(date-time)(Sys Last Modified At)required

The date/time that this record record was last modified, expressed in ISO-8601 date format

sys_last_modified_by_idstring(Sys Last Modified By)required

The ID of the user that last modified this record

sys_last_security_contextobject(Sys Last Security Context)

The security context of the last insert, modify, or delete performed on this item

sys_lockedboolean(Sys Locked)

If set, this record is locked and cannot be changed via the API

sys_snapshot_base_versionnumber(float)(Sys Snapshot Base Version)

The version to use as a base when creating a configuration snapshot; if not set, 1 is used. Helpful when creating a sandbox

sys_versionnumber(float)(Sys Version)

A number representing the version of this record in the database

typestring(Type)

The type of coupon

Enum"multi use""single use"
valid_fromstring(date-time)(Valid From)

Date/time at which the code begins to be valid

valid_untilstring(date-time)(Valid Until)

Expiration date

Response
application/json
{ "contact_id": "string", "coupon_id": "string", "coupon_type": "string", "custom_field_values": [ {} ], "eligibility_criteria": { "advanced_rule_error_message": "string", "advanced_rules": {}, "age_restrictions": {}, "award_options": {}, "award_recipients": true, "by_location": true, "certificants": true, "certification_options": {}, "committee_member_options": {}, "committee_members": true, "custom_logic_options": {}, "customer_type": "contact", "donor_options": {}, "donors": true, "enable_advanced_rules": true, "enable_age_restrictions": true, "enable_custom_logic": true, "enable_entitlement_restrictions": true, "enable_expression": true, "enable_organization_restrictions": true, "enable_status_restriction": true, "entitlement_restrictions": [], "event_registration_options": {}, "event_registrations": true, "expression": "string", "expression_error_message": "string", "location": {}, "logic_operator": "and", "member_options": {}, "members": true, "non_members": true, "organization_restrictions": {}, "status_restrictions": {}, "use_organization_for_eligibility": true }, "enable_coupon_ownership": true, "enable_eligibility_criteria": true, "enable_restricted_contacts": true, "enable_restricted_organizations": true, "id": "string", "is_active": true, "maximum_number_of_total_uses": 1, "maximum_number_of_uses_per_customer": 1, "maximum_number_of_uses_per_organization": 1, "name": "string", "notes": "string", "order_id": "string", "order_line_item_id": "string", "organization_id": "string", "owner_type": "contact", "restricted_contacts": [ {} ], "restricted_organizations": [ {} ], "sys_bulk_load_at": "string", "sys_bulk_load_id": "string", "sys_bulk_load_pk": "string", "sys_bulk_load_record_no": 0.1, "sys_bulk_load_source_file": "string", "sys_calculated_field_error": "string", "sys_calculated_field_errors": [ {} ], "sys_configuration_snapshot_id": "string", "sys_created_at": "2019-08-24T14:15:22Z", "sys_created_by_id": "string", "sys_deleted_by_id": "string", "sys_directive": "string", "sys_external_id": "string", "sys_has_files_in_s3": true, "sys_last_bulk_data_operation_id": "string", "sys_last_bulk_data_operation_sys_version": "string", "sys_last_modified_at": "2019-08-24T14:15:22Z", "sys_last_modified_by_id": "string", "sys_last_security_context": {}, "sys_locked": true, "sys_snapshot_base_version": 0.1, "sys_version": 0.1, "type": "multi use", "valid_from": "2019-08-24T14:15:22Z", "valid_until": "2019-08-24T14:15:22Z" }

Partially updates a coupon code with the specified ID.

Request

This method will patch an existing coupon code with the specified ID, using the HTTP PATCH specification.

Path
tenantIdstringrequired

The id of the tenant being accessed.

idstringrequired

The ID of the coupon code to patch.

Bodyapplication/jsonrequired

The patch directives conforming to RFC 6902.

Array [
opstring(Op)required

The operation

Enum"add""copy""move""remove""replace""test"
pathstring(Path)required

The JSON path

valuestring(Value)
]
curl -i -X PATCH \
  'https://docs.api.rhythmsoftware.com/_mock/apis/commerce/commerce-v1/couponCodes/{tenantId}/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "op": "add",
      "path": "string",
      "value": "string"
    }
  ]'

Responses

The coupon code was patched successfully.

Headers
Access-Control-Allow-Headersstring
Access-Control-Allow-Methodsstring
Access-Control-Allow-Originstring
Bodyapplication/json
contact_idstring(Contact)required

The contact

coupon_idstring(Coupon)required

The ID of the associated coupon

coupon_typestring(Coupon Type)\-coupons$required

The type of coupon

custom_field_valuesArray of objects(Custom Field Values)
eligibility_criteriaobject(Eligibility Criteria)required

The criteria to use

eligibility_criteria.​advanced_rule_error_messagestring(Advanced Rule Error Message)

The error message to show when the advanced rule fails

eligibility_criteria.​advanced_rulesobject(Advanced Rules)
eligibility_criteria.​age_restrictionsobject(Age Restrictions)
eligibility_criteria.​award_optionsobject(Award Options)
eligibility_criteria.​award_recipientsboolean(Award Recipients)

If set, only people who have received awards

eligibility_criteria.​by_locationboolean(By Location)

If true, then filter by location

eligibility_criteria.​certificantsboolean(Certificants)

If set, only people with specific certifications

eligibility_criteria.​certification_optionsCertification Options (object)(Certification Options)
One of:
eligibility_criteria.​committee_member_optionsCommittee Member Options (object)(Committee Member Options)
One of:
eligibility_criteria.​committee_membersboolean(Committee Members)

If set, active members who belong to a committee can purchase

eligibility_criteria.​custom_logic_optionsCustom Logic Options (object)(Custom Logic Options)
One of:
eligibility_criteria.​customer_typestring(Customer Type)
Enum"contact""organization"
eligibility_criteria.​donor_optionsobject(Donor Options)
eligibility_criteria.​donorsboolean(Donors)

If true, only donors

eligibility_criteria.​enable_advanced_rulesboolean(Enable Advanced Rules)

Enable advanced JSON rules

eligibility_criteria.​enable_age_restrictionsboolean(Enable Age Restrictions)

Age registrations

eligibility_criteria.​enable_custom_logicboolean(Enable Custom Logic)

If set, the order engine will call out to a custom lambda function to process/change the order immediately after bundle expansion

eligibility_criteria.​enable_entitlement_restrictionsboolean(Enable Entitlement Restrictions)

If set, then you must have certain entitlements

eligibility_criteria.​enable_expressionboolean(Enable Expression)

Whether or not to enable an expression for evaluation

eligibility_criteria.​enable_organization_restrictionsboolean(Enable Organization Restrictions)

If set, you can restrict organizations

eligibility_criteria.​enable_status_restrictionboolean(Enable Status Restriction)

If set, you can restrict by status

eligibility_criteria.​entitlement_restrictionsArray of objects
eligibility_criteria.​event_registration_optionsobject(Event Registration Options)
eligibility_criteria.​event_registrationsboolean(Event Registrations)

If set, only people who have registered for events

eligibility_criteria.​expressionstring(Expression)

The expression

eligibility_criteria.​expression_error_messagestring(Expression Error Message)

The error message to show when the expression fails

eligibility_criteria.​locationLocation (object)(Location)
One of:
eligibility_criteria.​logic_operatorstring(Logic Operator)
Enum"and""not"
eligibility_criteria.​member_optionsMember Options (object)(Member Options)
One of:
eligibility_criteria.​membersboolean(Members)

If set, active members can purchase this

eligibility_criteria.​non_membersboolean(Non Members)

If set, only nonmembers can purchase

eligibility_criteria.​organization_restrictionsobject(Organization Restrictions)
eligibility_criteria.​status_restrictionsArray of Status Restrictions (strings)(Status Restrictions)non-empty

The statuses

One of:

The statuses

non-empty
eligibility_criteria.​use_organization_for_eligibilityboolean(Use Organization For Eligibility)

If checked, a person's organization is used to check for eligibility, rather than the person themselves

enable_coupon_ownershipboolean(Enable Coupon Ownership)

Enable the idea that a coupon can be owned by a contact/organization

enable_eligibility_criteriaboolean(Enable Eligibility Criteria)

If true, eligibility criteria is applied to the coupon code

enable_restricted_contactsboolean(Enable Restricted Contacts)

If true, this coupon is restricted only to certain contacts

enable_restricted_organizationsboolean(Enable Restricted Organizations)

If true, this coupon is restricted only to certain organizations

idstring(ID)^[\w|-]+$required

The unique, string identifier of this coupon code

is_activeboolean(Is Active)

Whether or not this coupon code is active

maximum_number_of_total_usesMaximum Number Of Total Uses (integer)(Maximum Number Of Total Uses)>= 1required

The maximum number of total uses

One of:

The maximum number of total uses

>= 1
integer(Maximum Number Of Total Uses)>= 1

The maximum number of total uses

Value1
maximum_number_of_uses_per_customerMaximum Number Of Uses Per Customer (integer)(Maximum Number Of Uses Per Customer)>= 1required

The maximum number of total uses for a given customer

One of:

The maximum number of total uses for a given customer

>= 1
integer(Maximum Number Of Uses Per Customer)>= 1

The maximum number of total uses for a given customer

Value1
maximum_number_of_uses_per_organizationinteger(Maximum Number Of Uses Per Organization)>= 1

The maximum number of total uses per contacts of an organization

namestring(Name)

The name of the coupon code - used to identify the owner

notesstring(Notes)

Notes

order_idstring(Order)

The order id tied to this code

order_line_item_idstring(Order Line Item)
organization_idstring(Organization)required

The organization

owner_typeOwner Type (string)(Owner Type)required

The owner of the code

Enum"contact""organization"
One of:

The owner of the code

string(Owner Type)

The owner of the code

Enum"contact""organization"
restricted_contactsArray of objectsnon-emptyrequired
restricted_contacts[].​contact_idstring(Contact)required
restricted_organizationsArray of objectsnon-emptyrequired
restricted_organizations[].​organization_idstring(Organization)required
sys_bulk_load_atstring(Sys Bulk Load At)

If this record was loaded via bulk, the timestamp when the record was processed

sys_bulk_load_idstring(Sys Bulk Load)

If this record was loaded via bulk, the ID of the bulk load process

sys_bulk_load_pkstring(Sys Bulk Load Pk)

If this record was loaded via bulk, the tenant and key of the bulk load process used as a partition key

sys_bulk_load_record_nonumber(float)(Sys Bulk Load Record No)

If this record was loaded via bulk, the record number in the source file

sys_bulk_load_source_filestring(Sys Bulk Load Source File)

If this record was loaded via bulk, the source file

sys_calculated_field_errorstring(Sys Calculated Field Error)

The error associated with the calculated field

sys_calculated_field_errorsArray of objects
sys_configuration_snapshot_idstring(Sys Configuration Snapshot)

If a snapshot was restored/applies to this record, the ID of the snapshot

sys_created_atstring(date-time)(Sys Created At)required

The date/time that this record was created, expressed in ISO-8601 date format

sys_created_by_idstring(Sys Created By)required

The ID of the user that created this record

sys_deleted_by_idstring(Sys Deleted By)

The ID of the user that deleted (or last tried to delete) this object

sys_directivestring(Sys Directive)

Means for passing directive information into an object processing logic

sys_external_idstring(Sys External)

The ID that a record has from an external system or data import

sys_has_files_in_s3boolean(Sys Has Files In S3)

If true, this record has files in S3. If false, it doesnt, so no need to hit S3 upon deletion

sys_last_bulk_data_operation_idstring(Sys Last Bulk Data Operation)

If this record was last touched by a bulk data operation, the ID of that operation

sys_last_bulk_data_operation_sys_versionstring(Sys Last Bulk Data Operation Sys Version)

If this record was last touched by a bulk data operation, the sys_version at the time of that operation

sys_last_modified_atstring(date-time)(Sys Last Modified At)required

The date/time that this record record was last modified, expressed in ISO-8601 date format

sys_last_modified_by_idstring(Sys Last Modified By)required

The ID of the user that last modified this record

sys_last_security_contextobject(Sys Last Security Context)

The security context of the last insert, modify, or delete performed on this item

sys_lockedboolean(Sys Locked)

If set, this record is locked and cannot be changed via the API

sys_snapshot_base_versionnumber(float)(Sys Snapshot Base Version)

The version to use as a base when creating a configuration snapshot; if not set, 1 is used. Helpful when creating a sandbox

sys_versionnumber(float)(Sys Version)

A number representing the version of this record in the database

typestring(Type)

The type of coupon

Enum"multi use""single use"
valid_fromstring(date-time)(Valid From)

Date/time at which the code begins to be valid

valid_untilstring(date-time)(Valid Until)

Expiration date

Response
application/json
{ "contact_id": "string", "coupon_id": "string", "coupon_type": "string", "custom_field_values": [ {} ], "eligibility_criteria": { "advanced_rule_error_message": "string", "advanced_rules": {}, "age_restrictions": {}, "award_options": {}, "award_recipients": true, "by_location": true, "certificants": true, "certification_options": {}, "committee_member_options": {}, "committee_members": true, "custom_logic_options": {}, "customer_type": "contact", "donor_options": {}, "donors": true, "enable_advanced_rules": true, "enable_age_restrictions": true, "enable_custom_logic": true, "enable_entitlement_restrictions": true, "enable_expression": true, "enable_organization_restrictions": true, "enable_status_restriction": true, "entitlement_restrictions": [], "event_registration_options": {}, "event_registrations": true, "expression": "string", "expression_error_message": "string", "location": {}, "logic_operator": "and", "member_options": {}, "members": true, "non_members": true, "organization_restrictions": {}, "status_restrictions": {}, "use_organization_for_eligibility": true }, "enable_coupon_ownership": true, "enable_eligibility_criteria": true, "enable_restricted_contacts": true, "enable_restricted_organizations": true, "id": "string", "is_active": true, "maximum_number_of_total_uses": 1, "maximum_number_of_uses_per_customer": 1, "maximum_number_of_uses_per_organization": 1, "name": "string", "notes": "string", "order_id": "string", "order_line_item_id": "string", "organization_id": "string", "owner_type": "contact", "restricted_contacts": [ {} ], "restricted_organizations": [ {} ], "sys_bulk_load_at": "string", "sys_bulk_load_id": "string", "sys_bulk_load_pk": "string", "sys_bulk_load_record_no": 0.1, "sys_bulk_load_source_file": "string", "sys_calculated_field_error": "string", "sys_calculated_field_errors": [ {} ], "sys_configuration_snapshot_id": "string", "sys_created_at": "2019-08-24T14:15:22Z", "sys_created_by_id": "string", "sys_deleted_by_id": "string", "sys_directive": "string", "sys_external_id": "string", "sys_has_files_in_s3": true, "sys_last_bulk_data_operation_id": "string", "sys_last_bulk_data_operation_sys_version": "string", "sys_last_modified_at": "2019-08-24T14:15:22Z", "sys_last_modified_by_id": "string", "sys_last_security_context": {}, "sys_locked": true, "sys_snapshot_base_version": 0.1, "sys_version": 0.1, "type": "multi use", "valid_from": "2019-08-24T14:15:22Z", "valid_until": "2019-08-24T14:15:22Z" }

Updates a coupon code with the specified ID.

Request

This method will update an existing coupon code with the specified ID.

Path
tenantIdstringrequired

The id of the tenant being accessed.

idstringrequired

The ID of the coupon code to update.

Bodyapplication/jsonrequired

The updated coupon code that will be saved.

contact_idstring(Contact)required

The contact

coupon_idstring(Coupon)required

The ID of the associated coupon

coupon_typestring(Coupon Type)\-coupons$required

The type of coupon

custom_field_valuesArray of objects(Custom Field Values)
eligibility_criteriaobject(Eligibility Criteria)required

The criteria to use

eligibility_criteria.​advanced_rule_error_messagestring(Advanced Rule Error Message)

The error message to show when the advanced rule fails

eligibility_criteria.​advanced_rulesobject(Advanced Rules)
eligibility_criteria.​age_restrictionsobject(Age Restrictions)
eligibility_criteria.​award_optionsobject(Award Options)
eligibility_criteria.​award_recipientsboolean(Award Recipients)

If set, only people who have received awards

eligibility_criteria.​by_locationboolean(By Location)

If true, then filter by location

eligibility_criteria.​certificantsboolean(Certificants)

If set, only people with specific certifications

eligibility_criteria.​certification_optionsCertification Options (object)(Certification Options)
One of:
eligibility_criteria.​committee_member_optionsCommittee Member Options (object)(Committee Member Options)
One of:
eligibility_criteria.​committee_membersboolean(Committee Members)

If set, active members who belong to a committee can purchase

eligibility_criteria.​custom_logic_optionsCustom Logic Options (object)(Custom Logic Options)
One of:
eligibility_criteria.​customer_typestring(Customer Type)
Enum"contact""organization"
eligibility_criteria.​donor_optionsobject(Donor Options)
eligibility_criteria.​donorsboolean(Donors)

If true, only donors

eligibility_criteria.​enable_advanced_rulesboolean(Enable Advanced Rules)

Enable advanced JSON rules

eligibility_criteria.​enable_age_restrictionsboolean(Enable Age Restrictions)

Age registrations

eligibility_criteria.​enable_custom_logicboolean(Enable Custom Logic)

If set, the order engine will call out to a custom lambda function to process/change the order immediately after bundle expansion

eligibility_criteria.​enable_entitlement_restrictionsboolean(Enable Entitlement Restrictions)

If set, then you must have certain entitlements

eligibility_criteria.​enable_expressionboolean(Enable Expression)

Whether or not to enable an expression for evaluation

eligibility_criteria.​enable_organization_restrictionsboolean(Enable Organization Restrictions)

If set, you can restrict organizations

eligibility_criteria.​enable_status_restrictionboolean(Enable Status Restriction)

If set, you can restrict by status

eligibility_criteria.​entitlement_restrictionsArray of objects
eligibility_criteria.​event_registration_optionsobject(Event Registration Options)
eligibility_criteria.​event_registrationsboolean(Event Registrations)

If set, only people who have registered for events

eligibility_criteria.​expressionstring(Expression)

The expression

eligibility_criteria.​expression_error_messagestring(Expression Error Message)

The error message to show when the expression fails

eligibility_criteria.​locationLocation (object)(Location)
One of:
eligibility_criteria.​logic_operatorstring(Logic Operator)
Enum"and""not"
eligibility_criteria.​member_optionsMember Options (object)(Member Options)
One of:
eligibility_criteria.​membersboolean(Members)

If set, active members can purchase this

eligibility_criteria.​non_membersboolean(Non Members)

If set, only nonmembers can purchase

eligibility_criteria.​organization_restrictionsobject(Organization Restrictions)
eligibility_criteria.​status_restrictionsArray of Status Restrictions (strings)(Status Restrictions)non-empty

The statuses

One of:

The statuses

non-empty
eligibility_criteria.​use_organization_for_eligibilityboolean(Use Organization For Eligibility)

If checked, a person's organization is used to check for eligibility, rather than the person themselves

enable_coupon_ownershipboolean(Enable Coupon Ownership)

Enable the idea that a coupon can be owned by a contact/organization

enable_eligibility_criteriaboolean(Enable Eligibility Criteria)

If true, eligibility criteria is applied to the coupon code

enable_restricted_contactsboolean(Enable Restricted Contacts)

If true, this coupon is restricted only to certain contacts

enable_restricted_organizationsboolean(Enable Restricted Organizations)

If true, this coupon is restricted only to certain organizations

idstring(ID)^[\w|-]+$required

The unique, string identifier of this coupon code

is_activeboolean(Is Active)

Whether or not this coupon code is active

maximum_number_of_total_usesMaximum Number Of Total Uses (integer)(Maximum Number Of Total Uses)>= 1required

The maximum number of total uses

One of:

The maximum number of total uses

>= 1
integer(Maximum Number Of Total Uses)>= 1

The maximum number of total uses

Value1
maximum_number_of_uses_per_customerMaximum Number Of Uses Per Customer (integer)(Maximum Number Of Uses Per Customer)>= 1required

The maximum number of total uses for a given customer

One of:

The maximum number of total uses for a given customer

>= 1
integer(Maximum Number Of Uses Per Customer)>= 1

The maximum number of total uses for a given customer

Value1
maximum_number_of_uses_per_organizationinteger(Maximum Number Of Uses Per Organization)>= 1

The maximum number of total uses per contacts of an organization

namestring(Name)

The name of the coupon code - used to identify the owner

notesstring(Notes)

Notes

order_idstring(Order)

The order id tied to this code

order_line_item_idstring(Order Line Item)
organization_idstring(Organization)required

The organization

owner_typeOwner Type (string)(Owner Type)required

The owner of the code

Enum"contact""organization"
One of:

The owner of the code

string(Owner Type)

The owner of the code

Enum"contact""organization"
restricted_contactsArray of objectsnon-emptyrequired
restricted_contacts[].​contact_idstring(Contact)required
restricted_organizationsArray of objectsnon-emptyrequired
restricted_organizations[].​organization_idstring(Organization)required
sys_bulk_load_atstring(Sys Bulk Load At)

If this record was loaded via bulk, the timestamp when the record was processed

sys_bulk_load_idstring(Sys Bulk Load)

If this record was loaded via bulk, the ID of the bulk load process

sys_bulk_load_pkstring(Sys Bulk Load Pk)

If this record was loaded via bulk, the tenant and key of the bulk load process used as a partition key

sys_bulk_load_record_nonumber(float)(Sys Bulk Load Record No)

If this record was loaded via bulk, the record number in the source file

sys_bulk_load_source_filestring(Sys Bulk Load Source File)

If this record was loaded via bulk, the source file

sys_calculated_field_errorstring(Sys Calculated Field Error)

The error associated with the calculated field

sys_calculated_field_errorsArray of objects
sys_configuration_snapshot_idstring(Sys Configuration Snapshot)

If a snapshot was restored/applies to this record, the ID of the snapshot

sys_created_atstring(date-time)(Sys Created At)required

The date/time that this record was created, expressed in ISO-8601 date format

sys_created_by_idstring(Sys Created By)required

The ID of the user that created this record

sys_deleted_by_idstring(Sys Deleted By)

The ID of the user that deleted (or last tried to delete) this object

sys_directivestring(Sys Directive)

Means for passing directive information into an object processing logic

sys_external_idstring(Sys External)

The ID that a record has from an external system or data import

sys_has_files_in_s3boolean(Sys Has Files In S3)

If true, this record has files in S3. If false, it doesnt, so no need to hit S3 upon deletion

sys_last_bulk_data_operation_idstring(Sys Last Bulk Data Operation)

If this record was last touched by a bulk data operation, the ID of that operation

sys_last_bulk_data_operation_sys_versionstring(Sys Last Bulk Data Operation Sys Version)

If this record was last touched by a bulk data operation, the sys_version at the time of that operation

sys_last_modified_atstring(date-time)(Sys Last Modified At)required

The date/time that this record record was last modified, expressed in ISO-8601 date format

sys_last_modified_by_idstring(Sys Last Modified By)required

The ID of the user that last modified this record

sys_last_security_contextobject(Sys Last Security Context)

The security context of the last insert, modify, or delete performed on this item

sys_lockedboolean(Sys Locked)

If set, this record is locked and cannot be changed via the API

sys_snapshot_base_versionnumber(float)(Sys Snapshot Base Version)

The version to use as a base when creating a configuration snapshot; if not set, 1 is used. Helpful when creating a sandbox

sys_versionnumber(float)(Sys Version)

A number representing the version of this record in the database

typestring(Type)

The type of coupon

Enum"multi use""single use"
valid_fromstring(date-time)(Valid From)

Date/time at which the code begins to be valid

valid_untilstring(date-time)(Valid Until)

Expiration date

curl -i -X PUT \
  'https://docs.api.rhythmsoftware.com/_mock/apis/commerce/commerce-v1/couponCodes/{tenantId}/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "contact_id": "string",
    "coupon_id": "string",
    "coupon_type": "string",
    "custom_field_values": [
      {
        "boolean_value": true,
        "custom_field_id": "string",
        "file_url_value": "string",
        "list_value": [
          "string"
        ],
        "numeric_value": 0.1,
        "string_value": "string",
        "table_value": [
          {}
        ]
      }
    ],
    "eligibility_criteria": {
      "advanced_rule_error_message": "string",
      "advanced_rules": {},
      "age_restrictions": {
        "maximum_age": 0.1,
        "minimum_age": 0.1
      },
      "award_options": {
        "award_ids": [
          "string"
        ],
        "award_type_ids": [
          "string"
        ],
        "logic_operator": "and"
      },
      "award_recipients": true,
      "by_location": true,
      "certificants": true,
      "certification_options": {
        "logic_operator": "and",
        "program_ids": [
          "string"
        ]
      },
      "committee_member_options": {
        "committee_ids": [
          "string"
        ],
        "committee_position_ids": [
          "string"
        ],
        "committee_type_ids": [
          "string"
        ],
        "logic_operator": "and"
      },
      "committee_members": true,
      "custom_logic_options": {
        "lambda_function_id": "string"
      },
      "customer_type": "contact",
      "donor_options": {
        "donor_club_ids": [
          "string"
        ],
        "logic_operator": "and"
      },
      "donors": true,
      "enable_advanced_rules": true,
      "enable_age_restrictions": true,
      "enable_custom_logic": true,
      "enable_entitlement_restrictions": true,
      "enable_expression": true,
      "enable_organization_restrictions": true,
      "enable_status_restriction": true,
      "entitlement_restrictions": [
        {
          "quantity": 0.1,
          "type_id": "string"
        }
      ],
      "event_registration_options": {
        "event_ids": [
          "string"
        ],
        "logic_operator": "and",
        "registration_category_ids": [
          "string"
        ]
      },
      "event_registrations": true,
      "expression": "string",
      "expression_error_message": "string",
      "location": {
        "countries": [
          "string"
        ],
        "negate_logic": true
      },
      "logic_operator": "and",
      "member_options": {
        "chapter_member_options": {
          "chapter_ids": [
            "string"
          ],
          "chapter_type_ids": [
            "string"
          ],
          "logic_operator": "and"
        },
        "chapter_members": true,
        "member_package_ids": [
          "string"
        ],
        "member_status_reason_ids": [
          "string"
        ],
        "member_statuses": [
          "active"
        ],
        "member_type_ids": [
          "string"
        ],
        "section_member_options": {
          "logic_operator": "and",
          "section_ids": [
            "string"
          ],
          "section_type_ids": [
            "string"
          ]
        },
        "section_members": true
      },
      "members": true,
      "non_members": true,
      "organization_restrictions": {
        "contact_role_ids": [
          "string"
        ],
        "organization_type_ids": [
          "string"
        ]
      },
      "status_restrictions": {
        "0": "string"
      },
      "use_organization_for_eligibility": true
    },
    "enable_coupon_ownership": true,
    "enable_eligibility_criteria": true,
    "enable_restricted_contacts": true,
    "enable_restricted_organizations": true,
    "id": "string",
    "is_active": true,
    "maximum_number_of_total_uses": 1,
    "maximum_number_of_uses_per_customer": 1,
    "maximum_number_of_uses_per_organization": 1,
    "name": "string",
    "notes": "string",
    "order_id": "string",
    "order_line_item_id": "string",
    "organization_id": "string",
    "owner_type": "contact",
    "restricted_contacts": [
      {
        "contact_id": "string"
      }
    ],
    "restricted_organizations": [
      {
        "organization_id": "string"
      }
    ],
    "sys_bulk_load_at": "string",
    "sys_bulk_load_id": "string",
    "sys_bulk_load_pk": "string",
    "sys_bulk_load_record_no": 0.1,
    "sys_bulk_load_source_file": "string",
    "sys_calculated_field_error": "string",
    "sys_calculated_field_errors": [
      {
        "error": "string",
        "field": "string"
      }
    ],
    "sys_configuration_snapshot_id": "string",
    "sys_created_at": "2019-08-24T14:15:22Z",
    "sys_created_by_id": "string",
    "sys_deleted_by_id": "string",
    "sys_directive": "string",
    "sys_external_id": "string",
    "sys_has_files_in_s3": true,
    "sys_last_bulk_data_operation_id": "string",
    "sys_last_bulk_data_operation_sys_version": "string",
    "sys_last_modified_at": "2019-08-24T14:15:22Z",
    "sys_last_modified_by_id": "string",
    "sys_last_security_context": {},
    "sys_locked": true,
    "sys_snapshot_base_version": 0.1,
    "sys_version": 0.1,
    "type": "multi use",
    "valid_from": "2019-08-24T14:15:22Z",
    "valid_until": "2019-08-24T14:15:22Z"
  }'

Responses

The coupon code was updated successfully.

Headers
Access-Control-Allow-Headersstring
Access-Control-Allow-Methodsstring
Access-Control-Allow-Originstring
Bodyapplication/json
contact_idstring(Contact)required

The contact

coupon_idstring(Coupon)required

The ID of the associated coupon

coupon_typestring(Coupon Type)\-coupons$required

The type of coupon

custom_field_valuesArray of objects(Custom Field Values)
eligibility_criteriaobject(Eligibility Criteria)required

The criteria to use

eligibility_criteria.​advanced_rule_error_messagestring(Advanced Rule Error Message)

The error message to show when the advanced rule fails

eligibility_criteria.​advanced_rulesobject(Advanced Rules)
eligibility_criteria.​age_restrictionsobject(Age Restrictions)
eligibility_criteria.​award_optionsobject(Award Options)
eligibility_criteria.​award_recipientsboolean(Award Recipients)

If set, only people who have received awards

eligibility_criteria.​by_locationboolean(By Location)

If true, then filter by location

eligibility_criteria.​certificantsboolean(Certificants)

If set, only people with specific certifications

eligibility_criteria.​certification_optionsCertification Options (object)(Certification Options)
One of:
eligibility_criteria.​committee_member_optionsCommittee Member Options (object)(Committee Member Options)
One of:
eligibility_criteria.​committee_membersboolean(Committee Members)

If set, active members who belong to a committee can purchase

eligibility_criteria.​custom_logic_optionsCustom Logic Options (object)(Custom Logic Options)
One of:
eligibility_criteria.​customer_typestring(Customer Type)
Enum"contact""organization"
eligibility_criteria.​donor_optionsobject(Donor Options)
eligibility_criteria.​donorsboolean(Donors)

If true, only donors

eligibility_criteria.​enable_advanced_rulesboolean(Enable Advanced Rules)

Enable advanced JSON rules

eligibility_criteria.​enable_age_restrictionsboolean(Enable Age Restrictions)

Age registrations

eligibility_criteria.​enable_custom_logicboolean(Enable Custom Logic)

If set, the order engine will call out to a custom lambda function to process/change the order immediately after bundle expansion

eligibility_criteria.​enable_entitlement_restrictionsboolean(Enable Entitlement Restrictions)

If set, then you must have certain entitlements

eligibility_criteria.​enable_expressionboolean(Enable Expression)

Whether or not to enable an expression for evaluation

eligibility_criteria.​enable_organization_restrictionsboolean(Enable Organization Restrictions)

If set, you can restrict organizations

eligibility_criteria.​enable_status_restrictionboolean(Enable Status Restriction)

If set, you can restrict by status

eligibility_criteria.​entitlement_restrictionsArray of objects
eligibility_criteria.​event_registration_optionsobject(Event Registration Options)
eligibility_criteria.​event_registrationsboolean(Event Registrations)

If set, only people who have registered for events

eligibility_criteria.​expressionstring(Expression)

The expression

eligibility_criteria.​expression_error_messagestring(Expression Error Message)

The error message to show when the expression fails

eligibility_criteria.​locationLocation (object)(Location)
One of:
eligibility_criteria.​logic_operatorstring(Logic Operator)
Enum"and""not"
eligibility_criteria.​member_optionsMember Options (object)(Member Options)
One of:
eligibility_criteria.​membersboolean(Members)

If set, active members can purchase this

eligibility_criteria.​non_membersboolean(Non Members)

If set, only nonmembers can purchase

eligibility_criteria.​organization_restrictionsobject(Organization Restrictions)
eligibility_criteria.​status_restrictionsArray of Status Restrictions (strings)(Status Restrictions)non-empty

The statuses

One of:

The statuses

non-empty
eligibility_criteria.​use_organization_for_eligibilityboolean(Use Organization For Eligibility)

If checked, a person's organization is used to check for eligibility, rather than the person themselves

enable_coupon_ownershipboolean(Enable Coupon Ownership)

Enable the idea that a coupon can be owned by a contact/organization

enable_eligibility_criteriaboolean(Enable Eligibility Criteria)

If true, eligibility criteria is applied to the coupon code

enable_restricted_contactsboolean(Enable Restricted Contacts)

If true, this coupon is restricted only to certain contacts

enable_restricted_organizationsboolean(Enable Restricted Organizations)

If true, this coupon is restricted only to certain organizations

idstring(ID)^[\w|-]+$required

The unique, string identifier of this coupon code

is_activeboolean(Is Active)

Whether or not this coupon code is active

maximum_number_of_total_usesMaximum Number Of Total Uses (integer)(Maximum Number Of Total Uses)>= 1required

The maximum number of total uses

One of:

The maximum number of total uses

>= 1
integer(Maximum Number Of Total Uses)>= 1

The maximum number of total uses

Value1
maximum_number_of_uses_per_customerMaximum Number Of Uses Per Customer (integer)(Maximum Number Of Uses Per Customer)>= 1required

The maximum number of total uses for a given customer

One of:

The maximum number of total uses for a given customer

>= 1
integer(Maximum Number Of Uses Per Customer)>= 1

The maximum number of total uses for a given customer

Value1
maximum_number_of_uses_per_organizationinteger(Maximum Number Of Uses Per Organization)>= 1

The maximum number of total uses per contacts of an organization

namestring(Name)

The name of the coupon code - used to identify the owner

notesstring(Notes)

Notes

order_idstring(Order)

The order id tied to this code

order_line_item_idstring(Order Line Item)
organization_idstring(Organization)required

The organization

owner_typeOwner Type (string)(Owner Type)required

The owner of the code

Enum"contact""organization"
One of:

The owner of the code

string(Owner Type)

The owner of the code

Enum"contact""organization"
restricted_contactsArray of objectsnon-emptyrequired
restricted_contacts[].​contact_idstring(Contact)required
restricted_organizationsArray of objectsnon-emptyrequired
restricted_organizations[].​organization_idstring(Organization)required
sys_bulk_load_atstring(Sys Bulk Load At)

If this record was loaded via bulk, the timestamp when the record was processed

sys_bulk_load_idstring(Sys Bulk Load)

If this record was loaded via bulk, the ID of the bulk load process

sys_bulk_load_pkstring(Sys Bulk Load Pk)

If this record was loaded via bulk, the tenant and key of the bulk load process used as a partition key

sys_bulk_load_record_nonumber(float)(Sys Bulk Load Record No)

If this record was loaded via bulk, the record number in the source file

sys_bulk_load_source_filestring(Sys Bulk Load Source File)

If this record was loaded via bulk, the source file

sys_calculated_field_errorstring(Sys Calculated Field Error)

The error associated with the calculated field

sys_calculated_field_errorsArray of objects
sys_configuration_snapshot_idstring(Sys Configuration Snapshot)

If a snapshot was restored/applies to this record, the ID of the snapshot

sys_created_atstring(date-time)(Sys Created At)required

The date/time that this record was created, expressed in ISO-8601 date format

sys_created_by_idstring(Sys Created By)required

The ID of the user that created this record

sys_deleted_by_idstring(Sys Deleted By)

The ID of the user that deleted (or last tried to delete) this object

sys_directivestring(Sys Directive)

Means for passing directive information into an object processing logic

sys_external_idstring(Sys External)

The ID that a record has from an external system or data import

sys_has_files_in_s3boolean(Sys Has Files In S3)

If true, this record has files in S3. If false, it doesnt, so no need to hit S3 upon deletion

sys_last_bulk_data_operation_idstring(Sys Last Bulk Data Operation)

If this record was last touched by a bulk data operation, the ID of that operation

sys_last_bulk_data_operation_sys_versionstring(Sys Last Bulk Data Operation Sys Version)

If this record was last touched by a bulk data operation, the sys_version at the time of that operation

sys_last_modified_atstring(date-time)(Sys Last Modified At)required

The date/time that this record record was last modified, expressed in ISO-8601 date format

sys_last_modified_by_idstring(Sys Last Modified By)required

The ID of the user that last modified this record

sys_last_security_contextobject(Sys Last Security Context)

The security context of the last insert, modify, or delete performed on this item

sys_lockedboolean(Sys Locked)

If set, this record is locked and cannot be changed via the API

sys_snapshot_base_versionnumber(float)(Sys Snapshot Base Version)

The version to use as a base when creating a configuration snapshot; if not set, 1 is used. Helpful when creating a sandbox

sys_versionnumber(float)(Sys Version)

A number representing the version of this record in the database

typestring(Type)

The type of coupon

Enum"multi use""single use"
valid_fromstring(date-time)(Valid From)

Date/time at which the code begins to be valid

valid_untilstring(date-time)(Valid Until)

Expiration date

Response
application/json
{ "contact_id": "string", "coupon_id": "string", "coupon_type": "string", "custom_field_values": [ {} ], "eligibility_criteria": { "advanced_rule_error_message": "string", "advanced_rules": {}, "age_restrictions": {}, "award_options": {}, "award_recipients": true, "by_location": true, "certificants": true, "certification_options": {}, "committee_member_options": {}, "committee_members": true, "custom_logic_options": {}, "customer_type": "contact", "donor_options": {}, "donors": true, "enable_advanced_rules": true, "enable_age_restrictions": true, "enable_custom_logic": true, "enable_entitlement_restrictions": true, "enable_expression": true, "enable_organization_restrictions": true, "enable_status_restriction": true, "entitlement_restrictions": [], "event_registration_options": {}, "event_registrations": true, "expression": "string", "expression_error_message": "string", "location": {}, "logic_operator": "and", "member_options": {}, "members": true, "non_members": true, "organization_restrictions": {}, "status_restrictions": {}, "use_organization_for_eligibility": true }, "enable_coupon_ownership": true, "enable_eligibility_criteria": true, "enable_restricted_contacts": true, "enable_restricted_organizations": true, "id": "string", "is_active": true, "maximum_number_of_total_uses": 1, "maximum_number_of_uses_per_customer": 1, "maximum_number_of_uses_per_organization": 1, "name": "string", "notes": "string", "order_id": "string", "order_line_item_id": "string", "organization_id": "string", "owner_type": "contact", "restricted_contacts": [ {} ], "restricted_organizations": [ {} ], "sys_bulk_load_at": "string", "sys_bulk_load_id": "string", "sys_bulk_load_pk": "string", "sys_bulk_load_record_no": 0.1, "sys_bulk_load_source_file": "string", "sys_calculated_field_error": "string", "sys_calculated_field_errors": [ {} ], "sys_configuration_snapshot_id": "string", "sys_created_at": "2019-08-24T14:15:22Z", "sys_created_by_id": "string", "sys_deleted_by_id": "string", "sys_directive": "string", "sys_external_id": "string", "sys_has_files_in_s3": true, "sys_last_bulk_data_operation_id": "string", "sys_last_bulk_data_operation_sys_version": "string", "sys_last_modified_at": "2019-08-24T14:15:22Z", "sys_last_modified_by_id": "string", "sys_last_security_context": {}, "sys_locked": true, "sys_snapshot_base_version": 0.1, "sys_version": 0.1, "type": "multi use", "valid_from": "2019-08-24T14:15:22Z", "valid_until": "2019-08-24T14:15:22Z" }

Coupons

Coupons

Operations

Discount Products

Discount Products

Operations

Entitlement Types

Entitlement Types

Operations

Entitlements

Entitlements

Operations

Inventory Transactions

Inventory Transactions

Operations

Merchandise

Merchandise

Operations

Orders

Orders

Operations

Product Categories

Product Categories

Operations

Product Confirmation Emails

Product Confirmation Emails

Operations

Product Inventories

Product Inventories

Operations

Query Definitions

Query Definitions

Operations

Returns

Returns

Operations

Settings

Settings

Operations

Shared Modifier Options

Shared Modifier Options

Operations

Shared Variant Options

Shared Variant Options

Operations

Shipments

Shipments

Operations

Shipping Configurations

Shipping Configurations

Operations

Shipping Products

Shipping Products

Operations

Statistics

Statistics

Operations

Stores

Stores

Operations

Tax Classes

Tax Classes

Operations

Tax Configurations

Tax Configurations

Operations

Tax Products

Tax Products

Operations

Warehouse Bins

Warehouse Bins

Operations

Warehouses

Warehouses

Operations