Class: StickyIoRestfulApiV2025731::CampaignsController

Inherits:
BaseController
  • Object
show all
Defined in:
lib/sticky_io_restful_api_v2025731/controllers/campaigns_controller.rb

Overview

CampaignsController

Constant Summary

Constants inherited from BaseController

BaseController::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseController

#config, #http_call_back

Instance Method Summary collapse

Methods inherited from BaseController

#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters

Constructor Details

This class inherits a constructor from StickyIoRestfulApiV2025731::BaseController

Instance Method Details

#add_campaign(body, domain, v2_ext) ⇒ ApiResponse

Create a new campaign. **Request Data** Request parameters expected during this API call: | Field | Requirement | Default | Data Type | Description | | — | — | — | — | — | | name | Required | - | String (255) | The campaign name. | | description | Required | - | String (1000) | The campaign description. | | site_url | Optional | - | String (255) | The campaign site URL. | | is_prepaid_blocked | Optional | 0 | Integer Flag | Flag that determines whether or not prepaid blocking is enabled. | | channel_id | Optional | 0 | Integer | The channel ID associated with the campaign. | | gateway_id | Optional | 0 | Integer | The payment gateway ID associated with the campaign. | | warehouse_id | Optional | 0 | Integer | The warehouse ID associated with the campaign. | | fulfillment_id | Optional | 0 | Integer | The the fulfillment provider ID associated with the campaign. | | check_provider_id | Optional | 0 | Integer | The the check provider ID associated with the campaign. | | membership_provider_id | Optional | 0 | Integer | The the membership provider ID associated with the campaign. | | call_confirm_provider_id | Optional | 0 | Integer | The the call confirm provider ID associated with the campaign. | | chargeback_provider_id | Optional | 0 | Integer | The the chargeback provider ID associated with the campaign. | | prospect_provider_id | Optional | 0 | Integer | The the prospect provider ID associated with the campaign. | | email_provider_id | Optional | 0 | Integer | The the email (autoresponder) provider ID associated with the campaign. | | tax_provider_id | Optional | 0 | Integer | The tax provider ID attached to the campaign. | | account_updater_provider_id | Optional | 0 | Integer | The account updater provider ID attached to the campaign. | | data_verification_provider_id | Optional | 0 | Integer | The data verification provider ID attached to the campaign. | | payment_methods | Conditional | - | Array | An array of payment method names. See ‘Get Payment Methods` for values. Required if no alternative payment methods provided. | | alternative_payments | Conditional | - | Array | An array of alternative payment method objects. | | alternative_payments.*.id | Conditional | - | Integer | The payment gateway profile ID. | | alternative_payments.*.payment_method | Conditional | - | String | The payment method name. See `Get Payment Methods` for values. This name must be compatible with the alternative gateway ID provided. | | offers | Required | - | Array | An array of offer IDs. Each offer ID must be an active and valid offer in the platform. | | countries | Required | - | Array | An array of country IDs. | | shipping_profiles | Required | - | Array | An array of shipping method IDs. | | return_profiles | Required | - | Array | An array of return profile IDs. | | coupon_profiles | Required | - | Array | An array of coupon profile IDs. | | postback_profiles | Required | - | Array | An array of postback profile IDs. | description here

Parameters:

  • body (AddCampaignRequest)

    Required parameter: TODO: type

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/sticky_io_restful_api_v2025731/controllers/campaigns_controller.rb', line 72

def add_campaign(body,
                 domain,
                 v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/.{domain}{v2_ext}campaigns',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body)
                            .is_required(true))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(AddCampaignWithAltPayments.method(:from_hash))
                .is_api_response(true)
                .local_error('422',
                             'Unprocessable Entity',
                             AddCampaignAltPaymentInvalidException))
    .execute
end

#archive_campaign(domain, v2_ext, campaign_id) ⇒ ApiResponse

TODO: type endpoint description here here

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

  • campaign_id (String)

    Required parameter: TODO: type description

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
# File 'lib/sticky_io_restful_api_v2025731/controllers/campaigns_controller.rb', line 2259

def archive_campaign(domain,
                     v2_ext,
                     campaign_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/.{domain}{v2_ext}campaigns/{campaign_id}/archive',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(campaign_id, key: 'campaign_id')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(ArchiveCampaign.method(:from_hash))
                .is_api_response(true))
    .execute
end

#copy_campaign(domain, v2_ext, campaign_id) ⇒ ApiResponse

Copy an existing campaign. **Response Data**\ Response parameters expected within the ‘data` field object: | Field | Data Type | Description | | ————— | ——— | ——————– | | new_campaign_id | Integer | The new campaign ID. | here

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

  • campaign_id (String)

    Required parameter: TODO: type description

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/sticky_io_restful_api_v2025731/controllers/campaigns_controller.rb', line 112

def copy_campaign(domain,
                  v2_ext,
                  campaign_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/.{domain}{v2_ext}campaigns/{campaign_id}/copy',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(campaign_id, key: 'campaign_id')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(CopyCampaign.method(:from_hash))
                .is_api_response(true))
    .execute
end

#delete_campaign(domain, v2_ext, campaign_id) ⇒ ApiResponse

Delete an existing campaign. Note\ A campaign can not be deleted if products are attached here

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

  • campaign_id (String)

    Required parameter: TODO: type description

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
# File 'lib/sticky_io_restful_api_v2025731/controllers/campaigns_controller.rb', line 2325

def delete_campaign(domain,
                    v2_ext,
                    campaign_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::DELETE,
                                 '/.{domain}{v2_ext}campaigns/{campaign_id}',
                                 Server::SERVER_1)
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(campaign_id, key: 'campaign_id')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(DeleteCampaign.method(:from_hash))
                .is_api_response(true))
    .execute
end

#get_campaign(domain, v2_ext, campaign_id) ⇒ ApiResponse

