This method will auto-generate an ID and create a new coupon. If an ID is specified for the coupon, an error will be thrown.
The coupon that you would like to be saved.
{- "id": "string",
- "name": "string",
- "code_generation_html": "string",
- "discount_method": "discount line item",
- "discount_product_id": "string",
- "maximum_discount": 0,
- "applies_to": "new members",
- "apply_to_membership_packages": true,
- "membership_package_discount_info": {
- "method": "amount",
- "amount": 0,
- "package_ids": [
- "string"
], - "type_ids": [
- "string"
]
}, - "apply_to_chapter_dues": true,
- "chapter_dues_discount_info": {
- "method": "amount",
- "maximum_number_of_chapters": 0,
- "amount": 0,
- "chapter_type_ids": [
- "string"
], - "chapter_ids": [
- "string"
]
}, - "apply_to_section_dues": true,
- "section_dues_discount_info": {
- "method": "amount",
- "maximum_number_of_sections": 0,
- "amount": 0,
- "section_type_ids": [
- "string"
], - "section_ids": [
- "string"
]
}, - "apply_to_add_on_products": true,
- "add_on_products_discount_info": {
- "method": "amount",
- "amount": 0,
- "add_on_ids": [
- "string"
], - "add_on_type_ids": [
- "string"
]
}, - "is_active": true,
- "custom_field_values": [
- {
- "custom_field_id": "string",
- "string_value": "string",
- "numeric_value": 0,
- "boolean_value": true,
- "file_url_value": "string",
- "list_value": [
- "string"
], - "table_value": [
- { }
]
}
], - "sys_deleted_by_id": "string",
- "sys_version": 0,
- "sys_created_at": "2019-08-24T14:15:22Z",
- "sys_last_modified_at": "2019-08-24T14:15:22Z",
- "sys_created_by_id": "string",
- "sys_last_modified_by_id": "string",
- "sys_external_id": "string",
- "sys_locked": true,
- "sys_bulk_load_pk": "string",
- "sys_bulk_load_at": "string",
- "sys_bulk_load_id": "string",
- "sys_bulk_load_record_no": 0,
- "sys_bulk_load_source_file": "string",
- "sys_last_bulk_data_operation_id": "string",
- "sys_last_bulk_data_operation_sys_version": "string",
- "sys_directive": "string",
- "sys_calculated_field_error": "string",
- "sys_snapshot_base_version": 0,
- "sys_has_files_in_s3": true,
- "sys_configuration_snapshot_id": "string",
- "sys_last_security_context": { },
- "sys_calculated_field_errors": [
- {
- "field": "string",
- "error": "string"
}
]
}
{- "id": "string",
- "name": "string",
- "code_generation_html": "string",
- "discount_method": "discount line item",
- "discount_product_id": "string",
- "maximum_discount": 0,
- "applies_to": "new members",
- "apply_to_membership_packages": true,
- "membership_package_discount_info": {
- "method": "amount",
- "amount": 0,
- "package_ids": [
- "string"
], - "type_ids": [
- "string"
]
}, - "apply_to_chapter_dues": true,
- "chapter_dues_discount_info": {
- "method": "amount",
- "maximum_number_of_chapters": 0,
- "amount": 0,
- "chapter_type_ids": [
- "string"
], - "chapter_ids": [
- "string"
]
}, - "apply_to_section_dues": true,
- "section_dues_discount_info": {
- "method": "amount",
- "maximum_number_of_sections": 0,
- "amount": 0,
- "section_type_ids": [
- "string"
], - "section_ids": [
- "string"
]
}, - "apply_to_add_on_products": true,
- "add_on_products_discount_info": {
- "method": "amount",
- "amount": 0,
- "add_on_ids": [
- "string"
], - "add_on_type_ids": [
- "string"
]
}, - "is_active": true,
- "custom_field_values": [
- {
- "custom_field_id": "string",
- "string_value": "string",
- "numeric_value": 0,
- "boolean_value": true,
- "file_url_value": "string",
- "list_value": [
- "string"
], - "table_value": [
- { }
]
}
], - "sys_deleted_by_id": "string",
- "sys_version": 0,
- "sys_created_at": "2019-08-24T14:15:22Z",
- "sys_last_modified_at": "2019-08-24T14:15:22Z",
- "sys_created_by_id": "string",
- "sys_last_modified_by_id": "string",
- "sys_external_id": "string",
- "sys_locked": true,
- "sys_bulk_load_pk": "string",
- "sys_bulk_load_at": "string",
- "sys_bulk_load_id": "string",
- "sys_bulk_load_record_no": 0,
- "sys_bulk_load_source_file": "string",
- "sys_last_bulk_data_operation_id": "string",
- "sys_last_bulk_data_operation_sys_version": "string",
- "sys_directive": "string",
- "sys_calculated_field_error": "string",
- "sys_snapshot_base_version": 0,
- "sys_has_files_in_s3": true,
- "sys_configuration_snapshot_id": "string",
- "sys_last_security_context": { },
- "sys_calculated_field_errors": [
- {
- "field": "string",
- "error": "string"
}
]
}
This method will scan all coupons and and return them to the caller.
curl -i -X GET \ 'https://membership.api.756794052567.rhythmsoftware.com/coupons/:tenantId?fields=string&exclusiveStartKey=string' \ -H 'Authorization: YOUR_API_KEY_HERE'
[- {
- "id": "string",
- "name": "string",
- "code_generation_html": "string",
- "discount_method": "discount line item",
- "discount_product_id": "string",
- "maximum_discount": 0,
- "applies_to": "new members",
- "apply_to_membership_packages": true,
- "membership_package_discount_info": {
- "method": "amount",
- "amount": 0,
- "package_ids": [
- "string"
], - "type_ids": [
- "string"
]
}, - "apply_to_chapter_dues": true,
- "chapter_dues_discount_info": {
- "method": "amount",
- "maximum_number_of_chapters": 0,
- "amount": 0,
- "chapter_type_ids": [
- "string"
], - "chapter_ids": [
- "string"
]
}, - "apply_to_section_dues": true,
- "section_dues_discount_info": {
- "method": "amount",
- "maximum_number_of_sections": 0,
- "amount": 0,
- "section_type_ids": [
- "string"
], - "section_ids": [
- "string"
]
}, - "apply_to_add_on_products": true,
- "add_on_products_discount_info": {
- "method": "amount",
- "amount": 0,
- "add_on_ids": [
- "string"
], - "add_on_type_ids": [
- "string"
]
}, - "is_active": true,
- "custom_field_values": [
- {
- "custom_field_id": "string",
- "string_value": "string",
- "numeric_value": 0,
- "boolean_value": true,
- "file_url_value": "string",
- "list_value": [
- "string"
], - "table_value": [
- { }
]
}
], - "sys_deleted_by_id": "string",
- "sys_version": 0,
- "sys_created_at": "2019-08-24T14:15:22Z",
- "sys_last_modified_at": "2019-08-24T14:15:22Z",
- "sys_created_by_id": "string",
- "sys_last_modified_by_id": "string",
- "sys_external_id": "string",
- "sys_locked": true,
- "sys_bulk_load_pk": "string",
- "sys_bulk_load_at": "string",
- "sys_bulk_load_id": "string",
- "sys_bulk_load_record_no": 0,
- "sys_bulk_load_source_file": "string",
- "sys_last_bulk_data_operation_id": "string",
- "sys_last_bulk_data_operation_sys_version": "string",
- "sys_directive": "string",
- "sys_calculated_field_error": "string",
- "sys_snapshot_base_version": 0,
- "sys_has_files_in_s3": true,
- "sys_configuration_snapshot_id": "string",
- "sys_last_security_context": { },
- "sys_calculated_field_errors": [
- {
- "field": "string",
- "error": "string"
}
]
}
]
This method will look up a coupon by the specified ID and return it back.
curl -i -X GET \ 'https://membership.api.756794052567.rhythmsoftware.com/coupons/:tenantId/:id?fields=string&consistentRead=string' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "id": "string",
- "name": "string",
- "code_generation_html": "string",
- "discount_method": "discount line item",
- "discount_product_id": "string",
- "maximum_discount": 0,
- "applies_to": "new members",
- "apply_to_membership_packages": true,
- "membership_package_discount_info": {
- "method": "amount",
- "amount": 0,
- "package_ids": [
- "string"
], - "type_ids": [
- "string"
]
}, - "apply_to_chapter_dues": true,
- "chapter_dues_discount_info": {
- "method": "amount",
- "maximum_number_of_chapters": 0,
- "amount": 0,
- "chapter_type_ids": [
- "string"
], - "chapter_ids": [
- "string"
]
}, - "apply_to_section_dues": true,
- "section_dues_discount_info": {
- "method": "amount",
- "maximum_number_of_sections": 0,
- "amount": 0,
- "section_type_ids": [
- "string"
], - "section_ids": [
- "string"
]
}, - "apply_to_add_on_products": true,
- "add_on_products_discount_info": {
- "method": "amount",
- "amount": 0,
- "add_on_ids": [
- "string"
], - "add_on_type_ids": [
- "string"
]
}, - "is_active": true,
- "custom_field_values": [
- {
- "custom_field_id": "string",
- "string_value": "string",
- "numeric_value": 0,
- "boolean_value": true,
- "file_url_value": "string",
- "list_value": [
- "string"
], - "table_value": [
- { }
]
}
], - "sys_deleted_by_id": "string",
- "sys_version": 0,
- "sys_created_at": "2019-08-24T14:15:22Z",
- "sys_last_modified_at": "2019-08-24T14:15:22Z",
- "sys_created_by_id": "string",
- "sys_last_modified_by_id": "string",
- "sys_external_id": "string",
- "sys_locked": true,
- "sys_bulk_load_pk": "string",
- "sys_bulk_load_at": "string",
- "sys_bulk_load_id": "string",
- "sys_bulk_load_record_no": 0,
- "sys_bulk_load_source_file": "string",
- "sys_last_bulk_data_operation_id": "string",
- "sys_last_bulk_data_operation_sys_version": "string",
- "sys_directive": "string",
- "sys_calculated_field_error": "string",
- "sys_snapshot_base_version": 0,
- "sys_has_files_in_s3": true,
- "sys_configuration_snapshot_id": "string",
- "sys_last_security_context": { },
- "sys_calculated_field_errors": [
- {
- "field": "string",
- "error": "string"
}
]
}
This method will update an existing coupon with the specified ID.
The updated coupon that will be saved.
{- "id": "string",
- "name": "string",
- "code_generation_html": "string",
- "discount_method": "discount line item",
- "discount_product_id": "string",
- "maximum_discount": 0,
- "applies_to": "new members",
- "apply_to_membership_packages": true,
- "membership_package_discount_info": {
- "method": "amount",
- "amount": 0,
- "package_ids": [
- "string"
], - "type_ids": [
- "string"
]
}, - "apply_to_chapter_dues": true,
- "chapter_dues_discount_info": {
- "method": "amount",
- "maximum_number_of_chapters": 0,
- "amount": 0,
- "chapter_type_ids": [
- "string"
], - "chapter_ids": [
- "string"
]
}, - "apply_to_section_dues": true,
- "section_dues_discount_info": {
- "method": "amount",
- "maximum_number_of_sections": 0,
- "amount": 0,
- "section_type_ids": [
- "string"
], - "section_ids": [
- "string"
]
}, - "apply_to_add_on_products": true,
- "add_on_products_discount_info": {
- "method": "amount",
- "amount": 0,
- "add_on_ids": [
- "string"
], - "add_on_type_ids": [
- "string"
]
}, - "is_active": true,
- "custom_field_values": [
- {
- "custom_field_id": "string",
- "string_value": "string",
- "numeric_value": 0,
- "boolean_value": true,
- "file_url_value": "string",
- "list_value": [
- "string"
], - "table_value": [
- { }
]
}
], - "sys_deleted_by_id": "string",
- "sys_version": 0,
- "sys_created_at": "2019-08-24T14:15:22Z",
- "sys_last_modified_at": "2019-08-24T14:15:22Z",
- "sys_created_by_id": "string",
- "sys_last_modified_by_id": "string",
- "sys_external_id": "string",
- "sys_locked": true,
- "sys_bulk_load_pk": "string",
- "sys_bulk_load_at": "string",
- "sys_bulk_load_id": "string",
- "sys_bulk_load_record_no": 0,
- "sys_bulk_load_source_file": "string",
- "sys_last_bulk_data_operation_id": "string",
- "sys_last_bulk_data_operation_sys_version": "string",
- "sys_directive": "string",
- "sys_calculated_field_error": "string",
- "sys_snapshot_base_version": 0,
- "sys_has_files_in_s3": true,
- "sys_configuration_snapshot_id": "string",
- "sys_last_security_context": { },
- "sys_calculated_field_errors": [
- {
- "field": "string",
- "error": "string"
}
]
}
{- "id": "string",
- "name": "string",
- "code_generation_html": "string",
- "discount_method": "discount line item",
- "discount_product_id": "string",
- "maximum_discount": 0,
- "applies_to": "new members",
- "apply_to_membership_packages": true,
- "membership_package_discount_info": {
- "method": "amount",
- "amount": 0,
- "package_ids": [
- "string"
], - "type_ids": [
- "string"
]
}, - "apply_to_chapter_dues": true,
- "chapter_dues_discount_info": {
- "method": "amount",
- "maximum_number_of_chapters": 0,
- "amount": 0,
- "chapter_type_ids": [
- "string"
], - "chapter_ids": [
- "string"
]
}, - "apply_to_section_dues": true,
- "section_dues_discount_info": {
- "method": "amount",
- "maximum_number_of_sections": 0,
- "amount": 0,
- "section_type_ids": [
- "string"
], - "section_ids": [
- "string"
]
}, - "apply_to_add_on_products": true,
- "add_on_products_discount_info": {
- "method": "amount",
- "amount": 0,
- "add_on_ids": [
- "string"
], - "add_on_type_ids": [
- "string"
]
}, - "is_active": true,
- "custom_field_values": [
- {
- "custom_field_id": "string",
- "string_value": "string",
- "numeric_value": 0,
- "boolean_value": true,
- "file_url_value": "string",
- "list_value": [
- "string"
], - "table_value": [
- { }
]
}
], - "sys_deleted_by_id": "string",
- "sys_version": 0,
- "sys_created_at": "2019-08-24T14:15:22Z",
- "sys_last_modified_at": "2019-08-24T14:15:22Z",
- "sys_created_by_id": "string",
- "sys_last_modified_by_id": "string",
- "sys_external_id": "string",
- "sys_locked": true,
- "sys_bulk_load_pk": "string",
- "sys_bulk_load_at": "string",
- "sys_bulk_load_id": "string",
- "sys_bulk_load_record_no": 0,
- "sys_bulk_load_source_file": "string",
- "sys_last_bulk_data_operation_id": "string",
- "sys_last_bulk_data_operation_sys_version": "string",
- "sys_directive": "string",
- "sys_calculated_field_error": "string",
- "sys_snapshot_base_version": 0,
- "sys_has_files_in_s3": true,
- "sys_configuration_snapshot_id": "string",
- "sys_last_security_context": { },
- "sys_calculated_field_errors": [
- {
- "field": "string",
- "error": "string"
}
]
}
This method will patch an existing coupon with the specified ID, using the HTTP PATCH specification.
The patch directives conforming to RFC 6902.
[- {
- "op": "add",
- "path": "string",
- "value": "string"
}
]
{- "id": "string",
- "name": "string",
- "code_generation_html": "string",
- "discount_method": "discount line item",
- "discount_product_id": "string",
- "maximum_discount": 0,
- "applies_to": "new members",
- "apply_to_membership_packages": true,
- "membership_package_discount_info": {
- "method": "amount",
- "amount": 0,
- "package_ids": [
- "string"
], - "type_ids": [
- "string"
]
}, - "apply_to_chapter_dues": true,
- "chapter_dues_discount_info": {
- "method": "amount",
- "maximum_number_of_chapters": 0,
- "amount": 0,
- "chapter_type_ids": [
- "string"
], - "chapter_ids": [
- "string"
]
}, - "apply_to_section_dues": true,
- "section_dues_discount_info": {
- "method": "amount",
- "maximum_number_of_sections": 0,
- "amount": 0,
- "section_type_ids": [
- "string"
], - "section_ids": [
- "string"
]
}, - "apply_to_add_on_products": true,
- "add_on_products_discount_info": {
- "method": "amount",
- "amount": 0,
- "add_on_ids": [
- "string"
], - "add_on_type_ids": [
- "string"
]
}, - "is_active": true,
- "custom_field_values": [
- {
- "custom_field_id": "string",
- "string_value": "string",
- "numeric_value": 0,
- "boolean_value": true,
- "file_url_value": "string",
- "list_value": [
- "string"
], - "table_value": [
- { }
]
}
], - "sys_deleted_by_id": "string",
- "sys_version": 0,
- "sys_created_at": "2019-08-24T14:15:22Z",
- "sys_last_modified_at": "2019-08-24T14:15:22Z",
- "sys_created_by_id": "string",
- "sys_last_modified_by_id": "string",
- "sys_external_id": "string",
- "sys_locked": true,
- "sys_bulk_load_pk": "string",
- "sys_bulk_load_at": "string",
- "sys_bulk_load_id": "string",
- "sys_bulk_load_record_no": 0,
- "sys_bulk_load_source_file": "string",
- "sys_last_bulk_data_operation_id": "string",
- "sys_last_bulk_data_operation_sys_version": "string",
- "sys_directive": "string",
- "sys_calculated_field_error": "string",
- "sys_snapshot_base_version": 0,
- "sys_has_files_in_s3": true,
- "sys_configuration_snapshot_id": "string",
- "sys_last_security_context": { },
- "sys_calculated_field_errors": [
- {
- "field": "string",
- "error": "string"
}
]
}
This method will delete a coupon with the specified ID.
curl -i -X DELETE \ https://membership.api.756794052567.rhythmsoftware.com/coupons/:tenantId/:id \ -H 'Authorization: YOUR_API_KEY_HERE'
"string"
TAllows you to perform up to 100 parallel patch/delete operations
The batch request
Array of objects |
{- "operations": [
- {
- "operation": "create",
- "id": "string",
- "patch_directives": [
- {
- "op": "add",
- "path": "string",
- "value": "string"
}
], - "object": { }
}
]
}
{- "success_count": 0,
- "error_count": 0,
- "results": [
- {
- "operation": "create",
- "id": "string",
- "outcome": "success",
- "error_message": "string",
- "object": { }
}
]
}