{"method":"GET","path":"https://api.revcent.com/v2/customer_groups","summary":"Get Customer Groups","description":"Returns a list of customer groups previously created. The page and limit URL parameters are required.","operationId":"GetCustomerGroups","parameters":[{"description":"A limit on the number of objects to be returned. Limit can range between 1 and 25, and the default is 25.","in":"query","name":"limit","required":true,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":25},"style":"form"},{"description":"Used for pagination, i.e. to skip to specific page of results.","in":"query","name":"page","required":true,"schema":{"type":"integer","format":"int32"},"style":"form"}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"API call response code.","type":"integer","format":"int32","enum":[1]},"current_count":{"description":"The current number of items in the results.","type":"integer"},"current_page":{"description":"The current page for the items in the results.","type":"integer"},"results":{"items":{"type":"object","additionalProperties":false,"properties":{"created_date_unix":{"description":"The unix timestamp of when the item was created.","type":"integer","format":"unix-time"},"id":{"type":"string","description":"A 20 character customer group ID.","minLength":20,"maxLength":20},"name":{"description":"The customer group name.","type":"string"},"description":{"description":"The customer group description.","type":"string"},"enabled":{"description":"Whether the customer group is currently enabled.","type":"boolean"},"qualifier_method":{"description":"The method used to qualify customers for the group. Can either be a group based on specific values and filters, based on other customer groups, or none (no qualifiers) for manual insertion and removal.","type":"string","enum":["specific_values","customer_group","none"]},"qualifiers":{"type":"object","description":"The qualifiers used to qualify customers for the group. The qualifiers depend on the qualifier_method for the group. If the qualifier method is 'none', then there are no qualifiers and the group has no qualification criteria, meaning customers must be manually added or removed from the group.","additionalProperties":false,"properties":{"specific_values":{"type":"object","description":"The specific values, filters and subscription options used to qualify customers for the group when the qualifier method is 'specific_values'.","additionalProperties":false,"properties":{"filters":{"type":"object","description":"The filters used to qualify customers.","additionalProperties":false,"properties":{"campaign":{"type":"array","description":"The campaign filter used to qualify customers. If empty, then there is no campaign filter qualification. If there are multiple campaign filters, then a customer only needs to qualify for one of the filters to qualify for the group.","items":{"type":"string","title":"Campaign ID","description":"A 20 character campaign ID.","minLength":20,"maxLength":20}},"product_group":{"type":"array","description":"The product group filter used to qualify customers that have purchased a product within the product group. If empty, then there is no product group filter qualification. If there are multiple product group filters, then a customer only needs to qualify for one of the filters to qualify for the group.","items":{"type":"string","description":"A 20 character product group ID.","minLength":20,"maxLength":20}},"third_party_shop":{"type":"array","description":"The third party shop filter used to qualify customers that have made a purchase from the third party shop. If empty, then there is no third party shop filter qualification. If there are multiple third party shop filters, then a customer only needs to qualify for one of the filters to qualify for the group.","items":{"type":"string","description":"A 20 character user shop ID.","minLength":20,"maxLength":20}},"metadata":{"type":"array","description":"The metadata filter used to qualify customers that have a specific metadata name and value. If empty, then there is no metadata filter qualification. If there are multiple metadata filters, then a customer needs to qualify for all of the filters to qualify for the group. If using multiple values for the same name, then values will be grouped by name and the customer must match at least one of the values for the name.","items":{"description":"The metadata name and value used to qualify customers.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The metadata name used to qualify customers."},"value":{"type":"string","description":"The metadata value used to qualify customers. Can be a specific value or 'METADATA_NAME_EXISTS' indicating the presence of the metadata name."}},"type":"object"}}}},"values":{"type":"object","description":"The specific values used to qualify customers. A customer must match all of the enabled specific values to qualify for the group. If a specific value is enabled then the customer must have a value equal to or greater than the min to qualify for the group and a value equal to or less than the max to qualify for the group. If enabled and both min and max are 0, then the customers' corresponding value must be 0 to qualify. If a specific value is not enabled, then there is no qualification based on that specific value.","additionalProperties":false,"properties":{"has_no_sales":{"type":"boolean","description":"Whether the customer has 0 sales on record. This is a method to quickly identify prospects, i.e. signups that have not attempted any purchases. If true, then customers must have 0 sales to qualify for the group, and NO OTHER qualifiers.specific_values.values, EXCEPT FOR 'days_since_created', will be considered for qualification. Recommended set to false."},"days_since_created":{"description":"The number of days since the customer was first created, i.e. the account age.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the days since created value is enabled."},"min":{"description":"The minimum number of days since the customer was created for customers to qualify for the group. Must be greater than 0.","type":"number","format":"integer","minimum":1},"max":{"description":"The maximum number of days since the customer was created for customers to qualify for the group. Must be greater than 0.","type":"number","format":"integer","minimum":1}}},"lifetime_value":{"description":"The lifetime value specific value used to qualify customers based on their lifetime value.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the lifetime value is enabled."},"min":{"description":"The minimum lifetime value for customers to qualify for the group.","type":"number","format":"float"},"max":{"description":"The maximum lifetime value for customers to qualify for the group.","type":"number","format":"float"}}},"lifetime_refunded":{"description":"The lifetime refunded specific value used to qualify customers based on their lifetime sum amount of refunds.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the lifetime refunded is enabled."},"min":{"description":"The minimum lifetime refunded for customers to qualify for the group.","type":"number","format":"float"},"max":{"description":"The maximum lifetime refunded for customers to qualify for the group.","type":"number","format":"float"}}},"num_sale":{"description":"The number of sales specific value used to qualify customers based on their sales count.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the sales count is enabled."},"min":{"description":"The minimum sales count for customers to qualify for the group.","type":"number","format":"integer"},"max":{"description":"The maximum sales count for customers to qualify for the group.","type":"number","format":"integer"}}},"avg_sale":{"description":"The average sale specific value used to qualify customers based on their average sale amount.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the average sale is enabled."},"min":{"description":"The minimum average sale for customers to qualify for the group.","type":"number","format":"float"},"max":{"description":"The maximum average sale for customers to qualify for the group.","type":"number","format":"float"}}},"days_last_sale":{"description":"The number of days since the last sale used to qualify customers based on their sales activity.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the days since last sale criteria is enabled."},"min":{"description":"The minimum number of days since the last sale for customers to qualify for the group.","type":"number","format":"integer","minimum":1},"max":{"description":"The maximum number of days since the last sale for customers to qualify for the group.","type":"number","format":"integer","minimum":1}}},"num_success_sale":{"description":"The number of successful sales used to qualify customers based on their sales activity.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the successful sales criteria is enabled."},"min":{"description":"The minimum number of successful sales for customers to qualify for the group.","type":"number","format":"integer"},"max":{"description":"The maximum number of successful sales for customers to qualify for the group.","type":"number","format":"integer"}}},"num_upsell_sale":{"description":"The number of upsell sales used to qualify customers based on their upsell activity.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the upsell sales criteria is enabled."},"min":{"description":"The minimum number of upsell sales for customers to qualify for the group.","type":"number","format":"integer"},"max":{"description":"The maximum number of upsell sales for customers to qualify for the group.","type":"number","format":"integer"}}},"num_pending_declined_sale":{"description":"The number of declined sales used to qualify customers based on their sales activity.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the declined sales criteria is enabled."},"min":{"description":"The minimum number of declined sales for customers to qualify for the group.","type":"number","format":"integer"},"max":{"description":"The maximum number of declined sales for customers to qualify for the group.","type":"number","format":"integer"}}},"num_pending_abandoned_sale":{"description":"The number of abandoned sales used to qualify customers based on their sales activity.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the abandoned sales criteria is enabled."},"min":{"description":"The minimum number of abandoned sales for customers to qualify for the group.","type":"number","format":"integer"},"max":{"description":"The maximum number of abandoned sales for customers to qualify for the group.","type":"number","format":"integer"}}},"num_fraud_detection":{"description":"The number of fraud detection specific value used to qualify customers based on their fraud detection count.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the fraud detection count is enabled."},"min":{"description":"The minimum fraud detection count for customers to qualify for the group.","type":"number","format":"integer"},"max":{"description":"The maximum fraud detection count for customers to qualify for the group.","type":"number","format":"integer"}}},"lifetime_chargeback":{"description":"The lifetime chargeback specific value used to qualify customers based on their lifetime sum amount of chargebacks.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the lifetime chargeback is enabled."},"min":{"description":"The minimum lifetime chargebacks for customers to qualify for the group.","type":"number","format":"float"},"max":{"description":"The maximum lifetime chargebacks for customers to qualify for the group.","type":"number","format":"float"}}},"num_chargeback":{"description":"The number of chargebacks specific value used to qualify customers based on their chargeback count.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the chargeback count is enabled."},"min":{"description":"The minimum chargeback count for customers to qualify for the group.","type":"number","format":"integer"},"max":{"description":"The maximum chargeback count for customers to qualify for the group.","type":"number","format":"integer"}}},"lifetime_paypal_dispute":{"description":"The lifetime PayPal dispute specific value used to qualify customers based on their lifetime sum amount of PayPal disputes.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the lifetime PayPal dispute is enabled."},"min":{"description":"The minimum lifetime PayPal disputes for customers to qualify for the group.","type":"number","format":"float"},"max":{"description":"The maximum lifetime PayPal disputes for customers to qualify for the group.","type":"number","format":"float"}}},"num_paypal_dispute":{"description":"The number of PayPal disputes specific value used to qualify customers based on their PayPal dispute count.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the PayPal dispute count is enabled."},"min":{"description":"The minimum PayPal dispute count for customers to qualify for the group.","type":"number","format":"integer"},"max":{"description":"The maximum PayPal dispute count for customers to qualify for the group.","type":"number","format":"integer"}}}}},"subscription_options":{"type":"object","description":"Subscription options based on a customer having one or more subscriptions which qualify.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether subscription options are enabled."},"days_last_renewal":{"description":"The number of days since the customers' last subscription renewal. Used to qualify customers based on how recently they renewed a subscription.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the days since last renewal is enabled."},"min":{"description":"The minimum number of days since the customers' last subscription renewal for customers to qualify for the group.","type":"number","format":"integer"},"max":{"description":"The maximum number of days since the customers' last subscription renewal for customers to qualify for the group.","type":"number","format":"integer"}}},"num_renewal":{"description":"The number of subscription renewals a customer has completed. Used to qualify customers based on their renewal history.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the number of renewals is enabled."},"min":{"description":"The minimum number of subscription renewals a customer must have completed to qualify for the group.","type":"number","format":"integer"},"max":{"description":"The maximum number of subscription renewals a customer can have completed to qualify for the group.","type":"number","format":"integer"}}},"num_success_renewal":{"description":"The number of successful subscription renewals a customer has completed. Used to qualify customers based on their successful renewal history.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the number of successful renewals is enabled."},"min":{"description":"The minimum number of successful subscription renewals a customer must have completed to qualify for the group.","type":"number","format":"integer"},"max":{"description":"The maximum number of successful subscription renewals a customer can have completed to qualify for the group.","type":"number","format":"integer"}}},"num_overdue_renewal":{"description":"The number of overdue subscription renewals a customer has. Used to qualify customers based on their overdue renewal history.","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the number of overdue renewals is enabled."},"min":{"description":"The minimum number of overdue subscription renewals a customer must have to qualify for the group.","type":"number","format":"integer"},"max":{"description":"The maximum number of overdue subscription renewals a customer can have to qualify for the group.","type":"number","format":"integer"}}},"status":{"type":"array","description":"The subscription status used to qualify customers based on their subscription status. If empty, then there is no subscription status qualification. If there are multiple subscription statuses, then a customer only needs to match one of the statuses to qualify for the group.","items":{"type":"string","description":"The status used to qualify customers based on their subscription status.","enum":["active","trial","overdue","occurrence_limit","suspended","cancelled"]}}}}}},"customer_group":{"type":"object","description":"The other customer groups used to qualify customers for the group when the qualifier method is 'customer_group'.","additionalProperties":false,"properties":{"in_any_customer_group":{"description":"The customer group(s) that that at least one of which the customer must be in, in order to qualify. Leave empty if there are no customer groups that customers must be in to qualify.","items":{"type":"string","description":"A 20 character customer group ID.","minLength":20,"maxLength":20},"type":"array"},"in_all_customer_group":{"description":"The customer group(s) that all of which the customer must be in, in order to qualify. Leave empty if there are no multiple customer groups that customers must be in to qualify.","items":{"type":"string","description":"A 20 character customer group ID.","minLength":20,"maxLength":20},"type":"array"},"not_in_customer_group":{"description":"The customer group(s) that at least one of which the customer must not be in, in order to qualify. Leave empty if there are no customer groups that customers must not be in to qualify.","items":{"type":"string","description":"A 20 character customer group ID.","minLength":20,"maxLength":20},"type":"array"}}}}},"updated_date_unix":{"description":"The unix timestamp of when the item was last updated.","type":"integer","format":"unix-time"}}},"type":"array"},"total_count":{"description":"The total number of items found given the date_start and date_end query parameters.","type":"integer"},"total_pages":{"description":"The total number of pages given the date_start, date_end and limit query parameters.","type":"integer"}},"type":"object","additionalProperties":false}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"This value indicates that there is an error. Will always be 0.","type":"integer","enum":[0]},"error_code":{"description":"The specific error code.","type":"string"},"message":{"description":"A human readable description of the error.","type":"string"},"result":{"description":"A description of the API call result.","type":"string"}},"title":"APIStandardErrors","type":"object","additionalProperties":false}}},"description":"Error response."}}}