Fetch a specific campaign object by campaign ID. **Response Data**\ Response parameters expected in ‘data` field object: | Field | Data Type | Description

|

| ————————————— | ———— | ————————————– | | c_id | Integer | The campaign ID.

|

| gateway_id | Integer | The primary gateway ID attached to the campaign. | | is_active | Integer Flag | The campaign active status. | | tax_provider_id | Integer | The tax provider ID attached to the campaign. | | data_verification_provider_id | Integer | The data verification provider ID attached to the campaign. | | site_url | String | The campaign site URL.

|

| id | Integer | The campaign ID.

|

| is_archived | Integer Flag | The campaign archive status. | | is_prepaid_blocked | Integer Flag | Flag that determines whether or not prepaid blocking is enabled. | | is_custom_price_allowed | Integer Flag | Flag that determines whether or not the campaign supports custom pricing. | | is_avs_enabled | Integer Flag | The campaign AVS status. | | is_collections_enabled | Integer Flag | Flag that determines whether or not collection providers are enabled. | | created_at | Object | Object that contains data pertaining to the campaign’s creation. | | created_at.date | String | The campaign creation timstamp. | | created_at.timezone_type | String | The campaign timezone type ID. | | created_at.timezone | String | The campaign creation timestamp timezone. | | updated_at | Object | Object that contains data pertaining to the campaign’s last update timestamp. | | updated_at.date | String | The campaign last updated timstamp. | | updated_at.timezone_type | String | The campaign timezone type ID. | | updated_at.timezone | String | The campaign last update timestamp timezone. | | archived_at | Object | Object that contains data pertaining to the campaign’s archive timestamp. | | archived_at.date | String | The campaign archive timstamp. | | archived_at.timezone_type | String | The campaign archive timezone type ID. | | archived_at.timezone | String | The campaign archive timestamp timezone. | | name | String | The campaign name. | | description | String | The campaign description. | | pre_auth_amount | Float | The gateway preauth amount (If Void Preauth is supported on the campaign gateway). | | creator | Object | Object that contains data pertaining to the admin user that created the campaign. | | creator.department_id | Integer | Department ID associated with the admin user. | | creator.timezone | String | The admin user timezone. | | creator.id | Integer | The admin user ID. | | creator.is_active | Integer Flag | The admin user active status. | | creator.name | String | The admin user name. | | creator.email | String | The admin user email. | | creator.call_center_provider_id | Integer | The call center provider ID associated with the admin user. | | updator | Object | Object that contains data pertaining to the admin user that last updated the campaign. | | updator.department_id | Integer | Department ID associated with the admin user. | | updator.timezone | String | The admin user timezone. | | updator.id | Integer | The admin user ID. | | updator.is_active | Integer Flag | The admin user active status. | | updator.name | String | The admin user name. | | updator.email | String | The admin user email. | | updator.call_center_provider_id | Integer | The call center provider ID associated with the admin user. | | countries | Array | Array of country objects associated with the campaign. | | countries.*.iso_numeric | Integer | The numeric ISO country code. | | countries.*.calling_code | Integer | The country country code. | | countries.*.id | Integer | The country ID. | | countries.*.name | String | The full country name. | | countries.*.iso_2 | String | The abbreviated ISO2 country name. | | countries.*.iso_3 | String | The abbreviated ISO3 country name. | | fulfillment_id | Integer | The the fulfillment provider ID associated with the campaign. | | check_provider_id | Integer | The the check provider ID associated with the campaign. | | membership_provider_id | Integer | The the membership provider ID associated with the campaign. | | call_confirm_provider_id | Integer | The the call confirm provider ID associated with the campaign. | | chargeback_provider_id | Integer | The the chargeback provider ID associated with the campaign. | | prospect_provider_id | Integer | The the prospect provider ID associated with the campaign. | | email_provider_id | Integer | The the email (autoresponder) provider ID associated with the campaign. | | offers | Array | An array of offer objects associated with the campaign. | | offers.*.id | Integer | The offer ID. | | offers.*.name | String | The offer name. | | offers.*.cycle_type_id | Integer | The offer cycle type ID (self or custom recurring). | | offers.*.terminating_product_id | Integer | The last cycle product ID (When the offer has expiring cycles). | | offers.*.expire_cycles | Integer | The number of cycles in the offer until it expires. | | offers.*.is_seasonal | Integer Flag | Flag that determines whether or not the offer is seasonal. | | offers.*.is_immutable | Integer Flag | Flag that determines whether or not the offer is immutable. | | offers.*.type_id | Integer | The offer type ID. | | offers.*.created_at | Object | Object that contains data pertaining to when the offer was created. | | offers.*.created_at.date | String | The offer creation timestamp. | | offers.*.created_at.timezone_type | Integer | The offer creation timezone type. | | offers.*.created_at.timezone | String | The offer creation timezone. | | offers.*.updated_at | Object | Object that contains data pertaining to when the offer was last updated. | | offers.*.updated_at.date | String | The offer last updated timestamp. | | offers.*.updated_at.timezone_type | Integer | The offer last updated timezone type. | | offers.*.updated_at.timezone | String | The offer last updated timezone. | | offers.*is_archived | Integer Flag | The offer last archive status. | | offers.*.products | Array | An array of product objects associated with the offer. | | offers.*.products.*.is_trial_allowed | Integer Flag | Flag that determines whether or not the product can be sold as a trial on the offer. | | offers.*.products.*.id | Integer | The product ID. | | offers.*.products.*.name | String | The product name. | | offers.*.products.*.is_bundle | Integer Flag | Flag that determines whether or not the product is a bundle. | | offers.*.products.*.is_custom_bundle | Integer Flag | Flag that determines whether or not the product is a custom bundle. | | offers.*.billing_models | Array | An array of billing model objects associated with the offer. | | offers.*.billing_models.*.id | Integer | The billing model ID. | | offers.*.billing_models.*.name | String | The billing model name. | | offers.*.billing_models.*.created_at | Object | Object that contains data pertaining to when the billing model was created. | | offers.*.billing_models.*.created_at.date | String | The billing model creation timestamp. | | offers.*.billing_models.*.created_at.timezone_type | Integer | The billing model creation timezone type. | | offers.*.billing_models.*.created_at.timezone | String | The billing model creation timezone. | | offers.*.billing_models.*.updated_at | Object | Object that contains data pertaining to when the billing model was last updated. | | offers.*.billing_models.*.updated_at.date | String | The billing model last updated timestamp. | | offers.*.billing_models.*.updated_at.timezone_type | Integer | The billing model last updated timezone type. | | offers.*.billing_models.*.updated_at.timezone | String | The billing model last updated timezone. | | offers.*.billing_models.*.is_archived | Integer Flag | Flag that determines whether or not the billing model is archived. | | offers.*.billing_models.*.is_preserve_quantity | Integer Flag | Flag that determines whether or not quantity will be preserved when chosen. | | offers.*.billing_models.*.is_default | Integer Flag | Flag that determines whether or not this billing model will be chosen when no billing model is provided for an order. | | offers.*.billing_models.*.description | String | The billing model description. | | offers.*.billing_models.*.type | Object | An object that contains data pertaining to the billing model type. | | offers.*.billing_models.*.type.id | Integer | The billing model type ID. | | offers.*.billing_models.*.type.name | String | The billing model type name. | | offers.*.billing_models.*.frequency_type_id | Integer | The billing model type ID. | | offers.*.billing_models.*.discount | Object | Object that contains data pertaining to the billing model discount associated with the offer. | | offers.*.billing_models.*.discount.percent | Float | The billing model discount percentage. | | offers.*.billing_models.*.discount.amount | Float | The billing model discount amount. | | offers.*.is_prepaid | Integer Flag | Flag that determines whether or not the offer has a prepaid configuration. | | offers.*.is_series | Integer Flag | Flag that determines whether or not the offer is of the series type. | | offers.*.type | Object | An object that contains data pertaining to offer type. | | offers.*.type.id | Integer | The offer type ID. | | offers.*.type.name | String | The offer type name. | | offers.*.type.active | Integer Flag | Flag that determines whether or not the offer type is active. | | offers.*.cycle_type | Object | Object that contains data pertaining to the offer cycle type. | | offers.*.cycle_type.id | Integer | The offer cycle type ID. | | offers.*.cycle_type.name | String | The offer cycle type name. | | offers.*.terminating_cycle_type | Object | Object that contains data pertaining to the offer last cycle type (If the offer has expiring cycles). | | offers.*.terminating_cycle_type.id | Integer | The offer last cycle type ID. | | offers.*.terminating_cycle_type.name | String | The offer last cycle type name. | | offers.*.terminating_cycle_type.description | String | The offer last cycle type description. | | offers.*.prepaid_profile | Object | An object that contains data pertaining to the offer’s prepaid configuration. | | offers.*.prepaid_profile.is_subscription | Integer Flag | Flag that determines whether or not associated subscriptions will restart once prepaid cycles are complete. | | offers.*.prepaid_profile.is_convert_to_standard | Integer Flag | Flag that determines whether or not associated subscriptions will take a standard offer configuration once prepaid cycles are complete. | | offers.*.prepaid_profile.is_cancel_immediate | Integer Flag | Flag that determines whether or not associated subscriptions will be put on hold once prepaid cycles are complete. | | offers.*.prepaid_profile.is_refund_allowed | Integer Flag | Flag that determines whether or not refunds are permitted on associated subscriptions before prepaid cycles are complete. | | offers.*.prepaid_profile.is_initial_shipping_on_restart | Integer Flag | Flag that determines whether or not the system will charge initial shipping price on the renewal of associated subscriptions. | | offers.*.prepaid_profile.is_prepaid_shipping | Integer Flag | Flag that determines whether or not the system will charge shipping amount as a prepaid amount (base shipping cost X number of cycles). | | offers.*.prepaid_profile.is_prepaid_notification_enabled | Integer Flag | Flag that determines whether or not order notification will be sent on $0 prepaid cycles. | | offers.*.prepaid_profile.terms | Array | An array of prepaid terms. | | offers.*.prepaid_profile.terms.*.cycles | Integer | Number of prepaid cycles. | | offers.*.prepaid_profile.terms.*.discount_value | Float | The prepaid term discount amount. | | offers.*.prepaid_profile.terms.*.discount_type | Object | An object that contains data pertaining to the prepaid term’s discount type. | | offers.*.prepaid_profile.terms.*.discount_type.id | Integer | The prepaid term discount type ID. | | offers.*.prepaid_profile.terms.*.discount_type.name | String | The prepaid term discount type name. | | offers.*.trial | Object

| An object that contains data pertaining to the offer's trial

configuration (DEPRECATED, use trial_workflows instead). | | offers.*.trial.is_custom_duration | Boolean

| A boolean value that determines whether or not the trial has a custom

duration (in days). | | offers.*.trial.days | Integer

| The trial duration, in days (If there is no custom duration, billing

model will be inherited to determine the next recurring date). | | offers.*.trial.is_custom_price | Integer Flag | Flag that determines whether or not the trial configuration has a custom price. | | offers.*.trial.price | Float

| The custom trial price. |

| offers.*.trial.is_delayed_billing | Integer Flag | Flag that determines whether or not the trial configuration has an associated delayed billing configuration. | | offers.*.trial.delayed_billing | Object

| An object that contains data pertaining to the offer's delayed billing

trial configuration. | | offers.*.trial.delayed_billing.is_delayed_email_suppressed | Integer Flag | Flag that determines whether or not the system will send an order confirmation email during the trial delay billing step. | | offers.*.trial.delayed_billing.is_custom_price | Integer Flag | Flag that determines whether or not the delayed trial configuration has a custom price. | | offers.*.trial.delayed_billing.price | Float

| The delayed billing charge amount (If not provided, the product price

will be inherited as the charge amount). | | offers.*.trial.delayed_billing.days | Integer

| The delayed billing duration, in days. This value must be less than

the trial duration, if provided. | | offers.*.trial.delayed_billing.default_days | Integer

| The default delayed billing duration, in days. |

| offers.*.trial_workflows | Array | An array of trial workflow objects associated with the offer. | | offers.*.trial_workflows.*.id | Integer | The trial workflow ID. | | offers.*.trial_workflows.*.name | String | The trial workflow name. | | offers.*.trial_workflows.*.is_active | Integer Flag | Flag that determines whether or not the trial workflow is active. | | offers.*.trial_workflows.*.is_deleted | Integer Flag | Flag that determines whether or not the trial workflow is deleted. | | offers.*.trial_workflows.*.created_by | Integer | The admin user ID that created the trial workflow. | | offers.*.trial_workflows.*.updated_by | Integer | The admin user ID that last updated the trial workflow. | | offers.*.trial_workflows.*.created_at | String | The trial workflow creation timestamp. | | offers.*.trial_workflows.*.updated_at | String | The trial workflow last update timestamp. | | offers.*.cycle_products | Array | An array of cycle product objects. | | offers.*.cycle_products.*.cycle_depth | Integer | The cycle position. | | offers.*.cycle_products.*.name | String | The cycle product name. | | offers.*.cycle_products.*.product_id | Integer | The cycle product ID. | | offers.*.cycle_products.*.price | Float | The cycle product price. | | offers.*.cycle_products.*.sku | String | The cycle product SKU identifier. | | offers.*.cycle_products.*.qty | Integer | The cycle product max quantity. | | offers.*.seasonal_products | Array | An array of seasonal cycle product objects. | | offers.*.seasonal_products.*.position | Integer | The cycle position. | | offers.*.seasonal_products.*.name | String | The cycle product name. | | offers.*.seasonal_products.*.product_id | Integer | The cycle product ID. | | offers.*.seasonal_products.*.price | Float | The cycle product price. | | offers.*.seasonal_products.*.sku | String | The cycle product SKU identifier. | | offers.*.seasonal_products.*.qty | Integer | The cycle product max quantity. | | offers.*.is_trial | Integer Flag | Flag that determines whether or not the offer has a trial configuration. | | offers.*.terminating_product_name | String | The last cycle product name (If the offer has expiring cycles). | | offers.*.terminating_cycle_product | Object | An object that contains data pertaining to the offer’s last cycle product (If the offer has expiring cycles). | | offers.*.terminating_cycle_product.is_trial_product | Integer Flag | Flag that determines whether or not the product can be sold as a trial. | | offers.*.terminating_cycle_product.is_shippable | Integer Flag | Flag that determines whether or not the product is shippable. | | offers.*.terminating_cycle_product.tax_code | String | The product’s shipping tax code. | | offers.*.terminating_cycle_product.is_licensed | Integer Flag | Flag that determines whether or not the product is a license product. | | offers.*.terminating_cycle_product.id | Integer | The product ID. | | offers.*.terminating_cycle_product.name | String | The product name. | | offers.*.terminating_cycle_product.description | String | The product description. | | offers.*.terminating_cycle_product.sku | String | The product SKU identifier. | | offers.*.terminating_cycle_product.price | Float | The product base price. | | offers.*.terminating_cycle_product.weight | Float | The product weight (in oz). | | offers.*.terminating_cycle_product.declared_value | Float | The product declared value. | | offers.*.terminating_cycle_product.restocking_fee | Float | The product restocking fee. | | offers.*.terminating_cycle_product.cost_of_goods | Float | The product cost of goods sold. | | offers.*.terminating_cycle_product.max_quantity | Integer | The maximum quantity allowed per order of this product. | | offers.*.terminating_cycle_product.created_at | Object | Object that contains data pertaining to when the product was created. | | offers.*.terminating_cycle_product.created_at.date | String | The product creation timestamp. | | offers.*.terminating_cycle_product.created_at.timezone_type | Integer | The product creation timezone type. | | offers.*.terminating_cycle_product.created_at.timezone | String | The product creation timezone. | | offers.*.terminating_cycle_product.updated_at | Object | Object that contains data pertaining to when the product was last updated. | | offers.*.terminating_cycle_product.updated_at.date | String | The product last updated timestamp. | | offers.*.terminating_cycle_product.updated_at.timezone_type | Integer | The product last updated timezone type. | | offers.*.terminating_cycle_product.updated_at.timezone | String | The product last updated timezone. | | offers.*.terminating_cycle_product.custom_fields | Array | An array of custom field configuration objects. | | offers.*.terminating_cycle_product.custom_fields.*.id | Integer | The custom field ID. | | offers.*.terminating_cycle_product.custom_fields.*.field_type_id | Integer | The custom field type ID. | | offers.*.terminating_cycle_product.custom_fields.*.name | String | The custom field name. | | offers.*.terminating_cycle_product.custom_fields.*.token_key | String | The custom field snake-cased name. | | offers.*.terminating_cycle_product.custom_fields.*.is_multi | Integer Flag | Flag that determines whether or not the custom field accepts multiple values. | | offers.*.terminating_cycle_product.custom_fields.*.type_id | Integer | The custom field value type ID. | | offers.*.terminating_cycle_product.custom_fields.*.values | Array | An array of custom field value objects. | | offers.*.terminating_cycle_product.custom_fields.*.values.*.option_id | Integer | The custom field option ID (It will be set to 0 for non-multi custom fields). | | offers.*.terminating_cycle_product.custom_fields.*.values.*.value | String | The custom field value. | | offers.*.terminating_cycle_product.custom_fields.*.values.*.name | String | The custom field value field name. | | offers.*.terminating_cycle_product.vertical | Array | An array of vertical objects. | | offers.*.terminating_cycle_product.vertical.*.id | Integer | The vertical ID. | | offers.*.terminating_cycle_product.vertical.*.name | String | The vertical name. | | offers.*.terminating_cycle_product.category_id | Integer | The product category name. | | offers.*.terminating_cycle_product.category | Object | An object that contains data pertaining to the offer’s last cycle product category. | | offers.*.terminating_cycle_product.category.id | Integer | The category ID. | | offers.*.terminating_cycle_product.category.name | String | The category name. | | offers.*.terminating_cycle_product.category.description | String | The category description. | | offers.*.terminating_cycle_product.is_bundle | Integer Flag | Flag that determines whether or not the product is a bundle. | | offers.*.terminating_cycle_product.is_custom_bundle | Integer Flag | Flag that determines whether or not the product is a custom bundle. | | offers.*.terminating_cycle_product.is_variant_enabled | Integer Flag | Flag that determines whether or not the product has one or more variants. | | channel | Object | Object that contains data pertaining to the campaign’s channel. | | channel.id | Integer | The channel ID. | | channel.name | String | The channel name. | | payment_methods | Array | An array of payment method objects. | | payment_methods.*.label | String | The payment method display name. | | payment_methods.*.value | String | The payment method internal name (Use this for API new order calls). | | gateway | Object | Object that contains data pertaining to the campaign’s payment gateway. | | gateway.account_id | Integer | The gateway account ID. | | gateway.id | Integer | The gateway profile ID. | | gateway.alias | String | The gateway proofile alias. | | gateway.account_name | String | The gateway account name. | | gateway.currency | Object | Object that contains data pertaining to the gateway currency. | | gateway.currency.title | String | The currency title. | | gateway.currency.code | String | The currency code. | | gateway.currency.symbol_left | String | The currency symbol. | | gateway.currency.id | Integer | The currency ID. | | gateway.fields | Object | Object that contains data pertaining to the gateway fields. | | gateway.fields.global_fields | Object | Object that contains data pertaining to the global gateway fields. | | gateway.fields.global_fields.global_monthly_cap | Float | The gateway profile global monthly cap. | | gateway.fields.global_fields.customer_service_number | String | The gateway profile customer service number. | | gateway.fields.global_fields.descriptor | String | The gateway profile descriptor. | | gateway.fields.global_fields.merchant_id | String | The gateway profile customer service email. | | gateway.fields.global_fields.customer_service_email | String | The gateway profile customer service from email. | | gateway.fields.global_fields.customer_service_email_from | String | The gateway profile customer service email. | | gateway.fields.global_fields.mid_group | String | The gateway profile MID group. | | gateway.fields.global_fields.vertical | Object | Object that contains data pertaining to the gateway profile vertical. | | gateway.fields.global_fields.vertical.id | Integer | The gateway vertical ID. | | gateway.fields.global_fields.vertical.option | String | The gateway vertical option name. | | gateway.fields.global_fields.processor | Object | Object that contains data pertaining to the gateway profile processor. | | gateway.fields.global_fields.processor.id | Integer | The gateway profile processor ID. | | gateway.fields.global_fields.processor.option | String | The gateway processor option name. | | gateway.fields.global_fields.url | String | The merchant gateway website URL. | | gateway.fields.global_fields.cancellation_url | String | The merchant gateway cancellation URL. | | gateway.fields.global_fields.cvv | Object | Object that contains data pertaining to gateway profile CVV configuration. | | gateway.fields.global_fields.cvv.id | Integer | The CVV option ID. | | gateway.fields.global_fields.cvv.option | String | The CVV option name. | | gateway.fields.global_fields.transaction_fee | Float | The gateway profile transaction fee. | | gateway.fields.global_fields.chargeback_fee | Float | The gateway profile chargeback fee. | | gateway.fields.global_fields.reserve_percent | Float | The gateway profile reserve percentage. | | gateway.fields.global_fields.reserve_term | Object | Object that contains data pertaining to the gateway profile reserve term. | | gateway.fields.global_fields.reserve_term.id | Integer | The reserve term ID. | | gateway.fields.global_fields.reserve_term.option | String | the reserve term option name. | | gateway.fields.global_fields.reserve_term_days | Integer | The gateway profile reserve term, in days. | | gateway.fields.global_fields.reserve_cap | Float | The gateway profile reserve cap amount. | | gateway.fields.account_fields | Object | Object that contains data pertaining to the account-specific gateway fields. The fields contained withing will change depending upon the gateway account selected. | | gateway.fields.fee_fields | Object | Object that contains data pertaining to merchant fee gateway fields. | | gateway.fields.fee_fields.monthly_fee | Float | The gateway profile monthly fee. | | gateway.fields.fee_fields.batch_fee | Float | The gateway profile batch fee. | | gateway.fields.fee_fields.visa | Float | The gateway profile Visa fee. | | gateway.fields.fee_fields.mastercard | Float | The gateway profile Mastercard fee. | | gateway.fields.fee_fields.discover | Float | The gateway profile Discover fee. | | gateway.fields.fee_fields.american_express | Float | The gateway profile American Express fee. | | gateway.fields.fee_fields.other | Float | The gateway profile Miscellaneous fee. | | gateway.fields.fee_fields.refund_processing_fee | Float | The gateway profile refund processing fee. | | alternative_payments | Array | Array of alternative payment field objects. | | alternative_payments.*.provider | Object | Object that contains data pertaining to the alternative payment provider profile. | | alternative_payments.*.provider.account_id | Integer | The gateway account ID. | | alternative_payments.*.provider.id | Integer | The gateway profile ID. | | alternative_payments.*.provider.alias | String | The gateway proofile alias. | | alternative_payments.*.provider.account_name | String | The gateway account name. | | alternative_payments.*.provider.currency | Object | Object that contains data pertaining to the gateway currency. | | alternative_payments.*.provider.currency.title | String | The currency title. | | alternative_payments.*.provider.currency.code | String | The currency code. | | alternative_payments.*.provider.currency.symbol_left | String | The currency symbol. | | alternative_payments.*.provider.currency.id | Integer | The currency ID. | | alternative_payments.*.provider.fields | Object | Object that contains data pertaining to the gateway fields. | | alternative_payments.*.provider.fields.global_fields

| Object  | Object that contains data pertaining to the global

gateway fields. | | alternative_payments.*.provider.fields.global_fields.global_monthly_cap

| Float   | The gateway profile global monthly cap. |

| alternative_payments.*.provider.fields.global_fields.customer_service_num ber | String | The gateway profile customer service number. | | alternative_payments.*.provider.fields.global_fields.descriptor

| String  | The gateway profile descriptor. |

| alternative_payments.*.provider.fields.global_fields.merchant_id

| String  | The gateway profile customer service email. |

| alternative_payments.*.provider.fields.global_fields.customer_service_ema il | String | The gateway profile customer service from email. | | alternative_payments.*.provider.fields.global_fields.customer_service_ema il_from | String | The gateway profile customer service email. | | alternative_payments.*.provider.fields.global_fields.mid_group

| String  | The gateway profile MID group. |

| alternative_payments.*.provider.fields.global_fields.vertical

| Object  | Object that contains data pertaining to the gateway

profile vertical. | | alternative_payments.*.provider.fields.global_fields.vertical.id

| Integer | The gateway vertical ID. |

| alternative_payments.*.provider.fields.global_fields.vertical.option

| String  | The gateway vertical option name. |

| alternative_payments.*.provider.fields.global_fields.processor

| Object  | Object that contains data pertaining to the gateway

profile processor. | | alternative_payments.*.provider.fields.global_fields.processor.id

| Integer | The gateway profile processor ID. |

| alternative_payments.*.provider.fields.global_fields.processor.option

| String  | The gateway processor option name. |

| alternative_payments.*.provider.fields.global_fields.url

| String  | The merchant gateway website URL. |

| alternative_payments.*.provider.fields.global_fields.cancellation_url

| String  | The merchant gateway cancellation URL. |

| alternative_payments.*.provider.fields.global_fields.cvv

| Object  | Object that contains data pertaining to gateway

profile CVV configuration. | | alternative_payments.*.provider.fields.global_fields.cvv.id

| Integer | The CVV option ID. |

| alternative_payments.*.provider.fields.global_fields.cvv.option

| String  | The CVV option name. |

| alternative_payments.*.provider.fields.global_fields.transaction_fee

| Float   | The gateway profile transaction fee. |

| alternative_payments.*.provider.fields.global_fields.chargeback_fee

| Float   | The gateway profile chargeback fee. |

| alternative_payments.*.provider.fields.global_fields.reserve_percent

| Float   | The gateway profile reserve percentage. |

| alternative_payments.*.provider.fields.global_fields.reserve_term

| Object  | Object that contains data pertaining to the gateway

profile reserve term. | | alternative_payments.*.provider.fields.global_fields.reserve_term.id

| Integer | The reserve term ID. |

| alternative_payments.*.provider.fields.global_fields.reserve_term.option

| String  | the reserve term option name. |

| alternative_payments.*.provider.fields.global_fields.reserve_term_days

| Integer | The gateway profile reserve term, in days. |

| alternative_payments.*.provider.fields.global_fields.reserve_cap

| Float   | The gateway profile reserve cap amount. |

| alternative_payments.*.provider.fields.account_fields

| Object  | Object that contains data pertaining to the

account-specific gateway fields. The fields contained withing will change depending upon the gateway account selected. | | alternative_payments.*.provider.fields.fee_fields | Object | Object that contains data pertaining to merchant fee gateway fields. | | alternative_payments.*.provider.fields.fee_fields.monthly_fee | Float | The gateway profile monthly fee. | | alternative_payments.*.provider.fields.fee_fields.batch_fee | Float | The gateway profile batch fee. | | alternative_payments.*.provider.fields.fee_fields.visa | Float | The gateway profile Visa fee. | | alternative_payments.*.provider.fields.fee_fields.mastercard | Float | The gateway profile Mastercard fee. | | alternative_payments.*.provider.fields.fee_fields.discover | Float | The gateway profile Discover fee. | | alternative_payments.*.provider.fields.fee_fields.american_express | Float | The gateway profile American Express fee. | | alternative_payments.*.provider.fields.fee_fields.other | Float | The gateway profile Miscellaneous fee. | | alternative_payments.*.provider.fields.fee_fields.refund_processing_fee | Float | The gateway profile refund processing fee. | | alternative_payments.payment_method | String | The gateway profile payment method name. | | shipping_profiles | Array | Array of shipping method profile objects. | | shipping_profiles.*.freight_code | String | The shipping method freight code. | | shipping_profiles.*.threshold_amount | Float | The shipping method threshold amount. | | shipping_profiles.*.threshold_charge_amount | Float | The shipping method threshold charge amount. This will be the shipping price when the order total reaches the threshold_amount. | | shipping_profiles.*.id | Integer | The shipping method id. | | shipping_profiles.*.name | String | The shipping method name. | | shipping_profiles.*.description | String | The shipping method description. | | shipping_profiles.*.amount_trial | Float | The shipping method initial order amount. | | shipping_profiles.*.amount_recurring | Float | The shipping method rebill order amount. | | shipping_profiles.*.type | Object | Object that contains data pertaining to the shipping method type. | | shipping_profiles.*.type.id | Integer | The shipping method type ID. | | shipping_profiles.*.type.name | String | The shipping method type name. | | shipping_profiles.*.type.code | String | The shipping method type code. | | shipping_profiles.*.type.created_at | Object | Object that contains data pertaining to when the shipping method type was created. | | shipping_profiles.*.type.created_at.date | String | The shipping method type creation timestamp. | | shipping_profiles.*.type.created_at.timezone_type | Integer | The shipping method type creation timezone type. | | shipping_profiles.*.type.created_at.timezone | String | The shipping method type creation timezone. | | shipping_profiles.*.type.updated_at | Object | Object that contains data pertaining to when the shipping method type was last updated. | | shipping_profiles.*.type.updated_at.date | String | The shipping method type last updated timestamp. | | shipping_profiles.*.type.updated_at.timezone_type | Integer | The shipping method type last updated timezone type. | | shipping_profiles.*.type.updated_at.timezone | String | The shipping method type last updated timezone. | | shipping_profiles.*.service_code | String | The shipping method service code. | | shipping_profiles.*.created_at | Object | Object that contains data pertaining to when the shipping method was created. | | shipping_profiles.*.created_at.date | String | The shipping method creation timestamp. | | shipping_profiles.*.created_at.timezone_type | Integer | The shipping method creation timezone type. | | shipping_profiles.*.created_at.timezone | String | The shipping method creation timezone. | | shipping_profiles.*.updated_at | Object | Object that contains data pertaining to when the shipping method was last updated. | | shipping_profiles.*.updated_at.date | String | The shipping method last updated timestamp. | | shipping_profiles.*.updated_at.timezone_type | Integer | The shipping method last updated timezone type. | | shipping_profiles.*.updated_at.timezone | String | The shipping method last updated timezone. | | return_profiles | Array | Array of return profile objects. | | return_profiles.*.id | Integer | The return profile ID. | | return_profiles.*.name | String | The return profile name. | | return_profiles.*.description | String | The return profile description. | | return_profiles.*.action_id | Integer | The return profile action ID. | | return_profiles.*.expired_action_id | Integer | The return profile expired action ID. | | return_profiles.*.rma_required_flag | Integer Flag | Flag that determines whether or not the return profile requires an RMA to be processed. | | return_profiles.*.expires | Integer | The return profile expiration, in days. | | return_profiles.*.policy_expires | Integer | The return profile policy expiration, in days. | | return_profiles.*.chargeback_flag | Integer Flag | Flag that determines whether or not the platform will prevent refunds on chargeback orders using the return profile. | | return_profiles.*.trial_flag | Integer Flag | Flag that determines whether or not the platform will abide by the return rules during rebill depth 0 and 1. | | return_profiles.*.active | Integer Flag | Flag that determines whether or not the return profile is active. | | return_profiles.*.deleted | Integer Flag | Flag that determines whether or not the return profile is deleted. | | return_profiles.*.date_in | String | The return profile creation timestamp. | | return_profiles.*.update_in | String | The shipping method last updated timestamp. | | return_profiles.*.created_id | Integer | The admin user ID that created the return profile. | | return_profiles.*.updated_id | Integer | The admin user ID that last updated the return profile. | | postback_profiles | Array | Array of postback profile objects. | | postback_profiles.*.id | Integer | The postback profile ID. | | postback_profiles.*.name | String | The postback profile name. | | postback_profiles.*.type_id | Integer | The postback profile type ID. | | postback_profiles.*.url | String | The postback tokenized URL. | | postback_profiles.*.is_active | Integer Flag | Flag that determines whether or not the postback profile is active. | | postback_profiles.*.is_global | Integer Flag | Flag that determines whether or not the postback profile is global (Will execute for all campaigns). | | postback_profiles.*.created_at | String | The postback profile creation timestamp. | | postback_profiles.*.updated_at | String | The postback profile last updated timestamp. | | postback_profiles.*.http_method | String | The postback profile HTTP method name. | | postback_profiles.*.type | String | The postback profile type name. | | postback_profiles.*.headers | Array | Array of HTTP header objects. | | postback_profiles.*.headers.*.id | Integer | The postback profile header ID. | | postback_profiles.*.headers.*.postback_id | Integer | The postback profile ID. | | postback_profiles.*.headers.*.key | String | The postback profile header field name. | | postback_profiles.*.headers.*.value | String | The postback profile header field value. | | postback_profiles.*.headers.*.created_by | Integer | The admin user ID that created the header. | | postback_profiles.*.headers.*.updated_by | Integer | The admin user ID that last updated the header. | | postback_profiles.*.headers.*.created_at | String | The postback profile type name. | | postback_profiles.*.headers.*.updated_at | String | The postback profile type name. | | postback_profiles.*.headers.*.deleted_at | String | The postback profile type name. | | postback_profiles.*.campaigns | Integer[] | Array of campaign IDs. | | postback_profiles.*.triggers | Object | Object containing arrays of action IDs, indexed by trigger ID (i.e. ‘[23]`). | | postback_profiles.*.trigger_type_id | Integer | The trigger type ID. | | postback_profiles.*.creator | Object | Object that contains data pertaining to the admin user that created the postback profile. | | postback_profiles.*.creator.department_id | Integer | Department ID associated with the admin user. | | postback_profiles.*.creator.timezone | String | The admin user timezone. | | postback_profiles.*.creator.id | Integer | The admin user ID. | | postback_profiles.*.creator.is_active | Integer Flag | The admin user active status. | | postback_profiles.*.creator.name | String | The admin user name. | | postback_profiles.*.creator.email | String | The admin user email. | | postback_profiles.*.creator.call_center_provider_id | Integer | The call center provider ID associated with the admin user. | | postback_profiles.*.updator | Object | Object that contains data pertaining to the admin user that last updated the postback profile. | | postback_profiles.*.updator.department_id | Integer | Department ID associated with the admin user. | | postback_profiles.*.updator.timezone | String | The admin user timezone. | | postback_profiles.*.updator.id | Integer | The admin user ID. | | postback_profiles.*.updator.is_active | Integer Flag | The admin user active status. | | postback_profiles.*.updator.name | String | The admin user name. | | postback_profiles.*.updator.email | String | The admin user email. | | postback_profiles.*.updator.call_center_provider_id | Integer | The call center provider ID associated with the admin user. | | coupon_profiles | Array | Array of coupon profile objects. | | coupon_profiles.*.id | Integer | The coupon profile ID. | | coupon_profiles.*.type_id | Integer | The coupon profile type ID. | | coupon_profiles.*.name | String | The coupon profile name. | | coupon_profiles.*.description | String | The coupon profile description. | | coupon_profiles.*.use_count | Integer | The amount of total usages allowed for this coupon profile. | | coupon_profiles.*.discount_amt | Float | The coupon discount amount. | | coupon_profiles.*.discount_pct | Float | The coupon discount percentage. | | coupon_profiles.*.minimum_purchase | Float | The coupon minimum purchase amount. | | coupon_profiles.*.is_lifetime | Integer Flag | Flag that determines whether or not the coupon profile promo codes are lifetime coupons. | | coupon_profiles.*.product_id | Integer | The product ID (DEPRECATED). | | coupon_profiles.*.variant_id | Integer | The variant ID (DEPRECATED). | | coupon_profiles.*.min_qty | Integer | The minimum quantity required to use a promo code from the coupon profile. | | coupon_profiles.*.max_qty | Integer | The maximum quantity allowed when using a promo code from the coupon profile. | | coupon_profiles.*.is_bogo | Integer Flag | Flag that determines whether or not the coupon profile promo codes are buy one get one free (BOGO). | | coupon_profiles.*.discount_amount | Float | The coupon discount amount. | | coupon_profiles.*.discount_percent | Float | The coupon discount percentage. | | coupon_profiles.*.minimum_quantity | Integer | The minimum quantity required to use a promo code from the coupon profile. | | coupon_profiles.*.maximum_quantity | Integer | The maximum quantity allowed when using a promo code from the coupon profile. | | coupon_profiles.*.is_active | Integer Flag | Flag that determines whether or not the coupon profile is active. | | coupon_profiles.*.created_at | Object | Object that contains data pertaining to when the coupon profile was created. | | coupon_profiles.*.created_at.date | String | The coupon profile creation timestamp. | | coupon_profiles.*.created_at.timezone_type | Integer | The coupon profile creation timezone type. | | coupon_profiles.*.created_at.timezone | String | The coupon profile creation timezone. | | coupon_profiles.*.updated_at | Object | Object that contains data pertaining to when the coupon profile was last updated. | | coupon_profiles.*.updated_at.date | String | The coupon profile last updated timestamp. | | coupon_profiles.*.updated_at.timezone_type | Integer | The coupon profile last updated timezone type. | | coupon_profiles.*.updated_at.timezone | String | The coupon profile last updated timezone. | | coupon_profiles.*.expires_at | Object | Object that contains data pertaining to when the coupon profile was last updated. | | coupon_profiles.*.expires_at.date | String | The coupon profile last updated timestamp. | | coupon_profiles.*.expires_at.timezone_type | Integer | The coupon profile last updated timezone type. | | coupon_profiles.*.expires_at.timezone | String | The coupon profile last updated timezone. | | coupon_profiles.*.is_free_shipping | Integer Flag | Flag that determines whether or not promo codes from the coupon profile grant free shipping. | | coupon_profiles.*.promo_code_count | Integer | The amount of promo codes associated with the coupon profile. | | coupon_profiles.*.limits | Object | Object that contains data pertaining to coupon profile limits. | | coupon_profiles.*.limits.total | Integer | The total coupon profile usage limit. | | coupon_profiles.*.limits.per_customer | Integer | The coupon profile usage limit per customer. | | coupon_profiles.*.limits.per_code | Integer | The coupon profile usage limit per promo code. | | coupon_profiles.*.limits.per_code_per_customer | Integer | The coupon profile usage limit per code, per customer. | | coupon_profiles.*.creator | String | The admin user email. | | coupon_profiles.*.updator | String | The admin user email. | | coupon_profiles.*.products | String | The admin user email. | | coupon_profiles.*.creator | Object | Object that contains data pertaining to the admin user that created the coupon profile. | | coupon_profiles.*.creator.department_id | Integer | Department ID associated with the admin user. | | coupon_profiles.*.creator.timezone | String | The admin user timezone. | | coupon_profiles.*.creator.id | Integer | The admin user ID. | | coupon_profiles.*.creator.is_active | Integer Flag | The admin user active status. | | coupon_profiles.*.creator.name | String | The admin user name. | | coupon_profiles.*.creator.email | String | The admin user email. | | coupon_profiles.*.creator.call_center_provider_id | Integer | The call center provider ID associated with the admin user. | | coupon_profiles.*.updator | Object | Object that contains data pertaining to the admin user that last updated the coupon profile. | | coupon_profiles.*.updator.department_id | Integer | Department ID associated with the admin user. | | coupon_profiles.*.updator.timezone | String | The admin user timezone. | | coupon_profiles.*.updator.id | Integer | The admin user ID. | | coupon_profiles.*.updator.is_active | Integer Flag | The admin user active status. | | coupon_profiles.*.updator.name | String | The admin user name. | | coupon_profiles.*.updator.email | String | The admin user email. | | coupon_profiles.*.updator.call_center_provider_id | Integer | The call center provider ID associated with the admin user. | | coupon_profiles.*.products | Array | Array of coupon profile product objects. | | coupon_profiles.*.products.*.id | Integer | The product ID. | | coupon_profiles.*.products.*.coupon_id | Integer | The coupon product ID. | | coupon_profiles.*.products.*.product_id | Integer | The product ID. | | coupon_profiles.*.products.*.variant_id | Integer | The product variant ID. | | fraud_profiles | Integer[] | Array of fraud profile IDs. | here

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

  • campaign_id (String)

    Required parameter: TODO: type description

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
# File 'lib/sticky_io_restful_api_v2025731/controllers/campaigns_controller.rb', line 1126

def get_campaign(domain,
                 v2_ext,
                 campaign_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}campaigns/{campaign_id}',
                                 Server::SERVER_1)
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(campaign_id, key: 'campaign_id')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetCampaign.method(:from_hash))
                .is_api_response(true))
    .execute
end

#get_campaigns(domain, v2_ext) ⇒ ApiResponse

Fetch a list of campaign objects. **Response Data**\ Response parameters expected in each campaign object contained within the ‘data` field array: | Field | Data Type | Description

|

| ————————————— | ———— | ————————————– | | c_id | Integer | The campaign ID.

|

| gateway_id | Integer | The primary gateway ID attached to the campaign. | | is_active | Integer Flag | The campaign active status. | | tax_provider_id | Integer | The tax provider ID attached to the campaign. | | data_verification_provider_id | Integer | The data verification provider ID attached to the campaign. | | site_url | String | The campaign site URL.

|

| id | Integer | The campaign ID.

|

| is_archived | Integer Flag | The campaign archive status. | | is_prepaid_blocked | Integer Flag | Flag that determines whether or not prepaid blocking is enabled. | | is_custom_price_allowed | Integer Flag | Flag that determines whether or not the campaign supports custom pricing. | | is_avs_enabled | Integer Flag | The campaign AVS status. | | is_collections_enabled | Integer Flag | Flag that determines whether or not collection providers are enabled. | | created_at | Object | Object that contains data pertaining to the campaign’s creation. | | created_at.date | String | The campaign creation timstamp. | | created_at.timezone_type | String | The campaign timezone type ID. | | created_at.timezone | String | The campaign creation timestamp timezone. | | updated_at | Object | Object that contains data pertaining to the campaign’s last update timestamp. | | updated_at.date | String | The campaign last updated timstamp. | | updated_at.timezone_type | String | The campaign timezone type ID. | | updated_at.timezone | String | The campaign last update timestamp timezone. | | archived_at | Object | Object that contains data pertaining to the campaign’s archive timestamp. | | archived_at.date | String | The campaign archive timstamp. | | archived_at.timezone_type | String | The campaign archive timezone type ID. | | archived_at.timezone | String | The campaign archive timestamp timezone. | | name | String | The campaign name. | | description | String | The campaign description. | | pre_auth_amount | Float | The gateway preauth amount (If Void Preauth is supported on the campaign gateway). | | creator | Object | Object that contains data pertaining to the admin user that created the campaign. | | creator.department_id | Integer | Department ID associated with the admin user. | | creator.timezone | String | The admin user timezone. | | creator.id | Integer | The admin user ID. | | creator.is_active | Integer Flag | The admin user active status. | | creator.name | String | The admin user name. | | creator.email | String | The admin user email. | | creator.call_center_provider_id | Integer | The call center provider ID associated with the admin user. | | updator | Object | Object that contains data pertaining to the admin user that last updated the campaign. | | updator.department_id | Integer | Department ID associated with the admin user. | | updator.timezone | String | The admin user timezone. | | updator.id | Integer | The admin user ID. | | updator.is_active | Integer Flag | The admin user active status. | | updator.name | String | The admin user name. | | updator.email | String | The admin user email. | | updator.call_center_provider_id | Integer | The call center provider ID associated with the admin user. | | countries | Array | Array of country objects associated with the campaign. | | countries.*.iso_numeric | Integer | The numeric ISO country code. | | countries.*.calling_code | Integer | The country country code. | | countries.*.id | Integer | The country ID. | | countries.*.name | String | The full country name. | | countries.*.iso_2 | String | The abbreviated ISO2 country name. | | countries.*.iso_3 | String | The abbreviated ISO3 country name. | | fulfillment_id | Integer | The the fulfillment provider ID associated with the campaign. | | check_provider_id | Integer | The the check provider ID associated with the campaign. | | membership_provider_id | Integer | The the membership provider ID associated with the campaign. | | call_confirm_provider_id | Integer | The the call confirm provider ID associated with the campaign. | | chargeback_provider_id | Integer | The the chargeback provider ID associated with the campaign. | | prospect_provider_id | Integer | The the prospect provider ID associated with the campaign. | | email_provider_id | Integer | The the email (autoresponder) provider ID associated with the campaign. | | offers | Array | An array of offer objects associated with the campaign. | | offers.*.id | Integer | The offer ID. | | offers.*.name | String | The offer name. | | offers.*.cycle_type_id | Integer | The offer cycle type ID (self or custom recurring). | | offers.*.terminating_product_id | Integer | The last cycle product ID (When the offer has expiring cycles). | | offers.*.expire_cycles | Integer | The number of cycles in the offer until it expires. | | offers.*.is_seasonal | Integer Flag | Flag that determines whether or not the offer is seasonal. | | offers.*.is_immutable | Integer Flag | Flag that determines whether or not the offer is immutable. | | offers.*.type_id | Integer | The offer type ID. | | offers.*.created_at | Object | Object that contains data pertaining to when the offer was created. | | offers.*.created_at.date | String | The offer creation timestamp. | | offers.*.created_at.timezone_type | Integer | The offer creation timezone type. | | offers.*.created_at.timezone | String | The offer creation timezone. | | offers.*.updated_at | Object | Object that contains data pertaining to when the offer was last updated. | | offers.*.updated_at.date | String | The offer last updated timestamp. | | offers.*.updated_at.timezone_type | Integer | The offer last updated timezone type. | | offers.*.updated_at.timezone | String | The offer last updated timezone. | | offers.*is_archived | Integer Flag | The offer last archive status. | | offers.*.products | Array | An array of product objects associated with the offer. | | offers.*.products.*.is_trial_allowed | Integer Flag | Flag that determines whether or not the product can be sold as a trial on the offer. | | offers.*.products.*.id | Integer | The product ID. | | offers.*.products.*.name | String | The product name. | | offers.*.products.*.is_bundle | Integer Flag | Flag that determines whether or not the product is a bundle. | | offers.*.products.*.is_custom_bundle | Integer Flag | Flag that determines whether or not the product is a custom bundle. | | offers.*.billing_models | Array | An array of billing model objects associated with the offer. | | offers.*.billing_models.*.id | Integer | The billing model ID. | | offers.*.billing_models.*.name | String | The billing model name. | | offers.*.billing_models.*.created_at | Object | Object that contains data pertaining to when the billing model was created. | | offers.*.billing_models.*.created_at.date | String | The billing model creation timestamp. | | offers.*.billing_models.*.created_at.timezone_type | Integer | The billing model creation timezone type. | | offers.*.billing_models.*.created_at.timezone | String | The billing model creation timezone. | | offers.*.billing_models.*.updated_at | Object | Object that contains data pertaining to when the billing model was last updated. | | offers.*.billing_models.*.updated_at.date | String | The billing model last updated timestamp. | | offers.*.billing_models.*.updated_at.timezone_type | Integer | The billing model last updated timezone type. | | offers.*.billing_models.*.updated_at.timezone | String | The billing model last updated timezone. | | offers.*.billing_models.*.is_archived | Integer Flag | Flag that determines whether or not the billing model is archived. | | offers.*.billing_models.*.is_preserve_quantity | Integer Flag | Flag that determines whether or not quantity will be preserved when chosen. | | offers.*.billing_models.*.is_default | Integer Flag | Flag that determines whether or not this billing model will be chosen when no billing model is provided for an order. | | offers.*.billing_models.*.description | String | The billing model description. | | offers.*.billing_models.*.type | Object | An object that contains data pertaining to the billing model type. | | offers.*.billing_models.*.type.id | Integer | The billing model type ID. | | offers.*.billing_models.*.type.name | String | The billing model type name. | | offers.*.billing_models.*.frequency_type_id | Integer | The billing model type ID. | | offers.*.billing_models.*.discount | Object | Object that contains data pertaining to the billing model discount associated with the offer. | | offers.*.billing_models.*.discount.percent | Float | The billing model discount percentage. | | offers.*.billing_models.*.discount.amount | Float | The billing model discount amount. | | offers.*.is_prepaid | Integer Flag | Flag that determines whether or not the offer has a prepaid configuration. | | offers.*.is_series | Integer Flag | Flag that determines whether or not the offer is of the series type. | | offers.*.type | Object | An object that contains data pertaining to offer type. | | offers.*.type.id | Integer | The offer type ID. | | offers.*.type.name | String | The offer type name. | | offers.*.type.active | Integer Flag | Flag that determines whether or not the offer type is active. | | offers.*.cycle_type | Object | Object that contains data pertaining to the offer cycle type. | | offers.*.cycle_type.id | Integer | The offer cycle type ID. | | offers.*.cycle_type.name | String | The offer cycle type name. | | offers.*.terminating_cycle_type | Object | Object that contains data pertaining to the offer last cycle type (If the offer has expiring cycles). | | offers.*.terminating_cycle_type.id | Integer | The offer last cycle type ID. | | offers.*.terminating_cycle_type.name | String | The offer last cycle type name. | | offers.*.terminating_cycle_type.description | String | The offer last cycle type description. | | offers.*.prepaid_profile | Object | An object that contains data pertaining to the offer’s prepaid configuration. | | offers.*.prepaid_profile.is_subscription | Integer Flag | Flag that determines whether or not associated subscriptions will restart once prepaid cycles are complete. | | offers.*.prepaid_profile.is_convert_to_standard | Integer Flag | Flag that determines whether or not associated subscriptions will take a standard offer configuration once prepaid cycles are complete. | | offers.*.prepaid_profile.is_cancel_immediate | Integer Flag | Flag that determines whether or not associated subscriptions will be put on hold once prepaid cycles are complete. | | offers.*.prepaid_profile.is_refund_allowed | Integer Flag | Flag that determines whether or not refunds are permitted on associated subscriptions before prepaid cycles are complete. | | offers.*.prepaid_profile.is_initial_shipping_on_restart | Integer Flag | Flag that determines whether or not the system will charge initial shipping price on the renewal of associated subscriptions. | | offers.*.prepaid_profile.is_prepaid_shipping | Integer Flag | Flag that determines whether or not the system will charge shipping amount as a prepaid amount (base shipping cost X number of cycles). | | offers.*.prepaid_profile.is_prepaid_notification_enabled | Integer Flag | Flag that determines whether or not order notification will be sent on $0 prepaid cycles. | | offers.*.prepaid_profile.terms | Array | An array of prepaid terms. | | offers.*.prepaid_profile.terms.*.cycles | Integer | Number of prepaid cycles. | | offers.*.prepaid_profile.terms.*.discount_value | Float | The prepaid term discount amount. | | offers.*.prepaid_profile.terms.*.discount_type | Object | An object that contains data pertaining to the prepaid term’s discount type. | | offers.*.prepaid_profile.terms.*.discount_type.id | Integer | The prepaid term discount type ID. | | offers.*.prepaid_profile.terms.*.discount_type.name | String | The prepaid term discount type name. | | offers.*.trial | Object

| An object that contains data pertaining to the offer's trial

configuration (DEPRECATED, use trial_workflows instead). | | offers.*.trial.is_custom_duration | Boolean

| A boolean value that determines whether or not the trial has a custom

duration (in days). | | offers.*.trial.days | Integer

| The trial duration, in days (If there is no custom duration, billing

model will be inherited to determine the next recurring date). | | offers.*.trial.is_custom_price | Integer Flag | Flag that determines whether or not the trial configuration has a custom price. | | offers.*.trial.price | Float

| The custom trial price. |

| offers.*.trial.is_delayed_billing | Integer Flag | Flag that determines whether or not the trial configuration has an associated delayed billing configuration. | | offers.*.trial.delayed_billing | Object

| An object that contains data pertaining to the offer's delayed billing

trial configuration. | | offers.*.trial.delayed_billing.is_delayed_email_suppressed | Integer Flag | Flag that determines whether or not the system will send an order confirmation email during the trial delay billing step. | | offers.*.trial.delayed_billing.is_custom_price | Integer Flag | Flag that determines whether or not the delayed trial configuration has a custom price. | | offers.*.trial.delayed_billing.price | Float

| The delayed billing charge amount (If not provided, the product price

will be inherited as the charge amount). | | offers.*.trial.delayed_billing.days | Integer

| The delayed billing duration, in days. This value must be less than

the trial duration, if provided. | | offers.*.trial.delayed_billing.default_days | Integer

| The default delayed billing duration, in days. |

| offers.*.trial_workflows | Array | An array of trial workflow objects associated with the offer. | | offers.*.trial_workflows.*.id | Integer | The trial workflow ID. | | offers.*.trial_workflows.*.name | String | The trial workflow name. | | offers.*.trial_workflows.*.is_active | Integer Flag | Flag that determines whether or not the trial workflow is active. | | offers.*.trial_workflows.*.is_deleted | Integer Flag | Flag that determines whether or not the trial workflow is deleted. | | offers.*.trial_workflows.*.created_by | Integer | The admin user ID that created the trial workflow. | | offers.*.trial_workflows.*.updated_by | Integer | The admin user ID that last updated the trial workflow. | | offers.*.trial_workflows.*.created_at | String | The trial workflow creation timestamp. | | offers.*.trial_workflows.*.updated_at | String | The trial workflow last update timestamp. | | offers.*.cycle_products | Array | An array of cycle product objects. | | offers.*.cycle_products.*.cycle_depth | Integer | The cycle position. | | offers.*.cycle_products.*.name | String | The cycle product name. | | offers.*.cycle_products.*.product_id | Integer | The cycle product ID. | | offers.*.cycle_products.*.price | Float | The cycle product price. | | offers.*.cycle_products.*.sku | String | The cycle product SKU identifier. | | offers.*.cycle_products.*.qty | Integer | The cycle product max quantity. | | offers.*.seasonal_products | Array | An array of seasonal cycle product objects. | | offers.*.seasonal_products.*.position | Integer | The cycle position. | | offers.*.seasonal_products.*.name | String | The cycle product name. | | offers.*.seasonal_products.*.product_id | Integer | The cycle product ID. | | offers.*.seasonal_products.*.price | Float | The cycle product price. | | offers.*.seasonal_products.*.sku | String | The cycle product SKU identifier. | | offers.*.seasonal_products.*.qty | Integer | The cycle product max quantity. | | offers.*.is_trial | Integer Flag | Flag that determines whether or not the offer has a trial configuration. | | offers.*.terminating_product_name | String | The last cycle product name (If the offer has expiring cycles). | | offers.*.terminating_cycle_product | Object | An object that contains data pertaining to the offer’s last cycle product (If the offer has expiring cycles). | | offers.*.terminating_cycle_product.is_trial_product | Integer Flag | Flag that determines whether or not the product can be sold as a trial. | | offers.*.terminating_cycle_product.is_shippable | Integer Flag | Flag that determines whether or not the product is shippable. | | offers.*.terminating_cycle_product.tax_code | String | The product’s shipping tax code. | | offers.*.terminating_cycle_product.is_licensed | Integer Flag | Flag that determines whether or not the product is a license product. | | offers.*.terminating_cycle_product.id | Integer | The product ID. | | offers.*.terminating_cycle_product.name | String | The product name. | | offers.*.terminating_cycle_product.description | String | The product description. | | offers.*.terminating_cycle_product.sku | String | The product SKU identifier. | | offers.*.terminating_cycle_product.price | Float | The product base price. | | offers.*.terminating_cycle_product.weight | Float | The product weight (in oz). | | offers.*.terminating_cycle_product.declared_value | Float | The product declared value. | | offers.*.terminating_cycle_product.restocking_fee | Float | The product restocking fee. | | offers.*.terminating_cycle_product.cost_of_goods | Float | The product cost of goods sold. | | offers.*.terminating_cycle_product.max_quantity | Integer | The maximum quantity allowed per order of this product. | | offers.*.terminating_cycle_product.created_at | Object | Object that contains data pertaining to when the product was created. | | offers.*.terminating_cycle_product.created_at.date | String | The product creation timestamp. | | offers.*.terminating_cycle_product.created_at.timezone_type | Integer | The product creation timezone type. | | offers.*.terminating_cycle_product.created_at.timezone | String | The product creation timezone. | | offers.*.terminating_cycle_product.updated_at | Object | Object that contains data pertaining to when the product was last updated. | | offers.*.terminating_cycle_product.updated_at.date | String | The product last updated timestamp. | | offers.*.terminating_cycle_product.updated_at.timezone_type | Integer | The product last updated timezone type. | | offers.*.terminating_cycle_product.updated_at.timezone | String | The product last updated timezone. | | offers.*.terminating_cycle_product.custom_fields | Array | An array of custom field configuration objects. | | offers.*.terminating_cycle_product.custom_fields.*.id | Integer | The custom field ID. | | offers.*.terminating_cycle_product.custom_fields.*.field_type_id | Integer | The custom field type ID. | | offers.*.terminating_cycle_product.custom_fields.*.name | String | The custom field name. | | offers.*.terminating_cycle_product.custom_fields.*.token_key | String | The custom field snake-cased name. | | offers.*.terminating_cycle_product.custom_fields.*.is_multi | Integer Flag | Flag that determines whether or not the custom field accepts multiple values. | | offers.*.terminating_cycle_product.custom_fields.*.type_id | Integer | The custom field value type ID. | | offers.*.terminating_cycle_product.custom_fields.*.values | Array | An array of custom field value objects. | | offers.*.terminating_cycle_product.custom_fields.*.values.*.option_id | Integer | The custom field option ID (It will be set to 0 for non-multi custom fields). | | offers.*.terminating_cycle_product.custom_fields.*.values.*.value | String | The custom field value. | | offers.*.terminating_cycle_product.custom_fields.*.values.*.name | String | The custom field value field name. | | offers.*.terminating_cycle_product.vertical | Array | An array of vertical objects. | | offers.*.terminating_cycle_product.vertical.*.id | Integer | The vertical ID. | | offers.*.terminating_cycle_product.vertical.*.name | String | The vertical name. | | offers.*.terminating_cycle_product.category_id | Integer | The product category name. | | offers.*.terminating_cycle_product.category | Object | An object that contains data pertaining to the offer’s last cycle product category. | | offers.*.terminating_cycle_product.category.id | Integer | The category ID. | | offers.*.terminating_cycle_product.category.name | String | The category name. | | offers.*.terminating_cycle_product.category.description | String | The category description. | | offers.*.terminating_cycle_product.is_bundle | Integer Flag | Flag that determines whether or not the product is a bundle. | | offers.*.terminating_cycle_product.is_custom_bundle | Integer Flag | Flag that determines whether or not the product is a custom bundle. | | offers.*.terminating_cycle_product.is_variant_enabled | Integer Flag | Flag that determines whether or not the product has one or more variants. | | channel | Object | Object that contains data pertaining to the campaign’s channel. | | channel.id | Integer | The channel ID. | | channel.name | String | The channel name. | | payment_methods | Array | An array of payment method objects. | | payment_methods.*.label | String | The payment method display name. | | payment_methods.*.value | String | The payment method internal name (Use this for API new order calls). | | gateway | Object | Object that contains data pertaining to the campaign’s payment gateway. | | gateway.account_id | Integer | The gateway account ID. | | gateway.id | Integer | The gateway profile ID. | | gateway.alias | String | The gateway proofile alias. | | gateway.account_name | String | The gateway account name. | | gateway.currency | Object | Object that contains data pertaining to the gateway currency. | | gateway.currency.title | String | The currency title. | | gateway.currency.code | String | The currency code. | | gateway.currency.symbol_left | String | The currency symbol. | | gateway.currency.id | Integer | The currency ID. | | gateway.fields | Object | Object that contains data pertaining to the gateway fields. | | gateway.fields.global_fields | Object | Object that contains data pertaining to the global gateway fields. | | gateway.fields.global_fields.global_monthly_cap | Float | The gateway profile global monthly cap. | | gateway.fields.global_fields.customer_service_number | String | The gateway profile customer service number. | | gateway.fields.global_fields.descriptor | String | The gateway profile descriptor. | | gateway.fields.global_fields.merchant_id | String | The gateway profile customer service email. | | gateway.fields.global_fields.customer_service_email | String | The gateway profile customer service from email. | | gateway.fields.global_fields.customer_service_email_from | String | The gateway profile customer service email. | | gateway.fields.global_fields.mid_group | String | The gateway profile MID group. | | gateway.fields.global_fields.vertical | Object | Object that contains data pertaining to the gateway profile vertical. | | gateway.fields.global_fields.vertical.id | Integer | The gateway vertical ID. | | gateway.fields.global_fields.vertical.option | String | The gateway vertical option name. | | gateway.fields.global_fields.processor | Object | Object that contains data pertaining to the gateway profile processor. | | gateway.fields.global_fields.processor.id | Integer | The gateway profile processor ID. | | gateway.fields.global_fields.processor.option | String | The gateway processor option name. | | gateway.fields.global_fields.url | String | The merchant gateway website URL. | | gateway.fields.global_fields.cancellation_url | String | The merchant gateway cancellation URL. | | gateway.fields.global_fields.cvv | Object | Object that contains data pertaining to gateway profile CVV configuration. | | gateway.fields.global_fields.cvv.id | Integer | The CVV option ID. | | gateway.fields.global_fields.cvv.option | String | The CVV option name. | | gateway.fields.global_fields.transaction_fee | Float | The gateway profile transaction fee. | | gateway.fields.global_fields.chargeback_fee | Float | The gateway profile chargeback fee. | | gateway.fields.global_fields.reserve_percent | Float | The gateway profile reserve percentage. | | gateway.fields.global_fields.reserve_term | Object | Object that contains data pertaining to the gateway profile reserve term. | | gateway.fields.global_fields.reserve_term.id | Integer | The reserve term ID. | | gateway.fields.global_fields.reserve_term.option | String | the reserve term option name. | | gateway.fields.global_fields.reserve_term_days | Integer | The gateway profile reserve term, in days. | | gateway.fields.global_fields.reserve_cap | Float | The gateway profile reserve cap amount. | | gateway.fields.account_fields | Object | Object that contains data pertaining to the account-specific gateway fields. The fields contained withing will change depending upon the gateway account selected. | | gateway.fields.fee_fields | Object | Object that contains data pertaining to merchant fee gateway fields. | | gateway.fields.fee_fields.monthly_fee | Float | The gateway profile monthly fee. | | gateway.fields.fee_fields.batch_fee | Float | The gateway profile batch fee. | | gateway.fields.fee_fields.visa | Float | The gateway profile Visa fee. | | gateway.fields.fee_fields.mastercard | Float | The gateway profile Mastercard fee. | | gateway.fields.fee_fields.discover | Float | The gateway profile Discover fee. | | gateway.fields.fee_fields.american_express | Float | The gateway profile American Express fee. | | gateway.fields.fee_fields.other | Float | The gateway profile Miscellaneous fee. | | gateway.fields.fee_fields.refund_processing_fee | Float | The gateway profile refund processing fee. | | alternative_payments | Array | Array of alternative payment field objects. | | alternative_payments.*.provider | Object | Object that contains data pertaining to the alternative payment provider profile. | | alternative_payments.*.provider.account_id | Integer | The gateway account ID. | | alternative_payments.*.provider.id | Integer | The gateway profile ID. | | alternative_payments.*.provider.alias | String | The gateway proofile alias. | | alternative_payments.*.provider.account_name | String | The gateway account name. | | alternative_payments.*.provider.currency | Object | Object that contains data pertaining to the gateway currency. | | alternative_payments.*.provider.currency.title | String | The currency title. | | alternative_payments.*.provider.currency.code | String | The currency code. | | alternative_payments.*.provider.currency.symbol_left | String | The currency symbol. | | alternative_payments.*.provider.currency.id | Integer | The currency ID. | | alternative_payments.*.provider.fields | Object | Object that contains data pertaining to the gateway fields. | | alternative_payments.*.provider.fields.global_fields

| Object  | Object that contains data pertaining to the global

gateway fields. | | alternative_payments.*.provider.fields.global_fields.global_monthly_cap

| Float   | The gateway profile global monthly cap. |

| alternative_payments.*.provider.fields.global_fields.customer_service_num ber | String | The gateway profile customer service number. | | alternative_payments.*.provider.fields.global_fields.descriptor

| String  | The gateway profile descriptor. |

| alternative_payments.*.provider.fields.global_fields.merchant_id

| String  | The gateway profile customer service email. |

| alternative_payments.*.provider.fields.global_fields.customer_service_ema il | String | The gateway profile customer service from email. | | alternative_payments.*.provider.fields.global_fields.customer_service_ema il_from | String | The gateway profile customer service email. | | alternative_payments.*.provider.fields.global_fields.mid_group

| String  | The gateway profile MID group. |

| alternative_payments.*.provider.fields.global_fields.vertical

| Object  | Object that contains data pertaining to the gateway

profile vertical. | | alternative_payments.*.provider.fields.global_fields.vertical.id

| Integer | The gateway vertical ID. |

| alternative_payments.*.provider.fields.global_fields.vertical.option

| String  | The gateway vertical option name. |

| alternative_payments.*.provider.fields.global_fields.processor

| Object  | Object that contains data pertaining to the gateway

profile processor. | | alternative_payments.*.provider.fields.global_fields.processor.id

| Integer | The gateway profile processor ID. |

| alternative_payments.*.provider.fields.global_fields.processor.option

| String  | The gateway processor option name. |

| alternative_payments.*.provider.fields.global_fields.url

| String  | The merchant gateway website URL. |

| alternative_payments.*.provider.fields.global_fields.cancellation_url

| String  | The merchant gateway cancellation URL. |

| alternative_payments.*.provider.fields.global_fields.cvv

| Object  | Object that contains data pertaining to gateway

profile CVV configuration. | | alternative_payments.*.provider.fields.global_fields.cvv.id

| Integer | The CVV option ID. |

| alternative_payments.*.provider.fields.global_fields.cvv.option

| String  | The CVV option name. |

| alternative_payments.*.provider.fields.global_fields.transaction_fee

| Float   | The gateway profile transaction fee. |

| alternative_payments.*.provider.fields.global_fields.chargeback_fee

| Float   | The gateway profile chargeback fee. |

| alternative_payments.*.provider.fields.global_fields.reserve_percent

| Float   | The gateway profile reserve percentage. |

| alternative_payments.*.provider.fields.global_fields.reserve_term

| Object  | Object that contains data pertaining to the gateway

profile reserve term. | | alternative_payments.*.provider.fields.global_fields.reserve_term.id

| Integer | The reserve term ID. |

| alternative_payments.*.provider.fields.global_fields.reserve_term.option

| String  | the reserve term option name. |

| alternative_payments.*.provider.fields.global_fields.reserve_term_days

| Integer | The gateway profile reserve term, in days. |

| alternative_payments.*.provider.fields.global_fields.reserve_cap

| Float   | The gateway profile reserve cap amount. |

| alternative_payments.*.provider.fields.account_fields

| Object  | Object that contains data pertaining to the

account-specific gateway fields. The fields contained withing will change depending upon the gateway account selected. | | alternative_payments.*.provider.fields.fee_fields | Object | Object that contains data pertaining to merchant fee gateway fields. | | alternative_payments.*.provider.fields.fee_fields.monthly_fee | Float | The gateway profile monthly fee. | | alternative_payments.*.provider.fields.fee_fields.batch_fee | Float | The gateway profile batch fee. | | alternative_payments.*.provider.fields.fee_fields.visa | Float | The gateway profile Visa fee. | | alternative_payments.*.provider.fields.fee_fields.mastercard | Float | The gateway profile Mastercard fee. | | alternative_payments.*.provider.fields.fee_fields.discover | Float | The gateway profile Discover fee. | | alternative_payments.*.provider.fields.fee_fields.american_express | Float | The gateway profile American Express fee. | | alternative_payments.*.provider.fields.fee_fields.other | Float | The gateway profile Miscellaneous fee. | | alternative_payments.*.provider.fields.fee_fields.refund_processing_fee | Float | The gateway profile refund processing fee. | | alternative_payments.payment_method | String | The gateway profile payment method name. | | shipping_profiles | Array | Array of shipping method profile objects. | | shipping_profiles.*.freight_code | String | The shipping method freight code. | | shipping_profiles.*.threshold_amount | Float | The shipping method threshold amount. | | shipping_profiles.*.threshold_charge_amount | Float | The shipping method threshold charge amount. This will be the shipping price when the order total reaches the threshold_amount. | | shipping_profiles.*.id | Integer | The shipping method id. | | shipping_profiles.*.name | String | The shipping method name. | | shipping_profiles.*.description | String | The shipping method description. | | shipping_profiles.*.amount_trial | Float | The shipping method initial order amount. | | shipping_profiles.*.amount_recurring | Float | The shipping method rebill order amount. | | shipping_profiles.*.type | Object | Object that contains data pertaining to the shipping method type. | | shipping_profiles.*.type.id | Integer | The shipping method type ID. | | shipping_profiles.*.type.name | String | The shipping method type name. | | shipping_profiles.*.type.code | String | The shipping method type code. | | shipping_profiles.*.type.created_at | Object | Object that contains data pertaining to when the shipping method type was created. | | shipping_profiles.*.type.created_at.date | String | The shipping method type creation timestamp. | | shipping_profiles.*.type.created_at.timezone_type | Integer | The shipping method type creation timezone type. | | shipping_profiles.*.type.created_at.timezone | String | The shipping method type creation timezone. | | shipping_profiles.*.type.updated_at | Object | Object that contains data pertaining to when the shipping method type was last updated. | | shipping_profiles.*.type.updated_at.date | String | The shipping method type last updated timestamp. | | shipping_profiles.*.type.updated_at.timezone_type | Integer | The shipping method type last updated timezone type. | | shipping_profiles.*.type.updated_at.timezone | String | The shipping method type last updated timezone. | | shipping_profiles.*.service_code | String | The shipping method service code. | | shipping_profiles.*.created_at | Object | Object that contains data pertaining to when the shipping method was created. | | shipping_profiles.*.created_at.date | String | The shipping method creation timestamp. | | shipping_profiles.*.created_at.timezone_type | Integer | The shipping method creation timezone type. | | shipping_profiles.*.created_at.timezone | String | The shipping method creation timezone. | | shipping_profiles.*.updated_at | Object | Object that contains data pertaining to when the shipping method was last updated. | | shipping_profiles.*.updated_at.date | String | The shipping method last updated timestamp. | | shipping_profiles.*.updated_at.timezone_type | Integer | The shipping method last updated timezone type. | | shipping_profiles.*.updated_at.timezone | String | The shipping method last updated timezone. | | return_profiles | Array | Array of return profile objects. | | return_profiles.*.id | Integer | The return profile ID. | | return_profiles.*.name | String | The return profile name. | | return_profiles.*.description | String | The return profile description. | | return_profiles.*.action_id | Integer | The return profile action ID. | | return_profiles.*.expired_action_id | Integer | The return profile expired action ID. | | return_profiles.*.rma_required_flag | Integer Flag | Flag that determines whether or not the return profile requires an RMA to be processed. | | return_profiles.*.expires | Integer | The return profile expiration, in days. | | return_profiles.*.policy_expires | Integer | The return profile policy expiration, in days. | | return_profiles.*.chargeback_flag | Integer Flag | Flag that determines whether or not the platform will prevent refunds on chargeback orders using the return profile. | | return_profiles.*.trial_flag | Integer Flag | Flag that determines whether or not the platform will abide by the return rules during rebill depth 0 and 1. | | return_profiles.*.active | Integer Flag | Flag that determines whether or not the return profile is active. | | return_profiles.*.deleted | Integer Flag | Flag that determines whether or not the return profile is deleted. | | return_profiles.*.date_in | String | The return profile creation timestamp. | | return_profiles.*.update_in | String | The shipping method last updated timestamp. | | return_profiles.*.created_id | Integer | The admin user ID that created the return profile. | | return_profiles.*.updated_id | Integer | The admin user ID that last updated the return profile. | | postback_profiles | Array | Array of postback profile objects. | | postback_profiles.*.id | Integer | The postback profile ID. | | postback_profiles.*.name | String | The postback profile name. | | postback_profiles.*.type_id | Integer | The postback profile type ID. | | postback_profiles.*.url | String | The postback tokenized URL. | | postback_profiles.*.is_active | Integer Flag | Flag that determines whether or not the postback profile is active. | | postback_profiles.*.is_global | Integer Flag | Flag that determines whether or not the postback profile is global (Will execute for all campaigns). | | postback_profiles.*.created_at | String | The postback profile creation timestamp. | | postback_profiles.*.updated_at | String | The postback profile last updated timestamp. | | postback_profiles.*.http_method | String | The postback profile HTTP method name. | | postback_profiles.*.type | String | The postback profile type name. | | postback_profiles.*.headers | Array | Array of HTTP header objects. | | postback_profiles.*.headers.*.id | Integer | The postback profile header ID. | | postback_profiles.*.headers.*.postback_id | Integer | The postback profile ID. | | postback_profiles.*.headers.*.key | String | The postback profile header field name. | | postback_profiles.*.headers.*.value | String | The postback profile header field value. | | postback_profiles.*.headers.*.created_by | Integer | The admin user ID that created the header. | | postback_profiles.*.headers.*.updated_by | Integer | The admin user ID that last updated the header. | | postback_profiles.*.headers.*.created_at | String | The postback profile type name. | | postback_profiles.*.headers.*.updated_at | String | The postback profile type name. | | postback_profiles.*.headers.*.deleted_at | String | The postback profile type name. | | postback_profiles.*.campaigns | Integer[] | Array of campaign IDs. | | postback_profiles.*.triggers | Object | Object containing arrays of action IDs, indexed by trigger ID (i.e. ‘[23]`). | | postback_profiles.*.trigger_type_id | Integer | The trigger type ID. | | postback_profiles.*.creator | Object | Object that contains data pertaining to the admin user that created the postback profile. | | postback_profiles.*.creator.department_id | Integer | Department ID associated with the admin user. | | postback_profiles.*.creator.timezone | String | The admin user timezone. | | postback_profiles.*.creator.id | Integer | The admin user ID. | | postback_profiles.*.creator.is_active | Integer Flag | The admin user active status. | | postback_profiles.*.creator.name | String | The admin user name. | | postback_profiles.*.creator.email | String | The admin user email. | | postback_profiles.*.creator.call_center_provider_id | Integer | The call center provider ID associated with the admin user. | | postback_profiles.*.updator | Object | Object that contains data pertaining to the admin user that last updated the postback profile. | | postback_profiles.*.updator.department_id | Integer | Department ID associated with the admin user. | | postback_profiles.*.updator.timezone | String | The admin user timezone. | | postback_profiles.*.updator.id | Integer | The admin user ID. | | postback_profiles.*.updator.is_active | Integer Flag | The admin user active status. | | postback_profiles.*.updator.name | String | The admin user name. | | postback_profiles.*.updator.email | String | The admin user email. | | postback_profiles.*.updator.call_center_provider_id | Integer | The call center provider ID associated with the admin user. | | coupon_profiles | Array | Array of coupon profile objects. | | coupon_profiles.*.id | Integer | The coupon profile ID. | | coupon_profiles.*.type_id | Integer | The coupon profile type ID. | | coupon_profiles.*.name | String | The coupon profile name. | | coupon_profiles.*.description | String | The coupon profile description. | | coupon_profiles.*.use_count | Integer | The amount of total usages allowed for this coupon profile. | | coupon_profiles.*.discount_amt | Float | The coupon discount amount. | | coupon_profiles.*.discount_pct | Float | The coupon discount percentage. | | coupon_profiles.*.minimum_purchase | Float | The coupon minimum purchase amount. | | coupon_profiles.*.is_lifetime | Integer Flag | Flag that determines whether or not the coupon profile promo codes are lifetime coupons. | | coupon_profiles.*.product_id | Integer | The product ID (DEPRECATED). | | coupon_profiles.*.variant_id | Integer | The variant ID (DEPRECATED). | | coupon_profiles.*.min_qty | Integer | The minimum quantity required to use a promo code from the coupon profile. | | coupon_profiles.*.max_qty | Integer | The maximum quantity allowed when using a promo code from the coupon profile. | | coupon_profiles.*.is_bogo | Integer Flag | Flag that determines whether or not the coupon profile promo codes are buy one get one free (BOGO). | | coupon_profiles.*.discount_amount | Float | The coupon discount amount. | | coupon_profiles.*.discount_percent | Float | The coupon discount percentage. | | coupon_profiles.*.minimum_quantity | Integer | The minimum quantity required to use a promo code from the coupon profile. | | coupon_profiles.*.maximum_quantity | Integer | The maximum quantity allowed when using a promo code from the coupon profile. | | coupon_profiles.*.is_active | Integer Flag | Flag that determines whether or not the coupon profile is active. | | coupon_profiles.*.created_at | Object | Object that contains data pertaining to when the coupon profile was created. | | coupon_profiles.*.created_at.date | String | The coupon profile creation timestamp. | | coupon_profiles.*.created_at.timezone_type | Integer | The coupon profile creation timezone type. | | coupon_profiles.*.created_at.timezone | String | The coupon profile creation timezone. | | coupon_profiles.*.updated_at | Object | Object that contains data pertaining to when the coupon profile was last updated. | | coupon_profiles.*.updated_at.date | String | The coupon profile last updated timestamp. | | coupon_profiles.*.updated_at.timezone_type | Integer | The coupon profile last updated timezone type. | | coupon_profiles.*.updated_at.timezone | String | The coupon profile last updated timezone. | | coupon_profiles.*.expires_at | Object | Object that contains data pertaining to when the coupon profile was last updated. | | coupon_profiles.*.expires_at.date | String | The coupon profile last updated timestamp. | | coupon_profiles.*.expires_at.timezone_type | Integer | The coupon profile last updated timezone type. | | coupon_profiles.*.expires_at.timezone | String | The coupon profile last updated timezone. | | coupon_profiles.*.is_free_shipping | Integer Flag | Flag that determines whether or not promo codes from the coupon profile grant free shipping. | | coupon_profiles.*.promo_code_count | Integer | The amount of promo codes associated with the coupon profile. | | coupon_profiles.*.limits | Object | Object that contains data pertaining to coupon profile limits. | | coupon_profiles.*.limits.total | Integer | The total coupon profile usage limit. | | coupon_profiles.*.limits.per_customer | Integer | The coupon profile usage limit per customer. | | coupon_profiles.*.limits.per_code | Integer | The coupon profile usage limit per promo code. | | coupon_profiles.*.limits.per_code_per_customer | Integer | The coupon profile usage limit per code, per customer. | | coupon_profiles.*.creator | String | The admin user email. | | coupon_profiles.*.updator | String | The admin user email. | | coupon_profiles.*.products | String | The admin user email. | | coupon_profiles.*.creator | Object | Object that contains data pertaining to the admin user that created the coupon profile. | | coupon_profiles.*.creator.department_id | Integer | Department ID associated with the admin user. | | coupon_profiles.*.creator.timezone | String | The admin user timezone. | | coupon_profiles.*.creator.id | Integer | The admin user ID. | | coupon_profiles.*.creator.is_active | Integer Flag | The admin user active status. | | coupon_profiles.*.creator.name | String | The admin user name. | | coupon_profiles.*.creator.email | String | The admin user email. | | coupon_profiles.*.creator.call_center_provider_id | Integer | The call center provider ID associated with the admin user. | | coupon_profiles.*.updator | Object | Object that contains data pertaining to the admin user that last updated the coupon profile. | | coupon_profiles.*.updator.department_id | Integer | Department ID associated with the admin user. | | coupon_profiles.*.updator.timezone | String | The admin user timezone. | | coupon_profiles.*.updator.id | Integer | The admin user ID. | | coupon_profiles.*.updator.is_active | Integer Flag | The admin user active status. | | coupon_profiles.*.updator.name | String | The admin user name. | | coupon_profiles.*.updator.email | String | The admin user email. | | coupon_profiles.*.updator.call_center_provider_id | Integer | The call center provider ID associated with the admin user. | | coupon_profiles.*.products | Array | Array of coupon profile product objects. | | coupon_profiles.*.products.*.id | Integer | The product ID. | | coupon_profiles.*.products.*.coupon_id | Integer | The coupon product ID. | | coupon_profiles.*.products.*.product_id | Integer | The product ID. | | coupon_profiles.*.products.*.variant_id | Integer | The product variant ID. | | fraud_profiles | Integer[] | Array of fraud profile IDs. |

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
# File 'lib/sticky_io_restful_api_v2025731/controllers/campaigns_controller.rb', line 2138

def get_campaigns(domain,
                  v2_ext)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}campaigns',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetCampaigns.method(:from_hash))
                .is_api_response(true))
    .execute
end

#restore_campaign(domain, v2_ext, campaign_id) ⇒ ApiResponse

Restore an archived campaign. here

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

  • campaign_id (String)

    Required parameter: TODO: type description

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
# File 'lib/sticky_io_restful_api_v2025731/controllers/campaigns_controller.rb', line 2291

def restore_campaign(domain,
                     v2_ext,
                     campaign_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/.{domain}{v2_ext}campaigns/{campaign_id}/restore',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(campaign_id, key: 'campaign_id')
                                .is_required(true)
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(RestoreCampaign.method(:from_hash))
                .is_api_response(true))
    .execute
end

#update_campaign(body, domain, v2_ext, campaign_id) ⇒ ApiResponse

Update an existing campaign. **Request Data** Request parameters expected during this API call: | Field | Requirement | Default | Data Type (Max Length) | Description | | — | — | — | — | — | | name | Optional | - | String (255) | The campaign name. | | description | Optional | - | String (1000) | The campaign description. | | site_url | Optional | - | String (255) | The campaign site URL. | | is_prepaid_blocked | Optional | 0 | Integer Flag | Flag that determines whether or not prepaid blocking is enabled. | | channel_id | Optional | 0 | Integer | The channel ID associated with the campaign. | | gateway_id | Optional | 0 | Integer | The payment gateway ID associated with the campaign. | | warehouse_id | Optional | 0 | Integer | The warehouse ID associated with the campaign. | | fulfillment_id | Optional | 0 | Integer | The the fulfillment provider ID associated with the campaign. | | check_provider_id | Optional | 0 | Integer | The the check provider ID associated with the campaign. | | membership_provider_id | Optional | 0 | Integer | The the membership provider ID associated with the campaign. | | call_confirm_provider_id | Optional | 0 | Integer | The the call confirm provider ID associated with the campaign. | | chargeback_provider_id | Optional | 0 | Integer | The the chargeback provider ID associated with the campaign. | | prospect_provider_id | Optional | 0 | Integer | The the prospect provider ID associated with the campaign. | | email_provider_id | Optional | 0 | Integer | The the email (autoresponder) provider ID associated with the campaign. | | tax_provider_id | Optional | 0 | Integer | The tax provider ID attached to the campaign. | | account_updater_provider_id | Optional | 0 | Integer | The account updater provider ID attached to the campaign. | | data_verification_provider_id | Optional | 0 | Integer | The data verification provider ID attached to the campaign. | | payment_methods | Conditional | - | Array | An array of payment method names. See ‘Get Payment Methods` for values. Required if no alternative payment methods provided. | | alternative_payments | Conditional | - | Array | An array of alternative payment method objects. | | alternative_payments.*.id | Conditional | - | Integer | The payment gateway profile ID. | | alternative_payments.*.payment_method | Conditional | - | String | The payment method name. See `Get Payment Methods` for values. This name must be compatible with the alternative gateway ID provided. | | offers | Optional | - | Array | An array of offer IDs. Each offer ID must be an active and valid offer in the platform. | | countries | Optional | - | Array | An array of country IDs. | | shipping_profiles | Optional | - | Array | An array of shipping method IDs. | | return_profiles | Optional | - | Array | An array of return profile IDs. | | coupon_profiles | Optional | - | Array | An array of coupon profile IDs. | | postback_profiles | Optional | - | Array | An array of postback profile IDs. | description here here

Parameters:

  • body (UpdateCampaignRequest)

    Required parameter: TODO: type

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

  • campaign_id (String)

    Required parameter: TODO: type description

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
# File 'lib/sticky_io_restful_api_v2025731/controllers/campaigns_controller.rb', line 2225

def update_campaign(body,
                    domain,
                    v2_ext,
                    campaign_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/.{domain}{v2_ext}campaigns/{campaign_id}',
                                 Server::SERVER_1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body)
                            .is_required(true))
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(campaign_id, key: 'campaign_id')
                                .is_required(true)
                                .should_encode(true))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('basic')))
    .response(new_response_handler
                .is_response_void(true)
                .is_api_response(true))
    .execute
end