From 186555b39b82b9d619f2bf936565e227d46e0e04 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 08:59:39 +0000 Subject: [PATCH] SDK regeneration --- .fern/metadata.json | 6 +- poetry.lock | 20 +- pyproject.toml | 2 +- reference.md | 2392 +++++++++++++++-- src/brevo/__init__.py | 240 +- src/brevo/account/__init__.py | 3 - src/brevo/account/client.py | 18 +- src/brevo/account/raw_client.py | 40 +- src/brevo/account/types/__init__.py | 3 - .../account/types/get_account_response.py | 8 +- ..._account_response_date_time_preferences.py | 38 - ...et_account_response_plan_verticals_item.py | 8 +- src/brevo/balance/__init__.py | 24 + src/brevo/balance/client.py | 260 +- src/brevo/balance/raw_client.py | 254 +- src/brevo/balance/types/__init__.py | 32 + ...in_transaction_request_transaction_type.py | 5 + .../create_balance_order_request_source.py | 5 + .../get_contact_balances_request_sort.py | 5 + ...get_contact_balances_request_sort_field.py | 5 + ...rograms_pid_active_balance_request_sort.py | 5 + ...ce_programs_pid_active_balance_response.py | 53 + ...e_balance_response_active_balances_item.py | 42 + ...story_response_transaction_history_item.py | 8 + ...ansaction_history_item_transaction_type.py | 7 + .../get_subscription_balances_response.py | 17 +- ...cription_balances_response_balance_item.py | 4 +- ...pid_subscriptions_cid_balances_response.py | 55 +- src/brevo/companies/__init__.py | 3 + src/brevo/companies/client.py | 72 +- src/brevo/companies/raw_client.py | 94 +- src/brevo/companies/types/__init__.py | 5 + ..._crm_attributes_companies_response_item.py | 38 +- ...s_response_item_attribute_options_item.py} | 5 +- src/brevo/contacts/client.py | 140 +- src/brevo/contacts/raw_client.py | 184 +- ...sponse_attributes_item_enumeration_item.py | 13 +- .../types/get_contact_info_response.py | 8 + .../get_contact_info_response_statistics.py | 4 +- .../get_segments_response_segments_item.py | 4 +- src/brevo/conversations/client.py | 236 +- src/brevo/conversations/raw_client.py | 228 +- src/brevo/core/client_wrapper.py | 4 +- src/brevo/coupons/client.py | 20 + src/brevo/coupons/raw_client.py | 20 + src/brevo/custom_objects/__init__.py | 33 +- src/brevo/custom_objects/client.py | 234 +- src/brevo/custom_objects/raw_client.py | 164 +- src/brevo/custom_objects/types/__init__.py | 49 +- .../types/getrecords_response_records_item.py | 7 +- ...cords_response_records_item_identifiers.py | 8 +- .../upsertrecords_request_records_item.py | 23 +- ..._request_records_item_associations_item.py | 36 +- ...t_records_item_associations_item_action.py | 5 + ...uest_records_item_associations_item_one.py | 28 - ...item_associations_item_one_records_item.py | 15 - ...associations_item_one_records_item_zero.py | 28 - ..._item_one_records_item_zero_identifiers.py | 32 - ...ds_item_associations_item_records_item.py} | 13 +- ...ciations_item_records_item_identifiers.py} | 10 +- ...est_records_item_associations_item_zero.py | 28 - ...ecords_request_records_item_identifiers.py | 9 +- src/brevo/deals/__init__.py | 3 + src/brevo/deals/client.py | 70 +- src/brevo/deals/raw_client.py | 114 +- src/brevo/deals/types/__init__.py | 5 + .../get_crm_attributes_deals_response_item.py | 38 +- ...ls_response_item_attribute_options_item.py | 21 + src/brevo/ecommerce/__init__.py | 3 + src/brevo/ecommerce/client.py | 189 +- src/brevo/ecommerce/raw_client.py | 187 +- src/brevo/ecommerce/types/__init__.py | 3 + ...te_batch_products_request_products_item.py | 7 +- .../types/create_update_category_response.py | 2 +- .../types/create_update_product_response.py | 4 +- .../get_products_request_sort_by_field.py | 5 + src/brevo/email_campaigns/__init__.py | 12 + src/brevo/email_campaigns/client.py | 94 +- src/brevo/email_campaigns/raw_client.py | 161 +- src/brevo/email_campaigns/types/__init__.py | 16 + .../create_email_campaign_request_sender.py | 6 +- .../types/get_email_campaign_response.py | 48 +- ...ampaign_response_email_expiration_date.py} | 13 +- ...ign_response_email_expiration_date_unit.py | 5 + ...email_campaigns_response_campaigns_item.py | 45 +- ...se_campaigns_item_email_expiration_date.py | 35 + ...mpaigns_item_email_expiration_date_unit.py | 7 + src/brevo/event/__init__.py | 36 +- src/brevo/event/client.py | 55 +- src/brevo/event/raw_client.py | 47 +- src/brevo/event/types/__init__.py | 42 +- ...reate_batch_events_request_events_item.py} | 22 +- ...st_events_item_contact_properties_value.py | 5 + ...uest_events_item_event_properties_value.py | 7 + ...events_request_events_item_identifiers.py} | 2 +- ...atch_events_request_events_item_object.py} | 8 +- ...request_events_item_object_identifiers.py} | 2 +- ...s_request_item_contact_properties_value.py | 5 - ...nts_request_item_event_properties_value.py | 7 - ..._all_external_feeds_response_feeds_item.py | 16 +- .../get_external_feed_by_uuid_response.py | 27 +- src/brevo/files/client.py | 20 + src/brevo/files/raw_client.py | 20 + src/brevo/inbound_parsing/client.py | 16 +- src/brevo/inbound_parsing/raw_client.py | 38 +- ...t_inbound_email_events_by_uuid_response.py | 4 +- src/brevo/master_account/client.py | 4 + src/brevo/master_account/raw_client.py | 92 + src/brevo/notes/client.py | 36 +- src/brevo/notes/raw_client.py | 28 +- .../notes/types/post_crm_notes_response.py | 2 +- src/brevo/payments/client.py | 12 + src/brevo/payments/raw_client.py | 12 + src/brevo/process/__init__.py | 6 - src/brevo/process/client.py | 62 +- src/brevo/process/raw_client.py | 62 +- src/brevo/process/types/__init__.py | 6 - .../process/types/get_process_response.py | 20 +- .../types/get_process_response_info.py | 9 +- .../types/get_process_response_info_import.py | 26 +- .../get_processes_response_processes_item.py | 20 +- ..._processes_response_processes_item_info.py | 9 +- ...ses_response_processes_item_info_import.py | 26 +- src/brevo/program/__init__.py | 3 + src/brevo/program/client.py | 48 +- src/brevo/program/raw_client.py | 44 +- src/brevo/program/types/__init__.py | 3 + .../program/types/get_lp_list_request_sort.py | 5 + ..._subscription_info_response_reward_item.py | 8 +- ...cribe_member_to_a_subscription_response.py | 23 +- .../subscribe_to_loyalty_program_response.py | 42 +- src/brevo/reward/client.py | 20 + src/brevo/reward/raw_client.py | 20 + .../reward/types/create_reward_response.py | 24 +- .../reward/types/create_voucher_response.py | 6 + ..._vouchers_response_contact_rewards_item.py | 7 + .../types/get_ips_response_ips_item.py | 10 +- src/brevo/sms_campaigns/__init__.py | 9 + src/brevo/sms_campaigns/client.py | 52 +- src/brevo/sms_campaigns/raw_client.py | 52 +- src/brevo/sms_campaigns/types/__init__.py | 11 + .../types/get_sms_campaign_response.py | 38 +- .../get_sms_campaign_response_recipients.py | 35 + ...sponse_recipients_exclusion_lists_item.py} | 14 +- ...campaign_response_recipients_lists_item.py | 28 + ...t_sms_campaigns_response_campaigns_item.py | 26 +- src/brevo/tasks/__init__.py | 6 +- src/brevo/tasks/client.py | 40 +- src/brevo/tasks/raw_client.py | 64 +- src/brevo/tasks/types/__init__.py | 6 +- ....py => get_crm_tasktypes_response_item.py} | 6 +- src/brevo/tier/__init__.py | 18 + src/brevo/tier/client.py | 26 +- src/brevo/tier/raw_client.py | 34 +- src/brevo/tier/types/__init__.py | 26 + ...e_tier_group_request_downgrade_schedule.py | 51 + ...st_downgrade_schedule_duration_modifier.py | 7 + ...equest_downgrade_schedule_duration_unit.py | 7 + ...ate_tier_group_request_upgrade_schedule.py | 49 + ...uest_upgrade_schedule_duration_modifier.py | 7 + ..._request_upgrade_schedule_duration_unit.py | 7 + src/brevo/transactional_emails/__init__.py | 12 + src/brevo/transactional_emails/client.py | 167 +- src/brevo/transactional_emails/raw_client.py | 237 +- .../transactional_emails/types/__init__.py | 12 + .../get_smtp_template_request_template_id.py} | 2 +- .../get_transac_email_content_response.py | 6 +- ...t_preview_smtp_email_templates_request.py} | 2 +- ...iew_smtp_email_templates_request_params.py | 35 + ...pdate_smtp_template_request_template_id.py | 5 + src/brevo/transactional_sms/client.py | 60 +- src/brevo/transactional_sms/raw_client.py | 83 +- src/brevo/types/__init__.py | 70 +- src/brevo/types/balance_definition.py | 176 +- ..._balance_availability_duration_modifier.py | 2 +- ...tion_balance_availability_duration_unit.py | 7 + ...lance_option_amount_overtaking_strategy.py | 5 + ...finition_balance_option_credit_rounding.py | 5 + ...efinition_balance_option_debit_rounding.py | 5 + src/brevo/types/balance_definition_unit.py | 26 + src/brevo/types/balance_limit.py | 60 +- .../types/balance_limit_constraint_type.py | 5 + .../types/balance_limit_duration_unit.py | 5 + .../types/balance_limit_transaction_type.py | 5 + src/brevo/types/company.py | 2 +- src/brevo/types/conversations_message.py | 23 + .../conversations_message_attachments_item.py | 48 +- ...ons_message_attachments_item_image_info.py | 40 + src/brevo/types/conversations_message_file.py | 50 +- .../conversations_message_file_image_info.py | 19 +- src/brevo/types/deal.py | 18 +- src/brevo/types/file_data.py | 36 +- src/brevo/types/get_campaign_recipients.py | 9 + src/brevo/types/get_campaign_stats.py | 8 +- src/brevo/types/get_contact_details.py | 8 + .../types/get_events_list_events_item.py | 5 - .../types/get_extended_campaign_overview.py | 48 +- ...campaign_overview_email_expiration_date.py | 35 + ...ign_overview_email_expiration_date_unit.py | 5 + .../types/get_extended_campaign_stats.py | 32 +- ...get_extended_campaign_stats_links_stats.py | 22 - src/brevo/types/get_product_details.py | 9 +- src/brevo/types/get_sms_campaign_overview.py | 27 +- src/brevo/types/get_smtp_template_overview.py | 8 + .../get_smtp_template_overview_sender.py | 2 +- src/brevo/types/get_webhook.py | 13 +- src/brevo/types/get_webhook_type.py | 2 +- src/brevo/types/loyalty_program.py | 74 +- src/brevo/types/loyalty_program_state.py | 2 +- src/brevo/types/note.py | 43 +- src/brevo/types/note_data.py | 2 +- src/brevo/types/order.py | 2 +- src/brevo/types/pipeline.py | 4 +- src/brevo/types/pipeline_stages_item.py | 2 +- src/brevo/types/send_transac_sms.py | 11 +- src/brevo/types/send_transac_sms_tag.py | 25 +- src/brevo/types/task.py | 57 +- src/brevo/types/tier_group.py | 12 + .../types/tier_group_downgrade_schedule.py | 52 + ...up_downgrade_schedule_duration_modifier.py | 7 + ..._group_downgrade_schedule_duration_unit.py | 5 + .../types/tier_group_upgrade_schedule.py | 52 + ...roup_upgrade_schedule_duration_modifier.py | 5 + ...er_group_upgrade_schedule_duration_unit.py | 5 + src/brevo/types/transaction.py | 101 +- src/brevo/types/transaction_status.py | 5 + .../types/transaction_transaction_type.py | 5 + src/brevo/user/client.py | 16 + src/brevo/user/raw_client.py | 16 + src/brevo/webhooks/client.py | 82 +- src/brevo/webhooks/raw_client.py | 76 +- .../types/create_webhook_request_channel.py | 2 +- src/brevo/whats_app_campaigns/__init__.py | 3 + src/brevo/whats_app_campaigns/client.py | 12 + src/brevo/whats_app_campaigns/raw_client.py | 12 + .../whats_app_campaigns/types/__init__.py | 3 + .../types/get_whats_app_campaign_response.py | 6 + ..._whats_app_campaign_response_recipients.py | 44 + ...s_app_templates_response_templates_item.py | 5 + tests/wire/test_balance.py | 21 +- tests/wire/test_conversations.py | 4 +- tests/wire/test_ecommerce.py | 3 +- tests/wire/test_event.py | 10 +- tests/wire/test_notes.py | 4 +- tests/wire/test_program.py | 2 +- tests/wire/test_tasks.py | 2 +- tests/wire/test_webhooks.py | 1 - wiremock/wiremock-mappings.json | 2 +- 248 files changed, 7957 insertions(+), 2446 deletions(-) delete mode 100644 src/brevo/account/types/get_account_response_date_time_preferences.py create mode 100644 src/brevo/balance/types/begin_transaction_request_transaction_type.py create mode 100644 src/brevo/balance/types/create_balance_order_request_source.py create mode 100644 src/brevo/balance/types/get_contact_balances_request_sort.py create mode 100644 src/brevo/balance/types/get_contact_balances_request_sort_field.py create mode 100644 src/brevo/balance/types/get_loyalty_balance_programs_pid_active_balance_request_sort.py create mode 100644 src/brevo/balance/types/get_loyalty_balance_programs_pid_active_balance_response.py create mode 100644 src/brevo/balance/types/get_loyalty_balance_programs_pid_active_balance_response_active_balances_item.py create mode 100644 src/brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item_transaction_type.py rename src/brevo/{custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_one.py => companies/types/get_crm_attributes_companies_response_item_attribute_options_item.py} (75%) create mode 100644 src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_action.py delete mode 100644 src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one.py delete mode 100644 src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item.py delete mode 100644 src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_zero.py delete mode 100644 src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_zero_identifiers.py rename src/brevo/custom_objects/types/{upsertrecords_request_records_item_associations_item_zero_records_item.py => upsertrecords_request_records_item_associations_item_records_item.py} (56%) rename src/brevo/custom_objects/types/{upsertrecords_request_records_item_associations_item_zero_records_item_identifiers.py => upsertrecords_request_records_item_associations_item_records_item_identifiers.py} (67%) delete mode 100644 src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero.py create mode 100644 src/brevo/deals/types/get_crm_attributes_deals_response_item_attribute_options_item.py create mode 100644 src/brevo/ecommerce/types/get_products_request_sort_by_field.py rename src/brevo/{process/types/get_processes_response_processes_item_info_export.py => email_campaigns/types/get_email_campaign_response_email_expiration_date.py} (51%) create mode 100644 src/brevo/email_campaigns/types/get_email_campaign_response_email_expiration_date_unit.py create mode 100644 src/brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_email_expiration_date.py create mode 100644 src/brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_email_expiration_date_unit.py rename src/brevo/event/types/{create_batch_events_request_item.py => create_batch_events_request_events_item.py} (70%) create mode 100644 src/brevo/event/types/create_batch_events_request_events_item_contact_properties_value.py create mode 100644 src/brevo/event/types/create_batch_events_request_events_item_event_properties_value.py rename src/brevo/event/types/{create_batch_events_request_item_identifiers.py => create_batch_events_request_events_item_identifiers.py} (95%) rename src/brevo/event/types/{create_batch_events_request_item_object.py => create_batch_events_request_events_item_object.py} (72%) rename src/brevo/event/types/{create_batch_events_request_item_object_identifiers.py => create_batch_events_request_events_item_object_identifiers.py} (90%) delete mode 100644 src/brevo/event/types/create_batch_events_request_item_contact_properties_value.py delete mode 100644 src/brevo/event/types/create_batch_events_request_item_event_properties_value.py create mode 100644 src/brevo/program/types/get_lp_list_request_sort.py create mode 100644 src/brevo/sms_campaigns/types/get_sms_campaign_response_recipients.py rename src/brevo/{process/types/get_process_response_info_export.py => sms_campaigns/types/get_sms_campaign_response_recipients_exclusion_lists_item.py} (63%) create mode 100644 src/brevo/sms_campaigns/types/get_sms_campaign_response_recipients_lists_item.py rename src/brevo/tasks/types/{get_crm_tasktypes_response.py => get_crm_tasktypes_response_item.py} (88%) create mode 100644 src/brevo/tier/types/create_tier_group_request_downgrade_schedule.py create mode 100644 src/brevo/tier/types/create_tier_group_request_downgrade_schedule_duration_modifier.py create mode 100644 src/brevo/tier/types/create_tier_group_request_downgrade_schedule_duration_unit.py create mode 100644 src/brevo/tier/types/create_tier_group_request_upgrade_schedule.py create mode 100644 src/brevo/tier/types/create_tier_group_request_upgrade_schedule_duration_modifier.py create mode 100644 src/brevo/tier/types/create_tier_group_request_upgrade_schedule_duration_unit.py rename src/brevo/{types/send_transac_sms_tag_field.py => transactional_emails/types/get_smtp_template_request_template_id.py} (56%) rename src/brevo/{types/get_webhook_channel.py => transactional_emails/types/post_preview_smtp_email_templates_request.py} (50%) create mode 100644 src/brevo/transactional_emails/types/post_preview_smtp_email_templates_request_params.py create mode 100644 src/brevo/transactional_emails/types/update_smtp_template_request_template_id.py create mode 100644 src/brevo/types/balance_definition_balance_availability_duration_unit.py create mode 100644 src/brevo/types/balance_definition_balance_option_amount_overtaking_strategy.py create mode 100644 src/brevo/types/balance_definition_balance_option_credit_rounding.py create mode 100644 src/brevo/types/balance_definition_balance_option_debit_rounding.py create mode 100644 src/brevo/types/balance_definition_unit.py create mode 100644 src/brevo/types/balance_limit_constraint_type.py create mode 100644 src/brevo/types/balance_limit_duration_unit.py create mode 100644 src/brevo/types/balance_limit_transaction_type.py create mode 100644 src/brevo/types/conversations_message_attachments_item_image_info.py create mode 100644 src/brevo/types/get_extended_campaign_overview_email_expiration_date.py create mode 100644 src/brevo/types/get_extended_campaign_overview_email_expiration_date_unit.py delete mode 100644 src/brevo/types/get_extended_campaign_stats_links_stats.py create mode 100644 src/brevo/types/tier_group_downgrade_schedule.py create mode 100644 src/brevo/types/tier_group_downgrade_schedule_duration_modifier.py create mode 100644 src/brevo/types/tier_group_downgrade_schedule_duration_unit.py create mode 100644 src/brevo/types/tier_group_upgrade_schedule.py create mode 100644 src/brevo/types/tier_group_upgrade_schedule_duration_modifier.py create mode 100644 src/brevo/types/tier_group_upgrade_schedule_duration_unit.py create mode 100644 src/brevo/types/transaction_status.py create mode 100644 src/brevo/types/transaction_transaction_type.py create mode 100644 src/brevo/whats_app_campaigns/types/get_whats_app_campaign_response_recipients.py diff --git a/.fern/metadata.json b/.fern/metadata.json index 36f17df..c34d295 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,5 +1,5 @@ { - "cliVersion": "4.65.2", + "cliVersion": "4.103.1", "generatorName": "fernapi/fern-python-sdk", "generatorVersion": "4.64.1", "generatorConfig": { @@ -18,6 +18,6 @@ "skip_validation": true } }, - "originGitCommit": "d2e18d0bd27160206c8251e11269b139a3b4ea10", - "sdkVersion": "4.0.10" + "originGitCommit": "1934b60b480a426232f9443e7831353a6f965651", + "sdkVersion": "v5.0.0-rc.1" } \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 1efb7e2..92996ee 100644 --- a/poetry.lock +++ b/poetry.lock @@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"] [[package]] name = "certifi" -version = "2026.2.25" +version = "2026.4.22" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.7" files = [ - {file = "certifi-2026.2.25-py3-none-any.whl", hash = "sha256:027692e4402ad994f1c42e52a4997a9763c646b73e4096e4d5d6db8af1d6f0fa"}, - {file = "certifi-2026.2.25.tar.gz", hash = "sha256:e887ab5cee78ea814d3472169153c2d12cd43b14bd03329a39a9c6e2e80bfba7"}, + {file = "certifi-2026.4.22-py3-none-any.whl", hash = "sha256:3cb2210c8f88ba2318d29b0388d1023c8492ff72ecdde4ebdaddbb13a31b1c4a"}, + {file = "certifi-2026.4.22.tar.gz", hash = "sha256:8d455352a37b71bf76a79caa83a3d6c25afee4a385d632127b6afb3963f1c580"}, ] [[package]] @@ -285,17 +285,17 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "idna" -version = "3.11" +version = "3.15" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.8" files = [ - {file = "idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea"}, - {file = "idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902"}, + {file = "idna-3.15-py3-none-any.whl", hash = "sha256:048adeaf8c2d788c40fee287673ccaa74c24ffd8dcf09ffa555a2fbb59f10ac8"}, + {file = "idna-3.15.tar.gz", hash = "sha256:ca962446ea538f7092a95e057da437618e886f4d349216d2b1e294abfdb65fdc"}, ] [package.extras] -all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] +all = ["mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] [[package]] name = "iniconfig" @@ -374,13 +374,13 @@ files = [ [[package]] name = "packaging" -version = "26.0" +version = "26.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529"}, - {file = "packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4"}, + {file = "packaging-26.2-py3-none-any.whl", hash = "sha256:5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e"}, + {file = "packaging-26.2.tar.gz", hash = "sha256:ff452ff5a3e828ce110190feff1178bb1f2ea2281fa2075aadb987c2fb221661"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index f11f695..c6b6a96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ dynamic = ["version"] [tool.poetry] name = "brevo-python" -version = "4.0.10" +version = "v5.0.0-rc.1" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index e9f88ac..2ced512 100644 --- a/reference.md +++ b/reference.md @@ -19,25 +19,22 @@ Retrieves details of your Brevo account. - Check plan details (type, credits, expiration) - Get relay information (for transactional emails) - Check Marketing Automation status -- View date/time preferences and account settings - Access organization and user identifiers **Key information returned:** - Complete account details (organization ID, user ID, company information) - Address and contact information - Plan configurations and credit allocations across different verticals -- Marketing Automation settings and tracker key +- Marketing Automation settings and tracker key (when enabled) - SMTP relay configuration for transactional emails -- Date/time preferences and account settings - Enterprise features availability status **Important considerations:** - Provides comprehensive account overview for billing and configuration management - Essential for understanding current plan limitations and feature availability -- Marketing Automation key required for advanced automation features -- Plan verticals show detailed breakdown across Marketing, Chat, and CRM categories +- Marketing Automation key is only returned when Marketing Automation is enabled on the account +- Plan verticals show detailed breakdown across Marketing, Chat, and CRM categories (only returned when plan verticals are available) - Relay configuration crucial for transactional email setup and deliverability -- Date/time preferences affect campaign scheduling and reporting displays - Enterprise status determines access to advanced features and sub-account management @@ -1633,6 +1630,20 @@ client.master_account.get_sub_account_details(
+#### πŸ“ Description + +
+
+ +
+
+ +Permanently deletes a sub-account from the corporate master account. Once deleted, all data associated with the sub-account organization is removed and cannot be recovered, so ensure the sub-account is no longer needed before proceeding. +
+
+
+
+ #### πŸ”Œ Usage
@@ -2631,6 +2642,20 @@ client.master_account.change_admin_user_permissions(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieves the list of all users associated with your organization, including both active and pending invited users. Each user entry includes their email address, owner status, current invitation status, and feature access levels for marketing, CRM, and conversations. +
+
+
+
+ #### πŸ”Œ Usage
@@ -2680,6 +2705,20 @@ client.user.get_invited_users_list()
+#### πŸ“ Description + +
+
+ +
+
+ +Revokes all permissions for an invited user in the organization, effectively removing their access to the platform. If the user''s plan change generated credit notes, they are returned in the response for billing reconciliation. +
+
+
+
+ #### πŸ”Œ Usage
@@ -2883,6 +2922,20 @@ client.user.inviteuser(
+#### πŸ“ Description + +
+
+ +
+
+ +Resends or cancels a pending invitation for a user in the organization, depending on the action path parameter. Use `resend` to send a new invitation email to the user, or `cancel` to revoke the pending invitation entirely and remove the user''s pending access. +
+
+
+
+ #### πŸ”Œ Usage
@@ -3094,6 +3147,20 @@ client.user.edit_user_permission(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieves the granular feature-level permissions assigned to a specific user in the organization, identified by their email address. The response includes the user''s current status (active or pending) and a detailed list of privileges specifying which features and permission levels are granted. +
+
+
+
+ #### πŸ”Œ Usage
@@ -3172,20 +3239,19 @@ Retrieves a list of background processes from your Brevo account with filtering - Identify failed or stuck processes for troubleshooting **Key information returned:** -- Process details (ID, name, type, status) -- Process creation and completion timestamps -- Process progress and completion status -- Error information for failed processes -- Process result data and download links +- Process details (ID, name, status) +- Export download URLs for completed export processes +- Import details with CSV report URLs for completed import processes +- Total count of processes for pagination **Important considerations:** - Background processes handle long-running operations like imports and exports -- Process status indicates current state (queued, processing, completed, failed, cancelled) +- Process status indicates current state (queued, processing, completed) - Export processes provide download URLs when completed -- Failed processes include error messages for troubleshooting +- Import processes provide CSV report URLs with details about problematic records - Use pagination for accounts with many historical processes - Sort options available for creation order (ascending or descending) -- Different process types handle specific operations (imports, exports, calculations) +- Default limit is 10 results per page, maximum is 50
@@ -3285,18 +3351,14 @@ Retrieves detailed information about a specific background process. - Track process execution times **Key information returned:** -- Complete process details and status -- Import/export statistics and results -- Error information for troubleshooting -- Download URLs for export processes -- Process timing and performance data +- Complete process details (ID, name, status) +- Download URLs for completed export processes +- Import details with CSV report URLs for completed import processes **Important considerations:** -- Process ID must exist in your account -- Completed processes provide detailed statistics and results -- Export processes include download URLs when successful -- Failed processes contain error messages for debugging -- Timing information helps with performance analysis +- Process ID must exist in your account and not be deleted +- Completed export processes include download URLs +- Completed import processes include CSV report URLs with details about problematic records - Different process types return different result structures
@@ -4568,9 +4630,6 @@ client = Brevo( ) client.webhooks.create_webhook( - events=[ - "sent" - ], url="http://requestb.in/173lyyx1", ) @@ -4588,31 +4647,6 @@ client.webhooks.create_webhook(
-**events:** `typing.List[CreateWebhookRequestEventsItem]` - -- Events triggering the webhook. Possible values for -**Transactional** type webhook: #### `sent` OR `request`, -`delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, -`invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and -`unsubscribed` - Possible values for **Marketing** type webhook: -#### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, -`unsubscribed`, `listAddition` & `delivered` - Possible values -for **Inbound** type webhook: #### `inboundEmailProcessed` - -Possible values for type **Transactional** and channel **SMS** -#### -`accepted`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`, -`subscribe`,`sent`,`blacklisted`,`skip` - Possible values for -type **Marketing** channel **SMS** #### -`sent`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`, -`subscribe`,`skip` -#### `reply` - -
-
- -
-
- **url:** `str` β€” URL of the webhook
@@ -4637,7 +4671,7 @@ type **Marketing** channel **SMS** ####
-**channel:** `typing.Optional[CreateWebhookRequestChannel]` β€” channel of webhook +**channel:** `typing.Optional[CreateWebhookRequestChannel]` β€” Channel of the webhook
@@ -4664,6 +4698,25 @@ Inbound domain of webhook, required in case of event type
+**events:** `typing.Optional[typing.List[CreateWebhookRequestEventsItem]]` + +Events triggering the webhook. Required for transactional and +marketing types, optional for inbound type (defaults to +`inboundEmailProcessed`). Possible values for **Transactional** +type webhook: `sent` OR `request`, `delivered`, `hardBounce`, +`softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, +`opened`, `uniqueOpened` and `unsubscribed`. Possible values for +**Marketing** type webhook: `spam`, `opened`, `click`, +`hardBounce`, `softBounce`, `unsubscribed`, `listAddition`, +`delivered`, `contactUpdated` & `contactDeleted`. Possible values +for **Inbound** type webhook: `inboundEmailProcessed`. + +
+
+ +
+
+ **headers:** `typing.Optional[typing.List[CreateWebhookRequestHeadersItem]]` β€” Custom headers to be send with webhooks
@@ -4810,7 +4863,7 @@ Mandatory if startDate is used. Ending date of the report
-**message_id:** `typing.Optional[int]` +**message_id:** `typing.Optional[str]` Filter the history for a specific message id. Applicable only for transactional webhooks. @@ -5861,24 +5914,51 @@ client.external_feeds.delete_external_feed( Custom objects are only available to Enterprise plans. This feature is in beta. These are subject to change. -This API allows bulk upsert of object records in a single request. Each object record may include - - Attributes - - Identifiers - - Associations -**Response:** - The API processes the request asynchronously and returns a processId that you can use to track the background process status. -**API and Schema Limitation:** - - Size: - - Max 1000 objects records per request - - Max request body size: 1 MB - - Max 500 attributes defined per object record upsert request - - This is coherent with schema limitation: an object cannot have more than 500 attributes. - - Worth noting: Nothing happens If an attribute is mentioned in the request, but was not previously defined for the object schema (no error, no attribute creation) - - Max 10 associations defined per associated object type, in each record of the request - - This is not a schema limitation. You can associate an object record to an unlimited number of other object records by running multiple requests. +Performs bulk create or update (upsert) operations for object records in a single asynchronous request. This endpoint is optimized for high-volume data imports and synchronization scenarios. + +**How Upsert Works:** +- **Create**: Omit `identifiers`, or provide only `ext_id` (if it doesn't already exist). A new record is created with a Brevo-generated `id`. +- **Update**: Provide `id` (Brevo internal ID) or an `ext_id` that already exists. The matching record is updated with the new attribute values. +- **Important:** `id` is for **updates only**. Providing an `id` that does not belong to an existing record will fail during async processing (the HTTP response will still be 202, but the record will be rejected in the background). To create a new record with a stable external reference, use `ext_id` instead. + +**Request Structure:** +Each object record in the `records` array can include: +- `identifiers`: Either `id` (internal Brevo ID) or `ext_id` (your external system ID) β€” required for updates. **Note:** use `id` (singular), not `ids`. +- `attributes`: Key-value pairs where each key is the attribute **key** (e.g., `company_name`), not the attribute label (e.g., "Company Name"). +- `associations`: Controls linking and unlinking of associated records (optional). Each entry specifies: + - `object_type`: The type of the associated object + - `action`: `link` (default) to create the association, or `unlink` to remove it + - `records`: The associated records to link or unlink (each identified by `ext_id` or `id`) + - **Unlink is idempotent** β€” unlinking a non-existing association is a no-op (no error returned) + - `link` and `unlink` actions can be submitted for the same `object_type` in a single record entry + - Both associated records must already exist before a link can be created + +> **Common mistake:** Passing the attribute **label** (the display name you see in the UI) instead of the attribute **key** will cause the attribute to be silently ignored and the record may not be created as expected. + +**Asynchronous Processing:** +- Returns immediately with a `processId` (HTTP 202 Accepted) +- Use the processId to track status via the Get process API + +**API and Schema Limitations:** +- Max 1000 object records per request +- Max request body size: 1 MB +- Max 500 attributes per object record (matches the schema limit of 500 attributes per object) +- Unknown attribute keys are silently ignored (no error, no attribute creation) +- Max 10 association records per associated object-type in each record of the request. If you need more, send multiple requests. + +**Important Behaviors:** +- The object schema must be created before upserting records +- Unknown attribute keys are silently ignored (no error, no creation) +- Both associated object records must already exist before creating a link association +- Unlink operations are idempotent: attempting to unlink a non-existing association returns success +- `link` and `unlink` actions can be submitted for the same `object_type` in a single record entry +- Contact objects cannot be created via this endpoint +- For `category` and `multiple_category` attributes, pass the option **key** as the value (not the option label or option ID). +- The `id` identifier (internal Brevo ID) can only be used for **updating** existing records. To create new records, either omit identifiers (Brevo auto-generates an ID) or provide an `ext_id`. + **Errors:** - - Make sure both object records exist before associating them, else the API will return an error. - - This route does not create objects. The object where the object records are upserted by this API must be created already else the API will return an error "invalid object type". +- Make sure both object records exist before associating them, else the API will return an error. +- This route does not create objects. The object where the object records are upserted by this API must be created already else the API will return an error "invalid object type".
@@ -5895,7 +5975,7 @@ This API allows bulk upsert of object records in a single request. Each object r ```python from brevo import Brevo from brevo.environment import BrevoEnvironment -from brevo.custom_objects import UpsertrecordsRequestRecordsItem +from brevo.custom_objects import UpsertrecordsRequestRecordsItem, UpsertrecordsRequestRecordsItemAssociationsItem, UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem, UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers, UpsertrecordsRequestRecordsItemIdentifiers client = Brevo( api_key="", @@ -5905,7 +5985,41 @@ client = Brevo( client.custom_objects.upsertrecords( object_type="vehicle", records=[ - UpsertrecordsRequestRecordsItem() + UpsertrecordsRequestRecordsItem( + associations=[ + UpsertrecordsRequestRecordsItemAssociationsItem( + object_type="garage", + action="link", + records=[ + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem( + identifiers=UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers( + id=435435, + ), + ) + ], + ), + UpsertrecordsRequestRecordsItemAssociationsItem( + object_type="garage", + action="unlink", + records=[ + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem( + identifiers=UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers( + ext_id="old-garage-001", + ), + ) + ], + ) + ], + attributes={ + "make": "Toyota", + "model": "Camry", + "year": 2020, + "engine_type": "hybrid" + }, + identifiers=UpsertrecordsRequestRecordsItemIdentifiers( + ext_id="VIN123", + ), + ) ], ) @@ -5923,7 +6037,7 @@ client.custom_objects.upsertrecords(
-**object_type:** `str` β€” object type for the attribute +**object_type:** `str` β€” Object type for the records to upsert. Must be a previously created custom object type. Only lowercase alphanumeric characters and underscores are allowed (max 32 characters).
@@ -6008,7 +6122,7 @@ client.custom_objects.getrecords(
-**object_type:** `str` β€” object type for the attribute +**object_type:** `str` β€” Object type for the records to retrieve. Must be a previously created custom object type. Contact as object type is not supported in this endpoint.
@@ -6073,8 +6187,8 @@ client.custom_objects.getrecords(
Use this endpoint to delete multiple object records of the same object-type in one request. -The request is accepted and processed asynchronously. You can track the status of the deletion process using the returned **processId**. -**API and Schema Limitations:** - Each request can contain up to **1000** object record identifiers - If more records must be deleted β†’ send multiple batch requests +The request is accepted and processed asynchronously. You can track the status of the deletion process using the returned **processId**. +**Limitations:** - Each request can contain up to **1000** object record identifiers - Either `ids` or `ext_ids` must be provided, but **not both** in the same request - Deletion of Brevo standard object records is not supported via this endpoint - If more records must be deleted, send multiple batch requests
@@ -6127,7 +6241,7 @@ client.custom_objects.batch_delete_object_records(
-**identifiers:** `typing.Optional[BatchDeleteObjectRecordsRequestIdentifiers]` β€” One of the below must be provided +**identifiers:** `typing.Optional[BatchDeleteObjectRecordsRequestIdentifiers]` β€” Either `ids` or `ext_ids` must be provided, but not both in the same request.
@@ -6152,6 +6266,20 @@ client.custom_objects.batch_delete_object_records(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve all contacts from your Brevo account with support for pagination, filtering, and sorting. Results default to 50 contacts per page (maximum 1000) sorted in descending order of creation, and can be filtered by modification date, creation date, contact IDs (up to 20), list IDs, segment ID, or contact attributes using the equals operator. Note that either listIds or segmentId can be passed but not both simultaneously. +
+
+
+
+ #### πŸ”Œ Usage
@@ -6225,7 +6353,15 @@ client.contacts.get_contacts()
-**segment_id:** `typing.Optional[int]` β€” Id of the segment. **Either listIds or segmentId can be passed.** +**ids:** `typing.Optional[typing.Union[int, typing.Sequence[int]]]` β€” Filter by a list of contact IDs. You can pass a **maximum of 20 IDs**. All elements must be integers. + +
+
+ +
+
+ +**segment_id:** `typing.Optional[int]` β€” Id of the segment. **Either listIds or segmentId can be passed.** Must be a positive integer (minimum value of 1).
@@ -6378,6 +6514,22 @@ client.contacts.create_contact()
+**force_merge:** `typing.Optional[bool]` β€” When true, if the contact being created shares an identifier (email, SMS, ext_id, whatsapp, landline) with an existing contact, the two contacts are force-merged. The contact with the most recent `last_modified` timestamp is retained; the other is deleted. When false (default), a 4xx error is returned on identifier conflict. + +
+
+ +
+
+ +**get_id:** `typing.Optional[bool]` β€” When true, the response returns the `id` of the surviving contact after merge. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` β€” Request-specific configuration.
@@ -6394,6 +6546,20 @@ client.contacts.create_contact()
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve all contact attributes defined in your Brevo account, grouped by category (normal, transactional, category, calculated, global). Each attribute includes its name, type, and category, along with enumeration values for category-type attributes and options for multiple-choice-type attributes. +
+
+
+
+ #### πŸ”Œ Usage
@@ -6443,6 +6609,20 @@ client.contacts.get_attributes()
+#### πŸ“ Description + +
+
+ +
+
+ +Create a new contact attribute under the specified category and name. The required body properties depend on the category: use "type" for normal, transactional, or category attributes; use "value" for calculated or global attributes; use "enumeration" for category attributes; and use "multiCategoryOptions" for normal multiple-choice attributes. None of the category or multicategory option values can exceed 200 characters. +
+
+
+
+ #### πŸ”Œ Usage
@@ -6551,6 +6731,20 @@ client.contacts.create_attribute(
+#### πŸ“ Description + +
+
+ +
+
+ +Update an existing contact attribute identified by its category and name. For category-type attributes, you can update the enumeration values; for calculated or global attributes, update the computed value formula; and for normal multiple-choice attributes, update the multicategory options. None of the category or multicategory option values can exceed 200 characters. +
+
+
+
+ #### πŸ”Œ Usage
@@ -6643,6 +6837,20 @@ client.contacts.update_attribute(
+#### πŸ“ Description + +
+
+ +
+
+ +Permanently delete an existing contact attribute by its category and name. The attribute must exist in the specified category (normal, transactional, category, calculated, or global), otherwise a 404 error is returned. +
+
+
+
+ #### πŸ”Œ Usage
@@ -6711,6 +6919,20 @@ client.contacts.delete_attribute(
+#### πŸ“ Description + +
+
+ +
+
+ +Delete a specific option from an existing multiple-choice contact attribute. The attribute type must be "multiple-choice", and both the attribute name and the option to delete must already exist in your account. +
+
+
+
+ #### πŸ”Œ Usage
@@ -6787,6 +7009,20 @@ client.contacts.delete_multi_attribute_options(
+#### πŸ“ Description + +
+
+ +
+
+ +Update multiple contacts in a single API call by passing an array of contact objects. Each contact in the array must be identified by one of: email, id, or sms (only one identifier per contact). You can update attributes, blacklist status, list memberships, ext_id, and transactional email forbidden senders for each contact in the batch. +
+
+
+
+ #### πŸ”Œ Usage
@@ -7183,6 +7419,20 @@ client.contacts.get_folders()
+#### πŸ“ Description + +
+
+ +
+
+ +Create a new folder to organize your contact lists. Folders serve as containers for grouping related lists together. The folder name is required and must be provided in the request body. +
+
+
+
+ #### πŸ”Œ Usage
@@ -7315,6 +7565,20 @@ client.contacts.get_folder(
+#### πŸ“ Description + +
+
+ +
+
+ +Update the name of an existing folder identified by its ID. The new folder name must be provided in the request body. Returns a 404 error if the folder ID does not exist. +
+
+
+
+ #### πŸ”Œ Usage
@@ -7382,6 +7646,20 @@ client.contacts.update_folder(
+#### πŸ“ Description + +
+
+ +
+
+ +Permanently delete a folder identified by its ID. Deleting a folder will also delete all the contact lists contained within it. This action cannot be undone. +
+
+
+
+ #### πŸ”Œ Usage
@@ -7780,7 +8058,7 @@ client.contacts.get_lists()
-#### πŸ”Œ Usage +#### πŸ“ Description
@@ -7788,11 +8066,25 @@ client.contacts.get_lists()
-```python -from brevo import Brevo -from brevo.environment import BrevoEnvironment +Create a new contact list inside a specified folder. Both the list name and the parent folder ID are required. The newly created list will be empty and ready to receive contacts via the add contacts endpoint. +
+
+
+
-client = Brevo( +#### πŸ”Œ Usage + +
+
+ +
+
+ +```python +from brevo import Brevo +from brevo.environment import BrevoEnvironment + +client = Brevo( api_key="", environment=BrevoEnvironment.DEFAULT, ) @@ -7848,6 +8140,20 @@ client.contacts.create_list(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the details of a specific contact list by its ID, including its name, folder ID, creation date, subscriber counts, and campaign statistics. You can optionally filter campaign statistics by providing startDate and endDate parameters (both must be used together in YYYY-MM-DD format). +
+
+
+
+ #### πŸ”Œ Usage
@@ -7891,7 +8197,7 @@ client.contacts.get_list(
-**start_date:** `typing.Optional[str]` β€” **Mandatory if endDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** +**start_date:** `typing.Optional[str]` β€” **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result**
@@ -7923,6 +8229,20 @@ client.contacts.get_list(
+#### πŸ“ Description + +
+
+ +
+
+ +Update an existing contact list identified by its ID. You can update the list name, move it to a different folder by providing a new folderId, or both. Only one of the two parameters (name, folderId) needs to be provided per request. +
+
+
+
+ #### πŸ”Œ Usage
@@ -7998,6 +8318,20 @@ client.contacts.update_list(
+#### πŸ“ Description + +
+
+ +
+
+ +Permanently delete a contact list identified by its ID. The contacts in the list are not deleted; they are only removed from this list. Returns a 404 error if the list ID does not exist. +
+
+
+
+ #### πŸ”Œ Usage
@@ -8057,6 +8391,20 @@ client.contacts.delete_list(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve all contacts belonging to a specific list, identified by its list ID. Results are paginated with a default of 50 contacts per page (maximum 500) and sorted in descending order of creation. You can optionally filter contacts by their modification date using the modifiedSince parameter. +
+
+
+
+ #### πŸ”Œ Usage
@@ -8291,6 +8639,20 @@ client.contacts.remove_contact_from_list(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve all contact segments defined in your Brevo account with support for pagination and sorting. Results default to 10 segments per page (maximum 50) sorted in descending order of creation. Each segment includes its ID, name, category name, and last update timestamp. +
+
+
+
+ #### πŸ”Œ Usage
@@ -8431,7 +8793,7 @@ client.contacts.get_contact_info(
-**start_date:** `typing.Optional[str]` β€” **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate +**start_date:** `typing.Optional[str]` β€” **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate. Must not be greater than the current date.
@@ -8439,7 +8801,7 @@ client.contacts.get_contact_info(
-**end_date:** `typing.Optional[str]` β€” **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. +**end_date:** `typing.Optional[str]` β€” **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Must not be greater than the current date.
@@ -8514,7 +8876,7 @@ client.contacts.update_contact(
-**identifier:** `UpdateContactRequestIdentifier` β€” Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE attribute value +**identifier:** `UpdateContactRequestIdentifier` β€” Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE_NUMBER attribute value
@@ -8522,7 +8884,7 @@ client.contacts.update_contact(
-**identifier_type:** `typing.Optional[UpdateContactRequestIdentifierType]` β€” email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE attribute +**identifier_type:** `typing.Optional[UpdateContactRequestIdentifierType]` β€” email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute
@@ -8586,6 +8948,14 @@ client.contacts.update_contact(
+**force_merge:** `typing.Optional[bool]` β€” When true, if the contact being updated shares an identifier (email, SMS, ext_id, whatsapp, landline) with an existing contact, the two contacts are force-merged. The contact with the most recent `last_modified` timestamp is retained; the other is deleted. When false (default), a 4xx error is returned on identifier conflict. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` β€” Request-specific configuration.
@@ -8683,6 +9053,20 @@ client.contacts.delete_contact(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve email campaign statistics for a specific contact identified by email address or numeric ID. Statistics include messages sent, opens, clicks, hard/soft bounces, deliveries, unsubscriptions, complaints, and transactional attributes. By default, data covers the last 90 days; use startDate and endDate parameters (YYYY-MM-DD) to specify a custom range with a maximum span of 90 days. +
+
+
+
+ #### πŸ”Œ Usage
@@ -8726,7 +9110,7 @@ client.contacts.get_contact_stats(
-**start_date:** `typing.Optional[str]` β€” **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate +**start_date:** `typing.Optional[str]` β€” **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate. Must not be greater than the current date.
@@ -8734,7 +9118,7 @@ client.contacts.get_contact_stats(
-**end_date:** `typing.Optional[str]` β€” **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days +**end_date:** `typing.Optional[str]` β€” **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Must not be greater than the current date. Maximum difference between startDate and endDate should not be greater than 90 days.
@@ -8767,7 +9151,7 @@ client.contacts.get_contact_stats(
-We recommend pinging this endpoint every minute for as long as the agent has to be considered online. +Sets the agent's status to online for 2-3 minutes. We recommend pinging this endpoint every minute for as long as the agent has to be considered online. You must provide either `agentId` alone, or all three of `agentEmail` + `agentName` + `receivedFrom`.
@@ -8808,7 +9192,7 @@ client.conversations.sets_agents_status_to_online_for23minutes(
-**agent_email:** `typing.Optional[typing.Any]` β€” agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically. +**agent_email:** `typing.Optional[str]` β€” Agent's email address. When sending online pings from a standalone system, it's hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there's no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically.
@@ -8816,7 +9200,7 @@ client.conversations.sets_agents_status_to_online_for23minutes(
-**agent_id:** `typing.Optional[typing.Any]` β€” agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). +**agent_id:** `typing.Optional[str]` β€” Agent ID. It can be found on the agent's page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required).
@@ -8824,7 +9208,7 @@ client.conversations.sets_agents_status_to_online_for23minutes(
-**agent_name:** `typing.Optional[typing.Any]` β€” agent name +**agent_name:** `typing.Optional[str]` β€” Agent's name.
@@ -8832,7 +9216,7 @@ client.conversations.sets_agents_status_to_online_for23minutes(
-**received_from:** `typing.Optional[typing.Any]` β€” mark your messages to distinguish messages created by you from the others. +**received_from:** `typing.Optional[str]` β€” Mark your messages to distinguish messages created by you from the others.
@@ -8856,6 +9240,20 @@ client.conversations.sets_agents_status_to_online_for23minutes(
+#### πŸ“ Description + +
+
+ +
+
+ +Send a message as an agent to an existing visitor's conversation. You must provide either `agentId` alone, or all three of `agentEmail` + `agentName` + `receivedFrom` to identify the agent. +
+
+
+
+ #### πŸ”Œ Usage
@@ -8893,7 +9291,7 @@ client.conversations.send_a_message_as_an_agent(
-**text:** `typing.Any` +**text:** `str` β€” Message text.
@@ -8901,7 +9299,7 @@ client.conversations.send_a_message_as_an_agent(
-**visitor_id:** `typing.Any` +**visitor_id:** `str` β€” Visitor's ID received from a webhook or generated by you to bind an existing user account to Conversations.
@@ -8909,7 +9307,7 @@ client.conversations.send_a_message_as_an_agent(
-**agent_email:** `typing.Optional[typing.Any]` β€” agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. +**agent_email:** `typing.Optional[str]` β€” Agent's email address. When sending messages from a standalone system, it's hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address.
@@ -8917,7 +9315,7 @@ client.conversations.send_a_message_as_an_agent(
-**agent_id:** `typing.Optional[typing.Any]` β€” agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). +**agent_id:** `typing.Optional[str]` β€” Agent ID. It can be found on the agent's page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required).
@@ -8925,7 +9323,7 @@ client.conversations.send_a_message_as_an_agent(
-**agent_name:** `typing.Optional[typing.Any]` β€” agent name +**agent_name:** `typing.Optional[str]` β€” Agent's name.
@@ -8933,7 +9331,7 @@ client.conversations.send_a_message_as_an_agent(
-**received_from:** `typing.Optional[typing.Any]` β€” mark your messages to distinguish messages created by you from the others. +**received_from:** `typing.Optional[str]` β€” Mark your messages to distinguish messages created by you from the others.
@@ -8957,6 +9355,20 @@ client.conversations.send_a_message_as_an_agent(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a single message by its ID. +
+
+
+
+ #### πŸ”Œ Usage
@@ -9024,7 +9436,7 @@ client.conversations.get_a_message(
-Only agents’ messages can be edited. +Update the text of a message sent by an agent. Only messages of type `agent` can be edited. The `text` and `html` fields of the message will be updated.
@@ -9074,7 +9486,7 @@ client.conversations.update_a_message_sent_by_an_agent(
-**text:** `str` β€” edited message text +**text:** `str` β€” The new message text.
@@ -9106,7 +9518,7 @@ client.conversations.update_a_message_sent_by_an_agent(
-Only agents’ messages can be deleted. +Delete a message sent by an agent. Only messages of type `agent` can be deleted.
@@ -9179,7 +9591,7 @@ client.conversations.delete_a_message_sent_by_an_agent(
-Example of automated messages: order status, announce new features in your web app, etc. +Send an automated (pushed) message to a visitor on behalf of an agent. Example use cases: order status updates, announcing new features in your web app, etc.
@@ -9204,7 +9616,7 @@ client = Brevo( client.conversations.send_an_automated_message_to_a_visitor( group_id="PjRBMhWGen6aRHjif", - text="Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88", + text="Your order has shipped! Here\'s your tracking number: 9114 5847 3325 9667 4328 88", visitor_id="kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", ) @@ -9222,7 +9634,7 @@ client.conversations.send_an_automated_message_to_a_visitor(
-**text:** `typing.Any` +**text:** `str` β€” Message text.
@@ -9230,7 +9642,7 @@ client.conversations.send_an_automated_message_to_a_visitor(
-**visitor_id:** `typing.Any` +**visitor_id:** `str` β€” Visitor's ID received from a webhook or generated by you to bind an existing user account to Conversations.
@@ -9238,7 +9650,7 @@ client.conversations.send_an_automated_message_to_a_visitor(
-**agent_id:** `typing.Optional[typing.Any]` β€” agent ID. It can be found on agent’s page or received from a webhook. +**agent_id:** `typing.Optional[str]` β€” Agent ID. It can be found on the agent's page or received from a webhook.
@@ -9246,7 +9658,7 @@ client.conversations.send_an_automated_message_to_a_visitor(
-**group_id:** `typing.Optional[typing.Any]` β€” group ID. It can be found on group’s page. +**group_id:** `typing.Optional[str]` β€” Group ID. It can be found on the group's page.
@@ -9270,6 +9682,20 @@ client.conversations.send_an_automated_message_to_a_visitor(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a single automated (pushed) message by its ID. +
+
+
+
+ #### πŸ”Œ Usage
@@ -9329,6 +9755,20 @@ client.conversations.get_an_automated_message(
+#### πŸ“ Description + +
+
+ +
+
+ +Update the text of an automated (pushed) message. The `text` and `html` fields of the message will be updated. +
+
+
+
+ #### πŸ”Œ Usage
@@ -9348,7 +9788,7 @@ client = Brevo( client.conversations.update_an_automated_message( id="id", - text="Your order has shipped! Here’s your tracking number: 9114 5847 4668 7775 9233 54", + text="Your order has shipped! Here\'s your tracking number: 9114 5847 4668 7775 9233 54", ) ``` @@ -9373,7 +9813,7 @@ client.conversations.update_an_automated_message(
-**text:** `str` β€” edited message text +**text:** `str` β€” The new message text.
@@ -9397,6 +9837,20 @@ client.conversations.update_an_automated_message(
+#### πŸ“ Description + +
+
+ +
+
+ +Delete an automated (pushed) message by its ID. +
+
+
+
+ #### πŸ”Œ Usage
@@ -9530,6 +9984,20 @@ client.conversations.set_visitor_group_assignment(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a paginated list of all ecommerce categories stored in your Brevo account. Results are sorted by creation date in descending order by default, and can be filtered by category IDs, name, modification date, creation date, or deletion status. The response includes a `count` field with the total number of matching categories, and pagination defaults to 50 categories per page (maximum 100). +
+
+
+
+ #### πŸ”Œ Usage
@@ -9643,6 +10111,20 @@ client.ecommerce.get_categories()
+#### πŸ“ Description + +
+
+ +
+
+ +Create a new ecommerce category or update an existing one, identified by the mandatory `id` field. When `updateEnabled` is set to `false` (the default), the endpoint performs an insert and returns `201`; if the category ID already exists, a `400` error is returned. When `updateEnabled` is `true`, the endpoint performs an upsert, returning `201` for a new category or `204` when an existing category is updated. The `name` field is mandatory for creation but optional for updates. +
+
+
+
+ #### πŸ”Œ Usage
@@ -9742,6 +10224,20 @@ client.ecommerce.create_update_category(
+#### πŸ“ Description + +
+
+ +
+
+ +Create or update multiple ecommerce categories in a single request. The `categories` array accepts up to 100 category objects, each requiring a unique `id`. When `updateEnabled` is `false` (the default), all categories are inserted as new; if any ID already exists, a `400` error is returned. When `updateEnabled` is `true`, existing categories are updated and new ones are created via upsert. Duplicate IDs within the same request payload are rejected. The response returns the count of created and updated categories. +
+
+
+
+ #### πŸ”Œ Usage
@@ -9814,6 +10310,20 @@ client.ecommerce.create_update_batch_category(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the full details of a single ecommerce category by its unique ID. The response includes the category name, URL, creation and modification timestamps, and deletion status. Returns a `404` error if no category matches the provided ID. +
+
+
+
+ #### πŸ”Œ Usage
@@ -9936,6 +10446,20 @@ client.ecommerce.activate_the_e_commerce_app()
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve aggregated ecommerce attribution metrics for one or more Brevo email campaigns, SMS campaigns, or automation workflows. You can optionally filter by a date range using `periodFrom` and `periodTo` in RFC3339 format. The response includes per-source metrics (orders count, revenue, and average basket) as well as aggregated totals across all requested sources. +
+
+
+
+ #### πŸ”Œ Usage
@@ -9957,6 +10481,9 @@ client = Brevo( client.ecommerce.get_attribution_metrics_for_one_or_more_brevo_campaigns_or_workflows( period_from=datetime.datetime.fromisoformat("2022-01-02T00:00:00+00:00"), period_to=datetime.datetime.fromisoformat("2022-01-03T00:00:00+00:00"), + email_campaign_id_array=[ + "sale" + ], ) ``` @@ -10037,6 +10564,20 @@ client.ecommerce.get_attribution_metrics_for_one_or_more_brevo_campaigns_or_work
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve detailed attribution metrics for a single Brevo campaign or automation workflow, identified by its conversion source type and ID. The response includes orders count, revenue, average basket value, and the number of new customers attributed to that specific campaign or workflow. +
+
+
+
+ #### πŸ”Œ Usage
@@ -10105,6 +10646,20 @@ client.ecommerce.get_detailed_attribution_metrics_for_a_single_brevo_campaign_or
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the list of products whose sales have been attributed to a specific Brevo campaign or automation workflow. Each product entry includes its ID, name, SKU, image URL, product URL, price, revenue, and orders count. The conversion source type must be one of `email_campaign`, `sms_campaign`, `automation_workflow_email`, or `automation_workflow_sms`. +
+
+
+
+ #### πŸ”Œ Usage
@@ -10173,7 +10728,21 @@ client.ecommerce.get_attributed_product_sales_for_a_single_brevo_campaign_or_wor
-#### πŸ”Œ Usage +#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the ISO 4217 display currency code currently configured for your Brevo ecommerce account. This currency is used to display monetary values across the ecommerce dashboard and reports. Returns a `403` error if ecommerce is not activated on the account. +
+
+
+
+ +#### πŸ”Œ Usage
@@ -10222,6 +10791,20 @@ client.ecommerce.get_the_iso4217compliant_display_currency_code_for_your_brevo_a
+#### πŸ“ Description + +
+
+ +
+
+ +Set or update the ISO 4217 display currency code for your Brevo ecommerce account. This currency determines how monetary values are displayed in the ecommerce dashboard and reports. The provided currency code must be a valid ISO 4217 code; invalid codes result in a `422` error. Returns a `403` error if ecommerce is not activated on the account. +
+
+
+
+ #### πŸ”Œ Usage
@@ -10538,7 +11121,7 @@ client.ecommerce.create_batch_order(
-**historical:** `typing.Optional[bool]` β€” Defines wether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual. +**historical:** `typing.Optional[bool]` β€” Defines whether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual.
@@ -10546,7 +11129,7 @@ client.ecommerce.create_batch_order(
-**notify_url:** `typing.Optional[str]` β€” Notify Url provided by client_dev to get the status of batch request +**notify_url:** `typing.Optional[str]` β€” Webhook URL to receive the status of the batch request
@@ -10570,6 +11153,20 @@ client.ecommerce.create_batch_order(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a paginated list of all ecommerce products stored in your Brevo account. Results are sorted by creation date in descending order by default, and can be filtered by product IDs, name (minimum 3 characters), price range, category IDs, modification date, creation date, or deletion status. Use the `search` parameter to query across SKU, name, and ID simultaneously β€” results are prioritized as exact SKU match > SKU prefix match > name match > ID match. Pagination defaults to 50 products per page (maximum 1000), and the response includes a `count` field with the total number of matching products. +
+
+
+
+ #### πŸ”Œ Usage
@@ -10635,6 +11232,14 @@ client.ecommerce.get_products()
+**search:** `typing.Optional[str]` β€” Search products simultaneously across SKU, name, and ID fields. Results are returned in the following priority order: **exact SKU match** > **SKU prefix match** > **name match** > **ID match**. For example, `?search=123` on products with `{sku: "123"}` and `{sku: "123456"}` returns the exact SKU match first. + +
+
+ +
+
+ **name:** `typing.Optional[str]` β€” Filter by product name, minimum 3 characters should be present for search.
@@ -10691,6 +11296,54 @@ client.ecommerce.get_products()
+**alternative_price_lte:** `typing.Optional[float]` β€” Alternative price filter for products less than and equals to particular amount + +
+
+ +
+
+ +**alternative_price_gte:** `typing.Optional[float]` β€” Alternative price filter for products greater than and equals to particular amount + +
+
+ +
+
+ +**alternative_price_lt:** `typing.Optional[float]` β€” Alternative price filter for products less than particular amount + +
+
+ +
+
+ +**alternative_price_gt:** `typing.Optional[float]` β€” Alternative price filter for products greater than particular amount + +
+
+ +
+
+ +**alternative_price_eq:** `typing.Optional[float]` β€” Alternative price filter for products equals to particular amount + +
+
+ +
+
+ +**alternative_price_ne:** `typing.Optional[float]` β€” Alternative price filter for products not equals to particular amount + +
+
+ +
+
+ **categories:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` β€” Filter by categories ids
@@ -10699,7 +11352,7 @@ client.ecommerce.get_products()
-**modified_since:** `typing.Optional[str]` β€” Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** +**modified_since:** `typing.Optional[str]` β€” Filter (urlencoded) the products modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
@@ -10707,7 +11360,15 @@ client.ecommerce.get_products()
-**created_since:** `typing.Optional[str]` β€” Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** +**created_since:** `typing.Optional[str]` β€” Filter (urlencoded) the products created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + +
+
+ +
+
+ +**sort_by_field:** `typing.Optional[GetProductsRequestSortByField]` β€” Sort the results by a specific field. Default sort field is `created_at` when not passed.
@@ -10739,6 +11400,20 @@ client.ecommerce.get_products()
+#### πŸ“ Description + +
+
+ +
+
+ +Create a new ecommerce product or update an existing one, identified by the mandatory `id` field. When `updateEnabled` is `false` (the default), the endpoint inserts a new product and returns `201`; if the product ID already exists, a `400` error is returned. When `updateEnabled` is `true`, the endpoint performs an upsert, returning `201` for a new product or `204` for an update. The `name` field is mandatory for creation but optional for updates. Product images are downloaded, validated (max 5 MB, formats: jpeg, jpg, png, bmp, gif, webp), and re-hosted on S3. The `metaInfo` object supports up to 20 keys with a cumulative size limit of approximately 1000 KB. +
+
+
+
+ #### πŸ”Œ Usage
@@ -10783,7 +11458,7 @@ client.ecommerce.create_update_product(
-**name:** `str` β€” Mandatory in case of creation**. Name of the product for which you requested the details +**name:** `str` β€” **Mandatory in case of creation**. Name of the product, as displayed in the shop
@@ -10863,6 +11538,14 @@ client.ecommerce.create_update_product(
+**alternative_price:** `typing.Optional[float]` β€” Alternative price of the product + +
+
+ +
+
+ **sku:** `typing.Optional[str]` β€” Product identifier from the shop
@@ -10879,7 +11562,7 @@ client.ecommerce.create_update_product(
-**update_enabled:** `typing.Optional[bool]` β€” Facilitate to update the existing category in the same request (updateEnabled = true) +**update_enabled:** `typing.Optional[bool]` β€” Facilitate to update the existing product in the same request (updateEnabled = true)
@@ -10911,6 +11594,20 @@ client.ecommerce.create_update_product(
+#### πŸ“ Description + +
+
+ +
+
+ +Create or update multiple ecommerce products in a single request. The `products` array accepts up to 100 product objects for creation (or up to 1000 when `updateEnabled` is `true` and the account has an increased limit). Each product requires a unique `id` and `name` (name is mandatory for creation only). When `updateEnabled` is `false`, all products are inserted as new; if any ID already exists, a `400` error is returned. When `updateEnabled` is `true`, existing products are updated and new ones are created via upsert. Duplicate IDs within the same request payload are rejected. The response returns the count of created and updated products. +
+
+
+
+ #### πŸ”Œ Usage
@@ -10960,7 +11657,7 @@ client.ecommerce.create_update_batch_products(
-**update_enabled:** `typing.Optional[bool]` β€” Facilitate to update the existing categories in the same request (updateEnabled = true) +**update_enabled:** `typing.Optional[bool]` β€” Facilitate to update the existing products in the same request (updateEnabled = true)
@@ -10984,6 +11681,20 @@ client.ecommerce.create_update_batch_products(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the full details of a single ecommerce product by its unique ID. The response includes the product name, price, SKU, URL, image URLs (original and thumbnails), categories, stock level, meta information, creation and modification timestamps, and deletion status. Returns a `404` error if no product matches the provided ID. +
+
+
+
+ #### πŸ”Œ Usage
@@ -11043,6 +11754,20 @@ client.ecommerce.get_product_info(
+#### πŸ“ Description + +
+
+ +
+
+ +Register a contact to receive an alert for a specific product event, such as `back_in_stock`. At least one contact identifier (`ext_id`, `email`, or `sms`) must be provided; when multiple are given, priority is `ext_id` > `email` > `sms`. Returns a `404` error if the product ID does not exist, and a `403` error if product alerts are not enabled for the account. +
+
+
+
+ #### πŸ”Œ Usage
@@ -11119,6 +11844,20 @@ client.ecommerce.create_product_alert(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a paginated list of all coupon collections in your Brevo account. Results can be sorted by creation date, remaining coupons count, or expiration date, in ascending or descending order. Pagination defaults to 50 collections per page (maximum 100). +
+
+
+
+ #### πŸ”Œ Usage
@@ -11200,6 +11939,20 @@ client.coupons.get_coupon_collections()
+#### πŸ“ Description + +
+
+ +
+
+ +Create a new coupon collection with a name and a default coupon value. You can optionally set an expiration date in RFC3339 format and configure alert thresholds to receive email notifications when remaining coupons or remaining days before expiration fall below a specified number. The collection ID is auto-generated as a UUID and returned in the response. +
+
+
+
+ #### πŸ”Œ Usage
@@ -11292,6 +12045,20 @@ client.coupons.create_coupon_collection(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the details of a single coupon collection by its UUID. The response includes the collection name, default coupon value, total and remaining coupon counts, and creation timestamp. Returns a `404` error if no collection matches the provided ID. +
+
+
+
+ #### πŸ”Œ Usage
@@ -11351,6 +12118,20 @@ client.coupons.get_coupon_collection(
+#### πŸ“ Description + +
+
+ +
+
+ +Update an existing coupon collection by its UUID. You can modify the default coupon value, set or remove the expiration date (pass `null` to remove), and configure or disable alert thresholds for remaining coupons or remaining days. Only the fields included in the request body are updated; omitted fields remain unchanged. +
+
+
+
+ #### πŸ”Œ Usage
@@ -11442,6 +12223,20 @@ client.coupons.update_coupon_collection(
+#### πŸ“ Description + +
+
+ +
+
+ +Add coupons to an existing coupon collection. The `coupons` array must contain between 1 and 10,000 unique coupon code strings, all associated with the specified `collectionId`. Coupon creation is processed asynchronously and a `204` status is returned immediately upon acceptance. Returns a `404` error if the specified coupon collection does not exist. +
+
+
+
+ #### πŸ”Œ Usage
@@ -11513,6 +12308,20 @@ client.coupons.create_coupons(
+#### πŸ“ Description + +
+
+ +
+
+ +Create a new payment request for a Brevo contact. The request requires a reference (displayed on the payment page), a contact ID, and a cart with currency and amount in cents. You can optionally configure a custom success redirect URL and enable email notifications with reminders. Returns the payment request ID and its public payment URL. A `403` error is returned if Brevo Payments is not activated or the account is not validated. +
+
+
+
+ #### πŸ”Œ Usage
@@ -11617,6 +12426,20 @@ client.payments.create_payment_request(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the details of a specific payment request by its ID. The response includes the reference, status (created, sent, reminderSent, or paid), cart details, notification configuration, contact ID, and the number of reminders sent. Returns a `404` error if no payment request matches the provided ID. +
+
+
+
+ #### πŸ”Œ Usage
@@ -11676,6 +12499,20 @@ client.payments.get_payment_request(
+#### πŸ“ Description + +
+
+ +
+
+ +Delete a payment request by its UUID. Once deleted, the payment request can no longer be accessed or paid. Returns a `404` error if no payment request matches the provided ID, and a `403` error if Brevo Payments is not activated or the account is not validated. +
+
+
+
+ #### πŸ”Œ Usage
@@ -11910,7 +12747,7 @@ client.event.create_event(
-**event_name:** `str` β€” The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters, alphanumerical characters and - _ only. +**event_name:** `str` β€” The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters; only alphanumeric characters, hyphens (-), and underscores (_) are allowed.
@@ -11934,7 +12771,7 @@ client.event.create_event(
-**event_date:** `typing.Optional[str]` β€” Timestamp of when the event occurred (e.g. "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp of the event creation is used. +**event_date:** `typing.Optional[datetime.datetime]` β€” ISO 8601 timestamp of when the event occurred (e.g. "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp of the event creation is used.
@@ -11942,7 +12779,7 @@ client.event.create_event(
-**event_properties:** `typing.Optional[typing.Dict[str, CreateEventRequestEventPropertiesValue]]` β€” Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb. +**event_properties:** `typing.Optional[typing.Dict[str, CreateEventRequestEventPropertiesValue]]` β€” Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field types are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50KB.
@@ -11999,7 +12836,7 @@ Create multiple events to track contacts' interactions in a single request. ```python from brevo import Brevo from brevo.environment import BrevoEnvironment -from brevo.event import CreateBatchEventsRequestItem, CreateBatchEventsRequestItemIdentifiers +from brevo.event import CreateBatchEventsRequestEventsItem, CreateBatchEventsRequestEventsItemIdentifiers client = Brevo( api_key="", @@ -12007,10 +12844,10 @@ client = Brevo( ) client.event.create_batch_events( - request=[ - CreateBatchEventsRequestItem( + events=[ + CreateBatchEventsRequestEventsItem( event_name="order_created", - identifiers=CreateBatchEventsRequestItemIdentifiers(), + identifiers=CreateBatchEventsRequestEventsItemIdentifiers(), ) ], ) @@ -12029,7 +12866,7 @@ client.event.create_batch_events(
-**request:** `typing.List[CreateBatchEventsRequestItem]` +**events:** `typing.List[CreateBatchEventsRequestEventsItem]`
@@ -12062,7 +12899,7 @@ client.event.create_batch_events(
-This endpoint will show the list of all the events for the received emails. +This endpoint will show the list of all the events for the received emails. When no date range is provided, the last 30 days of events are returned by default.
@@ -12109,7 +12946,7 @@ client.inbound_parsing.get_inbound_email_events()
-**start_date:** `typing.Optional[str]` β€” Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month. +**start_date:** `typing.Optional[str]` β€” Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is 30 days. Must not be in the future.
@@ -12117,7 +12954,7 @@ client.inbound_parsing.get_inbound_email_events()
-**end_date:** `typing.Optional[str]` β€” Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month. +**end_date:** `typing.Optional[str]` β€” Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is 30 days. Must not be in the future.
@@ -12308,7 +13145,7 @@ client.inbound_parsing.get_inbound_email_attachment( ## Balance -
client.balance.get_active_balances_api(...) -> BalanceLimit +
client.balance.get_active_balances_api(...) -> GetLoyaltyBalanceProgramsPidActiveBalanceResponse
@@ -12345,8 +13182,8 @@ client = Brevo( client.balance.get_active_balances_api( pid="pid", - contact_id=1, - balance_definition_id="balance_definition_id", + contact_id=1000000, + balance_definition_id="balanceDefinitionId", ) ``` @@ -12403,7 +13240,7 @@ client.balance.get_active_balances_api(
-**sort_field:** `typing.Optional[str]` β€” Sort Field +**sort_field:** `typing.Optional[typing.Literal]` β€” Sort Field
@@ -12411,7 +13248,7 @@ client.balance.get_active_balances_api(
-**sort:** `typing.Optional[str]` β€” Sort Order +**sort:** `typing.Optional[GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort]` β€” Sort Order
@@ -13620,7 +14457,7 @@ client.balance.delete_balance_limit(
-Returns balance list +Returns contact balances for a given balance definition across all subscriptions.
@@ -13645,6 +14482,7 @@ client = Brevo( client.balance.get_contact_balances( pid="pid", + balance_definition_id="balanceDefinitionId", ) ``` @@ -13669,6 +14507,14 @@ client.balance.get_contact_balances(
+**balance_definition_id:** `str` β€” Balance Definition ID (required) + +
+
+ +
+
+ **include_internal:** `typing.Optional[bool]` β€” Include balances tied to internal definitions.
@@ -13677,6 +14523,38 @@ client.balance.get_contact_balances(
+**limit:** `typing.Optional[int]` β€” Limit the number of records returned + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` β€” Skip a number of records + +
+
+ +
+
+ +**sort:** `typing.Optional[GetContactBalancesRequestSort]` β€” Sort order + +
+
+ +
+
+ +**sort_field:** `typing.Optional[GetContactBalancesRequestSortField]` β€” Field to sort by + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` β€” Request-specific configuration.
@@ -13730,7 +14608,7 @@ client.balance.create_balance_order( balance_definition_id="balanceDefinitionId", contact_id=1, due_at="dueAt", - source="source", + source="engine", ) ``` @@ -13787,7 +14665,7 @@ client.balance.create_balance_order(
-**source:** `str` β€” Specifies the origin of the order (`engine` or `user`). +**source:** `CreateBalanceOrderRequestSource` β€” Specifies the origin of the order.
@@ -14041,7 +14919,7 @@ client = Brevo( client.balance.get_transaction_history_api( pid="pid", - contact_id=1, + contact_id=1000000, balance_definition_id="balanceDefinitionId", ) @@ -14107,7 +14985,7 @@ client.balance.get_transaction_history_api(
-**sort:** `typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort]` β€” Sort order, either asc or desc +**sort:** `typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort]` β€” Sort order
@@ -14115,7 +14993,7 @@ client.balance.get_transaction_history_api(
-**filters:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` β€” Filters to apply +**status:** `typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus]` β€” Transaction status filter
@@ -14123,7 +15001,7 @@ client.balance.get_transaction_history_api(
-**status:** `typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus]` β€” Transaction status filter. Allowed values: draft, completed, rejected, cancelled, expired +**transaction_type:** `typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType]` β€” Transaction type filter
@@ -14131,7 +15009,7 @@ client.balance.get_transaction_history_api(
-**transaction_type:** `typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType]` β€” Transaction type filter. Allowed values: credit, debit +**loyalty_subscription_id:** `typing.Optional[str]` β€” Loyalty Subscription ID filter
@@ -14214,7 +15092,7 @@ client.balance.begin_transaction(
-**amount:** `float` β€” Transaction amount (must be provided). +**amount:** `float` β€” Transaction amount. A positive value creates a credit transaction and a negative value creates a debit transaction (unless transactionType is explicitly provided).
@@ -14230,7 +15108,7 @@ client.balance.begin_transaction(
-**loyalty_subscription_id:** `typing.Optional[str]` β€” Unique identifier for the loyalty subscription (required unless `contactId` is provided). +**transaction_type:** `typing.Optional[BeginTransactionRequestTransactionType]` β€” Explicit transaction type. If not provided, the type is inferred from the sign of the amount (positive = credit, negative = debit).
@@ -14238,7 +15116,7 @@ client.balance.begin_transaction(
-**auto_complete:** `typing.Optional[bool]` β€” Whether the transaction should be automatically completed. +**contact_id:** `typing.Optional[int]` β€” Unique identifier of the contact involved in the transaction. Required unless `LoyaltySubscriptionId` is provided.
@@ -14246,7 +15124,7 @@ client.balance.begin_transaction(
-**balance_expiry_in_minutes:** `typing.Optional[int]` β€” Optional expiry time for the balance in minutes (must be greater than 0 if provided). +**loyalty_subscription_id:** `typing.Optional[str]` β€” Unique identifier for the loyalty subscription. Required unless `contactId` is provided.
@@ -14254,7 +15132,7 @@ client.balance.begin_transaction(
-**contact_id:** `typing.Optional[int]` β€” Unique identifier of the contact involved in the transaction (required unless `LoyaltySubscriptionId` is provided). +**meta:** `typing.Optional[typing.Dict[str, typing.Any]]` β€” Optional metadata associated with the transaction.
@@ -14262,7 +15140,7 @@ client.balance.begin_transaction(
-**event_time:** `typing.Optional[str]` β€” Optional timestamp specifying when the transaction occurred. +**ttl:** `typing.Optional[int]` β€” Time-to-live for the transaction in seconds. Must be at least 10 seconds if provided.
@@ -14270,7 +15148,7 @@ client.balance.begin_transaction(
-**meta:** `typing.Optional[typing.Dict[str, typing.Any]]` β€” Optional metadata associated with the transaction. +**event_time:** `typing.Optional[datetime.datetime]` β€” Timestamp specifying when the transaction event occurred (ISO 8601 / RFC 3339 format).
@@ -14278,7 +15156,15 @@ client.balance.begin_transaction(
-**ttl:** `typing.Optional[int]` β€” Optional time-to-live for the transaction (must be greater than 0 if provided). +**auto_complete:** `typing.Optional[bool]` β€” Whether the transaction should be automatically completed. + +
+
+ +
+
+ +**balance_expiry_in_minutes:** `typing.Optional[int]` β€” Expiry time for the balance in minutes. Must be greater than 0 if provided. Only applicable when autoComplete is true.
@@ -14538,7 +15424,7 @@ client.program.get_lp_list()
-**sort:** `typing.Optional[str]` β€” Sort documents by field +**sort:** `typing.Optional[GetLpListRequestSort]` β€” Sort order
@@ -15475,7 +16361,7 @@ client = Brevo( client.program.subscribe_to_loyalty_program( pid="pid", - contact_id=1, + contact_id=1000000, ) ``` @@ -15508,7 +16394,7 @@ client.program.subscribe_to_loyalty_program(
-**creation_date:** `typing.Optional[str]` β€” Optional custom date-time format. +**loyalty_subscription_id:** `typing.Optional[str]` β€” Optional subscription ID (max length 64).
@@ -15516,7 +16402,15 @@ client.program.subscribe_to_loyalty_program(
-**loyalty_subscription_id:** `typing.Optional[str]` β€” Optional subscription ID (max length 64). +**creation_date:** `typing.Optional[datetime.datetime]` β€” Optional creation date in ISO 8601 format (YYYY-MM-DDThh:mm:ss.ffffff+HH:MM). Must be in the past. + +
+
+ +
+
+ +**meta:** `typing.Optional[typing.Dict[str, typing.Any]]` β€” Optional metadata associated with the subscription.
@@ -15948,6 +16842,14 @@ client.reward.create_voucher(
+**valid_from:** `typing.Optional[str]` β€” Date from which the voucher becomes valid. Accepts RFC 3339 or DD/MM/YYYY HH:MM AM/PM format. Converted to UTC using the organization's timezone. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` β€” Request-specific configuration.
@@ -16069,7 +16971,15 @@ client.reward.redeem_voucher(
-**reward_id:** `typing.Optional[str]` β€” Unique identifier for the reward +**reward_id:** `typing.Optional[str]` β€” Unique identifier for the reward + +
+
+ +
+
+ +**ttl:** `typing.Optional[int]` β€” Time to live in seconds for the redemption request
@@ -16077,7 +16987,7 @@ client.reward.redeem_voucher(
-**ttl:** `typing.Optional[int]` β€” Time to live in seconds for the redemption request +**auto_complete:** `typing.Optional[bool]` β€” Whether the redemption should be automatically completed
@@ -16876,6 +17786,22 @@ client.tier.create_tier_group(
+**upgrade_schedule:** `typing.Optional[CreateTierGroupRequestUpgradeSchedule]` β€” Schedule configuration for tier upgrades. Required when upgradeStrategy is set to a schedule-based strategy. + +
+
+ +
+
+ +**downgrade_schedule:** `typing.Optional[CreateTierGroupRequestDowngradeSchedule]` β€” Schedule configuration for tier downgrades. Required when downgradeStrategy is set to a schedule-based strategy. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` β€” Request-specific configuration.
@@ -17606,7 +18532,7 @@ client.tier.delete_tier(
The response payload for this endpoint has changed -You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/get-all-marketing-campaigns). +You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/2023/2/7).
@@ -17661,7 +18587,7 @@ client.email_campaigns.get_email_campaigns()
-**statistics:** `typing.Optional[GetEmailCampaignsRequestStatistics]` β€” Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the **Get Campaign Report** endpoint. +**statistics:** `typing.Optional[GetEmailCampaignsRequestStatistics]` β€” Filter on the type of statistics required. Example: **globalStats** value will only fetch globalStats info of the campaign in the returned response. This option only returns data for events that occurred in the last 6 months. For older campaigns, it is advisable to use the **Get Campaign Report** endpoint.
@@ -17669,7 +18595,7 @@ client.email_campaigns.get_email_campaigns()
-**start_date:** `typing.Optional[str]` β€” **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) +**start_date:** `typing.Optional[str]` β€” **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. The date range between `startDate` and `endDate` must not exceed 2 years. `startDate` must not be in the future.
@@ -17677,7 +18603,7 @@ client.email_campaigns.get_email_campaigns()
-**end_date:** `typing.Optional[str]` β€” **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) +**end_date:** `typing.Optional[str]` β€” **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. The date range between `startDate` and `endDate` must not exceed 2 years. `endDate` must not be in the future.
@@ -17709,7 +18635,15 @@ client.email_campaigns.get_email_campaigns()
-**exclude_html_content:** `typing.Optional[bool]` β€” Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body +**exclude_html_content:** `typing.Optional[bool]` β€” Use this flag to exclude htmlContent from the response body. If set to **true**, the htmlContent field will be returned as an empty string in the response body. + +
+
+ +
+
+ +**exclude_pdf_attachment:** `typing.Optional[bool]` β€” Use this flag to filter out campaigns that have a PDF attachment. If set to **true**, only campaigns without a PDF attachment (or with no attachment at all) will be returned.
@@ -17733,6 +18667,20 @@ client.email_campaigns.get_email_campaigns()
+#### πŸ“ Description + +
+
+ +
+
+ +Create a new email campaign. The campaign requires at minimum a name and sender details, and is created in draft status by default. You must provide email content via one of three mutually exclusive options: htmlContent (inline HTML), htmlUrl (remote URL), or templateId (existing template); additionally, A/B testing can be enabled by setting abTesting to true with subjectA and subjectB, but this is incompatible with sendAtBestTime. +
+
+
+
+ #### πŸ”Œ Usage
@@ -17778,7 +18726,7 @@ client.email_campaigns.create_email_campaign(
-**sender:** `CreateEmailCampaignRequestSender` β€” Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{"name":"xyz", "email":"example@abc.com"}** **{"name":"xyz", "id":123}** +**sender:** `CreateEmailCampaignRequestSender` β€” Sender details including id or email and name (optional). Only one of either Sender’s email or Sender’s ID shall be passed in one request at a time. Passing both `email` and `id` will result in an error. For example: **{"name":"xyz", "email":"example@abc.com"}** or **{"name":"xyz", "id":123}**
@@ -17826,7 +18774,7 @@ client.email_campaigns.create_email_campaign(
-**html_content:** `typing.Optional[str]` β€” Mandatory if htmlUrl and templateId are empty. Body of the message (HTML). +**html_content:** `typing.Optional[str]` β€” **Mandatory if htmlUrl and templateId are empty.** Body of the message (HTML). Must have more than 10 characters and be less than 1MB in size. Cannot be used together with `htmlUrl` or `templateId`.
@@ -17834,7 +18782,7 @@ client.email_campaigns.create_email_campaign(
-**html_url:** `typing.Optional[str]` β€” **Mandatory if htmlContent and templateId are empty**. Url to the message (HTML). For example: **https://html.domain.com** +**html_url:** `typing.Optional[str]` β€” **Mandatory if htmlContent and templateId are empty.** URL to the message (HTML). Cannot be used together with `htmlContent` or `templateId`. For example: **https://html.domain.com**
@@ -17970,7 +18918,7 @@ client.email_campaigns.create_email_campaign(
-**template_id:** `typing.Optional[int]` β€” **Mandatory if htmlContent and htmlUrl are empty**. Id of the transactional email template with status _active_. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. +**template_id:** `typing.Optional[int]` β€” **Mandatory if htmlContent and htmlUrl are empty.** Id of the transactional email template with status _active_. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. Cannot be used together with `htmlContent` or `htmlUrl`.
@@ -18042,6 +18990,20 @@ client.email_campaigns.create_email_campaign(
+#### πŸ“ Description + +
+
+ +
+
+ +Upload an image to your account''s image gallery by providing an absolute URL to the image. The maximum allowed image size is 2MB and supported formats are jpeg, jpg, png, bmp, and gif; local file uploads are not supported. +
+
+
+
+ #### πŸ”Œ Usage
@@ -18109,6 +19071,20 @@ client.email_campaigns.upload_image_to_gallery(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve detailed information about a specific email campaign by its ID, including recipients, statistics, and HTML content. Use the statistics query parameter to select which statistics to include (globalStats, linksStats, statsByDomain, statsByDevice, or statsByBrowser); statsByDevice and statsByBrowser are only available on this single-campaign endpoint. You can exclude HTML content from the response by setting excludeHtmlContent to true. +
+
+
+
+ #### πŸ”Œ Usage
@@ -18152,7 +19128,7 @@ client.email_campaigns.get_email_campaign(
-**statistics:** `typing.Optional[GetEmailCampaignRequestStatistics]` β€” Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. +**statistics:** `typing.Optional[GetEmailCampaignRequestStatistics]` β€” Filter on the type of statistics required. Example: **globalStats** value will only fetch globalStats info of the campaign in the returned response. `statsByDevice` and `statsByBrowser` are only available when retrieving a single campaign (not in the list endpoint).
@@ -18184,6 +19160,20 @@ client.email_campaigns.get_email_campaign(
+#### πŸ“ Description + +
+
+ +
+
+ +Update an existing email campaign''s properties such as name, subject, content, sender, recipients, schedule, and A/B testing configuration. The campaign must exist and the request body must contain at least one valid field to update. Only draft or scheduled campaigns can be modified; if sendAtBestTime is enabled, IP warmup will be automatically disabled. +
+
+
+
+ #### πŸ”Œ Usage
@@ -18499,6 +19489,20 @@ client.email_campaigns.update_email_campaign(
+#### πŸ“ Description + +
+
+ +
+
+ +Delete an email campaign by its campaign ID. Only campaigns that have not been scheduled can be deleted; attempting to delete a campaign that has already been scheduled will return a 403 permission denied error. Related data in templates, newsletter builder, and schedule collections is also cleaned up. +
+
+
+
+ #### πŸ”Œ Usage
@@ -18631,6 +19635,20 @@ client.email_campaigns.get_ab_test_campaign_result(
+#### πŸ“ Description + +
+
+ +
+
+ +Export the recipients of a sent email campaign as an asynchronous process, filtered by recipient type (e.g. openers, clickers, hardBounces). The recipientsType field is required and determines which subset of recipients to export. An optional notifyURL webhook will be called once the export is complete, and the response returns a processId to track the export status. +
+
+
+
+ #### πŸ”Œ Usage
@@ -18707,6 +19725,20 @@ client.email_campaigns.email_export_recipients(
+#### πŸ“ Description + +
+
+ +
+
+ +Send an existing email campaign immediately by scheduling it for the current time. The campaign must have valid recipients and content configured before sending. The system verifies your account''s send limit and credit balance before dispatching; if credits are insufficient, a 402 error is returned. +
+
+
+
+ #### πŸ”Œ Usage
@@ -18853,6 +19885,20 @@ client.email_campaigns.send_report(
+#### πŸ“ Description + +
+
+ +
+
+ +Send a test version of an email campaign to specified email addresses or your entire test list. If the emailTo array is left empty, the test mail will be sent to all addresses in your test list. You can send a maximum of 50 test emails per day. +
+
+
+
+ #### πŸ”Œ Usage
@@ -18993,6 +20039,20 @@ client.email_campaigns.get_shared_template_url(
+#### πŸ“ Description + +
+
+ +
+
+ +Update the status of an email campaign, such as suspending, archiving, or replicating it. Available status values include suspended, archive, darchive, sent, queued, replicate, replicateTemplate, cancel, and draft. Note that the replicateTemplate status is only available for template type campaigns. +
+
+
+
+ #### πŸ”Œ Usage
@@ -19061,6 +20121,20 @@ client.email_campaigns.update_campaign_status(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a paginated list of all your SMS campaigns with their statistics and recipient information. Results can be filtered by status and date range, with a default limit of 500 and maximum of 1000 per page. The sort order defaults to descending by creation date; date filters are only available when status is not passed or is set to sent. +
+
+
+
+ #### πŸ”Œ Usage
@@ -19102,7 +20176,7 @@ client.sms_campaigns.get_sms_campaigns()
-**start_date:** `typing.Optional[str]` β€” **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) +**start_date:** `typing.Optional[str]` β€” **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent SMS campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. `startDate` must not be in the future.
@@ -19110,7 +20184,7 @@ client.sms_campaigns.get_sms_campaigns()
-**end_date:** `typing.Optional[str]` β€” **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) +**end_date:** `typing.Optional[str]` β€” **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent SMS campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. `endDate` must not be in the future.
@@ -19118,7 +20192,7 @@ client.sms_campaigns.get_sms_campaigns()
-**limit:** `typing.Optional[int]` β€” Number limitation for the result returned +**limit:** `typing.Optional[int]` β€” Number of documents per page
@@ -19158,6 +20232,20 @@ client.sms_campaigns.get_sms_campaigns()
+#### πŸ“ Description + +
+
+ +
+
+ +Create a new SMS campaign with the required name, sender, and content fields. The sender name is limited to 11 alphanumeric characters or 15 numeric characters, and the content should stay within 160 characters per SMS segment. If a scheduledAt date is provided, listIds in recipients become mandatory; accounts under validation are limited to 4 total campaigns and campaigns with more than 10 recipients will be saved as draft. +
+
+
+
+ #### πŸ”Œ Usage
@@ -19275,6 +20363,20 @@ client.sms_campaigns.create_sms_campaign(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve detailed information about a specific SMS campaign by its ID, including campaign content, sender, recipients with list names, statistics (delivered, sent, bounces, unsubscriptions, answered), and tags. Unlike the list endpoint, recipients are returned as objects with id and name fields rather than plain IDs. +
+
+
+
+ #### πŸ”Œ Usage
@@ -19334,6 +20436,20 @@ client.sms_campaigns.get_sms_campaign(
+#### πŸ“ Description + +
+
+ +
+
+ +Update an existing SMS campaign''s properties such as name, sender, content, recipients, scheduled date, organisation prefix, and unsubscribe instructions. The request body must contain at least one valid field to update. The campaign must exist and must be of type SMS; if a scheduledAt is provided, valid recipients must be present either in the request or already configured on the campaign. +
+
+
+
+ #### πŸ”Œ Usage
@@ -19457,6 +20573,20 @@ client.sms_campaigns.update_sms_campaign(
+#### πŸ“ Description + +
+
+ +
+
+ +Delete an SMS campaign by its campaign ID. Only campaigns that have not been scheduled or sent can be deleted; attempting to delete a campaign that is queued, in process, or has been sent with recipients will return a 403 permission denied error. +
+
+
+
+ #### πŸ”Œ Usage
@@ -19606,6 +20736,20 @@ client.sms_campaigns.request_sms_recipient_export(
+#### πŸ“ Description + +
+
+ +
+
+ +Send an existing SMS campaign immediately by scheduling it for the current time. The system verifies your account''s SMS credit balance before dispatching; if credits are insufficient or the remaining credit is less than the number of recipients, a 402 error is returned. The campaign must have valid recipients and content already configured. +
+
+
+
+ #### πŸ”Œ Usage
@@ -19752,6 +20896,20 @@ client.sms_campaigns.send_sms_report(
+#### πŸ“ Description + +
+
+ +
+
+ +Send a test SMS to a specified phone number to preview the campaign before sending it to all recipients. The phone number must belong to one of your existing contacts in your Brevo account and must not be blacklisted. The number should include the country code (e.g. 33689965433). +
+
+
+
+ #### πŸ”Œ Usage
@@ -19809,15 +20967,29 @@ client.sms_campaigns.send_test_sms(
- - + + +
+
+ + +
client.sms_campaigns.update_sms_campaign_status(...) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Update the status of an SMS campaign, such as suspending, archiving, or replicating it. Available status values include suspended, archive, darchive, sent, queued, replicate, replicateTemplate, cancel, and draft. Note that the replicateTemplate status is only available for template type campaigns. +
+
-
- -
client.sms_campaigns.update_sms_campaign_status(...) -
-
#### πŸ”Œ Usage @@ -19887,6 +21059,20 @@ client.sms_campaigns.update_sms_campaign_status(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a paginated list of all your WhatsApp campaigns with their statistics and metadata. Results can be filtered by creation date range using startDate and endDate, with a default limit of 50 and maximum of 100 per page. The sort order defaults to descending by modification date. +
+
+
+
+ #### πŸ”Œ Usage
@@ -20273,6 +21459,20 @@ Language of the template. For Example :
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a paginated list of all your WhatsApp templates with their status, category, language, and metadata. Results can be filtered by creation date range and optionally by source (Automation or Conversations), with a default limit of 50 and maximum of 100 per page. The sort order defaults to descending by modification date. +
+
+
+
+ #### πŸ”Œ Usage
@@ -20630,6 +21830,20 @@ client.whats_app_campaigns.update_whats_app_campaign(
+#### πŸ“ Description + +
+
+ +
+
+ +Delete a WhatsApp campaign by its campaign ID. The campaign must exist; if the campaign ID is not found, a 404 error is returned. This action is permanent and cannot be undone. +
+
+
+
+ #### πŸ”Œ Usage
@@ -20690,6 +21904,20 @@ client.whats_app_campaigns.delete_whats_app_campaign(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a paginated list of companies with optional filtering, sorting, and search capabilities. Results are sorted by creation date in descending order by default, and can be filtered by attributes, linked contacts, linked deals, or modification/creation timestamps. +
+
+
+
+ #### πŸ”Œ Usage
@@ -20723,7 +21951,7 @@ client.companies.get_all_companies()
-**filters:** `typing.Optional[str]` β€” Filter by attrbutes. If you have filter for owner on your side please send it as {"attributes.owner":"6299dcf3874a14eacbc65c46"} +**filters_attributes_name:** `typing.Optional[str]` β€” Filter by attributes. If you have a filter for the owner on your side please send it as filters[attributes.owner] and utilize the account email for the filtering.
@@ -20747,7 +21975,7 @@ client.companies.get_all_companies()
-**modified_since:** `typing.Optional[str]` β€” Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. +**modified_since:** `typing.Optional[str]` β€” Filter (urlencoded) the companies modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
@@ -20755,7 +21983,7 @@ client.companies.get_all_companies()
-**created_since:** `typing.Optional[str]` β€” Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. +**created_since:** `typing.Optional[str]` β€” Filter (urlencoded) the companies created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
@@ -20811,6 +22039,20 @@ client.companies.get_all_companies()
+#### πŸ“ Description + +
+
+ +
+
+ +Create a new CRM company with the specified name, attributes, and optional associations to contacts and deals. The company name is required, and you can optionally provide a country code when a phone number attribute is included. +
+
+
+
+ #### πŸ”Œ Usage
@@ -20951,7 +22193,7 @@ client.companies.import_companies_creation_and_updation(
-**file:** `typing.Optional[core.File]` β€” The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are (a) company_id [brevo mongoID to update deals] (b) associated_contact (c) associated_deal (f) any other attribute with internal name +**file:** `typing.Optional[core.File]` β€” The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are (a) company_id [brevo mongoID to update companies] (b) associated_contact (c) associated_deal (f) any other attribute with internal name
@@ -20990,6 +22232,20 @@ The mapping options in JSON format. Here is an example of the JSON structure: ``
+#### πŸ“ Description + +
+
+ +
+
+ +Link or unlink contacts and deals with a specific company in a single request. You can simultaneously link new contacts/deals and unlink existing ones by providing the respective ID arrays in the request body. +
+
+
+
+ #### πŸ”Œ Usage
@@ -21081,6 +22337,20 @@ client.companies.link_and_unlink_company_with_contact_and_deal(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the full details of a single company by its identifier, including its attributes, linked contacts, and linked deals. Returns a 404 error if the company does not exist, or a 403 error if the user lacks permission to view the company. +
+
+
+
+ #### πŸ”Œ Usage
@@ -21140,6 +22410,20 @@ client.companies.get_a_company(
+#### πŸ“ Description + +
+
+ +
+
+ +Permanently delete a company by its identifier. The requesting user must be the company owner or have manage permission on companies; otherwise, a 403 Forbidden error is returned. +
+
+
+
+ #### πŸ”Œ Usage
@@ -21199,6 +22483,20 @@ client.companies.delete_a_company(
+#### πŸ“ Description + +
+
+ +
+
+ +Update an existing company''s attributes, name, linked contacts, or linked deals. Note that passing `linkedContactsIds` or `linkedDealsIds` replaces the entire list of associations, so omitted IDs will be removed. The company name cannot be set to an empty string. +
+
+
+
+ #### πŸ”Œ Usage
@@ -21266,7 +22564,7 @@ client.companies.update_a_company(
-**linked_deals_ids:** `typing.Optional[typing.List[str]]` β€” Warning - Using PATCH on linkedDealsIds replaces the list of linked contacts. Omitted IDs will be removed. +**linked_deals_ids:** `typing.Optional[typing.List[str]]` β€” Warning - Using PATCH on linkedDealsIds replaces the list of linked deals. Omitted IDs will be removed.
@@ -21298,6 +22596,20 @@ client.companies.update_a_company(
+#### πŸ“ Description + +
+
+ +
+
+ +Create a new custom attribute for companies or deals. The attribute label must be unique within the object type, cannot exceed 50 characters, and cannot use reserved names. For `single-select` or `multi-choice` attribute types, you must also provide the `optionsLabels` array. +
+
+
+
+ #### πŸ”Œ Usage
@@ -21351,7 +22663,7 @@ client.companies.create_a_company_deal_attribute(
-**object_type:** `PostCrmAttributesRequestObjectType` β€” The type of object the attribute belongs to (prefilled with `companies`, mandatory) +**object_type:** `PostCrmAttributesRequestObjectType` β€” The type of object the attribute belongs to. Must be either `companies` or `deals`.
@@ -21391,6 +22703,20 @@ client.companies.create_a_company_deal_attribute(
+#### πŸ“ Description + +
+
+ +
+
+ +Delete an existing custom attribute by its identifier. This permanently removes the attribute definition and cleans up all references to it across companies or deals. System-default and non-editable attributes cannot be deleted. +
+
+
+
+ #### πŸ”Œ Usage
@@ -21450,6 +22776,20 @@ client.companies.delete_an_attribute(
+#### πŸ“ Description + +
+
+ +
+
+ +Update an existing custom attribute''s label or options. You can rename the attribute label or modify the available options for `single-select` and `multi-choice` attribute types. System-default attributes cannot be modified except for specific editable fields. +
+
+
+
+ #### πŸ”Œ Usage
@@ -21533,6 +22873,20 @@ client.companies.update_an_attribute(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the list of all attributes defined for companies, including both system-default and custom attributes. Each attribute includes its label, internal name, type, required status, and available options for select-type attributes. +
+
+
+
+ #### πŸ”Œ Usage
@@ -21583,6 +22937,20 @@ client.companies.get_company_attributes()
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the list of all attributes defined for deals, including both system-default and custom attributes. Each attribute includes its label, internal name, type, required status, and available options for select-type attributes. +
+
+
+
+ #### πŸ”Œ Usage
@@ -21632,6 +23000,20 @@ client.deals.get_deal_attributes()
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a paginated list of deals with optional filtering, sorting, and search capabilities. Results can be filtered by attributes such as deal name or owner, linked companies, linked contacts, or modification/creation timestamps. Default sort order is descending by creation date. +
+
+
+
+ #### πŸ”Œ Usage
@@ -21681,7 +23063,7 @@ client.deals.get_all_deals()
-**filters_linked_contacts_ids:** `typing.Optional[str]` β€” Filter by linked companies ids +**filters_linked_contacts_ids:** `typing.Optional[str]` β€” Filter by linked contacts ids
@@ -21689,7 +23071,7 @@ client.deals.get_all_deals()
-**modified_since:** `typing.Optional[str]` β€” Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. +**modified_since:** `typing.Optional[str]` β€” Filter (urlencoded) the deals modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
@@ -21697,7 +23079,7 @@ client.deals.get_all_deals()
-**created_since:** `typing.Optional[str]` β€” Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. +**created_since:** `typing.Optional[str]` β€” Filter (urlencoded) the deals created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
@@ -21729,6 +23111,14 @@ client.deals.get_all_deals()
+**sort_by:** `typing.Optional[str]` β€” The field used to sort field names. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` β€” Request-specific configuration.
@@ -21745,6 +23135,20 @@ client.deals.get_all_deals()
+#### πŸ“ Description + +
+
+ +
+
+ +Create a new deal in the CRM with the specified name, attributes, and optional associations to contacts and companies. You can assign the deal to a specific pipeline and stage by providing `pipeline` and `deal_stage` attribute IDs, which can be retrieved from the pipeline details endpoint. +
+
+
+
+ #### πŸ”Œ Usage
@@ -21890,7 +23294,7 @@ client.deals.import_deals_creation_and_updation( The mapping options in JSON format. Here is an example of the JSON structure: ```json { "link_entities": true, // Determines whether to link related entities during the import process "unlink_entities": false, // Determines whether to unlink related entities during the import process - "update_existing_records": true, // Determines whether to update based on company ID or treat every row as create + "update_existing_records": true, // Determines whether to update based on deal ID or treat every row as create "unset_empty_attributes": false // Determines whether to unset a specific attribute during update if the values input is blank } ``` @@ -21916,6 +23320,20 @@ The mapping options in JSON format. Here is an example of the JSON structure: ``
+#### πŸ“ Description + +
+
+ +
+
+ +Link or unlink contacts and companies with a specific deal in a single request. You can simultaneously link new contacts/companies and unlink existing ones by providing the respective ID arrays in the request body. +
+
+
+
+ #### πŸ”Œ Usage
@@ -21997,15 +23415,29 @@ client.deals.link_and_unlink_a_deal_with_contacts_and_companies(
- - + + +
+
+
+ +
client.deals.get_a_deal(...) -> Deal +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the full details of a single deal by its identifier, including its attributes, pipeline stage, linked contacts, and linked companies. Returns a 404 error if the deal does not exist. +
+
-
- -
client.deals.get_a_deal(...) -> Deal -
-
#### πŸ”Œ Usage @@ -22066,6 +23498,20 @@ client.deals.get_a_deal(
+#### πŸ“ Description + +
+
+ +
+
+ +Permanently delete a deal by its identifier. The requesting user must be the deal owner or have manage permission on deals; otherwise, a 403 Forbidden error is returned. +
+
+
+
+ #### πŸ”Œ Usage
@@ -22125,6 +23571,20 @@ client.deals.delete_a_deal(
+#### πŸ“ Description + +
+
+ +
+
+ +Update an existing deal''s attributes, name, linked contacts, or linked companies. Note that passing `linkedContactsIds` or `linkedCompaniesIds` replaces the entire list of associations, so omitted IDs will be removed. To move a deal to a different pipeline or stage, provide both the `pipeline` and `deal_stage` attribute IDs. +
+
+
+
+ #### πŸ”Œ Usage
@@ -22176,7 +23636,7 @@ client.deals.update_a_deal(
-**linked_companies_ids:** `typing.Optional[typing.List[str]]` β€” Warning - Using PATCH on linkedCompaniesIds replaces the list of linked contacts. Omitted IDs will be removed. +**linked_companies_ids:** `typing.Optional[typing.List[str]]` β€” Warning - Using PATCH on linkedCompaniesIds replaces the list of linked companies. Omitted IDs will be removed.
@@ -22279,6 +23739,20 @@ client.deals.get_pipeline_stages()
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the list of all deal pipelines configured for your account, including each pipeline''s stages and settings. If no pipelines have been configured yet, a default pipeline is automatically created and returned. +
+
+
+
+ #### πŸ”Œ Usage
@@ -22328,6 +23802,20 @@ client.deals.get_all_pipelines()
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the details of a specific deal pipeline by its identifier, including its stages, stage ordering, and configuration. Use this endpoint to obtain the pipeline and stage IDs needed when creating or updating deals. +
+
+
+
+ #### πŸ”Œ Usage
@@ -22388,6 +23876,20 @@ client.deals.get_a_pipeline(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a paginated list of CRM files with optional filtering by entity type, entity IDs, and date range. Results are sorted by creation date in descending order by default, with a default limit of 50 files per page. +
+
+
+
+ #### πŸ”Œ Usage
@@ -22493,6 +23995,20 @@ client.files.get_all_files()
+#### πŸ“ Description + +
+
+ +
+
+ +Upload a file and associate it with a contact, company, or deal. The file must be sent as multipart form data with a maximum size of 10 MB. You can optionally link the file to a specific entity by providing the corresponding entity ID. +
+
+
+
+ #### πŸ”Œ Usage
@@ -22576,6 +24092,20 @@ client.files.upload_a_file(
+#### πŸ“ Description + +
+
+ +
+
+ +Get a temporary download URL for a CRM file by its identifier. The returned URL is valid for 5 minutes only and provides direct access to the file content. +
+
+
+
+ #### πŸ”Œ Usage
@@ -22635,6 +24165,20 @@ client.files.download_a_file(
+#### πŸ“ Description + +
+
+ +
+
+ +Permanently delete a CRM file by its identifier. This removes the file from storage and unlinks it from any associated contacts, companies, or deals. +
+
+
+
+ #### πŸ”Œ Usage
@@ -22694,6 +24238,20 @@ client.files.delete_a_file(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the metadata and details of a specific CRM file by its identifier. This returns information such as the file name, size, type, creation date, and associated entities, but does not include the file content itself. +
+
+
+
+ #### πŸ”Œ Usage
@@ -22754,6 +24312,20 @@ client.files.get_file_details(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a paginated list of CRM notes with optional filtering by entity type, entity IDs, and date range. Results are sorted by creation date in descending order by default, with a default limit of 50 notes per page. +
+
+
+
+ #### πŸ”Œ Usage
@@ -22859,6 +24431,20 @@ client.notes.get_all_notes()
+#### πŸ“ Description + +
+
+ +
+
+ +Create a new CRM note and optionally associate it with contacts, companies, or deals. The note text content is required, and you can link the note to multiple entities simultaneously during creation. +
+
+
+
+ #### πŸ”Œ Usage
@@ -22877,7 +24463,7 @@ client = Brevo( ) client.notes.create_a_note( - text="In communication with client_dev for resolution of queries.", + text="

Meeting notes: Action item - visit Brevo for details.

", ) ``` @@ -22918,6 +24504,20 @@ client.notes.create_a_note(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the full details of a single CRM note by its identifier. The response includes the note''s text content, creation date, author, and any associated contacts, companies, or deals. +
+
+
+
+ #### πŸ”Œ Usage
@@ -22977,6 +24577,20 @@ client.notes.get_a_note(
+#### πŸ“ Description + +
+
+ +
+
+ +Permanently delete a CRM note by its identifier. This removes the note and unlinks it from any associated contacts, companies, or deals. +
+
+
+
+ #### πŸ”Œ Usage
@@ -23036,6 +24650,20 @@ client.notes.delete_a_note(
+#### πŸ“ Description + +
+
+ +
+
+ +Update an existing CRM note''s text content and its associations with contacts, companies, or deals. You can modify the note text, change the pinned status, or update the linked entities. +
+
+
+
+ #### πŸ”Œ Usage
@@ -23055,7 +24683,7 @@ client = Brevo( client.notes.update_a_note( id="id", - text="In communication with client_dev for resolution of queries.", + text="

Meeting notes: Action item - visit Brevo for details.

", ) ``` @@ -23105,6 +24733,20 @@ client.notes.update_a_note(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a paginated list of CRM tasks with optional filtering by task type, status, date range, assignee, and linked entities (contacts, deals, companies). Results are sorted by creation date in descending order by default, with a default limit of 50 tasks per page. +
+
+
+
+ #### πŸ”Œ Usage
@@ -23260,6 +24902,20 @@ client.tasks.get_all_tasks(
+#### πŸ“ Description + +
+
+ +
+
+ +Create a new CRM task with the specified name, type, due date, and optional associations to contacts, companies, or deals. A task requires a name, task type ID, and due date at minimum. You can also set a duration, notes, a reminder, and assign the task to a specific user. +
+
+
+
+ #### πŸ”Œ Usage
@@ -23280,7 +24936,7 @@ client = Brevo( client.tasks.create_a_task( date=datetime.datetime.fromisoformat("2021-11-01T17:44:54+00:00"), - name="Task: Connect with client_dev", + name="Task: Connect with client", task_type_id="61a5cd07ca1347c82306ad09", ) @@ -23402,6 +25058,20 @@ client.tasks.create_a_task(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the full details of a single CRM task by its identifier. The response includes the task''s name, type, status, due date, duration, notes, assignee, reminder settings, and linked contacts, companies, or deals. +
+
+
+
+ #### πŸ”Œ Usage
@@ -23461,6 +25131,20 @@ client.tasks.get_a_task(
+#### πŸ“ Description + +
+
+ +
+
+ +Permanently delete a CRM task by its identifier. This removes the task and cancels any associated reminders. The requesting user must be the task assignee or have manage permission on tasks. +
+
+
+
+ #### πŸ”Œ Usage
@@ -23514,11 +25198,25 @@ client.tasks.delete_a_task(
-
- -
client.tasks.update_a_task(...) -
-
+
+ +
client.tasks.update_a_task(...) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Update an existing CRM task''s properties such as name, type, due date, status, duration, notes, assignee, reminder, or linked entities. Only the fields provided in the request body will be updated; omitted fields remain unchanged. +
+
+
+
#### πŸ”Œ Usage @@ -23663,10 +25361,24 @@ client.tasks.update_a_task(
-
client.tasks.get_all_task_types() -> GetCrmTasktypesResponse +
client.tasks.get_all_task_types() -> typing.List[GetCrmTasktypesResponseItem] +
+
+ +#### πŸ“ Description + +
+
+
+Retrieve the list of all available task types, such as Email, Call, Meeting, Todo, Lunch, Deadline, and LinkedIn. If no task types exist yet, the default set is automatically created and returned. Use the task type ID when creating or updating tasks. +
+
+
+
+ #### πŸ”Œ Usage
@@ -23927,6 +25639,20 @@ client.transactional_whats_app.get_whatsapp_event_report()
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a paginated list of transactional contacts that have been blocked or unsubscribed, along with the reason for blocking (e.g. hard bounce, admin blocked, spam complaint, or unsubscription via email/API/Marketing Automation). Both `startDate` and `endDate` must be provided together when filtering by date range, and neither date can be in the future. Results default to 50 per page (max 100) and are sorted in descending order of record creation unless overridden with the `sort` parameter. +
+
+
+
+ #### πŸ”Œ Usage
@@ -24024,6 +25750,20 @@ client.transactional_emails.get_transac_blocked_contacts()
+#### πŸ“ Description + +
+
+ +
+
+ +Unblock or resubscribe a transactional contact by removing their email address from the blacklist. The email address must be URL-encoded in the path parameter and must be a valid email format. If the contact is not found in the blocklist, a 404 error is returned. +
+
+
+
+ #### πŸ”Œ Usage
@@ -24379,6 +26119,20 @@ client.transactional_emails.delete_hardbounces()
+#### πŸ“ Description + +
+
+ +
+
+ +Send a transactional email to one or more recipients, either using inline HTML content or a pre-built template via `templateId`. You can schedule emails for future delivery using `scheduledAt` (UTC, up to 5-minute delay), send multiple personalized versions with `messageVersions` (max 2000 total recipients, 99 per version), and attach files via URL or base64-encoded content. A `sender` and `subject` are required when no `templateId` is provided; when a `templateId` is used, the template''s sender and subject are applied unless overridden. +
+
+
+
+ #### πŸ”Œ Usage
@@ -24619,7 +26373,7 @@ client.transactional_emails.delete_scheduled_email_by_id(
-**identifier:** `str` β€” The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. +**identifier:** `str` β€” The `batchId` of scheduled emails batch (must be a valid UUIDv4) or the `messageId` of scheduled email (enclosed in angle brackets with @ sign, e.g. `<...@domain>`).
@@ -24695,7 +26449,7 @@ client.transactional_emails.get_scheduled_email_by_id(
-**identifier:** `str` β€” The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. +**identifier:** `str` β€” The `batchId` of scheduled emails batch (must be a valid UUIDv4) or the `messageId` of scheduled email (enclosed in angle brackets with @ sign, e.g. `<...@domain>`). When using `messageId`, the `limit`, `offset`, `sort`, and `status` query parameters are ignored.
@@ -24703,7 +26457,7 @@ client.transactional_emails.get_scheduled_email_by_id(
-**start_date:** `typing.Optional[datetime.date]` β€” Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. +**start_date:** `typing.Optional[datetime.date]` β€” Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Cannot be more than 30 days older than the current date.
@@ -24969,6 +26723,20 @@ client.transactional_emails.get_transac_email_content(
+#### πŸ“ Description + +
+
+ +
+
+ +Delete SMTP transactional log entries identified by a message ID (enclosed in angle brackets with an @ sign) or a valid email address. Optionally narrow the deletion to a specific date range using `from_date` and `to_date` query parameters (YYYY-MM-DD format). The operation also removes any associated stored email preview content. +
+
+
+
+ #### πŸ”Œ Usage
@@ -25004,7 +26772,23 @@ client.transactional_emails.delete_an_smtp_transactional_log(
-**identifier:** `str` β€” MessageId of the transactional log(s) to delete +**identifier:** `str` β€” MessageId or email address of the transactional log(s) to delete. Must be a valid message ID (enclosed in angle brackets with @ sign) or a valid email address. + +
+
+ +
+
+ +**from_date:** `typing.Optional[str]` β€” Starting date (YYYY-MM-DD) to narrow down logs for deletion + +
+
+ +
+
+ +**to_date:** `typing.Optional[str]` β€” Ending date (YYYY-MM-DD) to narrow down logs for deletion
@@ -25091,7 +26875,7 @@ client.transactional_emails.get_aggregated_smtp_report()
-**days:** `typing.Optional[int]` β€” Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ +**days:** `typing.Optional[int]` β€” Number of days in the past including today (positive integer, maximum 90). _Not compatible with 'startDate' and 'endDate'_. Defaults to 90 if neither dates nor days are provided.
@@ -25202,7 +26986,7 @@ client.transactional_emails.get_email_event_report()
-**days:** `typing.Optional[int]` β€” Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ +**days:** `typing.Optional[int]` β€” Number of days in the past including today (positive integer, maximum 90). _Not compatible with 'startDate' and 'endDate'_. Defaults to 30 if neither dates nor days are provided.
@@ -25274,6 +27058,20 @@ client.transactional_emails.get_email_event_report()
+#### πŸ“ Description + +
+
+ +
+
+ +This endpoint will show the aggregated stats per day for the past 10 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 30 days. +
+
+
+
+ #### πŸ”Œ Usage
@@ -25339,7 +27137,7 @@ client.transactional_emails.get_smtp_report()
-**days:** `typing.Optional[int]` β€” Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ +**days:** `typing.Optional[int]` β€” Number of days in the past including today (positive integer, maximum 30). _Not compatible with 'startDate' and 'endDate'_
@@ -25379,6 +27177,20 @@ client.transactional_emails.get_smtp_report()
+#### πŸ“ Description + +
+
+ +
+
+ +Generate a fully rendered preview of a transactional email template by resolving dynamic variables. Provide either an `email` address (to populate variables from the contact''s attributes) or a `params` object with key-value pairs for manual substitution; at least one of these is required alongside the mandatory `templateId`. The response includes the rendered HTML, subject, sender details, preview text, and any feed names used in the template. +
+
+
+
+ #### πŸ”Œ Usage
@@ -25414,7 +27226,7 @@ client.transactional_emails.post_preview_smtp_email_templates(
-**request:** `typing.Any` +**request:** `PostPreviewSmtpEmailTemplatesRequest`
@@ -25438,6 +27250,20 @@ client.transactional_emails.post_preview_smtp_email_templates(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a paginated list of all transactional email templates (including automation templates) with their details such as name, subject, sender, status, HTML content, and timestamps. Results default to 50 per page (max 1000) and are sorted in descending creation order unless overridden. You can filter by active/inactive status using `templateStatus` and by editor type using `editorType` (currently only `richTextEditor` is supported). +
+
+
+
+ #### πŸ”Œ Usage
@@ -25503,6 +27329,14 @@ client.transactional_emails.get_smtp_templates()
+**editor_type:** `typing.Optional[typing.Literal]` β€” Filter on the editor type used to create the template. Currently only `richTextEditor` is supported as a filter value. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` β€” Request-specific configuration.
@@ -25519,6 +27353,20 @@ client.transactional_emails.get_smtp_templates()
+#### πŸ“ Description + +
+
+ +
+
+ +Create a new transactional email template with the specified sender, subject, and content. The `sender`, `subject`, and `templateName` fields are required. Template content can be provided via `htmlContent` (minimum 10 characters) or `htmlUrl`; at least one must be supplied. Templates are created as inactive by default unless `isActive` is explicitly set to `true`. +
+
+
+
+ #### πŸ”Œ Usage
@@ -25653,6 +27501,20 @@ client.transactional_emails.create_smtp_template(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the full details of a specific transactional email template by its numeric ID or custom template identifier string. The response includes the template name, subject, sender information, HTML content, active status, creation and modification timestamps, reply-to address, tag, and a `doiTemplate` flag indicating whether the template is a double opt-in template (detected by the presence of optin-related tags or variables in the content). +
+
+
+
+ #### πŸ”Œ Usage
@@ -25688,7 +27550,7 @@ client.transactional_emails.get_smtp_template(
-**template_id:** `int` β€” id of the template +**template_id:** `GetSmtpTemplateRequestTemplateId` β€” ID of the template. Can be a numeric template ID or a custom template identifier string (alphanumeric, hyphens, and underscores only, max 64 characters, must start with a letter).
@@ -25712,6 +27574,20 @@ client.transactional_emails.get_smtp_template(
+#### πŸ“ Description + +
+
+ +
+
+ +Update an existing transactional email template by its numeric ID or custom template identifier string. All fields in the request body are optional; only the provided fields will be updated. You can update the template name, subject, sender, reply-to address, HTML content (via `htmlContent` or `htmlUrl`), active status, tag, attachment URL, and the personalized `toField`. Only one of sender email or sender ID should be provided per request. +
+
+
+
+ #### πŸ”Œ Usage
@@ -25747,7 +27623,7 @@ client.transactional_emails.update_smtp_template(
-**template_id:** `int` β€” id of the template +**template_id:** `UpdateSmtpTemplateRequestTemplateId` β€” ID of the template. Can be a numeric template ID or a custom template identifier string.
@@ -25851,6 +27727,20 @@ client.transactional_emails.update_smtp_template(
+#### πŸ“ Description + +
+
+ +
+
+ +Permanently delete a transactional email template by its numeric ID. Only inactive templates can be deleted; attempting to delete an active template returns a 405 error. To deactivate a template before deletion, use `PUT /smtp/templates/{templateId}` with `isActive` set to `false`. Deletion also removes associated newsletter template data and triggers asynchronous cleanup of shared assets. +
+
+
+
+ #### πŸ”Œ Usage
@@ -25910,6 +27800,20 @@ client.transactional_emails.delete_smtp_template(
+#### πŸ“ Description + +
+
+ +
+
+ +Send a test email of the specified transactional template to one or more recipients. Provide an array of email addresses in the `emailTo` field; if left empty, the test mail is sent to your entire test list. You can send a maximum of 50 test emails per day, and all provided email addresses must be valid. +
+
+
+
+ #### πŸ”Œ Usage
@@ -26054,6 +27958,20 @@ client.transactional_sms.send_async_transactional_sms(
+#### πŸ“ Description + +
+
+ +
+
+ +Send a transactional SMS message to a single mobile number. The `sender`, `recipient`, and either `content` or `templateId` fields are required. The sender name is limited to 11 alphanumeric characters or 15 numeric characters, and the recipient must be a valid international phone number (6-15 digits, optional leading +). Tags can be a string or an array of up to 10 strings. The SMS type defaults to `transactional` but can be set to `marketing`; if the content includes a stop code, it is automatically treated as marketing. Returns the message ID, SMS count, credits used, and remaining credits. +
+
+
+
+ #### πŸ”Œ Usage
@@ -26114,6 +28032,20 @@ client.transactional_sms.send_transac_sms(
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve an aggregated report of your transactional SMS activity over a specified time period, including counts for requests, delivered, hard bounces, soft bounces, blocked, unsubscribed, replied, accepted, rejected, and skipped messages. Filter by date range using `startDate` and `endDate` (both required together, YYYY-MM-DD format) or by a number of past `days` (not compatible with date range). You can further narrow results by `tag`. If no date filter is provided, the report covers all available data and returns the auto-detected date range. +
+
+
+
+ #### πŸ”Œ Usage
@@ -26195,6 +28127,20 @@ client.transactional_sms.get_transac_aggregated_sms_report()
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a paginated list of individual SMS event records (unaggregated), including event type, phone number, message ID, timestamp, tag, and reason or reply content where applicable. Results default to 50 per page (max 100) and are sorted in descending order unless overridden. Filter by date range (`startDate`/`endDate`), past `days` (not compatible with date range), specific `event` type (e.g. delivered, bounces, replies), `phoneNumber`, or `tags`. Bounce events include the failure reason, and reply events include the reply content. +
+
+
+
+ #### πŸ”Œ Usage
@@ -26316,6 +28262,20 @@ client.transactional_sms.get_sms_events()
+#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a day-by-day breakdown of your transactional SMS activity, with each entry containing the date and counts for requests, delivered, hard bounces, soft bounces, blocked, unsubscribed, replied, accepted, rejected, and skipped messages. Filter by date range using `startDate` and `endDate` (both required together, YYYY-MM-DD format), by a number of past `days` (not compatible with date range), or by `tag`. Results are sorted in descending order by default unless overridden with the `sort` parameter. +
+
+
+
+ #### πŸ”Œ Usage
diff --git a/src/brevo/__init__.py b/src/brevo/__init__.py index d7f792e..f2335be 100644 --- a/src/brevo/__init__.py +++ b/src/brevo/__init__.py @@ -14,7 +14,15 @@ BadRequestErrorBodyCode, BalanceDefinition, BalanceDefinitionBalanceAvailabilityDurationModifier, + BalanceDefinitionBalanceAvailabilityDurationUnit, + BalanceDefinitionBalanceOptionAmountOvertakingStrategy, + BalanceDefinitionBalanceOptionCreditRounding, + BalanceDefinitionBalanceOptionDebitRounding, + BalanceDefinitionUnit, BalanceLimit, + BalanceLimitConstraintType, + BalanceLimitDurationUnit, + BalanceLimitTransactionType, BatchAcceptedResponse, BatchEventsResponse, BatchEventsResponseErrorsItem, @@ -26,6 +34,7 @@ ContactErrorModelCode, ConversationsMessage, ConversationsMessageAttachmentsItem, + ConversationsMessageAttachmentsItemImageInfo, ConversationsMessageBccItem, ConversationsMessageCcItem, ConversationsMessageFile, @@ -54,11 +63,12 @@ GetEventsList, GetEventsListEventsItem, GetExtendedCampaignOverview, + GetExtendedCampaignOverviewEmailExpirationDate, + GetExtendedCampaignOverviewEmailExpirationDateUnit, GetExtendedCampaignOverviewSender, GetExtendedCampaignOverviewStatus, GetExtendedCampaignOverviewType, GetExtendedCampaignStats, - GetExtendedCampaignStatsLinksStats, GetExtendedCampaignStatsStatsByDevice, GetFolder, GetList, @@ -70,7 +80,6 @@ GetSmtpTemplateOverviewSender, GetSsoToken, GetWebhook, - GetWebhookChannel, GetWebhookType, InternalServerErrorBody, InternalServerErrorBodyCode, @@ -107,7 +116,6 @@ SendTestEmail, SendTransacSms, SendTransacSmsTag, - SendTransacSmsTagField, SendTransacSmsType, Task, TaskReminder, @@ -116,10 +124,18 @@ Tier, TierAccessConditionsItem, TierGroup, + TierGroupDowngradeSchedule, + TierGroupDowngradeScheduleDurationModifier, + TierGroupDowngradeScheduleDurationUnit, TierGroupDowngradeStrategy, + TierGroupUpgradeSchedule, + TierGroupUpgradeScheduleDurationModifier, + TierGroupUpgradeScheduleDurationUnit, TierGroupUpgradeStrategy, TierTierRewardsItem, Transaction, + TransactionStatus, + TransactionTransactionType, UnauthorizedErrorBody, UnauthorizedErrorBodyCode, UpdateCampaignStatus, @@ -184,7 +200,6 @@ GetAccountActivityResponseLogsItem, GetAccountResponse, GetAccountResponseAddress, - GetAccountResponseDateTimePreferences, GetAccountResponseMarketingAutomation, GetAccountResponsePlanItem, GetAccountResponsePlanItemType, @@ -196,9 +211,11 @@ GetAccountResponseRelayData, ) from .balance import ( + BeginTransactionRequestTransactionType, CreateBalanceLimitRequestConstraintType, CreateBalanceLimitRequestDurationUnit, CreateBalanceLimitRequestTransactionType, + CreateBalanceOrderRequestSource, CreateBalanceOrderResponse, GetBalanceDefinitionListRequestSort, GetBalanceDefinitionListRequestSortField, @@ -206,13 +223,19 @@ GetBalanceDefinitionListResponse, GetBalanceDefinitionRequestVersion, GetBalanceLimitRequestVersion, + GetContactBalancesRequestSort, + GetContactBalancesRequestSortField, GetContactBalancesResponse, GetContactBalancesResponseBalancesItem, + GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort, + GetLoyaltyBalanceProgramsPidActiveBalanceResponse, + GetLoyaltyBalanceProgramsPidActiveBalanceResponseActiveBalancesItem, GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort, GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus, GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType, GetLoyaltyBalanceProgramsPidTransactionHistoryResponse, GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItem, + GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItemTransactionType, GetSubscriptionBalancesResponse, GetSubscriptionBalancesResponseBalanceItem, PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationModifier, @@ -239,6 +262,7 @@ GetCompaniesRequestSort, GetCompaniesResponse, GetCrmAttributesCompaniesResponseItem, + GetCrmAttributesCompaniesResponseItemAttributeOptionsItem, PatchCrmAttributesIdRequestObjectType, PatchCrmAttributesIdRequestOptionsLabelsItem, PostCompaniesImportResponse, @@ -365,19 +389,15 @@ GetrecordsResponseRecordsItemIdentifiers, UpsertrecordsRequestRecordsItem, UpsertrecordsRequestRecordsItemAssociationsItem, - UpsertrecordsRequestRecordsItemAssociationsItemOne, - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItem, - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemOne, - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZero, - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZeroIdentifiers, - UpsertrecordsRequestRecordsItemAssociationsItemZero, - UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItem, - UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItemIdentifiers, + UpsertrecordsRequestRecordsItemAssociationsItemAction, + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem, + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers, UpsertrecordsRequestRecordsItemIdentifiers, UpsertrecordsResponse, ) from .deals import ( GetCrmAttributesDealsResponseItem, + GetCrmAttributesDealsResponseItemAttributeOptionsItem, GetCrmDealsRequestSort, GetCrmDealsResponse, PostCrmDealsImportResponse, @@ -423,6 +443,7 @@ GetEcommerceConfigDisplayCurrencyResponse, GetOrdersRequestSort, GetProductsRequestSort, + GetProductsRequestSortByField, GetProductsResponse, SetConfigDisplayCurrencyResponse, ) @@ -442,6 +463,8 @@ GetAbTestCampaignResultResponseWinningVersion, GetEmailCampaignRequestStatistics, GetEmailCampaignResponse, + GetEmailCampaignResponseEmailExpirationDate, + GetEmailCampaignResponseEmailExpirationDateUnit, GetEmailCampaignResponseSender, GetEmailCampaignResponseStatus, GetEmailCampaignResponseType, @@ -451,6 +474,8 @@ GetEmailCampaignsRequestType, GetEmailCampaignsResponse, GetEmailCampaignsResponseCampaignsItem, + GetEmailCampaignsResponseCampaignsItemEmailExpirationDate, + GetEmailCampaignsResponseCampaignsItemEmailExpirationDateUnit, GetEmailCampaignsResponseCampaignsItemSender, GetEmailCampaignsResponseCampaignsItemStatus, GetEmailCampaignsResponseCampaignsItemType, @@ -464,12 +489,12 @@ ) from .environment import BrevoEnvironment from .event import ( - CreateBatchEventsRequestItem, - CreateBatchEventsRequestItemContactPropertiesValue, - CreateBatchEventsRequestItemEventPropertiesValue, - CreateBatchEventsRequestItemIdentifiers, - CreateBatchEventsRequestItemObject, - CreateBatchEventsRequestItemObjectIdentifiers, + CreateBatchEventsRequestEventsItem, + CreateBatchEventsRequestEventsItemContactPropertiesValue, + CreateBatchEventsRequestEventsItemEventPropertiesValue, + CreateBatchEventsRequestEventsItemIdentifiers, + CreateBatchEventsRequestEventsItemObject, + CreateBatchEventsRequestEventsItemObjectIdentifiers, CreateEventRequestContactPropertiesValue, CreateEventRequestEventPropertiesValue, CreateEventRequestIdentifiers, @@ -564,7 +589,6 @@ from .process import ( GetProcessResponse, GetProcessResponseInfo, - GetProcessResponseInfoExport, GetProcessResponseInfoImport, GetProcessResponseName, GetProcessResponseStatus, @@ -572,12 +596,12 @@ GetProcessesResponse, GetProcessesResponseProcessesItem, GetProcessesResponseProcessesItemInfo, - GetProcessesResponseProcessesItemInfoExport, GetProcessesResponseProcessesItemInfoImport, GetProcessesResponseProcessesItemName, GetProcessesResponseProcessesItemStatus, ) from .program import ( + GetLpListRequestSort, GetLpListRequestSortField, GetLpListResponse, GetParameterSubscriptionInfoResponse, @@ -633,6 +657,9 @@ CreateSmsCampaignRequestRecipients, CreateSmsCampaignResponse, GetSmsCampaignResponse, + GetSmsCampaignResponseRecipients, + GetSmsCampaignResponseRecipientsExclusionListsItem, + GetSmsCampaignResponseRecipientsListsItem, GetSmsCampaignResponseStatus, GetSmsCampaignsRequestSort, GetSmsCampaignsRequestStatus, @@ -654,15 +681,21 @@ GetCrmTasksRequestFilterStatus, GetCrmTasksRequestSort, GetCrmTasksResponse, - GetCrmTasktypesResponse, + GetCrmTasktypesResponseItem, PostCrmTasksResponse, ) from .tier import ( AddSubscriptionToTierResponse, CreateTierForTierGroupRequestAccessConditionsItem, CreateTierForTierGroupRequestTierRewardsItem, + CreateTierGroupRequestDowngradeSchedule, + CreateTierGroupRequestDowngradeScheduleDurationModifier, + CreateTierGroupRequestDowngradeScheduleDurationUnit, CreateTierGroupRequestDowngradeStrategy, CreateTierGroupRequestMeta, + CreateTierGroupRequestUpgradeSchedule, + CreateTierGroupRequestUpgradeScheduleDurationModifier, + CreateTierGroupRequestUpgradeScheduleDurationUnit, CreateTierGroupRequestUpgradeStrategy, GetListOfTierGroupsRequestVersion, GetListOfTierGroupsResponse, @@ -696,6 +729,7 @@ GetSmtpReportRequestSort, GetSmtpReportResponse, GetSmtpReportResponseReportsItem, + GetSmtpTemplateRequestTemplateId, GetSmtpTemplatesRequestSort, GetSmtpTemplatesResponse, GetTransacBlockedContactsRequestSort, @@ -708,6 +742,8 @@ GetTransacEmailsListRequestSort, GetTransacEmailsListResponse, GetTransacEmailsListResponseTransactionalEmailsItem, + PostPreviewSmtpEmailTemplatesRequest, + PostPreviewSmtpEmailTemplatesRequestParams, PostPreviewSmtpEmailTemplatesResponse, SendTransacEmailRequestAttachmentItem, SendTransacEmailRequestBccItem, @@ -722,6 +758,7 @@ SendTransacEmailRequestToItem, SendTransacEmailResponse, UpdateSmtpTemplateRequestSender, + UpdateSmtpTemplateRequestTemplateId, ) from .transactional_sms import ( GetSmsEventsRequestEvent, @@ -785,6 +822,7 @@ CreateWhatsAppTemplateResponse, GetWhatsAppCampaignResponse, GetWhatsAppCampaignResponseCampaignStatus, + GetWhatsAppCampaignResponseRecipients, GetWhatsAppCampaignResponseTemplate, GetWhatsAppCampaignResponseTemplateComponentsItem, GetWhatsAppCampaignsRequestSort, @@ -818,7 +856,15 @@ "BadRequestErrorBodyCode": ".types", "BalanceDefinition": ".types", "BalanceDefinitionBalanceAvailabilityDurationModifier": ".types", + "BalanceDefinitionBalanceAvailabilityDurationUnit": ".types", + "BalanceDefinitionBalanceOptionAmountOvertakingStrategy": ".types", + "BalanceDefinitionBalanceOptionCreditRounding": ".types", + "BalanceDefinitionBalanceOptionDebitRounding": ".types", + "BalanceDefinitionUnit": ".types", "BalanceLimit": ".types", + "BalanceLimitConstraintType": ".types", + "BalanceLimitDurationUnit": ".types", + "BalanceLimitTransactionType": ".types", "BatchAcceptedResponse": ".types", "BatchDeleteObjectRecordsRequestIdentifiers": ".custom_objects", "BatchDeleteObjectRecordsRequestIdentifiersExtIds": ".custom_objects", @@ -826,6 +872,7 @@ "BatchDeleteObjectRecordsResponse": ".custom_objects", "BatchEventsResponse": ".types", "BatchEventsResponseErrorsItem": ".types", + "BeginTransactionRequestTransactionType": ".balance", "Brevo": ".client", "BrevoEnvironment": ".environment", "BrevoError": ".types", @@ -837,6 +884,7 @@ "ContactErrorModelCode": ".types", "ConversationsMessage": ".types", "ConversationsMessageAttachmentsItem": ".types", + "ConversationsMessageAttachmentsItemImageInfo": ".types", "ConversationsMessageBccItem": ".types", "ConversationsMessageCcItem": ".types", "ConversationsMessageFile": ".types", @@ -854,13 +902,14 @@ "CreateBalanceLimitRequestConstraintType": ".balance", "CreateBalanceLimitRequestDurationUnit": ".balance", "CreateBalanceLimitRequestTransactionType": ".balance", + "CreateBalanceOrderRequestSource": ".balance", "CreateBalanceOrderResponse": ".balance", - "CreateBatchEventsRequestItem": ".event", - "CreateBatchEventsRequestItemContactPropertiesValue": ".event", - "CreateBatchEventsRequestItemEventPropertiesValue": ".event", - "CreateBatchEventsRequestItemIdentifiers": ".event", - "CreateBatchEventsRequestItemObject": ".event", - "CreateBatchEventsRequestItemObjectIdentifiers": ".event", + "CreateBatchEventsRequestEventsItem": ".event", + "CreateBatchEventsRequestEventsItemContactPropertiesValue": ".event", + "CreateBatchEventsRequestEventsItemEventPropertiesValue": ".event", + "CreateBatchEventsRequestEventsItemIdentifiers": ".event", + "CreateBatchEventsRequestEventsItemObject": ".event", + "CreateBatchEventsRequestEventsItemObjectIdentifiers": ".event", "CreateBatchOrderResponse": ".ecommerce", "CreateContactRequestAttributesValue": ".contacts", "CreateContactResponse": ".contacts", @@ -898,8 +947,14 @@ "CreateSmtpTemplateResponse": ".transactional_emails", "CreateTierForTierGroupRequestAccessConditionsItem": ".tier", "CreateTierForTierGroupRequestTierRewardsItem": ".tier", + "CreateTierGroupRequestDowngradeSchedule": ".tier", + "CreateTierGroupRequestDowngradeScheduleDurationModifier": ".tier", + "CreateTierGroupRequestDowngradeScheduleDurationUnit": ".tier", "CreateTierGroupRequestDowngradeStrategy": ".tier", "CreateTierGroupRequestMeta": ".tier", + "CreateTierGroupRequestUpgradeSchedule": ".tier", + "CreateTierGroupRequestUpgradeScheduleDurationModifier": ".tier", + "CreateTierGroupRequestUpgradeScheduleDurationUnit": ".tier", "CreateTierGroupRequestUpgradeStrategy": ".tier", "CreateUpdateBatchCategoryRequestCategoriesItem": ".ecommerce", "CreateUpdateBatchCategoryResponse": ".ecommerce", @@ -948,7 +1003,6 @@ "GetAccountActivityResponseLogsItem": ".account", "GetAccountResponse": ".account", "GetAccountResponseAddress": ".account", - "GetAccountResponseDateTimePreferences": ".account", "GetAccountResponseMarketingAutomation": ".account", "GetAccountResponsePlanItem": ".account", "GetAccountResponsePlanItemType": ".account", @@ -985,6 +1039,8 @@ "GetCodeCountResponse": ".reward", "GetCompaniesRequestSort": ".companies", "GetCompaniesResponse": ".companies", + "GetContactBalancesRequestSort": ".balance", + "GetContactBalancesRequestSortField": ".balance", "GetContactBalancesResponse": ".balance", "GetContactBalancesResponseBalancesItem": ".balance", "GetContactDetails": ".types", @@ -1063,7 +1119,9 @@ "GetCouponCollectionsRequestSort": ".coupons", "GetCouponCollectionsRequestSortBy": ".coupons", "GetCrmAttributesCompaniesResponseItem": ".companies", + "GetCrmAttributesCompaniesResponseItemAttributeOptionsItem": ".companies", "GetCrmAttributesDealsResponseItem": ".deals", + "GetCrmAttributesDealsResponseItemAttributeOptionsItem": ".deals", "GetCrmDealsRequestSort": ".deals", "GetCrmDealsResponse": ".deals", "GetCrmFilesIdResponse": ".files", @@ -1075,7 +1133,7 @@ "GetCrmTasksRequestFilterStatus": ".tasks", "GetCrmTasksRequestSort": ".tasks", "GetCrmTasksResponse": ".tasks", - "GetCrmTasktypesResponse": ".tasks", + "GetCrmTasktypesResponseItem": ".tasks", "GetDeviceBrowserStats": ".types", "GetDomainConfigurationResponse": ".domains", "GetDomainConfigurationResponseDnsRecords": ".domains", @@ -1096,6 +1154,8 @@ "GetEcommerceConfigDisplayCurrencyResponse": ".ecommerce", "GetEmailCampaignRequestStatistics": ".email_campaigns", "GetEmailCampaignResponse": ".email_campaigns", + "GetEmailCampaignResponseEmailExpirationDate": ".email_campaigns", + "GetEmailCampaignResponseEmailExpirationDateUnit": ".email_campaigns", "GetEmailCampaignResponseSender": ".email_campaigns", "GetEmailCampaignResponseStatus": ".email_campaigns", "GetEmailCampaignResponseType": ".email_campaigns", @@ -1105,6 +1165,8 @@ "GetEmailCampaignsRequestType": ".email_campaigns", "GetEmailCampaignsResponse": ".email_campaigns", "GetEmailCampaignsResponseCampaignsItem": ".email_campaigns", + "GetEmailCampaignsResponseCampaignsItemEmailExpirationDate": ".email_campaigns", + "GetEmailCampaignsResponseCampaignsItemEmailExpirationDateUnit": ".email_campaigns", "GetEmailCampaignsResponseCampaignsItemSender": ".email_campaigns", "GetEmailCampaignsResponseCampaignsItemStatus": ".email_campaigns", "GetEmailCampaignsResponseCampaignsItemType": ".email_campaigns", @@ -1116,11 +1178,12 @@ "GetEventsList": ".types", "GetEventsListEventsItem": ".types", "GetExtendedCampaignOverview": ".types", + "GetExtendedCampaignOverviewEmailExpirationDate": ".types", + "GetExtendedCampaignOverviewEmailExpirationDateUnit": ".types", "GetExtendedCampaignOverviewSender": ".types", "GetExtendedCampaignOverviewStatus": ".types", "GetExtendedCampaignOverviewType": ".types", "GetExtendedCampaignStats": ".types", - "GetExtendedCampaignStatsLinksStats": ".types", "GetExtendedCampaignStatsStatsByDevice": ".types", "GetExternalFeedByUuidResponse": ".external_feeds", "GetExternalFeedByUuidResponseAuthType": ".external_feeds", @@ -1152,11 +1215,15 @@ "GetListsRequestSort": ".contacts", "GetListsResponse": ".contacts", "GetListsResponseListsItem": ".contacts", + "GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort": ".balance", + "GetLoyaltyBalanceProgramsPidActiveBalanceResponse": ".balance", + "GetLoyaltyBalanceProgramsPidActiveBalanceResponseActiveBalancesItem": ".balance", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort": ".balance", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus": ".balance", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType": ".balance", "GetLoyaltyBalanceProgramsPidTransactionHistoryResponse": ".balance", "GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItem": ".balance", + "GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItemTransactionType": ".balance", "GetLoyaltyOfferProgramsPidOffersRequestVersion": ".reward", "GetLoyaltyOfferProgramsPidOffersResponse": ".reward", "GetLoyaltyOfferProgramsPidOffersResponseItemsItem": ".reward", @@ -1177,6 +1244,7 @@ "GetLoyaltyOfferProgramsPidVouchersResponseContactRewardsItem": ".reward", "GetLoyaltyProgramTierRequestVersion": ".tier", "GetLoyaltyProgramTierResponse": ".tier", + "GetLpListRequestSort": ".program", "GetLpListRequestSortField": ".program", "GetLpListResponse": ".program", "GetOrdersRequestSort": ".ecommerce", @@ -1190,7 +1258,6 @@ "GetPaymentRequestResponseStatus": ".payments", "GetProcessResponse": ".process", "GetProcessResponseInfo": ".process", - "GetProcessResponseInfoExport": ".process", "GetProcessResponseInfoImport": ".process", "GetProcessResponseName": ".process", "GetProcessResponseStatus": ".process", @@ -1198,12 +1265,12 @@ "GetProcessesResponse": ".process", "GetProcessesResponseProcessesItem": ".process", "GetProcessesResponseProcessesItemInfo": ".process", - "GetProcessesResponseProcessesItemInfoExport": ".process", "GetProcessesResponseProcessesItemInfoImport": ".process", "GetProcessesResponseProcessesItemName": ".process", "GetProcessesResponseProcessesItemStatus": ".process", "GetProductDetails": ".types", "GetProductsRequestSort": ".ecommerce", + "GetProductsRequestSortByField": ".ecommerce", "GetProductsResponse": ".ecommerce", "GetScheduledEmailByIdRequestSort": ".transactional_emails", "GetScheduledEmailByIdRequestStatus": ".transactional_emails", @@ -1223,6 +1290,9 @@ "GetSmsCampaignOverview": ".types", "GetSmsCampaignOverviewStatus": ".types", "GetSmsCampaignResponse": ".sms_campaigns", + "GetSmsCampaignResponseRecipients": ".sms_campaigns", + "GetSmsCampaignResponseRecipientsExclusionListsItem": ".sms_campaigns", + "GetSmsCampaignResponseRecipientsListsItem": ".sms_campaigns", "GetSmsCampaignResponseStatus": ".sms_campaigns", "GetSmsCampaignStats": ".types", "GetSmsCampaignsRequestSort": ".sms_campaigns", @@ -1244,6 +1314,7 @@ "GetSmtpReportResponseReportsItem": ".transactional_emails", "GetSmtpTemplateOverview": ".types", "GetSmtpTemplateOverviewSender": ".types", + "GetSmtpTemplateRequestTemplateId": ".transactional_emails", "GetSmtpTemplatesRequestSort": ".transactional_emails", "GetSmtpTemplatesResponse": ".transactional_emails", "GetSsoToken": ".types", @@ -1268,13 +1339,13 @@ "GetUserPermissionResponse": ".user", "GetUserPermissionResponsePrivilegesItem": ".user", "GetWebhook": ".types", - "GetWebhookChannel": ".types", "GetWebhookType": ".types", "GetWebhooksRequestSort": ".webhooks", "GetWebhooksRequestType": ".webhooks", "GetWebhooksResponse": ".webhooks", "GetWhatsAppCampaignResponse": ".whats_app_campaigns", "GetWhatsAppCampaignResponseCampaignStatus": ".whats_app_campaigns", + "GetWhatsAppCampaignResponseRecipients": ".whats_app_campaigns", "GetWhatsAppCampaignResponseTemplate": ".whats_app_campaigns", "GetWhatsAppCampaignResponseTemplateComponentsItem": ".whats_app_campaigns", "GetWhatsAppCampaignsRequestSort": ".whats_app_campaigns", @@ -1374,6 +1445,8 @@ "PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestMeta": ".balance", "PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestUnit": ".balance", "PostLoyaltyBalanceProgramsPidSubscriptionsCidBalancesResponse": ".balance", + "PostPreviewSmtpEmailTemplatesRequest": ".transactional_emails", + "PostPreviewSmtpEmailTemplatesRequestParams": ".transactional_emails", "PostPreviewSmtpEmailTemplatesResponse": ".transactional_emails", "PostSendFailed": ".types", "PreconditionFailedError": ".errors", @@ -1428,7 +1501,6 @@ "SendTransacSms": ".types", "SendTransacSmsResponse": ".transactional_sms", "SendTransacSmsTag": ".types", - "SendTransacSmsTagField": ".types", "SendTransacSmsType": ".types", "SendWhatsappMessageRequest": ".transactional_whats_app", "SendWhatsappMessageRequestParams": ".transactional_whats_app", @@ -1444,12 +1516,20 @@ "Tier": ".types", "TierAccessConditionsItem": ".types", "TierGroup": ".types", + "TierGroupDowngradeSchedule": ".types", + "TierGroupDowngradeScheduleDurationModifier": ".types", + "TierGroupDowngradeScheduleDurationUnit": ".types", "TierGroupDowngradeStrategy": ".types", + "TierGroupUpgradeSchedule": ".types", + "TierGroupUpgradeScheduleDurationModifier": ".types", + "TierGroupUpgradeScheduleDurationUnit": ".types", "TierGroupUpgradeStrategy": ".types", "TierTierRewardsItem": ".types", "TooEarlyError": ".errors", "TooManyRequestsError": ".errors", "Transaction": ".types", + "TransactionStatus": ".types", + "TransactionTransactionType": ".types", "UnauthorizedError": ".errors", "UnauthorizedErrorBody": ".types", "UnauthorizedErrorBodyCode": ".types", @@ -1484,6 +1564,7 @@ "UpdateSenderRequestIpsItem": ".senders", "UpdateSmsCampaignRequestRecipients": ".sms_campaigns", "UpdateSmtpTemplateRequestSender": ".transactional_emails", + "UpdateSmtpTemplateRequestTemplateId": ".transactional_emails", "UpdateTierGroupRequestDowngradeStrategy": ".tier", "UpdateTierGroupRequestMeta": ".tier", "UpdateTierGroupRequestUpgradeStrategy": ".tier", @@ -1497,14 +1578,9 @@ "UploadImageToGalleryResponse": ".email_campaigns", "UpsertrecordsRequestRecordsItem": ".custom_objects", "UpsertrecordsRequestRecordsItemAssociationsItem": ".custom_objects", - "UpsertrecordsRequestRecordsItemAssociationsItemOne": ".custom_objects", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItem": ".custom_objects", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemOne": ".custom_objects", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZero": ".custom_objects", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZeroIdentifiers": ".custom_objects", - "UpsertrecordsRequestRecordsItemAssociationsItemZero": ".custom_objects", - "UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItem": ".custom_objects", - "UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItemIdentifiers": ".custom_objects", + "UpsertrecordsRequestRecordsItemAssociationsItemAction": ".custom_objects", + "UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem": ".custom_objects", + "UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers": ".custom_objects", "UpsertrecordsRequestRecordsItemIdentifiers": ".custom_objects", "UpsertrecordsResponse": ".custom_objects", "ValidateRewardResponse": ".reward", @@ -1584,7 +1660,15 @@ def __dir__(): "BadRequestErrorBodyCode", "BalanceDefinition", "BalanceDefinitionBalanceAvailabilityDurationModifier", + "BalanceDefinitionBalanceAvailabilityDurationUnit", + "BalanceDefinitionBalanceOptionAmountOvertakingStrategy", + "BalanceDefinitionBalanceOptionCreditRounding", + "BalanceDefinitionBalanceOptionDebitRounding", + "BalanceDefinitionUnit", "BalanceLimit", + "BalanceLimitConstraintType", + "BalanceLimitDurationUnit", + "BalanceLimitTransactionType", "BatchAcceptedResponse", "BatchDeleteObjectRecordsRequestIdentifiers", "BatchDeleteObjectRecordsRequestIdentifiersExtIds", @@ -1592,6 +1676,7 @@ def __dir__(): "BatchDeleteObjectRecordsResponse", "BatchEventsResponse", "BatchEventsResponseErrorsItem", + "BeginTransactionRequestTransactionType", "Brevo", "BrevoEnvironment", "BrevoError", @@ -1603,6 +1688,7 @@ def __dir__(): "ContactErrorModelCode", "ConversationsMessage", "ConversationsMessageAttachmentsItem", + "ConversationsMessageAttachmentsItemImageInfo", "ConversationsMessageBccItem", "ConversationsMessageCcItem", "ConversationsMessageFile", @@ -1620,13 +1706,14 @@ def __dir__(): "CreateBalanceLimitRequestConstraintType", "CreateBalanceLimitRequestDurationUnit", "CreateBalanceLimitRequestTransactionType", + "CreateBalanceOrderRequestSource", "CreateBalanceOrderResponse", - "CreateBatchEventsRequestItem", - "CreateBatchEventsRequestItemContactPropertiesValue", - "CreateBatchEventsRequestItemEventPropertiesValue", - "CreateBatchEventsRequestItemIdentifiers", - "CreateBatchEventsRequestItemObject", - "CreateBatchEventsRequestItemObjectIdentifiers", + "CreateBatchEventsRequestEventsItem", + "CreateBatchEventsRequestEventsItemContactPropertiesValue", + "CreateBatchEventsRequestEventsItemEventPropertiesValue", + "CreateBatchEventsRequestEventsItemIdentifiers", + "CreateBatchEventsRequestEventsItemObject", + "CreateBatchEventsRequestEventsItemObjectIdentifiers", "CreateBatchOrderResponse", "CreateContactRequestAttributesValue", "CreateContactResponse", @@ -1664,8 +1751,14 @@ def __dir__(): "CreateSmtpTemplateResponse", "CreateTierForTierGroupRequestAccessConditionsItem", "CreateTierForTierGroupRequestTierRewardsItem", + "CreateTierGroupRequestDowngradeSchedule", + "CreateTierGroupRequestDowngradeScheduleDurationModifier", + "CreateTierGroupRequestDowngradeScheduleDurationUnit", "CreateTierGroupRequestDowngradeStrategy", "CreateTierGroupRequestMeta", + "CreateTierGroupRequestUpgradeSchedule", + "CreateTierGroupRequestUpgradeScheduleDurationModifier", + "CreateTierGroupRequestUpgradeScheduleDurationUnit", "CreateTierGroupRequestUpgradeStrategy", "CreateUpdateBatchCategoryRequestCategoriesItem", "CreateUpdateBatchCategoryResponse", @@ -1714,7 +1807,6 @@ def __dir__(): "GetAccountActivityResponseLogsItem", "GetAccountResponse", "GetAccountResponseAddress", - "GetAccountResponseDateTimePreferences", "GetAccountResponseMarketingAutomation", "GetAccountResponsePlanItem", "GetAccountResponsePlanItemType", @@ -1751,6 +1843,8 @@ def __dir__(): "GetCodeCountResponse", "GetCompaniesRequestSort", "GetCompaniesResponse", + "GetContactBalancesRequestSort", + "GetContactBalancesRequestSortField", "GetContactBalancesResponse", "GetContactBalancesResponseBalancesItem", "GetContactDetails", @@ -1829,7 +1923,9 @@ def __dir__(): "GetCouponCollectionsRequestSort", "GetCouponCollectionsRequestSortBy", "GetCrmAttributesCompaniesResponseItem", + "GetCrmAttributesCompaniesResponseItemAttributeOptionsItem", "GetCrmAttributesDealsResponseItem", + "GetCrmAttributesDealsResponseItemAttributeOptionsItem", "GetCrmDealsRequestSort", "GetCrmDealsResponse", "GetCrmFilesIdResponse", @@ -1841,7 +1937,7 @@ def __dir__(): "GetCrmTasksRequestFilterStatus", "GetCrmTasksRequestSort", "GetCrmTasksResponse", - "GetCrmTasktypesResponse", + "GetCrmTasktypesResponseItem", "GetDeviceBrowserStats", "GetDomainConfigurationResponse", "GetDomainConfigurationResponseDnsRecords", @@ -1862,6 +1958,8 @@ def __dir__(): "GetEcommerceConfigDisplayCurrencyResponse", "GetEmailCampaignRequestStatistics", "GetEmailCampaignResponse", + "GetEmailCampaignResponseEmailExpirationDate", + "GetEmailCampaignResponseEmailExpirationDateUnit", "GetEmailCampaignResponseSender", "GetEmailCampaignResponseStatus", "GetEmailCampaignResponseType", @@ -1871,6 +1969,8 @@ def __dir__(): "GetEmailCampaignsRequestType", "GetEmailCampaignsResponse", "GetEmailCampaignsResponseCampaignsItem", + "GetEmailCampaignsResponseCampaignsItemEmailExpirationDate", + "GetEmailCampaignsResponseCampaignsItemEmailExpirationDateUnit", "GetEmailCampaignsResponseCampaignsItemSender", "GetEmailCampaignsResponseCampaignsItemStatus", "GetEmailCampaignsResponseCampaignsItemType", @@ -1882,11 +1982,12 @@ def __dir__(): "GetEventsList", "GetEventsListEventsItem", "GetExtendedCampaignOverview", + "GetExtendedCampaignOverviewEmailExpirationDate", + "GetExtendedCampaignOverviewEmailExpirationDateUnit", "GetExtendedCampaignOverviewSender", "GetExtendedCampaignOverviewStatus", "GetExtendedCampaignOverviewType", "GetExtendedCampaignStats", - "GetExtendedCampaignStatsLinksStats", "GetExtendedCampaignStatsStatsByDevice", "GetExternalFeedByUuidResponse", "GetExternalFeedByUuidResponseAuthType", @@ -1918,11 +2019,15 @@ def __dir__(): "GetListsRequestSort", "GetListsResponse", "GetListsResponseListsItem", + "GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort", + "GetLoyaltyBalanceProgramsPidActiveBalanceResponse", + "GetLoyaltyBalanceProgramsPidActiveBalanceResponseActiveBalancesItem", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType", "GetLoyaltyBalanceProgramsPidTransactionHistoryResponse", "GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItem", + "GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItemTransactionType", "GetLoyaltyOfferProgramsPidOffersRequestVersion", "GetLoyaltyOfferProgramsPidOffersResponse", "GetLoyaltyOfferProgramsPidOffersResponseItemsItem", @@ -1943,6 +2048,7 @@ def __dir__(): "GetLoyaltyOfferProgramsPidVouchersResponseContactRewardsItem", "GetLoyaltyProgramTierRequestVersion", "GetLoyaltyProgramTierResponse", + "GetLpListRequestSort", "GetLpListRequestSortField", "GetLpListResponse", "GetOrdersRequestSort", @@ -1956,7 +2062,6 @@ def __dir__(): "GetPaymentRequestResponseStatus", "GetProcessResponse", "GetProcessResponseInfo", - "GetProcessResponseInfoExport", "GetProcessResponseInfoImport", "GetProcessResponseName", "GetProcessResponseStatus", @@ -1964,12 +2069,12 @@ def __dir__(): "GetProcessesResponse", "GetProcessesResponseProcessesItem", "GetProcessesResponseProcessesItemInfo", - "GetProcessesResponseProcessesItemInfoExport", "GetProcessesResponseProcessesItemInfoImport", "GetProcessesResponseProcessesItemName", "GetProcessesResponseProcessesItemStatus", "GetProductDetails", "GetProductsRequestSort", + "GetProductsRequestSortByField", "GetProductsResponse", "GetScheduledEmailByIdRequestSort", "GetScheduledEmailByIdRequestStatus", @@ -1989,6 +2094,9 @@ def __dir__(): "GetSmsCampaignOverview", "GetSmsCampaignOverviewStatus", "GetSmsCampaignResponse", + "GetSmsCampaignResponseRecipients", + "GetSmsCampaignResponseRecipientsExclusionListsItem", + "GetSmsCampaignResponseRecipientsListsItem", "GetSmsCampaignResponseStatus", "GetSmsCampaignStats", "GetSmsCampaignsRequestSort", @@ -2010,6 +2118,7 @@ def __dir__(): "GetSmtpReportResponseReportsItem", "GetSmtpTemplateOverview", "GetSmtpTemplateOverviewSender", + "GetSmtpTemplateRequestTemplateId", "GetSmtpTemplatesRequestSort", "GetSmtpTemplatesResponse", "GetSsoToken", @@ -2034,13 +2143,13 @@ def __dir__(): "GetUserPermissionResponse", "GetUserPermissionResponsePrivilegesItem", "GetWebhook", - "GetWebhookChannel", "GetWebhookType", "GetWebhooksRequestSort", "GetWebhooksRequestType", "GetWebhooksResponse", "GetWhatsAppCampaignResponse", "GetWhatsAppCampaignResponseCampaignStatus", + "GetWhatsAppCampaignResponseRecipients", "GetWhatsAppCampaignResponseTemplate", "GetWhatsAppCampaignResponseTemplateComponentsItem", "GetWhatsAppCampaignsRequestSort", @@ -2140,6 +2249,8 @@ def __dir__(): "PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestMeta", "PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestUnit", "PostLoyaltyBalanceProgramsPidSubscriptionsCidBalancesResponse", + "PostPreviewSmtpEmailTemplatesRequest", + "PostPreviewSmtpEmailTemplatesRequestParams", "PostPreviewSmtpEmailTemplatesResponse", "PostSendFailed", "PreconditionFailedError", @@ -2194,7 +2305,6 @@ def __dir__(): "SendTransacSms", "SendTransacSmsResponse", "SendTransacSmsTag", - "SendTransacSmsTagField", "SendTransacSmsType", "SendWhatsappMessageRequest", "SendWhatsappMessageRequestParams", @@ -2210,12 +2320,20 @@ def __dir__(): "Tier", "TierAccessConditionsItem", "TierGroup", + "TierGroupDowngradeSchedule", + "TierGroupDowngradeScheduleDurationModifier", + "TierGroupDowngradeScheduleDurationUnit", "TierGroupDowngradeStrategy", + "TierGroupUpgradeSchedule", + "TierGroupUpgradeScheduleDurationModifier", + "TierGroupUpgradeScheduleDurationUnit", "TierGroupUpgradeStrategy", "TierTierRewardsItem", "TooEarlyError", "TooManyRequestsError", "Transaction", + "TransactionStatus", + "TransactionTransactionType", "UnauthorizedError", "UnauthorizedErrorBody", "UnauthorizedErrorBodyCode", @@ -2250,6 +2368,7 @@ def __dir__(): "UpdateSenderRequestIpsItem", "UpdateSmsCampaignRequestRecipients", "UpdateSmtpTemplateRequestSender", + "UpdateSmtpTemplateRequestTemplateId", "UpdateTierGroupRequestDowngradeStrategy", "UpdateTierGroupRequestMeta", "UpdateTierGroupRequestUpgradeStrategy", @@ -2263,14 +2382,9 @@ def __dir__(): "UploadImageToGalleryResponse", "UpsertrecordsRequestRecordsItem", "UpsertrecordsRequestRecordsItemAssociationsItem", - "UpsertrecordsRequestRecordsItemAssociationsItemOne", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItem", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemOne", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZero", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZeroIdentifiers", - "UpsertrecordsRequestRecordsItemAssociationsItemZero", - "UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItem", - "UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItemIdentifiers", + "UpsertrecordsRequestRecordsItemAssociationsItemAction", + "UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem", + "UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers", "UpsertrecordsRequestRecordsItemIdentifiers", "UpsertrecordsResponse", "ValidateRewardResponse", diff --git a/src/brevo/account/__init__.py b/src/brevo/account/__init__.py index bd2e80f..426a9f0 100644 --- a/src/brevo/account/__init__.py +++ b/src/brevo/account/__init__.py @@ -11,7 +11,6 @@ GetAccountActivityResponseLogsItem, GetAccountResponse, GetAccountResponseAddress, - GetAccountResponseDateTimePreferences, GetAccountResponseMarketingAutomation, GetAccountResponsePlanItem, GetAccountResponsePlanItemType, @@ -27,7 +26,6 @@ "GetAccountActivityResponseLogsItem": ".types", "GetAccountResponse": ".types", "GetAccountResponseAddress": ".types", - "GetAccountResponseDateTimePreferences": ".types", "GetAccountResponseMarketingAutomation": ".types", "GetAccountResponsePlanItem": ".types", "GetAccountResponsePlanItemType": ".types", @@ -66,7 +64,6 @@ def __dir__(): "GetAccountActivityResponseLogsItem", "GetAccountResponse", "GetAccountResponseAddress", - "GetAccountResponseDateTimePreferences", "GetAccountResponseMarketingAutomation", "GetAccountResponsePlanItem", "GetAccountResponsePlanItemType", diff --git a/src/brevo/account/client.py b/src/brevo/account/client.py index 8813e7c..2cb9dba 100644 --- a/src/brevo/account/client.py +++ b/src/brevo/account/client.py @@ -33,25 +33,22 @@ def get_account(self, *, request_options: typing.Optional[RequestOptions] = None - Check plan details (type, credits, expiration) - Get relay information (for transactional emails) - Check Marketing Automation status - - View date/time preferences and account settings - Access organization and user identifiers **Key information returned:** - Complete account details (organization ID, user ID, company information) - Address and contact information - Plan configurations and credit allocations across different verticals - - Marketing Automation settings and tracker key + - Marketing Automation settings and tracker key (when enabled) - SMTP relay configuration for transactional emails - - Date/time preferences and account settings - Enterprise features availability status **Important considerations:** - Provides comprehensive account overview for billing and configuration management - Essential for understanding current plan limitations and feature availability - - Marketing Automation key required for advanced automation features - - Plan verticals show detailed breakdown across Marketing, Chat, and CRM categories + - Marketing Automation key is only returned when Marketing Automation is enabled on the account + - Plan verticals show detailed breakdown across Marketing, Chat, and CRM categories (only returned when plan verticals are available) - Relay configuration crucial for transactional email setup and deliverability - - Date/time preferences affect campaign scheduling and reporting displays - Enterprise status determines access to advanced features and sub-account management Parameters @@ -179,25 +176,22 @@ async def get_account(self, *, request_options: typing.Optional[RequestOptions] - Check plan details (type, credits, expiration) - Get relay information (for transactional emails) - Check Marketing Automation status - - View date/time preferences and account settings - Access organization and user identifiers **Key information returned:** - Complete account details (organization ID, user ID, company information) - Address and contact information - Plan configurations and credit allocations across different verticals - - Marketing Automation settings and tracker key + - Marketing Automation settings and tracker key (when enabled) - SMTP relay configuration for transactional emails - - Date/time preferences and account settings - Enterprise features availability status **Important considerations:** - Provides comprehensive account overview for billing and configuration management - Essential for understanding current plan limitations and feature availability - - Marketing Automation key required for advanced automation features - - Plan verticals show detailed breakdown across Marketing, Chat, and CRM categories + - Marketing Automation key is only returned when Marketing Automation is enabled on the account + - Plan verticals show detailed breakdown across Marketing, Chat, and CRM categories (only returned when plan verticals are available) - Relay configuration crucial for transactional email setup and deliverability - - Date/time preferences affect campaign scheduling and reporting displays - Enterprise status determines access to advanced features and sub-account management Parameters diff --git a/src/brevo/account/raw_client.py b/src/brevo/account/raw_client.py index 2c565c5..df2c626 100644 --- a/src/brevo/account/raw_client.py +++ b/src/brevo/account/raw_client.py @@ -30,25 +30,22 @@ def get_account( - Check plan details (type, credits, expiration) - Get relay information (for transactional emails) - Check Marketing Automation status - - View date/time preferences and account settings - Access organization and user identifiers **Key information returned:** - Complete account details (organization ID, user ID, company information) - Address and contact information - Plan configurations and credit allocations across different verticals - - Marketing Automation settings and tracker key + - Marketing Automation settings and tracker key (when enabled) - SMTP relay configuration for transactional emails - - Date/time preferences and account settings - Enterprise features availability status **Important considerations:** - Provides comprehensive account overview for billing and configuration management - Essential for understanding current plan limitations and feature availability - - Marketing Automation key required for advanced automation features - - Plan verticals show detailed breakdown across Marketing, Chat, and CRM categories + - Marketing Automation key is only returned when Marketing Automation is enabled on the account + - Plan verticals show detailed breakdown across Marketing, Chat, and CRM categories (only returned when plan verticals are available) - Relay configuration crucial for transactional email setup and deliverability - - Date/time preferences affect campaign scheduling and reporting displays - Enterprise status determines access to advanced features and sub-account management Parameters @@ -76,6 +73,17 @@ def get_account( ), ) return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -202,25 +210,22 @@ async def get_account( - Check plan details (type, credits, expiration) - Get relay information (for transactional emails) - Check Marketing Automation status - - View date/time preferences and account settings - Access organization and user identifiers **Key information returned:** - Complete account details (organization ID, user ID, company information) - Address and contact information - Plan configurations and credit allocations across different verticals - - Marketing Automation settings and tracker key + - Marketing Automation settings and tracker key (when enabled) - SMTP relay configuration for transactional emails - - Date/time preferences and account settings - Enterprise features availability status **Important considerations:** - Provides comprehensive account overview for billing and configuration management - Essential for understanding current plan limitations and feature availability - - Marketing Automation key required for advanced automation features - - Plan verticals show detailed breakdown across Marketing, Chat, and CRM categories + - Marketing Automation key is only returned when Marketing Automation is enabled on the account + - Plan verticals show detailed breakdown across Marketing, Chat, and CRM categories (only returned when plan verticals are available) - Relay configuration crucial for transactional email setup and deliverability - - Date/time preferences affect campaign scheduling and reporting displays - Enterprise status determines access to advanced features and sub-account management Parameters @@ -248,6 +253,17 @@ async def get_account( ), ) return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) diff --git a/src/brevo/account/types/__init__.py b/src/brevo/account/types/__init__.py index 03fbdfa..118a1b9 100644 --- a/src/brevo/account/types/__init__.py +++ b/src/brevo/account/types/__init__.py @@ -10,7 +10,6 @@ from .get_account_activity_response_logs_item import GetAccountActivityResponseLogsItem from .get_account_response import GetAccountResponse from .get_account_response_address import GetAccountResponseAddress - from .get_account_response_date_time_preferences import GetAccountResponseDateTimePreferences from .get_account_response_marketing_automation import GetAccountResponseMarketingAutomation from .get_account_response_plan_item import GetAccountResponsePlanItem from .get_account_response_plan_item_type import GetAccountResponsePlanItemType @@ -25,7 +24,6 @@ "GetAccountActivityResponseLogsItem": ".get_account_activity_response_logs_item", "GetAccountResponse": ".get_account_response", "GetAccountResponseAddress": ".get_account_response_address", - "GetAccountResponseDateTimePreferences": ".get_account_response_date_time_preferences", "GetAccountResponseMarketingAutomation": ".get_account_response_marketing_automation", "GetAccountResponsePlanItem": ".get_account_response_plan_item", "GetAccountResponsePlanItemType": ".get_account_response_plan_item_type", @@ -64,7 +62,6 @@ def __dir__(): "GetAccountActivityResponseLogsItem", "GetAccountResponse", "GetAccountResponseAddress", - "GetAccountResponseDateTimePreferences", "GetAccountResponseMarketingAutomation", "GetAccountResponsePlanItem", "GetAccountResponsePlanItemType", diff --git a/src/brevo/account/types/get_account_response.py b/src/brevo/account/types/get_account_response.py index fa09825..7c1a18b 100644 --- a/src/brevo/account/types/get_account_response.py +++ b/src/brevo/account/types/get_account_response.py @@ -8,7 +8,6 @@ from ...core.serialization import FieldMetadata from ...core.unchecked_base_model import UncheckedBaseModel from .get_account_response_address import GetAccountResponseAddress -from .get_account_response_date_time_preferences import GetAccountResponseDateTimePreferences from .get_account_response_marketing_automation import GetAccountResponseMarketingAutomation from .get_account_response_plan_item import GetAccountResponsePlanItem from .get_account_response_plan_verticals_item import GetAccountResponsePlanVerticalsItem @@ -45,16 +44,11 @@ class GetAccountResponse(UncheckedBaseModel): last_name: typing_extensions.Annotated[ str, FieldMetadata(alias="lastName"), pydantic.Field(alias="lastName", description="Last Name") ] - address: GetAccountResponseAddress = pydantic.Field() + address: typing.Optional[GetAccountResponseAddress] = pydantic.Field(default=None) """ Address informations """ - date_time_preferences: typing_extensions.Annotated[ - GetAccountResponseDateTimePreferences, - FieldMetadata(alias="dateTimePreferences"), - pydantic.Field(alias="dateTimePreferences", description="User's date and time preferences"), - ] marketing_automation: typing_extensions.Annotated[ typing.Optional[GetAccountResponseMarketingAutomation], FieldMetadata(alias="marketingAutomation"), diff --git a/src/brevo/account/types/get_account_response_date_time_preferences.py b/src/brevo/account/types/get_account_response_date_time_preferences.py deleted file mode 100644 index 61a06a8..0000000 --- a/src/brevo/account/types/get_account_response_date_time_preferences.py +++ /dev/null @@ -1,38 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -import typing_extensions -from ...core.pydantic_utilities import IS_PYDANTIC_V2 -from ...core.serialization import FieldMetadata -from ...core.unchecked_base_model import UncheckedBaseModel - - -class GetAccountResponseDateTimePreferences(UncheckedBaseModel): - """ - User's date and time preferences - """ - - timezone: str = pydantic.Field() - """ - User's timezone setting - """ - - time_format: typing_extensions.Annotated[ - str, - FieldMetadata(alias="timeFormat"), - pydantic.Field(alias="timeFormat", description="Preferred time format (12 or 24 hour)"), - ] - date_format: typing_extensions.Annotated[ - str, FieldMetadata(alias="dateFormat"), pydantic.Field(alias="dateFormat", description="Preferred date format") - ] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/brevo/account/types/get_account_response_plan_verticals_item.py b/src/brevo/account/types/get_account_response_plan_verticals_item.py index d94a27b..63efd8a 100644 --- a/src/brevo/account/types/get_account_response_plan_verticals_item.py +++ b/src/brevo/account/types/get_account_response_plan_verticals_item.py @@ -34,15 +34,15 @@ class GetAccountResponsePlanVerticalsItem(UncheckedBaseModel): """ start_date: typing_extensions.Annotated[ - str, + typing.Optional[str], FieldMetadata(alias="startDate"), pydantic.Field(alias="startDate", description="Plan start date (Unix timestamp)"), - ] + ] = None end_date: typing_extensions.Annotated[ - str, + typing.Optional[str], FieldMetadata(alias="endDate"), pydantic.Field(alias="endDate", description="Plan end date (Unix timestamp)"), - ] + ] = None users: typing.Optional[GetAccountResponsePlanVerticalsItemUsers] = pydantic.Field(default=None) """ User seat information for the plan diff --git a/src/brevo/balance/__init__.py b/src/brevo/balance/__init__.py index 5ba917c..4be6d1c 100644 --- a/src/brevo/balance/__init__.py +++ b/src/brevo/balance/__init__.py @@ -7,9 +7,11 @@ if typing.TYPE_CHECKING: from .types import ( + BeginTransactionRequestTransactionType, CreateBalanceLimitRequestConstraintType, CreateBalanceLimitRequestDurationUnit, CreateBalanceLimitRequestTransactionType, + CreateBalanceOrderRequestSource, CreateBalanceOrderResponse, GetBalanceDefinitionListRequestSort, GetBalanceDefinitionListRequestSortField, @@ -17,13 +19,19 @@ GetBalanceDefinitionListResponse, GetBalanceDefinitionRequestVersion, GetBalanceLimitRequestVersion, + GetContactBalancesRequestSort, + GetContactBalancesRequestSortField, GetContactBalancesResponse, GetContactBalancesResponseBalancesItem, + GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort, + GetLoyaltyBalanceProgramsPidActiveBalanceResponse, + GetLoyaltyBalanceProgramsPidActiveBalanceResponseActiveBalancesItem, GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort, GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus, GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType, GetLoyaltyBalanceProgramsPidTransactionHistoryResponse, GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItem, + GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItemTransactionType, GetSubscriptionBalancesResponse, GetSubscriptionBalancesResponseBalanceItem, PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationModifier, @@ -46,9 +54,11 @@ UpdateBalanceLimitRequestTransactionType, ) _dynamic_imports: typing.Dict[str, str] = { + "BeginTransactionRequestTransactionType": ".types", "CreateBalanceLimitRequestConstraintType": ".types", "CreateBalanceLimitRequestDurationUnit": ".types", "CreateBalanceLimitRequestTransactionType": ".types", + "CreateBalanceOrderRequestSource": ".types", "CreateBalanceOrderResponse": ".types", "GetBalanceDefinitionListRequestSort": ".types", "GetBalanceDefinitionListRequestSortField": ".types", @@ -56,13 +66,19 @@ "GetBalanceDefinitionListResponse": ".types", "GetBalanceDefinitionRequestVersion": ".types", "GetBalanceLimitRequestVersion": ".types", + "GetContactBalancesRequestSort": ".types", + "GetContactBalancesRequestSortField": ".types", "GetContactBalancesResponse": ".types", "GetContactBalancesResponseBalancesItem": ".types", + "GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort": ".types", + "GetLoyaltyBalanceProgramsPidActiveBalanceResponse": ".types", + "GetLoyaltyBalanceProgramsPidActiveBalanceResponseActiveBalancesItem": ".types", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort": ".types", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus": ".types", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType": ".types", "GetLoyaltyBalanceProgramsPidTransactionHistoryResponse": ".types", "GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItem": ".types", + "GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItemTransactionType": ".types", "GetSubscriptionBalancesResponse": ".types", "GetSubscriptionBalancesResponseBalanceItem": ".types", "PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationModifier": ".types", @@ -108,9 +124,11 @@ def __dir__(): __all__ = [ + "BeginTransactionRequestTransactionType", "CreateBalanceLimitRequestConstraintType", "CreateBalanceLimitRequestDurationUnit", "CreateBalanceLimitRequestTransactionType", + "CreateBalanceOrderRequestSource", "CreateBalanceOrderResponse", "GetBalanceDefinitionListRequestSort", "GetBalanceDefinitionListRequestSortField", @@ -118,13 +136,19 @@ def __dir__(): "GetBalanceDefinitionListResponse", "GetBalanceDefinitionRequestVersion", "GetBalanceLimitRequestVersion", + "GetContactBalancesRequestSort", + "GetContactBalancesRequestSortField", "GetContactBalancesResponse", "GetContactBalancesResponseBalancesItem", + "GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort", + "GetLoyaltyBalanceProgramsPidActiveBalanceResponse", + "GetLoyaltyBalanceProgramsPidActiveBalanceResponseActiveBalancesItem", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType", "GetLoyaltyBalanceProgramsPidTransactionHistoryResponse", "GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItem", + "GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItemTransactionType", "GetSubscriptionBalancesResponse", "GetSubscriptionBalancesResponseBalanceItem", "PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationModifier", diff --git a/src/brevo/balance/client.py b/src/brevo/balance/client.py index 8b2ed58..bd0989e 100644 --- a/src/brevo/balance/client.py +++ b/src/brevo/balance/client.py @@ -9,9 +9,11 @@ from ..types.balance_limit import BalanceLimit from ..types.transaction import Transaction from .raw_client import AsyncRawBalanceClient, RawBalanceClient +from .types.begin_transaction_request_transaction_type import BeginTransactionRequestTransactionType from .types.create_balance_limit_request_constraint_type import CreateBalanceLimitRequestConstraintType from .types.create_balance_limit_request_duration_unit import CreateBalanceLimitRequestDurationUnit from .types.create_balance_limit_request_transaction_type import CreateBalanceLimitRequestTransactionType +from .types.create_balance_order_request_source import CreateBalanceOrderRequestSource from .types.create_balance_order_response import CreateBalanceOrderResponse from .types.get_balance_definition_list_request_sort import GetBalanceDefinitionListRequestSort from .types.get_balance_definition_list_request_sort_field import GetBalanceDefinitionListRequestSortField @@ -19,7 +21,15 @@ from .types.get_balance_definition_list_response import GetBalanceDefinitionListResponse from .types.get_balance_definition_request_version import GetBalanceDefinitionRequestVersion from .types.get_balance_limit_request_version import GetBalanceLimitRequestVersion +from .types.get_contact_balances_request_sort import GetContactBalancesRequestSort +from .types.get_contact_balances_request_sort_field import GetContactBalancesRequestSortField from .types.get_contact_balances_response import GetContactBalancesResponse +from .types.get_loyalty_balance_programs_pid_active_balance_request_sort import ( + GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort, +) +from .types.get_loyalty_balance_programs_pid_active_balance_response import ( + GetLoyaltyBalanceProgramsPidActiveBalanceResponse, +) from .types.get_loyalty_balance_programs_pid_transaction_history_request_sort import ( GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort, ) @@ -105,11 +115,11 @@ def get_active_balances_api( balance_definition_id: str, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, - sort_field: typing.Optional[str] = None, - sort: typing.Optional[str] = None, + sort_field: typing.Optional[typing.Literal["createdAt"]] = None, + sort: typing.Optional[GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort] = None, include_internal: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> BalanceLimit: + ) -> GetLoyaltyBalanceProgramsPidActiveBalanceResponse: """ Returns Active Balances @@ -130,10 +140,10 @@ def get_active_balances_api( offset : typing.Optional[int] Offset - sort_field : typing.Optional[str] + sort_field : typing.Optional[typing.Literal["createdAt"]] Sort Field - sort : typing.Optional[str] + sort : typing.Optional[GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort] Sort Order include_internal : typing.Optional[bool] @@ -144,8 +154,8 @@ def get_active_balances_api( Returns ------- - BalanceLimit - Successful retrieval of active balance + GetLoyaltyBalanceProgramsPidActiveBalanceResponse + Successful retrieval of active balances Examples -------- @@ -156,8 +166,8 @@ def get_active_balances_api( ) client.balance.get_active_balances_api( pid="pid", - contact_id=1, - balance_definition_id="balance_definition_id", + contact_id=1000000, + balance_definition_id="balanceDefinitionId", ) """ _response = self._raw_client.get_active_balances_api( @@ -846,20 +856,40 @@ def get_contact_balances( self, pid: str, *, + balance_definition_id: str, include_internal: typing.Optional[bool] = None, + limit: typing.Optional[int] = None, + offset: typing.Optional[int] = None, + sort: typing.Optional[GetContactBalancesRequestSort] = None, + sort_field: typing.Optional[GetContactBalancesRequestSortField] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetContactBalancesResponse: """ - Returns balance list + Returns contact balances for a given balance definition across all subscriptions. Parameters ---------- pid : str Loyalty Program Id + balance_definition_id : str + Balance Definition ID (required) + include_internal : typing.Optional[bool] Include balances tied to internal definitions. + limit : typing.Optional[int] + Limit the number of records returned + + offset : typing.Optional[int] + Skip a number of records + + sort : typing.Optional[GetContactBalancesRequestSort] + Sort order + + sort_field : typing.Optional[GetContactBalancesRequestSortField] + Field to sort by + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -877,10 +907,18 @@ def get_contact_balances( ) client.balance.get_contact_balances( pid="pid", + balance_definition_id="balanceDefinitionId", ) """ _response = self._raw_client.get_contact_balances( - pid, include_internal=include_internal, request_options=request_options + pid, + balance_definition_id=balance_definition_id, + include_internal=include_internal, + limit=limit, + offset=offset, + sort=sort, + sort_field=sort_field, + request_options=request_options, ) return _response.data @@ -892,7 +930,7 @@ def create_balance_order( balance_definition_id: str, contact_id: int, due_at: str, - source: str, + source: CreateBalanceOrderRequestSource, expires_at: typing.Optional[str] = OMIT, meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -917,8 +955,8 @@ def create_balance_order( due_at : str RFC3339 timestamp specifying when the order is due. - source : str - Specifies the origin of the order (`engine` or `user`). + source : CreateBalanceOrderRequestSource + Specifies the origin of the order. expires_at : typing.Optional[str] Optional RFC3339 timestamp defining order expiration. @@ -947,7 +985,7 @@ def create_balance_order( balance_definition_id="balanceDefinitionId", contact_id=1, due_at="dueAt", - source="source", + source="engine", ) """ _response = self._raw_client.create_balance_order( @@ -1063,9 +1101,9 @@ def get_transaction_history_api( offset: typing.Optional[int] = None, sort_field: typing.Optional[typing.Literal["createdAt"]] = None, sort: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort] = None, - filters: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, status: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus] = None, transaction_type: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType] = None, + loyalty_subscription_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetLoyaltyBalanceProgramsPidTransactionHistoryResponse: """ @@ -1092,16 +1130,16 @@ def get_transaction_history_api( Field to sort by sort : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort] - Sort order, either asc or desc - - filters : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Filters to apply + Sort order status : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus] - Transaction status filter. Allowed values: draft, completed, rejected, cancelled, expired + Transaction status filter transaction_type : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType] - Transaction type filter. Allowed values: credit, debit + Transaction type filter + + loyalty_subscription_id : typing.Optional[str] + Loyalty Subscription ID filter request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1120,7 +1158,7 @@ def get_transaction_history_api( ) client.balance.get_transaction_history_api( pid="pid", - contact_id=1, + contact_id=1000000, balance_definition_id="balanceDefinitionId", ) """ @@ -1132,9 +1170,9 @@ def get_transaction_history_api( offset=offset, sort_field=sort_field, sort=sort, - filters=filters, status=status, transaction_type=transaction_type, + loyalty_subscription_id=loyalty_subscription_id, request_options=request_options, ) return _response.data @@ -1145,13 +1183,14 @@ def begin_transaction( *, amount: float, balance_definition_id: str, - loyalty_subscription_id: typing.Optional[str] = OMIT, - auto_complete: typing.Optional[bool] = OMIT, - balance_expiry_in_minutes: typing.Optional[int] = OMIT, + transaction_type: typing.Optional[BeginTransactionRequestTransactionType] = OMIT, contact_id: typing.Optional[int] = OMIT, - event_time: typing.Optional[str] = OMIT, + loyalty_subscription_id: typing.Optional[str] = OMIT, meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, ttl: typing.Optional[int] = OMIT, + event_time: typing.Optional[dt.datetime] = OMIT, + auto_complete: typing.Optional[bool] = OMIT, + balance_expiry_in_minutes: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Transaction: """ @@ -1163,31 +1202,34 @@ def begin_transaction( Loyalty Program Id amount : float - Transaction amount (must be provided). + Transaction amount. A positive value creates a credit transaction and a negative value creates a debit transaction (unless transactionType is explicitly provided). balance_definition_id : str Unique identifier (UUID) of the associated balance definition. - loyalty_subscription_id : typing.Optional[str] - Unique identifier for the loyalty subscription (required unless `contactId` is provided). - - auto_complete : typing.Optional[bool] - Whether the transaction should be automatically completed. - - balance_expiry_in_minutes : typing.Optional[int] - Optional expiry time for the balance in minutes (must be greater than 0 if provided). + transaction_type : typing.Optional[BeginTransactionRequestTransactionType] + Explicit transaction type. If not provided, the type is inferred from the sign of the amount (positive = credit, negative = debit). contact_id : typing.Optional[int] - Unique identifier of the contact involved in the transaction (required unless `LoyaltySubscriptionId` is provided). + Unique identifier of the contact involved in the transaction. Required unless `LoyaltySubscriptionId` is provided. - event_time : typing.Optional[str] - Optional timestamp specifying when the transaction occurred. + loyalty_subscription_id : typing.Optional[str] + Unique identifier for the loyalty subscription. Required unless `contactId` is provided. meta : typing.Optional[typing.Dict[str, typing.Any]] Optional metadata associated with the transaction. ttl : typing.Optional[int] - Optional time-to-live for the transaction (must be greater than 0 if provided). + Time-to-live for the transaction in seconds. Must be at least 10 seconds if provided. + + event_time : typing.Optional[dt.datetime] + Timestamp specifying when the transaction event occurred (ISO 8601 / RFC 3339 format). + + auto_complete : typing.Optional[bool] + Whether the transaction should be automatically completed. + + balance_expiry_in_minutes : typing.Optional[int] + Expiry time for the balance in minutes. Must be greater than 0 if provided. Only applicable when autoComplete is true. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1195,7 +1237,7 @@ def begin_transaction( Returns ------- Transaction - Transaction information + Transaction created successfully Examples -------- @@ -1214,13 +1256,14 @@ def begin_transaction( pid, amount=amount, balance_definition_id=balance_definition_id, - loyalty_subscription_id=loyalty_subscription_id, - auto_complete=auto_complete, - balance_expiry_in_minutes=balance_expiry_in_minutes, + transaction_type=transaction_type, contact_id=contact_id, - event_time=event_time, + loyalty_subscription_id=loyalty_subscription_id, meta=meta, ttl=ttl, + event_time=event_time, + auto_complete=auto_complete, + balance_expiry_in_minutes=balance_expiry_in_minutes, request_options=request_options, ) return _response.data @@ -1323,11 +1366,11 @@ async def get_active_balances_api( balance_definition_id: str, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, - sort_field: typing.Optional[str] = None, - sort: typing.Optional[str] = None, + sort_field: typing.Optional[typing.Literal["createdAt"]] = None, + sort: typing.Optional[GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort] = None, include_internal: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> BalanceLimit: + ) -> GetLoyaltyBalanceProgramsPidActiveBalanceResponse: """ Returns Active Balances @@ -1348,10 +1391,10 @@ async def get_active_balances_api( offset : typing.Optional[int] Offset - sort_field : typing.Optional[str] + sort_field : typing.Optional[typing.Literal["createdAt"]] Sort Field - sort : typing.Optional[str] + sort : typing.Optional[GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort] Sort Order include_internal : typing.Optional[bool] @@ -1362,8 +1405,8 @@ async def get_active_balances_api( Returns ------- - BalanceLimit - Successful retrieval of active balance + GetLoyaltyBalanceProgramsPidActiveBalanceResponse + Successful retrieval of active balances Examples -------- @@ -1379,8 +1422,8 @@ async def get_active_balances_api( async def main() -> None: await client.balance.get_active_balances_api( pid="pid", - contact_id=1, - balance_definition_id="balance_definition_id", + contact_id=1000000, + balance_definition_id="balanceDefinitionId", ) @@ -2146,20 +2189,40 @@ async def get_contact_balances( self, pid: str, *, + balance_definition_id: str, include_internal: typing.Optional[bool] = None, + limit: typing.Optional[int] = None, + offset: typing.Optional[int] = None, + sort: typing.Optional[GetContactBalancesRequestSort] = None, + sort_field: typing.Optional[GetContactBalancesRequestSortField] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetContactBalancesResponse: """ - Returns balance list + Returns contact balances for a given balance definition across all subscriptions. Parameters ---------- pid : str Loyalty Program Id + balance_definition_id : str + Balance Definition ID (required) + include_internal : typing.Optional[bool] Include balances tied to internal definitions. + limit : typing.Optional[int] + Limit the number of records returned + + offset : typing.Optional[int] + Skip a number of records + + sort : typing.Optional[GetContactBalancesRequestSort] + Sort order + + sort_field : typing.Optional[GetContactBalancesRequestSortField] + Field to sort by + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2182,13 +2245,21 @@ async def get_contact_balances( async def main() -> None: await client.balance.get_contact_balances( pid="pid", + balance_definition_id="balanceDefinitionId", ) asyncio.run(main()) """ _response = await self._raw_client.get_contact_balances( - pid, include_internal=include_internal, request_options=request_options + pid, + balance_definition_id=balance_definition_id, + include_internal=include_internal, + limit=limit, + offset=offset, + sort=sort, + sort_field=sort_field, + request_options=request_options, ) return _response.data @@ -2200,7 +2271,7 @@ async def create_balance_order( balance_definition_id: str, contact_id: int, due_at: str, - source: str, + source: CreateBalanceOrderRequestSource, expires_at: typing.Optional[str] = OMIT, meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -2225,8 +2296,8 @@ async def create_balance_order( due_at : str RFC3339 timestamp specifying when the order is due. - source : str - Specifies the origin of the order (`engine` or `user`). + source : CreateBalanceOrderRequestSource + Specifies the origin of the order. expires_at : typing.Optional[str] Optional RFC3339 timestamp defining order expiration. @@ -2260,7 +2331,7 @@ async def main() -> None: balance_definition_id="balanceDefinitionId", contact_id=1, due_at="dueAt", - source="source", + source="engine", ) @@ -2395,9 +2466,9 @@ async def get_transaction_history_api( offset: typing.Optional[int] = None, sort_field: typing.Optional[typing.Literal["createdAt"]] = None, sort: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort] = None, - filters: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, status: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus] = None, transaction_type: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType] = None, + loyalty_subscription_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetLoyaltyBalanceProgramsPidTransactionHistoryResponse: """ @@ -2424,16 +2495,16 @@ async def get_transaction_history_api( Field to sort by sort : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort] - Sort order, either asc or desc - - filters : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Filters to apply + Sort order status : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus] - Transaction status filter. Allowed values: draft, completed, rejected, cancelled, expired + Transaction status filter transaction_type : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType] - Transaction type filter. Allowed values: credit, debit + Transaction type filter + + loyalty_subscription_id : typing.Optional[str] + Loyalty Subscription ID filter request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2457,7 +2528,7 @@ async def get_transaction_history_api( async def main() -> None: await client.balance.get_transaction_history_api( pid="pid", - contact_id=1, + contact_id=1000000, balance_definition_id="balanceDefinitionId", ) @@ -2472,9 +2543,9 @@ async def main() -> None: offset=offset, sort_field=sort_field, sort=sort, - filters=filters, status=status, transaction_type=transaction_type, + loyalty_subscription_id=loyalty_subscription_id, request_options=request_options, ) return _response.data @@ -2485,13 +2556,14 @@ async def begin_transaction( *, amount: float, balance_definition_id: str, - loyalty_subscription_id: typing.Optional[str] = OMIT, - auto_complete: typing.Optional[bool] = OMIT, - balance_expiry_in_minutes: typing.Optional[int] = OMIT, + transaction_type: typing.Optional[BeginTransactionRequestTransactionType] = OMIT, contact_id: typing.Optional[int] = OMIT, - event_time: typing.Optional[str] = OMIT, + loyalty_subscription_id: typing.Optional[str] = OMIT, meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, ttl: typing.Optional[int] = OMIT, + event_time: typing.Optional[dt.datetime] = OMIT, + auto_complete: typing.Optional[bool] = OMIT, + balance_expiry_in_minutes: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Transaction: """ @@ -2503,31 +2575,34 @@ async def begin_transaction( Loyalty Program Id amount : float - Transaction amount (must be provided). + Transaction amount. A positive value creates a credit transaction and a negative value creates a debit transaction (unless transactionType is explicitly provided). balance_definition_id : str Unique identifier (UUID) of the associated balance definition. - loyalty_subscription_id : typing.Optional[str] - Unique identifier for the loyalty subscription (required unless `contactId` is provided). - - auto_complete : typing.Optional[bool] - Whether the transaction should be automatically completed. - - balance_expiry_in_minutes : typing.Optional[int] - Optional expiry time for the balance in minutes (must be greater than 0 if provided). + transaction_type : typing.Optional[BeginTransactionRequestTransactionType] + Explicit transaction type. If not provided, the type is inferred from the sign of the amount (positive = credit, negative = debit). contact_id : typing.Optional[int] - Unique identifier of the contact involved in the transaction (required unless `LoyaltySubscriptionId` is provided). + Unique identifier of the contact involved in the transaction. Required unless `LoyaltySubscriptionId` is provided. - event_time : typing.Optional[str] - Optional timestamp specifying when the transaction occurred. + loyalty_subscription_id : typing.Optional[str] + Unique identifier for the loyalty subscription. Required unless `contactId` is provided. meta : typing.Optional[typing.Dict[str, typing.Any]] Optional metadata associated with the transaction. ttl : typing.Optional[int] - Optional time-to-live for the transaction (must be greater than 0 if provided). + Time-to-live for the transaction in seconds. Must be at least 10 seconds if provided. + + event_time : typing.Optional[dt.datetime] + Timestamp specifying when the transaction event occurred (ISO 8601 / RFC 3339 format). + + auto_complete : typing.Optional[bool] + Whether the transaction should be automatically completed. + + balance_expiry_in_minutes : typing.Optional[int] + Expiry time for the balance in minutes. Must be greater than 0 if provided. Only applicable when autoComplete is true. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2535,7 +2610,7 @@ async def begin_transaction( Returns ------- Transaction - Transaction information + Transaction created successfully Examples -------- @@ -2562,13 +2637,14 @@ async def main() -> None: pid, amount=amount, balance_definition_id=balance_definition_id, - loyalty_subscription_id=loyalty_subscription_id, - auto_complete=auto_complete, - balance_expiry_in_minutes=balance_expiry_in_minutes, + transaction_type=transaction_type, contact_id=contact_id, - event_time=event_time, + loyalty_subscription_id=loyalty_subscription_id, meta=meta, ttl=ttl, + event_time=event_time, + auto_complete=auto_complete, + balance_expiry_in_minutes=balance_expiry_in_minutes, request_options=request_options, ) return _response.data diff --git a/src/brevo/balance/raw_client.py b/src/brevo/balance/raw_client.py index 89a577b..51dd2a8 100644 --- a/src/brevo/balance/raw_client.py +++ b/src/brevo/balance/raw_client.py @@ -22,9 +22,11 @@ from ..types.balance_limit import BalanceLimit from ..types.error_model import ErrorModel from ..types.transaction import Transaction +from .types.begin_transaction_request_transaction_type import BeginTransactionRequestTransactionType from .types.create_balance_limit_request_constraint_type import CreateBalanceLimitRequestConstraintType from .types.create_balance_limit_request_duration_unit import CreateBalanceLimitRequestDurationUnit from .types.create_balance_limit_request_transaction_type import CreateBalanceLimitRequestTransactionType +from .types.create_balance_order_request_source import CreateBalanceOrderRequestSource from .types.create_balance_order_response import CreateBalanceOrderResponse from .types.get_balance_definition_list_request_sort import GetBalanceDefinitionListRequestSort from .types.get_balance_definition_list_request_sort_field import GetBalanceDefinitionListRequestSortField @@ -32,7 +34,15 @@ from .types.get_balance_definition_list_response import GetBalanceDefinitionListResponse from .types.get_balance_definition_request_version import GetBalanceDefinitionRequestVersion from .types.get_balance_limit_request_version import GetBalanceLimitRequestVersion +from .types.get_contact_balances_request_sort import GetContactBalancesRequestSort +from .types.get_contact_balances_request_sort_field import GetContactBalancesRequestSortField from .types.get_contact_balances_response import GetContactBalancesResponse +from .types.get_loyalty_balance_programs_pid_active_balance_request_sort import ( + GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort, +) +from .types.get_loyalty_balance_programs_pid_active_balance_response import ( + GetLoyaltyBalanceProgramsPidActiveBalanceResponse, +) from .types.get_loyalty_balance_programs_pid_transaction_history_request_sort import ( GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort, ) @@ -108,11 +118,11 @@ def get_active_balances_api( balance_definition_id: str, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, - sort_field: typing.Optional[str] = None, - sort: typing.Optional[str] = None, + sort_field: typing.Optional[typing.Literal["createdAt"]] = None, + sort: typing.Optional[GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort] = None, include_internal: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[BalanceLimit]: + ) -> HttpResponse[GetLoyaltyBalanceProgramsPidActiveBalanceResponse]: """ Returns Active Balances @@ -133,10 +143,10 @@ def get_active_balances_api( offset : typing.Optional[int] Offset - sort_field : typing.Optional[str] + sort_field : typing.Optional[typing.Literal["createdAt"]] Sort Field - sort : typing.Optional[str] + sort : typing.Optional[GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort] Sort Order include_internal : typing.Optional[bool] @@ -147,8 +157,8 @@ def get_active_balances_api( Returns ------- - HttpResponse[BalanceLimit] - Successful retrieval of active balance + HttpResponse[GetLoyaltyBalanceProgramsPidActiveBalanceResponse] + Successful retrieval of active balances """ _response = self._client_wrapper.httpx_client.request( f"loyalty/balance/programs/{jsonable_encoder(pid)}/active-balance", @@ -156,10 +166,10 @@ def get_active_balances_api( params={ "limit": limit, "offset": offset, - "sort_field": sort_field, + "sortField": sort_field, "sort": sort, - "contact_id": contact_id, - "balance_definition_id": balance_definition_id, + "contactId": contact_id, + "balanceDefinitionId": balance_definition_id, "includeInternal": include_internal, }, request_options=request_options, @@ -167,9 +177,9 @@ def get_active_balances_api( try: if 200 <= _response.status_code < 300: _data = typing.cast( - BalanceLimit, + GetLoyaltyBalanceProgramsPidActiveBalanceResponse, construct_type( - type_=BalanceLimit, # type: ignore + type_=GetLoyaltyBalanceProgramsPidActiveBalanceResponse, # type: ignore object_=_response.json(), ), ) @@ -1475,20 +1485,40 @@ def get_contact_balances( self, pid: str, *, + balance_definition_id: str, include_internal: typing.Optional[bool] = None, + limit: typing.Optional[int] = None, + offset: typing.Optional[int] = None, + sort: typing.Optional[GetContactBalancesRequestSort] = None, + sort_field: typing.Optional[GetContactBalancesRequestSortField] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetContactBalancesResponse]: """ - Returns balance list + Returns contact balances for a given balance definition across all subscriptions. Parameters ---------- pid : str Loyalty Program Id + balance_definition_id : str + Balance Definition ID (required) + include_internal : typing.Optional[bool] Include balances tied to internal definitions. + limit : typing.Optional[int] + Limit the number of records returned + + offset : typing.Optional[int] + Skip a number of records + + sort : typing.Optional[GetContactBalancesRequestSort] + Sort order + + sort_field : typing.Optional[GetContactBalancesRequestSortField] + Field to sort by + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1502,6 +1532,11 @@ def get_contact_balances( method="GET", params={ "includeInternal": include_internal, + "limit": limit, + "offset": offset, + "sort": sort, + "sortField": sort_field, + "balanceDefinitionId": balance_definition_id, }, request_options=request_options, ) @@ -1587,7 +1622,7 @@ def create_balance_order( balance_definition_id: str, contact_id: int, due_at: str, - source: str, + source: CreateBalanceOrderRequestSource, expires_at: typing.Optional[str] = OMIT, meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -1612,8 +1647,8 @@ def create_balance_order( due_at : str RFC3339 timestamp specifying when the order is due. - source : str - Specifies the origin of the order (`engine` or `user`). + source : CreateBalanceOrderRequestSource + Specifies the origin of the order. expires_at : typing.Optional[str] Optional RFC3339 timestamp defining order expiration. @@ -1943,9 +1978,9 @@ def get_transaction_history_api( offset: typing.Optional[int] = None, sort_field: typing.Optional[typing.Literal["createdAt"]] = None, sort: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort] = None, - filters: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, status: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus] = None, transaction_type: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType] = None, + loyalty_subscription_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetLoyaltyBalanceProgramsPidTransactionHistoryResponse]: """ @@ -1972,16 +2007,16 @@ def get_transaction_history_api( Field to sort by sort : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort] - Sort order, either asc or desc - - filters : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Filters to apply + Sort order status : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus] - Transaction status filter. Allowed values: draft, completed, rejected, cancelled, expired + Transaction status filter transaction_type : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType] - Transaction type filter. Allowed values: credit, debit + Transaction type filter + + loyalty_subscription_id : typing.Optional[str] + Loyalty Subscription ID filter request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2001,9 +2036,9 @@ def get_transaction_history_api( "sort": sort, "contactId": contact_id, "balanceDefinitionId": balance_definition_id, - "filters": filters, "status": status, "transactionType": transaction_type, + "loyaltySubscriptionId": loyalty_subscription_id, }, request_options=request_options, ) @@ -2087,13 +2122,14 @@ def begin_transaction( *, amount: float, balance_definition_id: str, - loyalty_subscription_id: typing.Optional[str] = OMIT, - auto_complete: typing.Optional[bool] = OMIT, - balance_expiry_in_minutes: typing.Optional[int] = OMIT, + transaction_type: typing.Optional[BeginTransactionRequestTransactionType] = OMIT, contact_id: typing.Optional[int] = OMIT, - event_time: typing.Optional[str] = OMIT, + loyalty_subscription_id: typing.Optional[str] = OMIT, meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, ttl: typing.Optional[int] = OMIT, + event_time: typing.Optional[dt.datetime] = OMIT, + auto_complete: typing.Optional[bool] = OMIT, + balance_expiry_in_minutes: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[Transaction]: """ @@ -2105,31 +2141,34 @@ def begin_transaction( Loyalty Program Id amount : float - Transaction amount (must be provided). + Transaction amount. A positive value creates a credit transaction and a negative value creates a debit transaction (unless transactionType is explicitly provided). balance_definition_id : str Unique identifier (UUID) of the associated balance definition. - loyalty_subscription_id : typing.Optional[str] - Unique identifier for the loyalty subscription (required unless `contactId` is provided). - - auto_complete : typing.Optional[bool] - Whether the transaction should be automatically completed. - - balance_expiry_in_minutes : typing.Optional[int] - Optional expiry time for the balance in minutes (must be greater than 0 if provided). + transaction_type : typing.Optional[BeginTransactionRequestTransactionType] + Explicit transaction type. If not provided, the type is inferred from the sign of the amount (positive = credit, negative = debit). contact_id : typing.Optional[int] - Unique identifier of the contact involved in the transaction (required unless `LoyaltySubscriptionId` is provided). + Unique identifier of the contact involved in the transaction. Required unless `LoyaltySubscriptionId` is provided. - event_time : typing.Optional[str] - Optional timestamp specifying when the transaction occurred. + loyalty_subscription_id : typing.Optional[str] + Unique identifier for the loyalty subscription. Required unless `contactId` is provided. meta : typing.Optional[typing.Dict[str, typing.Any]] Optional metadata associated with the transaction. ttl : typing.Optional[int] - Optional time-to-live for the transaction (must be greater than 0 if provided). + Time-to-live for the transaction in seconds. Must be at least 10 seconds if provided. + + event_time : typing.Optional[dt.datetime] + Timestamp specifying when the transaction event occurred (ISO 8601 / RFC 3339 format). + + auto_complete : typing.Optional[bool] + Whether the transaction should be automatically completed. + + balance_expiry_in_minutes : typing.Optional[int] + Expiry time for the balance in minutes. Must be greater than 0 if provided. Only applicable when autoComplete is true. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2137,21 +2176,22 @@ def begin_transaction( Returns ------- HttpResponse[Transaction] - Transaction information + Transaction created successfully """ _response = self._client_wrapper.httpx_client.request( f"loyalty/balance/programs/{jsonable_encoder(pid)}/transactions", method="POST", json={ - "LoyaltySubscriptionId": loyalty_subscription_id, "amount": amount, - "autoComplete": auto_complete, + "transactionType": transaction_type, "balanceDefinitionId": balance_definition_id, - "balanceExpiryInMinutes": balance_expiry_in_minutes, "contactId": contact_id, - "eventTime": event_time, + "LoyaltySubscriptionId": loyalty_subscription_id, "meta": meta, "ttl": ttl, + "eventTime": event_time, + "autoComplete": auto_complete, + "balanceExpiryInMinutes": balance_expiry_in_minutes, }, headers={ "content-type": "application/json", @@ -2448,11 +2488,11 @@ async def get_active_balances_api( balance_definition_id: str, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, - sort_field: typing.Optional[str] = None, - sort: typing.Optional[str] = None, + sort_field: typing.Optional[typing.Literal["createdAt"]] = None, + sort: typing.Optional[GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort] = None, include_internal: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[BalanceLimit]: + ) -> AsyncHttpResponse[GetLoyaltyBalanceProgramsPidActiveBalanceResponse]: """ Returns Active Balances @@ -2473,10 +2513,10 @@ async def get_active_balances_api( offset : typing.Optional[int] Offset - sort_field : typing.Optional[str] + sort_field : typing.Optional[typing.Literal["createdAt"]] Sort Field - sort : typing.Optional[str] + sort : typing.Optional[GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort] Sort Order include_internal : typing.Optional[bool] @@ -2487,8 +2527,8 @@ async def get_active_balances_api( Returns ------- - AsyncHttpResponse[BalanceLimit] - Successful retrieval of active balance + AsyncHttpResponse[GetLoyaltyBalanceProgramsPidActiveBalanceResponse] + Successful retrieval of active balances """ _response = await self._client_wrapper.httpx_client.request( f"loyalty/balance/programs/{jsonable_encoder(pid)}/active-balance", @@ -2496,10 +2536,10 @@ async def get_active_balances_api( params={ "limit": limit, "offset": offset, - "sort_field": sort_field, + "sortField": sort_field, "sort": sort, - "contact_id": contact_id, - "balance_definition_id": balance_definition_id, + "contactId": contact_id, + "balanceDefinitionId": balance_definition_id, "includeInternal": include_internal, }, request_options=request_options, @@ -2507,9 +2547,9 @@ async def get_active_balances_api( try: if 200 <= _response.status_code < 300: _data = typing.cast( - BalanceLimit, + GetLoyaltyBalanceProgramsPidActiveBalanceResponse, construct_type( - type_=BalanceLimit, # type: ignore + type_=GetLoyaltyBalanceProgramsPidActiveBalanceResponse, # type: ignore object_=_response.json(), ), ) @@ -3815,20 +3855,40 @@ async def get_contact_balances( self, pid: str, *, + balance_definition_id: str, include_internal: typing.Optional[bool] = None, + limit: typing.Optional[int] = None, + offset: typing.Optional[int] = None, + sort: typing.Optional[GetContactBalancesRequestSort] = None, + sort_field: typing.Optional[GetContactBalancesRequestSortField] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetContactBalancesResponse]: """ - Returns balance list + Returns contact balances for a given balance definition across all subscriptions. Parameters ---------- pid : str Loyalty Program Id + balance_definition_id : str + Balance Definition ID (required) + include_internal : typing.Optional[bool] Include balances tied to internal definitions. + limit : typing.Optional[int] + Limit the number of records returned + + offset : typing.Optional[int] + Skip a number of records + + sort : typing.Optional[GetContactBalancesRequestSort] + Sort order + + sort_field : typing.Optional[GetContactBalancesRequestSortField] + Field to sort by + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -3842,6 +3902,11 @@ async def get_contact_balances( method="GET", params={ "includeInternal": include_internal, + "limit": limit, + "offset": offset, + "sort": sort, + "sortField": sort_field, + "balanceDefinitionId": balance_definition_id, }, request_options=request_options, ) @@ -3927,7 +3992,7 @@ async def create_balance_order( balance_definition_id: str, contact_id: int, due_at: str, - source: str, + source: CreateBalanceOrderRequestSource, expires_at: typing.Optional[str] = OMIT, meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -3952,8 +4017,8 @@ async def create_balance_order( due_at : str RFC3339 timestamp specifying when the order is due. - source : str - Specifies the origin of the order (`engine` or `user`). + source : CreateBalanceOrderRequestSource + Specifies the origin of the order. expires_at : typing.Optional[str] Optional RFC3339 timestamp defining order expiration. @@ -4283,9 +4348,9 @@ async def get_transaction_history_api( offset: typing.Optional[int] = None, sort_field: typing.Optional[typing.Literal["createdAt"]] = None, sort: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort] = None, - filters: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, status: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus] = None, transaction_type: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType] = None, + loyalty_subscription_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetLoyaltyBalanceProgramsPidTransactionHistoryResponse]: """ @@ -4312,16 +4377,16 @@ async def get_transaction_history_api( Field to sort by sort : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort] - Sort order, either asc or desc - - filters : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Filters to apply + Sort order status : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus] - Transaction status filter. Allowed values: draft, completed, rejected, cancelled, expired + Transaction status filter transaction_type : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType] - Transaction type filter. Allowed values: credit, debit + Transaction type filter + + loyalty_subscription_id : typing.Optional[str] + Loyalty Subscription ID filter request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -4341,9 +4406,9 @@ async def get_transaction_history_api( "sort": sort, "contactId": contact_id, "balanceDefinitionId": balance_definition_id, - "filters": filters, "status": status, "transactionType": transaction_type, + "loyaltySubscriptionId": loyalty_subscription_id, }, request_options=request_options, ) @@ -4427,13 +4492,14 @@ async def begin_transaction( *, amount: float, balance_definition_id: str, - loyalty_subscription_id: typing.Optional[str] = OMIT, - auto_complete: typing.Optional[bool] = OMIT, - balance_expiry_in_minutes: typing.Optional[int] = OMIT, + transaction_type: typing.Optional[BeginTransactionRequestTransactionType] = OMIT, contact_id: typing.Optional[int] = OMIT, - event_time: typing.Optional[str] = OMIT, + loyalty_subscription_id: typing.Optional[str] = OMIT, meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, ttl: typing.Optional[int] = OMIT, + event_time: typing.Optional[dt.datetime] = OMIT, + auto_complete: typing.Optional[bool] = OMIT, + balance_expiry_in_minutes: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[Transaction]: """ @@ -4445,31 +4511,34 @@ async def begin_transaction( Loyalty Program Id amount : float - Transaction amount (must be provided). + Transaction amount. A positive value creates a credit transaction and a negative value creates a debit transaction (unless transactionType is explicitly provided). balance_definition_id : str Unique identifier (UUID) of the associated balance definition. - loyalty_subscription_id : typing.Optional[str] - Unique identifier for the loyalty subscription (required unless `contactId` is provided). - - auto_complete : typing.Optional[bool] - Whether the transaction should be automatically completed. - - balance_expiry_in_minutes : typing.Optional[int] - Optional expiry time for the balance in minutes (must be greater than 0 if provided). + transaction_type : typing.Optional[BeginTransactionRequestTransactionType] + Explicit transaction type. If not provided, the type is inferred from the sign of the amount (positive = credit, negative = debit). contact_id : typing.Optional[int] - Unique identifier of the contact involved in the transaction (required unless `LoyaltySubscriptionId` is provided). + Unique identifier of the contact involved in the transaction. Required unless `LoyaltySubscriptionId` is provided. - event_time : typing.Optional[str] - Optional timestamp specifying when the transaction occurred. + loyalty_subscription_id : typing.Optional[str] + Unique identifier for the loyalty subscription. Required unless `contactId` is provided. meta : typing.Optional[typing.Dict[str, typing.Any]] Optional metadata associated with the transaction. ttl : typing.Optional[int] - Optional time-to-live for the transaction (must be greater than 0 if provided). + Time-to-live for the transaction in seconds. Must be at least 10 seconds if provided. + + event_time : typing.Optional[dt.datetime] + Timestamp specifying when the transaction event occurred (ISO 8601 / RFC 3339 format). + + auto_complete : typing.Optional[bool] + Whether the transaction should be automatically completed. + + balance_expiry_in_minutes : typing.Optional[int] + Expiry time for the balance in minutes. Must be greater than 0 if provided. Only applicable when autoComplete is true. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -4477,21 +4546,22 @@ async def begin_transaction( Returns ------- AsyncHttpResponse[Transaction] - Transaction information + Transaction created successfully """ _response = await self._client_wrapper.httpx_client.request( f"loyalty/balance/programs/{jsonable_encoder(pid)}/transactions", method="POST", json={ - "LoyaltySubscriptionId": loyalty_subscription_id, "amount": amount, - "autoComplete": auto_complete, + "transactionType": transaction_type, "balanceDefinitionId": balance_definition_id, - "balanceExpiryInMinutes": balance_expiry_in_minutes, "contactId": contact_id, - "eventTime": event_time, + "LoyaltySubscriptionId": loyalty_subscription_id, "meta": meta, "ttl": ttl, + "eventTime": event_time, + "autoComplete": auto_complete, + "balanceExpiryInMinutes": balance_expiry_in_minutes, }, headers={ "content-type": "application/json", diff --git a/src/brevo/balance/types/__init__.py b/src/brevo/balance/types/__init__.py index a3dc1a0..93ca897 100644 --- a/src/brevo/balance/types/__init__.py +++ b/src/brevo/balance/types/__init__.py @@ -6,9 +6,11 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .begin_transaction_request_transaction_type import BeginTransactionRequestTransactionType from .create_balance_limit_request_constraint_type import CreateBalanceLimitRequestConstraintType from .create_balance_limit_request_duration_unit import CreateBalanceLimitRequestDurationUnit from .create_balance_limit_request_transaction_type import CreateBalanceLimitRequestTransactionType + from .create_balance_order_request_source import CreateBalanceOrderRequestSource from .create_balance_order_response import CreateBalanceOrderResponse from .get_balance_definition_list_request_sort import GetBalanceDefinitionListRequestSort from .get_balance_definition_list_request_sort_field import GetBalanceDefinitionListRequestSortField @@ -16,8 +18,19 @@ from .get_balance_definition_list_response import GetBalanceDefinitionListResponse from .get_balance_definition_request_version import GetBalanceDefinitionRequestVersion from .get_balance_limit_request_version import GetBalanceLimitRequestVersion + from .get_contact_balances_request_sort import GetContactBalancesRequestSort + from .get_contact_balances_request_sort_field import GetContactBalancesRequestSortField from .get_contact_balances_response import GetContactBalancesResponse from .get_contact_balances_response_balances_item import GetContactBalancesResponseBalancesItem + from .get_loyalty_balance_programs_pid_active_balance_request_sort import ( + GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort, + ) + from .get_loyalty_balance_programs_pid_active_balance_response import ( + GetLoyaltyBalanceProgramsPidActiveBalanceResponse, + ) + from .get_loyalty_balance_programs_pid_active_balance_response_active_balances_item import ( + GetLoyaltyBalanceProgramsPidActiveBalanceResponseActiveBalancesItem, + ) from .get_loyalty_balance_programs_pid_transaction_history_request_sort import ( GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort, ) @@ -33,6 +46,9 @@ from .get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item import ( GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItem, ) + from .get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item_transaction_type import ( + GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItemTransactionType, + ) from .get_subscription_balances_response import GetSubscriptionBalancesResponse from .get_subscription_balances_response_balance_item import GetSubscriptionBalancesResponseBalanceItem from .post_loyalty_balance_programs_pid_balance_definitions_request_balance_availability_duration_modifier import ( @@ -80,9 +96,11 @@ from .update_balance_limit_request_duration_unit import UpdateBalanceLimitRequestDurationUnit from .update_balance_limit_request_transaction_type import UpdateBalanceLimitRequestTransactionType _dynamic_imports: typing.Dict[str, str] = { + "BeginTransactionRequestTransactionType": ".begin_transaction_request_transaction_type", "CreateBalanceLimitRequestConstraintType": ".create_balance_limit_request_constraint_type", "CreateBalanceLimitRequestDurationUnit": ".create_balance_limit_request_duration_unit", "CreateBalanceLimitRequestTransactionType": ".create_balance_limit_request_transaction_type", + "CreateBalanceOrderRequestSource": ".create_balance_order_request_source", "CreateBalanceOrderResponse": ".create_balance_order_response", "GetBalanceDefinitionListRequestSort": ".get_balance_definition_list_request_sort", "GetBalanceDefinitionListRequestSortField": ".get_balance_definition_list_request_sort_field", @@ -90,13 +108,19 @@ "GetBalanceDefinitionListResponse": ".get_balance_definition_list_response", "GetBalanceDefinitionRequestVersion": ".get_balance_definition_request_version", "GetBalanceLimitRequestVersion": ".get_balance_limit_request_version", + "GetContactBalancesRequestSort": ".get_contact_balances_request_sort", + "GetContactBalancesRequestSortField": ".get_contact_balances_request_sort_field", "GetContactBalancesResponse": ".get_contact_balances_response", "GetContactBalancesResponseBalancesItem": ".get_contact_balances_response_balances_item", + "GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort": ".get_loyalty_balance_programs_pid_active_balance_request_sort", + "GetLoyaltyBalanceProgramsPidActiveBalanceResponse": ".get_loyalty_balance_programs_pid_active_balance_response", + "GetLoyaltyBalanceProgramsPidActiveBalanceResponseActiveBalancesItem": ".get_loyalty_balance_programs_pid_active_balance_response_active_balances_item", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort": ".get_loyalty_balance_programs_pid_transaction_history_request_sort", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus": ".get_loyalty_balance_programs_pid_transaction_history_request_status", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType": ".get_loyalty_balance_programs_pid_transaction_history_request_transaction_type", "GetLoyaltyBalanceProgramsPidTransactionHistoryResponse": ".get_loyalty_balance_programs_pid_transaction_history_response", "GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItem": ".get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item", + "GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItemTransactionType": ".get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item_transaction_type", "GetSubscriptionBalancesResponse": ".get_subscription_balances_response", "GetSubscriptionBalancesResponseBalanceItem": ".get_subscription_balances_response_balance_item", "PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationModifier": ".post_loyalty_balance_programs_pid_balance_definitions_request_balance_availability_duration_modifier", @@ -142,9 +166,11 @@ def __dir__(): __all__ = [ + "BeginTransactionRequestTransactionType", "CreateBalanceLimitRequestConstraintType", "CreateBalanceLimitRequestDurationUnit", "CreateBalanceLimitRequestTransactionType", + "CreateBalanceOrderRequestSource", "CreateBalanceOrderResponse", "GetBalanceDefinitionListRequestSort", "GetBalanceDefinitionListRequestSortField", @@ -152,13 +178,19 @@ def __dir__(): "GetBalanceDefinitionListResponse", "GetBalanceDefinitionRequestVersion", "GetBalanceLimitRequestVersion", + "GetContactBalancesRequestSort", + "GetContactBalancesRequestSortField", "GetContactBalancesResponse", "GetContactBalancesResponseBalancesItem", + "GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort", + "GetLoyaltyBalanceProgramsPidActiveBalanceResponse", + "GetLoyaltyBalanceProgramsPidActiveBalanceResponseActiveBalancesItem", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestStatus", "GetLoyaltyBalanceProgramsPidTransactionHistoryRequestTransactionType", "GetLoyaltyBalanceProgramsPidTransactionHistoryResponse", "GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItem", + "GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItemTransactionType", "GetSubscriptionBalancesResponse", "GetSubscriptionBalancesResponseBalanceItem", "PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationModifier", diff --git a/src/brevo/balance/types/begin_transaction_request_transaction_type.py b/src/brevo/balance/types/begin_transaction_request_transaction_type.py new file mode 100644 index 0000000..cd3dd90 --- /dev/null +++ b/src/brevo/balance/types/begin_transaction_request_transaction_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BeginTransactionRequestTransactionType = typing.Union[typing.Literal["credit", "debit"], typing.Any] diff --git a/src/brevo/balance/types/create_balance_order_request_source.py b/src/brevo/balance/types/create_balance_order_request_source.py new file mode 100644 index 0000000..b8a27b6 --- /dev/null +++ b/src/brevo/balance/types/create_balance_order_request_source.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateBalanceOrderRequestSource = typing.Union[typing.Literal["engine", "user"], typing.Any] diff --git a/src/brevo/balance/types/get_contact_balances_request_sort.py b/src/brevo/balance/types/get_contact_balances_request_sort.py new file mode 100644 index 0000000..f469940 --- /dev/null +++ b/src/brevo/balance/types/get_contact_balances_request_sort.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GetContactBalancesRequestSort = typing.Union[typing.Literal["asc", "desc"], typing.Any] diff --git a/src/brevo/balance/types/get_contact_balances_request_sort_field.py b/src/brevo/balance/types/get_contact_balances_request_sort_field.py new file mode 100644 index 0000000..6290feb --- /dev/null +++ b/src/brevo/balance/types/get_contact_balances_request_sort_field.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GetContactBalancesRequestSortField = typing.Union[typing.Literal["updatedAt", "value"], typing.Any] diff --git a/src/brevo/balance/types/get_loyalty_balance_programs_pid_active_balance_request_sort.py b/src/brevo/balance/types/get_loyalty_balance_programs_pid_active_balance_request_sort.py new file mode 100644 index 0000000..07c384f --- /dev/null +++ b/src/brevo/balance/types/get_loyalty_balance_programs_pid_active_balance_request_sort.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GetLoyaltyBalanceProgramsPidActiveBalanceRequestSort = typing.Union[typing.Literal["asc", "desc"], typing.Any] diff --git a/src/brevo/balance/types/get_loyalty_balance_programs_pid_active_balance_response.py b/src/brevo/balance/types/get_loyalty_balance_programs_pid_active_balance_response.py new file mode 100644 index 0000000..c294c97 --- /dev/null +++ b/src/brevo/balance/types/get_loyalty_balance_programs_pid_active_balance_response.py @@ -0,0 +1,53 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel +from .get_loyalty_balance_programs_pid_active_balance_response_active_balances_item import ( + GetLoyaltyBalanceProgramsPidActiveBalanceResponseActiveBalancesItem, +) + + +class GetLoyaltyBalanceProgramsPidActiveBalanceResponse(UncheckedBaseModel): + """ + Active balance response for a specific contact and balance definition. + """ + + count: typing.Optional[int] = pydantic.Field(default=None) + """ + Total number of active balances. + """ + + loyalty_program_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="loyaltyProgramId"), + pydantic.Field(alias="loyaltyProgramId", description="Unique identifier of the loyalty program."), + ] = None + contact_id: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="contactId"), + pydantic.Field(alias="contactId", description="Unique identifier of the contact."), + ] = None + balance_definition_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="balanceDefinitionId"), + pydantic.Field(alias="balanceDefinitionId", description="Unique identifier of the balance definition."), + ] = None + active_balances: typing_extensions.Annotated[ + typing.Optional[typing.List[GetLoyaltyBalanceProgramsPidActiveBalanceResponseActiveBalancesItem]], + FieldMetadata(alias="activeBalances"), + pydantic.Field(alias="activeBalances", description="List of active balances."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/balance/types/get_loyalty_balance_programs_pid_active_balance_response_active_balances_item.py b/src/brevo/balance/types/get_loyalty_balance_programs_pid_active_balance_response_active_balances_item.py new file mode 100644 index 0000000..32efa4c --- /dev/null +++ b/src/brevo/balance/types/get_loyalty_balance_programs_pid_active_balance_response_active_balances_item.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel + + +class GetLoyaltyBalanceProgramsPidActiveBalanceResponseActiveBalancesItem(UncheckedBaseModel): + id: typing.Optional[str] = pydantic.Field(default=None) + """ + Unique identifier of the balance entry. + """ + + amount: typing.Optional[float] = pydantic.Field(default=None) + """ + Current balance amount. + """ + + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAt"), + pydantic.Field(alias="createdAt", description="Timestamp when the balance was created."), + ] = None + expires_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="expiresAt"), + pydantic.Field(alias="expiresAt", description="Timestamp when the balance expires (if applicable)."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item.py b/src/brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item.py index 93dacbe..5ef0337 100644 --- a/src/brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item.py +++ b/src/brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item.py @@ -7,6 +7,9 @@ from ...core.pydantic_utilities import IS_PYDANTIC_V2 from ...core.serialization import FieldMetadata from ...core.unchecked_base_model import UncheckedBaseModel +from .get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item_transaction_type import ( + GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItemTransactionType, +) class GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItem(UncheckedBaseModel): @@ -19,6 +22,11 @@ class GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryIt The transaction amount. """ + transaction_type: typing_extensions.Annotated[ + typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItemTransactionType], + FieldMetadata(alias="transactionType"), + pydantic.Field(alias="transactionType", description="The type of the transaction."), + ] = None balance_expiration_date: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="balanceExpirationDate"), diff --git a/src/brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item_transaction_type.py b/src/brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item_transaction_type.py new file mode 100644 index 0000000..148f23e --- /dev/null +++ b/src/brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item_transaction_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GetLoyaltyBalanceProgramsPidTransactionHistoryResponseTransactionHistoryItemTransactionType = typing.Union[ + typing.Literal["credit", "debit"], typing.Any +] diff --git a/src/brevo/balance/types/get_subscription_balances_response.py b/src/brevo/balance/types/get_subscription_balances_response.py index 5a87994..e0f3277 100644 --- a/src/brevo/balance/types/get_subscription_balances_response.py +++ b/src/brevo/balance/types/get_subscription_balances_response.py @@ -3,13 +3,28 @@ import typing import pydantic +import typing_extensions from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata from ...core.unchecked_base_model import UncheckedBaseModel from .get_subscription_balances_response_balance_item import GetSubscriptionBalancesResponseBalanceItem class GetSubscriptionBalancesResponse(UncheckedBaseModel): - balance: typing.Optional[typing.List[GetSubscriptionBalancesResponseBalanceItem]] = None + loyalty_program_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="loyaltyProgramId"), + pydantic.Field(alias="loyaltyProgramId", description="Unique identifier of the loyalty program."), + ] = None + contact_id: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="contactId"), + pydantic.Field(alias="contactId", description="Unique identifier of the contact."), + ] = None + balance: typing.Optional[typing.List[GetSubscriptionBalancesResponseBalanceItem]] = pydantic.Field(default=None) + """ + Aggregate balance per balance definition. + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/balance/types/get_subscription_balances_response_balance_item.py b/src/brevo/balance/types/get_subscription_balances_response_balance_item.py index 5119189..cf97ee0 100644 --- a/src/brevo/balance/types/get_subscription_balances_response_balance_item.py +++ b/src/brevo/balance/types/get_subscription_balances_response_balance_item.py @@ -13,11 +13,11 @@ class GetSubscriptionBalancesResponseBalanceItem(UncheckedBaseModel): balance_definition_id: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="balanceDefinitionId"), - pydantic.Field(alias="balanceDefinitionId", description="balance definition ID"), + pydantic.Field(alias="balanceDefinitionId", description="Balance definition ID."), ] = None value: typing.Optional[float] = pydantic.Field(default=None) """ - Unique identifier for the balance definition associated with this aggregate balance + Aggregate balance value for this definition. """ if IS_PYDANTIC_V2: diff --git a/src/brevo/balance/types/post_loyalty_balance_programs_pid_subscriptions_cid_balances_response.py b/src/brevo/balance/types/post_loyalty_balance_programs_pid_subscriptions_cid_balances_response.py index e12762d..f14f1c0 100644 --- a/src/brevo/balance/types/post_loyalty_balance_programs_pid_subscriptions_cid_balances_response.py +++ b/src/brevo/balance/types/post_loyalty_balance_programs_pid_subscriptions_cid_balances_response.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing import pydantic @@ -10,50 +11,50 @@ class PostLoyaltyBalanceProgramsPidSubscriptionsCidBalancesResponse(UncheckedBaseModel): + id: typing.Optional[str] = pydantic.Field(default=None) + """ + Unique identifier for the balance. + """ + amount: typing.Optional[float] = pydantic.Field(default=None) """ - The current amount available in the balance + The current amount available in the balance. """ - balance_definition_id: typing_extensions.Annotated[ + loyalty_program_id: typing_extensions.Annotated[ typing.Optional[str], - FieldMetadata(alias="balanceDefinitionId"), - pydantic.Field(alias="balanceDefinitionId", description="balance definition ID"), + FieldMetadata(alias="loyaltyProgramId"), + pydantic.Field(alias="loyaltyProgramId", description="Loyalty program ID."), ] = None - consumed_at: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="consumedAt"), - pydantic.Field(alias="consumedAt", description="Timestamp of when the balance was last consumed"), + organization_id: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="organizationId"), + pydantic.Field(alias="organizationId", description="Organization ID."), ] = None contact_id: typing_extensions.Annotated[ typing.Optional[int], FieldMetadata(alias="contactId"), - pydantic.Field(alias="contactId", description="contact ID"), + pydantic.Field(alias="contactId", description="Contact ID."), ] = None - created_at: typing_extensions.Annotated[ + balance_definition_id: typing_extensions.Annotated[ typing.Optional[str], + FieldMetadata(alias="balanceDefinitionId"), + pydantic.Field(alias="balanceDefinitionId", description="Balance definition ID."), + ] = None + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], FieldMetadata(alias="createdAt"), - pydantic.Field(alias="createdAt", description="Timestamp of when the balance was created"), + pydantic.Field(alias="createdAt", description="Timestamp of when the balance was created."), ] = None expires_at: typing_extensions.Annotated[ - typing.Optional[str], + typing.Optional[dt.datetime], FieldMetadata(alias="expiresAt"), - pydantic.Field(alias="expiresAt", description="Expiration timestamp of the balance"), - ] = None - id: typing.Optional[str] = pydantic.Field(default=None) - """ - Unique identifier for the balance - """ - - loyalty_program_id: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="loyaltyProgramId"), - pydantic.Field(alias="loyaltyProgramId", description="loyalty program ID"), + pydantic.Field(alias="expiresAt", description="Expiration timestamp of the balance."), ] = None - organization_id: typing_extensions.Annotated[ - typing.Optional[int], - FieldMetadata(alias="organizationId"), - pydantic.Field(alias="organizationId", description="organization ID"), + consumed_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="consumedAt"), + pydantic.Field(alias="consumedAt", description="Timestamp of when the balance was last consumed."), ] = None if IS_PYDANTIC_V2: diff --git a/src/brevo/companies/__init__.py b/src/brevo/companies/__init__.py index a7e4416..eba6399 100644 --- a/src/brevo/companies/__init__.py +++ b/src/brevo/companies/__init__.py @@ -10,6 +10,7 @@ GetCompaniesRequestSort, GetCompaniesResponse, GetCrmAttributesCompaniesResponseItem, + GetCrmAttributesCompaniesResponseItemAttributeOptionsItem, PatchCrmAttributesIdRequestObjectType, PatchCrmAttributesIdRequestOptionsLabelsItem, PostCompaniesImportResponse, @@ -22,6 +23,7 @@ "GetCompaniesRequestSort": ".types", "GetCompaniesResponse": ".types", "GetCrmAttributesCompaniesResponseItem": ".types", + "GetCrmAttributesCompaniesResponseItemAttributeOptionsItem": ".types", "PatchCrmAttributesIdRequestObjectType": ".types", "PatchCrmAttributesIdRequestOptionsLabelsItem": ".types", "PostCompaniesImportResponse": ".types", @@ -57,6 +59,7 @@ def __dir__(): "GetCompaniesRequestSort", "GetCompaniesResponse", "GetCrmAttributesCompaniesResponseItem", + "GetCrmAttributesCompaniesResponseItemAttributeOptionsItem", "PatchCrmAttributesIdRequestObjectType", "PatchCrmAttributesIdRequestOptionsLabelsItem", "PostCompaniesImportResponse", diff --git a/src/brevo/companies/client.py b/src/brevo/companies/client.py index ab09ada..b5231a0 100644 --- a/src/brevo/companies/client.py +++ b/src/brevo/companies/client.py @@ -40,7 +40,7 @@ def with_raw_response(self) -> RawCompaniesClient: def get_all_companies( self, *, - filters: typing.Optional[str] = None, + filters_attributes_name: typing.Optional[str] = None, linked_contacts_ids: typing.Optional[int] = None, linked_deals_ids: typing.Optional[str] = None, modified_since: typing.Optional[str] = None, @@ -52,10 +52,12 @@ def get_all_companies( request_options: typing.Optional[RequestOptions] = None, ) -> GetCompaniesResponse: """ + Retrieve a paginated list of companies with optional filtering, sorting, and search capabilities. Results are sorted by creation date in descending order by default, and can be filtered by attributes, linked contacts, linked deals, or modification/creation timestamps. + Parameters ---------- - filters : typing.Optional[str] - Filter by attrbutes. If you have filter for owner on your side please send it as {"attributes.owner":"6299dcf3874a14eacbc65c46"} + filters_attributes_name : typing.Optional[str] + Filter by attributes. If you have a filter for the owner on your side please send it as filters[attributes.owner] and utilize the account email for the filtering. linked_contacts_ids : typing.Optional[int] Filter by linked contacts ids @@ -64,10 +66,10 @@ def get_all_companies( Filter by linked Deals ids modified_since : typing.Optional[str] - Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the companies modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. created_since : typing.Optional[str] - Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the companies created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. page : typing.Optional[int] Index of the first document of the page @@ -99,7 +101,7 @@ def get_all_companies( client.companies.get_all_companies() """ _response = self._raw_client.get_all_companies( - filters=filters, + filters_attributes_name=filters_attributes_name, linked_contacts_ids=linked_contacts_ids, linked_deals_ids=linked_deals_ids, modified_since=modified_since, @@ -123,6 +125,8 @@ def create_a_company( request_options: typing.Optional[RequestOptions] = None, ) -> PostCompaniesResponse: """ + Create a new CRM company with the specified name, attributes, and optional associations to contacts and deals. The company name is required, and you can optionally provide a country code when a phone number attribute is included. + Parameters ---------- name : str @@ -225,6 +229,8 @@ def link_and_unlink_company_with_contact_and_deal( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Link or unlink contacts and deals with a specific company in a single request. You can simultaneously link new contacts/deals and unlink existing ones by providing the respective ID arrays in the request body. + Parameters ---------- id : str @@ -271,6 +277,8 @@ def link_and_unlink_company_with_contact_and_deal( def get_a_company(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Company: """ + Retrieve the full details of a single company by its identifier, including its attributes, linked contacts, and linked deals. Returns a 404 error if the company does not exist, or a 403 error if the user lacks permission to view the company. + Parameters ---------- id : str @@ -300,6 +308,8 @@ def get_a_company(self, id: str, *, request_options: typing.Optional[RequestOpti def delete_a_company(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently delete a company by its identifier. The requesting user must be the company owner or have manage permission on companies; otherwise, a 403 Forbidden error is returned. + Parameters ---------- id : str @@ -338,6 +348,8 @@ def update_a_company( request_options: typing.Optional[RequestOptions] = None, ) -> Company: """ + Update an existing company''s attributes, name, linked contacts, or linked deals. Note that passing `linkedContactsIds` or `linkedDealsIds` replaces the entire list of associations, so omitted IDs will be removed. The company name cannot be set to an empty string. + Parameters ---------- id : str @@ -352,7 +364,7 @@ def update_a_company( Warning - Using PATCH on linkedContactIds replaces the list of linked contacts. Omitted IDs will be removed. linked_deals_ids : typing.Optional[typing.Sequence[str]] - Warning - Using PATCH on linkedDealsIds replaces the list of linked contacts. Omitted IDs will be removed. + Warning - Using PATCH on linkedDealsIds replaces the list of linked deals. Omitted IDs will be removed. name : typing.Optional[str] Name of company @@ -398,6 +410,8 @@ def create_a_company_deal_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> PostCrmAttributesResponse: """ + Create a new custom attribute for companies or deals. The attribute label must be unique within the object type, cannot exceed 50 characters, and cannot use reserved names. For `single-select` or `multi-choice` attribute types, you must also provide the `optionsLabels` array. + Parameters ---------- attribute_type : PostCrmAttributesRequestAttributeType @@ -407,7 +421,7 @@ def create_a_company_deal_attribute( The label for the attribute (max 50 characters, cannot be empty) object_type : PostCrmAttributesRequestObjectType - The type of object the attribute belongs to (prefilled with `companies`, mandatory) + The type of object the attribute belongs to. Must be either `companies` or `deals`. description : typing.Optional[str] A description of the attribute @@ -448,6 +462,8 @@ def create_a_company_deal_attribute( def delete_an_attribute(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Delete an existing custom attribute by its identifier. This permanently removes the attribute definition and cleans up all references to it across companies or deals. System-default and non-editable attributes cannot be deleted. + Parameters ---------- id : str @@ -484,6 +500,8 @@ def update_an_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing custom attribute''s label or options. You can rename the attribute label or modify the available options for `single-select` and `multi-choice` attribute types. System-default attributes cannot be modified except for specific editable fields. + Parameters ---------- id : str @@ -525,6 +543,8 @@ def get_company_attributes( self, *, request_options: typing.Optional[RequestOptions] = None ) -> typing.List[GetCrmAttributesCompaniesResponseItem]: """ + Retrieve the list of all attributes defined for companies, including both system-default and custom attributes. Each attribute includes its label, internal name, type, required status, and available options for select-type attributes. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -566,7 +586,7 @@ def with_raw_response(self) -> AsyncRawCompaniesClient: async def get_all_companies( self, *, - filters: typing.Optional[str] = None, + filters_attributes_name: typing.Optional[str] = None, linked_contacts_ids: typing.Optional[int] = None, linked_deals_ids: typing.Optional[str] = None, modified_since: typing.Optional[str] = None, @@ -578,10 +598,12 @@ async def get_all_companies( request_options: typing.Optional[RequestOptions] = None, ) -> GetCompaniesResponse: """ + Retrieve a paginated list of companies with optional filtering, sorting, and search capabilities. Results are sorted by creation date in descending order by default, and can be filtered by attributes, linked contacts, linked deals, or modification/creation timestamps. + Parameters ---------- - filters : typing.Optional[str] - Filter by attrbutes. If you have filter for owner on your side please send it as {"attributes.owner":"6299dcf3874a14eacbc65c46"} + filters_attributes_name : typing.Optional[str] + Filter by attributes. If you have a filter for the owner on your side please send it as filters[attributes.owner] and utilize the account email for the filtering. linked_contacts_ids : typing.Optional[int] Filter by linked contacts ids @@ -590,10 +612,10 @@ async def get_all_companies( Filter by linked Deals ids modified_since : typing.Optional[str] - Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the companies modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. created_since : typing.Optional[str] - Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the companies created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. page : typing.Optional[int] Index of the first document of the page @@ -633,7 +655,7 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._raw_client.get_all_companies( - filters=filters, + filters_attributes_name=filters_attributes_name, linked_contacts_ids=linked_contacts_ids, linked_deals_ids=linked_deals_ids, modified_since=modified_since, @@ -657,6 +679,8 @@ async def create_a_company( request_options: typing.Optional[RequestOptions] = None, ) -> PostCompaniesResponse: """ + Create a new CRM company with the specified name, attributes, and optional associations to contacts and deals. The company name is required, and you can optionally provide a country code when a phone number attribute is included. + Parameters ---------- name : str @@ -775,6 +799,8 @@ async def link_and_unlink_company_with_contact_and_deal( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Link or unlink contacts and deals with a specific company in a single request. You can simultaneously link new contacts/deals and unlink existing ones by providing the respective ID arrays in the request body. + Parameters ---------- id : str @@ -829,6 +855,8 @@ async def main() -> None: async def get_a_company(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Company: """ + Retrieve the full details of a single company by its identifier, including its attributes, linked contacts, and linked deals. Returns a 404 error if the company does not exist, or a 403 error if the user lacks permission to view the company. + Parameters ---------- id : str @@ -866,6 +894,8 @@ async def main() -> None: async def delete_a_company(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently delete a company by its identifier. The requesting user must be the company owner or have manage permission on companies; otherwise, a 403 Forbidden error is returned. + Parameters ---------- id : str @@ -912,6 +942,8 @@ async def update_a_company( request_options: typing.Optional[RequestOptions] = None, ) -> Company: """ + Update an existing company''s attributes, name, linked contacts, or linked deals. Note that passing `linkedContactsIds` or `linkedDealsIds` replaces the entire list of associations, so omitted IDs will be removed. The company name cannot be set to an empty string. + Parameters ---------- id : str @@ -926,7 +958,7 @@ async def update_a_company( Warning - Using PATCH on linkedContactIds replaces the list of linked contacts. Omitted IDs will be removed. linked_deals_ids : typing.Optional[typing.Sequence[str]] - Warning - Using PATCH on linkedDealsIds replaces the list of linked contacts. Omitted IDs will be removed. + Warning - Using PATCH on linkedDealsIds replaces the list of linked deals. Omitted IDs will be removed. name : typing.Optional[str] Name of company @@ -980,6 +1012,8 @@ async def create_a_company_deal_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> PostCrmAttributesResponse: """ + Create a new custom attribute for companies or deals. The attribute label must be unique within the object type, cannot exceed 50 characters, and cannot use reserved names. For `single-select` or `multi-choice` attribute types, you must also provide the `optionsLabels` array. + Parameters ---------- attribute_type : PostCrmAttributesRequestAttributeType @@ -989,7 +1023,7 @@ async def create_a_company_deal_attribute( The label for the attribute (max 50 characters, cannot be empty) object_type : PostCrmAttributesRequestObjectType - The type of object the attribute belongs to (prefilled with `companies`, mandatory) + The type of object the attribute belongs to. Must be either `companies` or `deals`. description : typing.Optional[str] A description of the attribute @@ -1038,6 +1072,8 @@ async def main() -> None: async def delete_an_attribute(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Delete an existing custom attribute by its identifier. This permanently removes the attribute definition and cleans up all references to it across companies or deals. System-default and non-editable attributes cannot be deleted. + Parameters ---------- id : str @@ -1082,6 +1118,8 @@ async def update_an_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing custom attribute''s label or options. You can rename the attribute label or modify the available options for `single-select` and `multi-choice` attribute types. System-default attributes cannot be modified except for specific editable fields. + Parameters ---------- id : str @@ -1131,6 +1169,8 @@ async def get_company_attributes( self, *, request_options: typing.Optional[RequestOptions] = None ) -> typing.List[GetCrmAttributesCompaniesResponseItem]: """ + Retrieve the list of all attributes defined for companies, including both system-default and custom attributes. Each attribute includes its label, internal name, type, required status, and available options for select-type attributes. + Parameters ---------- request_options : typing.Optional[RequestOptions] diff --git a/src/brevo/companies/raw_client.py b/src/brevo/companies/raw_client.py index 12f7f5d..84904b5 100644 --- a/src/brevo/companies/raw_client.py +++ b/src/brevo/companies/raw_client.py @@ -39,7 +39,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def get_all_companies( self, *, - filters: typing.Optional[str] = None, + filters_attributes_name: typing.Optional[str] = None, linked_contacts_ids: typing.Optional[int] = None, linked_deals_ids: typing.Optional[str] = None, modified_since: typing.Optional[str] = None, @@ -51,10 +51,12 @@ def get_all_companies( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetCompaniesResponse]: """ + Retrieve a paginated list of companies with optional filtering, sorting, and search capabilities. Results are sorted by creation date in descending order by default, and can be filtered by attributes, linked contacts, linked deals, or modification/creation timestamps. + Parameters ---------- - filters : typing.Optional[str] - Filter by attrbutes. If you have filter for owner on your side please send it as {"attributes.owner":"6299dcf3874a14eacbc65c46"} + filters_attributes_name : typing.Optional[str] + Filter by attributes. If you have a filter for the owner on your side please send it as filters[attributes.owner] and utilize the account email for the filtering. linked_contacts_ids : typing.Optional[int] Filter by linked contacts ids @@ -63,10 +65,10 @@ def get_all_companies( Filter by linked Deals ids modified_since : typing.Optional[str] - Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the companies modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. created_since : typing.Optional[str] - Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the companies created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. page : typing.Optional[int] Index of the first document of the page @@ -92,7 +94,7 @@ def get_all_companies( "companies", method="GET", params={ - "filters": filters, + "filters[attributes.name]": filters_attributes_name, "linkedContactsIds": linked_contacts_ids, "linkedDealsIds": linked_deals_ids, "modifiedSince": modified_since, @@ -145,6 +147,8 @@ def create_a_company( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PostCompaniesResponse]: """ + Create a new CRM company with the specified name, attributes, and optional associations to contacts and deals. The company name is required, and you can optionally provide a country code when a phone number attribute is included. + Parameters ---------- name : str @@ -301,6 +305,8 @@ def link_and_unlink_company_with_contact_and_deal( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Link or unlink contacts and deals with a specific company in a single request. You can simultaneously link new contacts/deals and unlink existing ones by providing the respective ID arrays in the request body. + Parameters ---------- id : str @@ -366,6 +372,8 @@ def get_a_company( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[Company]: """ + Retrieve the full details of a single company by its identifier, including its attributes, linked contacts, and linked deals. Returns a 404 error if the company does not exist, or a 403 error if the user lacks permission to view the company. + Parameters ---------- id : str @@ -429,6 +437,8 @@ def delete_a_company( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ + Permanently delete a company by its identifier. The requesting user must be the company owner or have manage permission on companies; otherwise, a 403 Forbidden error is returned. + Parameters ---------- id : str @@ -492,6 +502,8 @@ def update_a_company( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[Company]: """ + Update an existing company''s attributes, name, linked contacts, or linked deals. Note that passing `linkedContactsIds` or `linkedDealsIds` replaces the entire list of associations, so omitted IDs will be removed. The company name cannot be set to an empty string. + Parameters ---------- id : str @@ -506,7 +518,7 @@ def update_a_company( Warning - Using PATCH on linkedContactIds replaces the list of linked contacts. Omitted IDs will be removed. linked_deals_ids : typing.Optional[typing.Sequence[str]] - Warning - Using PATCH on linkedDealsIds replaces the list of linked contacts. Omitted IDs will be removed. + Warning - Using PATCH on linkedDealsIds replaces the list of linked deals. Omitted IDs will be removed. name : typing.Optional[str] Name of company @@ -587,6 +599,8 @@ def create_a_company_deal_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PostCrmAttributesResponse]: """ + Create a new custom attribute for companies or deals. The attribute label must be unique within the object type, cannot exceed 50 characters, and cannot use reserved names. For `single-select` or `multi-choice` attribute types, you must also provide the `optionsLabels` array. + Parameters ---------- attribute_type : PostCrmAttributesRequestAttributeType @@ -596,7 +610,7 @@ def create_a_company_deal_attribute( The label for the attribute (max 50 characters, cannot be empty) object_type : PostCrmAttributesRequestObjectType - The type of object the attribute belongs to (prefilled with `companies`, mandatory) + The type of object the attribute belongs to. Must be either `companies` or `deals`. description : typing.Optional[str] A description of the attribute @@ -662,6 +676,8 @@ def delete_an_attribute( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ + Delete an existing custom attribute by its identifier. This permanently removes the attribute definition and cleans up all references to it across companies or deals. System-default and non-editable attributes cannot be deleted. + Parameters ---------- id : str @@ -723,6 +739,8 @@ def update_an_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Update an existing custom attribute''s label or options. You can rename the attribute label or modify the available options for `single-select` and `multi-choice` attribute types. System-default attributes cannot be modified except for specific editable fields. + Parameters ---------- id : str @@ -800,6 +818,8 @@ def get_company_attributes( self, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[typing.List[GetCrmAttributesCompaniesResponseItem]]: """ + Retrieve the list of all attributes defined for companies, including both system-default and custom attributes. Each attribute includes its label, internal name, type, required status, and available options for select-type attributes. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -825,6 +845,17 @@ def get_company_attributes( ), ) return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -842,7 +873,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): async def get_all_companies( self, *, - filters: typing.Optional[str] = None, + filters_attributes_name: typing.Optional[str] = None, linked_contacts_ids: typing.Optional[int] = None, linked_deals_ids: typing.Optional[str] = None, modified_since: typing.Optional[str] = None, @@ -854,10 +885,12 @@ async def get_all_companies( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetCompaniesResponse]: """ + Retrieve a paginated list of companies with optional filtering, sorting, and search capabilities. Results are sorted by creation date in descending order by default, and can be filtered by attributes, linked contacts, linked deals, or modification/creation timestamps. + Parameters ---------- - filters : typing.Optional[str] - Filter by attrbutes. If you have filter for owner on your side please send it as {"attributes.owner":"6299dcf3874a14eacbc65c46"} + filters_attributes_name : typing.Optional[str] + Filter by attributes. If you have a filter for the owner on your side please send it as filters[attributes.owner] and utilize the account email for the filtering. linked_contacts_ids : typing.Optional[int] Filter by linked contacts ids @@ -866,10 +899,10 @@ async def get_all_companies( Filter by linked Deals ids modified_since : typing.Optional[str] - Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the companies modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. created_since : typing.Optional[str] - Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the companies created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. page : typing.Optional[int] Index of the first document of the page @@ -895,7 +928,7 @@ async def get_all_companies( "companies", method="GET", params={ - "filters": filters, + "filters[attributes.name]": filters_attributes_name, "linkedContactsIds": linked_contacts_ids, "linkedDealsIds": linked_deals_ids, "modifiedSince": modified_since, @@ -948,6 +981,8 @@ async def create_a_company( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PostCompaniesResponse]: """ + Create a new CRM company with the specified name, attributes, and optional associations to contacts and deals. The company name is required, and you can optionally provide a country code when a phone number attribute is included. + Parameters ---------- name : str @@ -1104,6 +1139,8 @@ async def link_and_unlink_company_with_contact_and_deal( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Link or unlink contacts and deals with a specific company in a single request. You can simultaneously link new contacts/deals and unlink existing ones by providing the respective ID arrays in the request body. + Parameters ---------- id : str @@ -1169,6 +1206,8 @@ async def get_a_company( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[Company]: """ + Retrieve the full details of a single company by its identifier, including its attributes, linked contacts, and linked deals. Returns a 404 error if the company does not exist, or a 403 error if the user lacks permission to view the company. + Parameters ---------- id : str @@ -1232,6 +1271,8 @@ async def delete_a_company( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Permanently delete a company by its identifier. The requesting user must be the company owner or have manage permission on companies; otherwise, a 403 Forbidden error is returned. + Parameters ---------- id : str @@ -1295,6 +1336,8 @@ async def update_a_company( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[Company]: """ + Update an existing company''s attributes, name, linked contacts, or linked deals. Note that passing `linkedContactsIds` or `linkedDealsIds` replaces the entire list of associations, so omitted IDs will be removed. The company name cannot be set to an empty string. + Parameters ---------- id : str @@ -1309,7 +1352,7 @@ async def update_a_company( Warning - Using PATCH on linkedContactIds replaces the list of linked contacts. Omitted IDs will be removed. linked_deals_ids : typing.Optional[typing.Sequence[str]] - Warning - Using PATCH on linkedDealsIds replaces the list of linked contacts. Omitted IDs will be removed. + Warning - Using PATCH on linkedDealsIds replaces the list of linked deals. Omitted IDs will be removed. name : typing.Optional[str] Name of company @@ -1390,6 +1433,8 @@ async def create_a_company_deal_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PostCrmAttributesResponse]: """ + Create a new custom attribute for companies or deals. The attribute label must be unique within the object type, cannot exceed 50 characters, and cannot use reserved names. For `single-select` or `multi-choice` attribute types, you must also provide the `optionsLabels` array. + Parameters ---------- attribute_type : PostCrmAttributesRequestAttributeType @@ -1399,7 +1444,7 @@ async def create_a_company_deal_attribute( The label for the attribute (max 50 characters, cannot be empty) object_type : PostCrmAttributesRequestObjectType - The type of object the attribute belongs to (prefilled with `companies`, mandatory) + The type of object the attribute belongs to. Must be either `companies` or `deals`. description : typing.Optional[str] A description of the attribute @@ -1465,6 +1510,8 @@ async def delete_an_attribute( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Delete an existing custom attribute by its identifier. This permanently removes the attribute definition and cleans up all references to it across companies or deals. System-default and non-editable attributes cannot be deleted. + Parameters ---------- id : str @@ -1526,6 +1573,8 @@ async def update_an_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Update an existing custom attribute''s label or options. You can rename the attribute label or modify the available options for `single-select` and `multi-choice` attribute types. System-default attributes cannot be modified except for specific editable fields. + Parameters ---------- id : str @@ -1603,6 +1652,8 @@ async def get_company_attributes( self, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[typing.List[GetCrmAttributesCompaniesResponseItem]]: """ + Retrieve the list of all attributes defined for companies, including both system-default and custom attributes. Each attribute includes its label, internal name, type, required status, and available options for select-type attributes. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -1628,6 +1679,17 @@ async def get_company_attributes( ), ) return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) diff --git a/src/brevo/companies/types/__init__.py b/src/brevo/companies/types/__init__.py index 3edf93b..b74323b 100644 --- a/src/brevo/companies/types/__init__.py +++ b/src/brevo/companies/types/__init__.py @@ -9,6 +9,9 @@ from .get_companies_request_sort import GetCompaniesRequestSort from .get_companies_response import GetCompaniesResponse from .get_crm_attributes_companies_response_item import GetCrmAttributesCompaniesResponseItem + from .get_crm_attributes_companies_response_item_attribute_options_item import ( + GetCrmAttributesCompaniesResponseItemAttributeOptionsItem, + ) from .patch_crm_attributes_id_request_object_type import PatchCrmAttributesIdRequestObjectType from .patch_crm_attributes_id_request_options_labels_item import PatchCrmAttributesIdRequestOptionsLabelsItem from .post_companies_import_response import PostCompaniesImportResponse @@ -20,6 +23,7 @@ "GetCompaniesRequestSort": ".get_companies_request_sort", "GetCompaniesResponse": ".get_companies_response", "GetCrmAttributesCompaniesResponseItem": ".get_crm_attributes_companies_response_item", + "GetCrmAttributesCompaniesResponseItemAttributeOptionsItem": ".get_crm_attributes_companies_response_item_attribute_options_item", "PatchCrmAttributesIdRequestObjectType": ".patch_crm_attributes_id_request_object_type", "PatchCrmAttributesIdRequestOptionsLabelsItem": ".patch_crm_attributes_id_request_options_labels_item", "PostCompaniesImportResponse": ".post_companies_import_response", @@ -55,6 +59,7 @@ def __dir__(): "GetCompaniesRequestSort", "GetCompaniesResponse", "GetCrmAttributesCompaniesResponseItem", + "GetCrmAttributesCompaniesResponseItemAttributeOptionsItem", "PatchCrmAttributesIdRequestObjectType", "PatchCrmAttributesIdRequestOptionsLabelsItem", "PostCompaniesImportResponse", diff --git a/src/brevo/companies/types/get_crm_attributes_companies_response_item.py b/src/brevo/companies/types/get_crm_attributes_companies_response_item.py index c79536c..a557f49 100644 --- a/src/brevo/companies/types/get_crm_attributes_companies_response_item.py +++ b/src/brevo/companies/types/get_crm_attributes_companies_response_item.py @@ -7,28 +7,46 @@ from ...core.pydantic_utilities import IS_PYDANTIC_V2 from ...core.serialization import FieldMetadata from ...core.unchecked_base_model import UncheckedBaseModel +from .get_crm_attributes_companies_response_item_attribute_options_item import ( + GetCrmAttributesCompaniesResponseItemAttributeOptionsItem, +) class GetCrmAttributesCompaniesResponseItem(UncheckedBaseModel): """ - List of attributes + Company attribute details """ - attribute_options: typing_extensions.Annotated[ - typing.Optional[typing.List[typing.Dict[str, typing.Any]]], - FieldMetadata(alias="attributeOptions"), - pydantic.Field(alias="attributeOptions"), + internal_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="internalName"), + pydantic.Field(alias="internalName", description="Internal name of the attribute"), ] = None attribute_type_name: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="attributeTypeName"), pydantic.Field(alias="attributeTypeName") + typing.Optional[str], + FieldMetadata(alias="attributeTypeName"), + pydantic.Field(alias="attributeTypeName", description="Type of the attribute"), ] = None - internal_name: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="internalName"), pydantic.Field(alias="internalName") + label: typing.Optional[str] = pydantic.Field(default=None) + """ + Display label of the attribute + """ + + attribute_options: typing_extensions.Annotated[ + typing.Optional[typing.List[GetCrmAttributesCompaniesResponseItemAttributeOptionsItem]], + FieldMetadata(alias="attributeOptions"), + pydantic.Field(alias="attributeOptions", description="Options for single-select or multi-choice attributes"), ] = None is_required: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="isRequired"), pydantic.Field(alias="isRequired") + typing.Optional[bool], + FieldMetadata(alias="isRequired"), + pydantic.Field(alias="isRequired", description="Whether this attribute is required"), + ] = None + is_value_readonly: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isValueReadonly"), + pydantic.Field(alias="isValueReadonly", description="Whether this attribute value is read-only"), ] = None - label: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_one.py b/src/brevo/companies/types/get_crm_attributes_companies_response_item_attribute_options_item.py similarity index 75% rename from src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_one.py rename to src/brevo/companies/types/get_crm_attributes_companies_response_item_attribute_options_item.py index 4ef760f..879d3ec 100644 --- a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_one.py +++ b/src/brevo/companies/types/get_crm_attributes_companies_response_item_attribute_options_item.py @@ -7,8 +7,9 @@ from ...core.unchecked_base_model import UncheckedBaseModel -class UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemOne(UncheckedBaseModel): - identifiers: typing.Optional[typing.Dict[str, typing.Any]] = None +class GetCrmAttributesCompaniesResponseItemAttributeOptionsItem(UncheckedBaseModel): + key: typing.Optional[str] = None + value: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/contacts/client.py b/src/brevo/contacts/client.py index 51f75d2..4fd68bf 100644 --- a/src/brevo/contacts/client.py +++ b/src/brevo/contacts/client.py @@ -77,12 +77,15 @@ def get_contacts( modified_since: typing.Optional[str] = None, created_since: typing.Optional[str] = None, sort: typing.Optional[GetContactsRequestSort] = None, + ids: typing.Optional[typing.Union[int, typing.Sequence[int]]] = None, segment_id: typing.Optional[int] = None, list_ids: typing.Optional[typing.Union[int, typing.Sequence[int]]] = None, filter: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetContacts: """ + Retrieve all contacts from your Brevo account with support for pagination, filtering, and sorting. Results default to 50 contacts per page (maximum 1000) sorted in descending order of creation, and can be filtered by modification date, creation date, contact IDs (up to 20), list IDs, segment ID, or contact attributes using the equals operator. Note that either listIds or segmentId can be passed but not both simultaneously. + Parameters ---------- limit : typing.Optional[int] @@ -100,8 +103,11 @@ def get_contacts( sort : typing.Optional[GetContactsRequestSort] Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + ids : typing.Optional[typing.Union[int, typing.Sequence[int]]] + Filter by a list of contact IDs. You can pass a **maximum of 20 IDs**. All elements must be integers. + segment_id : typing.Optional[int] - Id of the segment. **Either listIds or segmentId can be passed.** + Id of the segment. **Either listIds or segmentId can be passed.** Must be a positive integer (minimum value of 1). list_ids : typing.Optional[typing.Union[int, typing.Sequence[int]]] Ids of the list. **Either listIds or segmentId can be passed.** @@ -132,6 +138,7 @@ def get_contacts( modified_since=modified_since, created_since=created_since, sort=sort, + ids=ids, segment_id=segment_id, list_ids=list_ids, filter=filter, @@ -150,6 +157,8 @@ def create_contact( sms_blacklisted: typing.Optional[bool] = OMIT, smtp_blacklist_sender: typing.Optional[typing.Sequence[str]] = OMIT, update_enabled: typing.Optional[bool] = OMIT, + force_merge: typing.Optional[bool] = OMIT, + get_id: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[CreateContactResponse]: """ @@ -183,6 +192,12 @@ def create_contact( update_enabled : typing.Optional[bool] Facilitate to update the existing contact in the same request (updateEnabled = true) + force_merge : typing.Optional[bool] + When true, if the contact being created shares an identifier (email, SMS, ext_id, whatsapp, landline) with an existing contact, the two contacts are force-merged. The contact with the most recent `last_modified` timestamp is retained; the other is deleted. When false (default), a 4xx error is returned on identifier conflict. + + get_id : typing.Optional[bool] + When true, the response returns the `id` of the surviving contact after merge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -209,12 +224,16 @@ def create_contact( sms_blacklisted=sms_blacklisted, smtp_blacklist_sender=smtp_blacklist_sender, update_enabled=update_enabled, + force_merge=force_merge, + get_id=get_id, request_options=request_options, ) return _response.data def get_attributes(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetAttributesResponse: """ + Retrieve all contact attributes defined in your Brevo account, grouped by category (normal, transactional, category, calculated, global). Each attribute includes its name, type, and category, along with enumeration values for category-type attributes and options for multiple-choice-type attributes. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -250,6 +269,8 @@ def create_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Create a new contact attribute under the specified category and name. The required body properties depend on the category: use "type" for normal, transactional, or category attributes; use "value" for calculated or global attributes; use "enumeration" for category attributes; and use "multiCategoryOptions" for normal multiple-choice attributes. None of the category or multicategory option values can exceed 200 characters. + Parameters ---------- attribute_category : CreateAttributeRequestAttributeCategory @@ -315,6 +336,8 @@ def update_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing contact attribute identified by its category and name. For category-type attributes, you can update the enumeration values; for calculated or global attributes, update the computed value formula; and for normal multiple-choice attributes, update the multicategory options. None of the category or multicategory option values can exceed 200 characters. + Parameters ---------- attribute_category : UpdateAttributeRequestAttributeCategory @@ -369,6 +392,8 @@ def delete_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Permanently delete an existing contact attribute by its category and name. The attribute must exist in the specified category (normal, transactional, category, calculated, or global), otherwise a 404 error is returned. + Parameters ---------- attribute_category : DeleteAttributeRequestAttributeCategory @@ -409,6 +434,8 @@ def delete_multi_attribute_options( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Delete a specific option from an existing multiple-choice contact attribute. The attribute type must be "multiple-choice", and both the attribute name and the option to delete must already exist in your account. + Parameters ---------- multiple_choice_attribute : str @@ -448,6 +475,8 @@ def update_batch_contacts( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update multiple contacts in a single API call by passing an array of contact objects. Each contact in the array must be identified by one of: email, id, or sms (only one identifier per contact). You can update attributes, blacklist status, list memberships, ext_id, and transactional email forbidden senders for each contact in the batch. + Parameters ---------- contacts : typing.Optional[typing.Sequence[UpdateBatchContactsRequestContactsItem]] @@ -663,6 +692,8 @@ def create_folder( self, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None ) -> CreateFolderResponse: """ + Create a new folder to organize your contact lists. Folders serve as containers for grouping related lists together. The folder name is required and must be provided in the request body. + Parameters ---------- name : typing.Optional[str] @@ -729,6 +760,8 @@ def update_folder( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update the name of an existing folder identified by its ID. The new folder name must be provided in the request body. Returns a 404 error if the folder ID does not exist. + Parameters ---------- folder_id : int @@ -760,6 +793,8 @@ def update_folder( def delete_folder(self, folder_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently delete a folder identified by its ID. Deleting a folder will also delete all the contact lists contained within it. This action cannot be undone. + Parameters ---------- folder_id : int @@ -973,6 +1008,8 @@ def create_list( self, *, folder_id: int, name: str, request_options: typing.Optional[RequestOptions] = None ) -> CreateListResponse: """ + Create a new contact list inside a specified folder. Both the list name and the parent folder ID are required. The newly created list will be empty and ready to receive contacts via the add contacts endpoint. + Parameters ---------- folder_id : int @@ -1013,13 +1050,15 @@ def get_list( request_options: typing.Optional[RequestOptions] = None, ) -> GetListResponse: """ + Retrieve the details of a specific contact list by its ID, including its name, folder ID, creation date, subscriber counts, and campaign statistics. You can optionally filter campaign statistics by providing startDate and endDate parameters (both must be used together in YYYY-MM-DD format). + Parameters ---------- list_id : int Id of the list start_date : typing.Optional[str] - **Mandatory if endDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** + **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** end_date : typing.Optional[str] **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** @@ -1057,6 +1096,8 @@ def update_list( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing contact list identified by its ID. You can update the list name, move it to a different folder by providing a new folderId, or both. Only one of the two parameters (name, folderId) needs to be provided per request. + Parameters ---------- list_id : int @@ -1093,6 +1134,8 @@ def update_list( def delete_list(self, list_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently delete a contact list identified by its ID. The contacts in the list are not deleted; they are only removed from this list. Returns a 404 error if the list ID does not exist. + Parameters ---------- list_id : int @@ -1130,6 +1173,8 @@ def get_contacts_from_list( request_options: typing.Optional[RequestOptions] = None, ) -> GetContacts: """ + Retrieve all contacts belonging to a specific list, identified by its list ID. Results are paginated with a default of 50 contacts per page (maximum 500) and sorted in descending order of creation. You can optionally filter contacts by their modification date using the modifiedSince parameter. + Parameters ---------- list_id : int @@ -1267,6 +1312,8 @@ def get_segments( request_options: typing.Optional[RequestOptions] = None, ) -> GetSegmentsResponse: """ + Retrieve all contact segments defined in your Brevo account with support for pagination and sorting. Results default to 10 segments per page (maximum 50) sorted in descending order of creation. Each segment includes its ID, name, category name, and last update timestamp. + Parameters ---------- limit : typing.Optional[int] @@ -1323,10 +1370,10 @@ def get_contact_info( email_id for Email, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute start_date : typing.Optional[str] - **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate. Must not be greater than the current date. end_date : typing.Optional[str] - **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Must not be greater than the current date. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1368,6 +1415,7 @@ def update_contact( sms_blacklisted: typing.Optional[bool] = OMIT, smtp_blacklist_sender: typing.Optional[typing.Sequence[str]] = OMIT, unlink_list_ids: typing.Optional[typing.Sequence[int]] = OMIT, + force_merge: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> None: """ @@ -1378,10 +1426,10 @@ def update_contact( Parameters ---------- identifier : UpdateContactRequestIdentifier - Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE attribute value + Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE_NUMBER attribute value identifier_type : typing.Optional[UpdateContactRequestIdentifierType] - email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE attribute + email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute attributes : typing.Optional[typing.Dict[str, UpdateContactRequestAttributesValue]] Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, **{ "EMAIL":"newemail@domain.com", "FNAME":"Ellie", "LNAME":"Roger", "COUNTRIES":["India","China"]}**. The attribute's parameter should be passed in capital letter while updating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored .Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"}** @@ -1404,6 +1452,9 @@ def update_contact( unlink_list_ids : typing.Optional[typing.Sequence[int]] Ids of the lists to remove the contact from + force_merge : typing.Optional[bool] + When true, if the contact being updated shares an identifier (email, SMS, ext_id, whatsapp, landline) with an existing contact, the two contacts are force-merged. The contact with the most recent `last_modified` timestamp is retained; the other is deleted. When false (default), a 4xx error is returned on identifier conflict. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1432,6 +1483,7 @@ def update_contact( sms_blacklisted=sms_blacklisted, smtp_blacklist_sender=smtp_blacklist_sender, unlink_list_ids=unlink_list_ids, + force_merge=force_merge, request_options=request_options, ) return _response.data @@ -1486,16 +1538,18 @@ def get_contact_stats( request_options: typing.Optional[RequestOptions] = None, ) -> GetContactStatsResponse: """ + Retrieve email campaign statistics for a specific contact identified by email address or numeric ID. Statistics include messages sent, opens, clicks, hard/soft bounces, deliveries, unsubscriptions, complaints, and transactional attributes. By default, data covers the last 90 days; use startDate and endDate parameters (YYYY-MM-DD) to specify a custom range with a maximum span of 90 days. + Parameters ---------- identifier : GetContactStatsRequestIdentifier Email (urlencoded) OR ID of the contact start_date : typing.Optional[str] - **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate. Must not be greater than the current date. end_date : typing.Optional[str] - **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Must not be greater than the current date. Maximum difference between startDate and endDate should not be greater than 90 days. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1545,12 +1599,15 @@ async def get_contacts( modified_since: typing.Optional[str] = None, created_since: typing.Optional[str] = None, sort: typing.Optional[GetContactsRequestSort] = None, + ids: typing.Optional[typing.Union[int, typing.Sequence[int]]] = None, segment_id: typing.Optional[int] = None, list_ids: typing.Optional[typing.Union[int, typing.Sequence[int]]] = None, filter: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetContacts: """ + Retrieve all contacts from your Brevo account with support for pagination, filtering, and sorting. Results default to 50 contacts per page (maximum 1000) sorted in descending order of creation, and can be filtered by modification date, creation date, contact IDs (up to 20), list IDs, segment ID, or contact attributes using the equals operator. Note that either listIds or segmentId can be passed but not both simultaneously. + Parameters ---------- limit : typing.Optional[int] @@ -1568,8 +1625,11 @@ async def get_contacts( sort : typing.Optional[GetContactsRequestSort] Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + ids : typing.Optional[typing.Union[int, typing.Sequence[int]]] + Filter by a list of contact IDs. You can pass a **maximum of 20 IDs**. All elements must be integers. + segment_id : typing.Optional[int] - Id of the segment. **Either listIds or segmentId can be passed.** + Id of the segment. **Either listIds or segmentId can be passed.** Must be a positive integer (minimum value of 1). list_ids : typing.Optional[typing.Union[int, typing.Sequence[int]]] Ids of the list. **Either listIds or segmentId can be passed.** @@ -1608,6 +1668,7 @@ async def main() -> None: modified_since=modified_since, created_since=created_since, sort=sort, + ids=ids, segment_id=segment_id, list_ids=list_ids, filter=filter, @@ -1626,6 +1687,8 @@ async def create_contact( sms_blacklisted: typing.Optional[bool] = OMIT, smtp_blacklist_sender: typing.Optional[typing.Sequence[str]] = OMIT, update_enabled: typing.Optional[bool] = OMIT, + force_merge: typing.Optional[bool] = OMIT, + get_id: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[CreateContactResponse]: """ @@ -1659,6 +1722,12 @@ async def create_contact( update_enabled : typing.Optional[bool] Facilitate to update the existing contact in the same request (updateEnabled = true) + force_merge : typing.Optional[bool] + When true, if the contact being created shares an identifier (email, SMS, ext_id, whatsapp, landline) with an existing contact, the two contacts are force-merged. The contact with the most recent `last_modified` timestamp is retained; the other is deleted. When false (default), a 4xx error is returned on identifier conflict. + + get_id : typing.Optional[bool] + When true, the response returns the `id` of the surviving contact after merge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1693,12 +1762,16 @@ async def main() -> None: sms_blacklisted=sms_blacklisted, smtp_blacklist_sender=smtp_blacklist_sender, update_enabled=update_enabled, + force_merge=force_merge, + get_id=get_id, request_options=request_options, ) return _response.data async def get_attributes(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetAttributesResponse: """ + Retrieve all contact attributes defined in your Brevo account, grouped by category (normal, transactional, category, calculated, global). Each attribute includes its name, type, and category, along with enumeration values for category-type attributes and options for multiple-choice-type attributes. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -1742,6 +1815,8 @@ async def create_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Create a new contact attribute under the specified category and name. The required body properties depend on the category: use "type" for normal, transactional, or category attributes; use "value" for calculated or global attributes; use "enumeration" for category attributes; and use "multiCategoryOptions" for normal multiple-choice attributes. None of the category or multicategory option values can exceed 200 characters. + Parameters ---------- attribute_category : CreateAttributeRequestAttributeCategory @@ -1815,6 +1890,8 @@ async def update_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing contact attribute identified by its category and name. For category-type attributes, you can update the enumeration values; for calculated or global attributes, update the computed value formula; and for normal multiple-choice attributes, update the multicategory options. None of the category or multicategory option values can exceed 200 characters. + Parameters ---------- attribute_category : UpdateAttributeRequestAttributeCategory @@ -1877,6 +1954,8 @@ async def delete_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Permanently delete an existing contact attribute by its category and name. The attribute must exist in the specified category (normal, transactional, category, calculated, or global), otherwise a 404 error is returned. + Parameters ---------- attribute_category : DeleteAttributeRequestAttributeCategory @@ -1925,6 +2004,8 @@ async def delete_multi_attribute_options( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Delete a specific option from an existing multiple-choice contact attribute. The attribute type must be "multiple-choice", and both the attribute name and the option to delete must already exist in your account. + Parameters ---------- multiple_choice_attribute : str @@ -1972,6 +2053,8 @@ async def update_batch_contacts( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update multiple contacts in a single API call by passing an array of contact objects. Each contact in the array must be identified by one of: email, id, or sms (only one identifier per contact). You can update attributes, blacklist status, list memberships, ext_id, and transactional email forbidden senders for each contact in the batch. + Parameters ---------- contacts : typing.Optional[typing.Sequence[UpdateBatchContactsRequestContactsItem]] @@ -2221,6 +2304,8 @@ async def create_folder( self, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None ) -> CreateFolderResponse: """ + Create a new folder to organize your contact lists. Folders serve as containers for grouping related lists together. The folder name is required and must be provided in the request body. + Parameters ---------- name : typing.Optional[str] @@ -2303,6 +2388,8 @@ async def update_folder( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update the name of an existing folder identified by its ID. The new folder name must be provided in the request body. Returns a 404 error if the folder ID does not exist. + Parameters ---------- folder_id : int @@ -2342,6 +2429,8 @@ async def main() -> None: async def delete_folder(self, folder_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently delete a folder identified by its ID. Deleting a folder will also delete all the contact lists contained within it. This action cannot be undone. + Parameters ---------- folder_id : int @@ -2589,6 +2678,8 @@ async def create_list( self, *, folder_id: int, name: str, request_options: typing.Optional[RequestOptions] = None ) -> CreateListResponse: """ + Create a new contact list inside a specified folder. Both the list name and the parent folder ID are required. The newly created list will be empty and ready to receive contacts via the add contacts endpoint. + Parameters ---------- folder_id : int @@ -2637,13 +2728,15 @@ async def get_list( request_options: typing.Optional[RequestOptions] = None, ) -> GetListResponse: """ + Retrieve the details of a specific contact list by its ID, including its name, folder ID, creation date, subscriber counts, and campaign statistics. You can optionally filter campaign statistics by providing startDate and endDate parameters (both must be used together in YYYY-MM-DD format). + Parameters ---------- list_id : int Id of the list start_date : typing.Optional[str] - **Mandatory if endDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** + **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** end_date : typing.Optional[str] **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** @@ -2689,6 +2782,8 @@ async def update_list( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing contact list identified by its ID. You can update the list name, move it to a different folder by providing a new folderId, or both. Only one of the two parameters (name, folderId) needs to be provided per request. + Parameters ---------- list_id : int @@ -2733,6 +2828,8 @@ async def main() -> None: async def delete_list(self, list_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently delete a contact list identified by its ID. The contacts in the list are not deleted; they are only removed from this list. Returns a 404 error if the list ID does not exist. + Parameters ---------- list_id : int @@ -2778,6 +2875,8 @@ async def get_contacts_from_list( request_options: typing.Optional[RequestOptions] = None, ) -> GetContacts: """ + Retrieve all contacts belonging to a specific list, identified by its list ID. Results are paginated with a default of 50 contacts per page (maximum 500) and sorted in descending order of creation. You can optionally filter contacts by their modification date using the modifiedSince parameter. + Parameters ---------- list_id : int @@ -2943,6 +3042,8 @@ async def get_segments( request_options: typing.Optional[RequestOptions] = None, ) -> GetSegmentsResponse: """ + Retrieve all contact segments defined in your Brevo account with support for pagination and sorting. Results default to 10 segments per page (maximum 50) sorted in descending order of creation. Each segment includes its ID, name, category name, and last update timestamp. + Parameters ---------- limit : typing.Optional[int] @@ -3007,10 +3108,10 @@ async def get_contact_info( email_id for Email, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute start_date : typing.Optional[str] - **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate. Must not be greater than the current date. end_date : typing.Optional[str] - **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Must not be greater than the current date. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -3060,6 +3161,7 @@ async def update_contact( sms_blacklisted: typing.Optional[bool] = OMIT, smtp_blacklist_sender: typing.Optional[typing.Sequence[str]] = OMIT, unlink_list_ids: typing.Optional[typing.Sequence[int]] = OMIT, + force_merge: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> None: """ @@ -3070,10 +3172,10 @@ async def update_contact( Parameters ---------- identifier : UpdateContactRequestIdentifier - Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE attribute value + Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE_NUMBER attribute value identifier_type : typing.Optional[UpdateContactRequestIdentifierType] - email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE attribute + email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute attributes : typing.Optional[typing.Dict[str, UpdateContactRequestAttributesValue]] Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, **{ "EMAIL":"newemail@domain.com", "FNAME":"Ellie", "LNAME":"Roger", "COUNTRIES":["India","China"]}**. The attribute's parameter should be passed in capital letter while updating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored .Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"}** @@ -3096,6 +3198,9 @@ async def update_contact( unlink_list_ids : typing.Optional[typing.Sequence[int]] Ids of the lists to remove the contact from + force_merge : typing.Optional[bool] + When true, if the contact being updated shares an identifier (email, SMS, ext_id, whatsapp, landline) with an existing contact, the two contacts are force-merged. The contact with the most recent `last_modified` timestamp is retained; the other is deleted. When false (default), a 4xx error is returned on identifier conflict. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -3132,6 +3237,7 @@ async def main() -> None: sms_blacklisted=sms_blacklisted, smtp_blacklist_sender=smtp_blacklist_sender, unlink_list_ids=unlink_list_ids, + force_merge=force_merge, request_options=request_options, ) return _response.data @@ -3194,16 +3300,18 @@ async def get_contact_stats( request_options: typing.Optional[RequestOptions] = None, ) -> GetContactStatsResponse: """ + Retrieve email campaign statistics for a specific contact identified by email address or numeric ID. Statistics include messages sent, opens, clicks, hard/soft bounces, deliveries, unsubscriptions, complaints, and transactional attributes. By default, data covers the last 90 days; use startDate and endDate parameters (YYYY-MM-DD) to specify a custom range with a maximum span of 90 days. + Parameters ---------- identifier : GetContactStatsRequestIdentifier Email (urlencoded) OR ID of the contact start_date : typing.Optional[str] - **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate. Must not be greater than the current date. end_date : typing.Optional[str] - **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Must not be greater than the current date. Maximum difference between startDate and endDate should not be greater than 90 days. request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/src/brevo/contacts/raw_client.py b/src/brevo/contacts/raw_client.py index 250bf3d..7c5ad3e 100644 --- a/src/brevo/contacts/raw_client.py +++ b/src/brevo/contacts/raw_client.py @@ -80,12 +80,15 @@ def get_contacts( modified_since: typing.Optional[str] = None, created_since: typing.Optional[str] = None, sort: typing.Optional[GetContactsRequestSort] = None, + ids: typing.Optional[typing.Union[int, typing.Sequence[int]]] = None, segment_id: typing.Optional[int] = None, list_ids: typing.Optional[typing.Union[int, typing.Sequence[int]]] = None, filter: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetContacts]: """ + Retrieve all contacts from your Brevo account with support for pagination, filtering, and sorting. Results default to 50 contacts per page (maximum 1000) sorted in descending order of creation, and can be filtered by modification date, creation date, contact IDs (up to 20), list IDs, segment ID, or contact attributes using the equals operator. Note that either listIds or segmentId can be passed but not both simultaneously. + Parameters ---------- limit : typing.Optional[int] @@ -103,8 +106,11 @@ def get_contacts( sort : typing.Optional[GetContactsRequestSort] Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + ids : typing.Optional[typing.Union[int, typing.Sequence[int]]] + Filter by a list of contact IDs. You can pass a **maximum of 20 IDs**. All elements must be integers. + segment_id : typing.Optional[int] - Id of the segment. **Either listIds or segmentId can be passed.** + Id of the segment. **Either listIds or segmentId can be passed.** Must be a positive integer (minimum value of 1). list_ids : typing.Optional[typing.Union[int, typing.Sequence[int]]] Ids of the list. **Either listIds or segmentId can be passed.** @@ -129,6 +135,7 @@ def get_contacts( "modifiedSince": modified_since, "createdSince": created_since, "sort": sort, + "ids": ids, "segmentId": segment_id, "listIds": list_ids, "filter": filter, @@ -187,6 +194,8 @@ def create_contact( sms_blacklisted: typing.Optional[bool] = OMIT, smtp_blacklist_sender: typing.Optional[typing.Sequence[str]] = OMIT, update_enabled: typing.Optional[bool] = OMIT, + force_merge: typing.Optional[bool] = OMIT, + get_id: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[typing.Optional[CreateContactResponse]]: """ @@ -220,6 +229,12 @@ def create_contact( update_enabled : typing.Optional[bool] Facilitate to update the existing contact in the same request (updateEnabled = true) + force_merge : typing.Optional[bool] + When true, if the contact being created shares an identifier (email, SMS, ext_id, whatsapp, landline) with an existing contact, the two contacts are force-merged. The contact with the most recent `last_modified` timestamp is retained; the other is deleted. When false (default), a 4xx error is returned on identifier conflict. + + get_id : typing.Optional[bool] + When true, the response returns the `id` of the surviving contact after merge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -244,6 +259,8 @@ def create_contact( "smsBlacklisted": sms_blacklisted, "smtpBlacklistSender": smtp_blacklist_sender, "updateEnabled": update_enabled, + "forceMerge": force_merge, + "getId": get_id, }, headers={ "content-type": "application/json", @@ -298,6 +315,8 @@ def get_attributes( self, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[GetAttributesResponse]: """ + Retrieve all contact attributes defined in your Brevo account, grouped by category (normal, transactional, category, calculated, global). Each attribute includes its name, type, and category, along with enumeration values for category-type attributes and options for multiple-choice-type attributes. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -323,6 +342,17 @@ def get_attributes( ), ) return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -345,6 +375,8 @@ def create_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Create a new contact attribute under the specified category and name. The required body properties depend on the category: use "type" for normal, transactional, or category attributes; use "value" for calculated or global attributes; use "enumeration" for category attributes; and use "multiCategoryOptions" for normal multiple-choice attributes. None of the category or multicategory option values can exceed 200 characters. + Parameters ---------- attribute_category : CreateAttributeRequestAttributeCategory @@ -429,6 +461,8 @@ def update_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Update an existing contact attribute identified by its category and name. For category-type attributes, you can update the enumeration values; for calculated or global attributes, update the computed value formula; and for normal multiple-choice attributes, update the multicategory options. None of the category or multicategory option values can exceed 200 characters. + Parameters ---------- attribute_category : UpdateAttributeRequestAttributeCategory @@ -513,6 +547,8 @@ def delete_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Permanently delete an existing contact attribute by its category and name. The attribute must exist in the specified category (normal, transactional, category, calculated, or global), otherwise a 404 error is returned. + Parameters ---------- attribute_category : DeleteAttributeRequestAttributeCategory @@ -575,6 +611,8 @@ def delete_multi_attribute_options( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Delete a specific option from an existing multiple-choice contact attribute. The attribute type must be "multiple-choice", and both the attribute name and the option to delete must already exist in your account. + Parameters ---------- multiple_choice_attribute : str @@ -636,6 +674,8 @@ def update_batch_contacts( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Update multiple contacts in a single API call by passing an array of contact objects. Each contact in the array must be identified by one of: email, id, or sms (only one identifier per contact). You can update attributes, blacklist status, list memberships, ext_id, and transactional email forbidden senders for each contact in the batch. + Parameters ---------- contacts : typing.Optional[typing.Sequence[UpdateBatchContactsRequestContactsItem]] @@ -964,6 +1004,8 @@ def create_folder( self, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[CreateFolderResponse]: """ + Create a new folder to organize your contact lists. Folders serve as containers for grouping related lists together. The folder name is required and must be provided in the request body. + Parameters ---------- name : typing.Optional[str] @@ -1094,6 +1136,8 @@ def update_folder( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Update the name of an existing folder identified by its ID. The new folder name must be provided in the request body. Returns a 404 error if the folder ID does not exist. + Parameters ---------- folder_id : int @@ -1159,6 +1203,8 @@ def delete_folder( self, folder_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ + Permanently delete a folder identified by its ID. Deleting a folder will also delete all the contact lists contained within it. This action cannot be undone. + Parameters ---------- folder_id : int @@ -1491,6 +1537,8 @@ def create_list( self, *, folder_id: int, name: str, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[CreateListResponse]: """ + Create a new contact list inside a specified folder. Both the list name and the parent folder ID are required. The newly created list will be empty and ready to receive contacts via the add contacts endpoint. + Parameters ---------- folder_id : int @@ -1559,13 +1607,15 @@ def get_list( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetListResponse]: """ + Retrieve the details of a specific contact list by its ID, including its name, folder ID, creation date, subscriber counts, and campaign statistics. You can optionally filter campaign statistics by providing startDate and endDate parameters (both must be used together in YYYY-MM-DD format). + Parameters ---------- list_id : int Id of the list start_date : typing.Optional[str] - **Mandatory if endDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** + **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** end_date : typing.Optional[str] **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** @@ -1637,6 +1687,8 @@ def update_list( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Update an existing contact list identified by its ID. You can update the list name, move it to a different folder by providing a new folderId, or both. Only one of the two parameters (name, folderId) needs to be provided per request. + Parameters ---------- list_id : int @@ -1706,6 +1758,8 @@ def delete_list( self, list_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ + Permanently delete a contact list identified by its ID. The contacts in the list are not deleted; they are only removed from this list. Returns a 404 error if the list ID does not exist. + Parameters ---------- list_id : int @@ -1768,6 +1822,8 @@ def get_contacts_from_list( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetContacts]: """ + Retrieve all contacts belonging to a specific list, identified by its list ID. Results are paginated with a default of 50 contacts per page (maximum 500) and sorted in descending order of creation. You can optionally filter contacts by their modification date using the modifiedSince parameter. + Parameters ---------- list_id : int @@ -1836,6 +1892,17 @@ def get_contacts_from_list( ), ), ) + if _response.status_code == 429: + raise TooManyRequestsError( + headers=dict(_response.headers), + body=typing.cast( + ErrorModel, + construct_type( + type_=ErrorModel, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -2006,6 +2073,8 @@ def get_segments( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetSegmentsResponse]: """ + Retrieve all contact segments defined in your Brevo account with support for pagination and sorting. Results default to 10 segments per page (maximum 50) sorted in descending order of creation. Each segment includes its ID, name, category name, and last update timestamp. + Parameters ---------- limit : typing.Optional[int] @@ -2088,10 +2157,10 @@ def get_contact_info( email_id for Email, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute start_date : typing.Optional[str] - **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate. Must not be greater than the current date. end_date : typing.Optional[str] - **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Must not be greater than the current date. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2164,6 +2233,7 @@ def update_contact( sms_blacklisted: typing.Optional[bool] = OMIT, smtp_blacklist_sender: typing.Optional[typing.Sequence[str]] = OMIT, unlink_list_ids: typing.Optional[typing.Sequence[int]] = OMIT, + force_merge: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ @@ -2174,10 +2244,10 @@ def update_contact( Parameters ---------- identifier : UpdateContactRequestIdentifier - Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE attribute value + Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE_NUMBER attribute value identifier_type : typing.Optional[UpdateContactRequestIdentifierType] - email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE attribute + email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute attributes : typing.Optional[typing.Dict[str, UpdateContactRequestAttributesValue]] Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, **{ "EMAIL":"newemail@domain.com", "FNAME":"Ellie", "LNAME":"Roger", "COUNTRIES":["India","China"]}**. The attribute's parameter should be passed in capital letter while updating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored .Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"}** @@ -2200,6 +2270,9 @@ def update_contact( unlink_list_ids : typing.Optional[typing.Sequence[int]] Ids of the lists to remove the contact from + force_merge : typing.Optional[bool] + When true, if the contact being updated shares an identifier (email, SMS, ext_id, whatsapp, landline) with an existing contact, the two contacts are force-merged. The contact with the most recent `last_modified` timestamp is retained; the other is deleted. When false (default), a 4xx error is returned on identifier conflict. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2225,6 +2298,7 @@ def update_contact( "smsBlacklisted": sms_blacklisted, "smtpBlacklistSender": smtp_blacklist_sender, "unlinkListIds": unlink_list_ids, + "forceMerge": force_merge, }, headers={ "content-type": "application/json", @@ -2364,16 +2438,18 @@ def get_contact_stats( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetContactStatsResponse]: """ + Retrieve email campaign statistics for a specific contact identified by email address or numeric ID. Statistics include messages sent, opens, clicks, hard/soft bounces, deliveries, unsubscriptions, complaints, and transactional attributes. By default, data covers the last 90 days; use startDate and endDate parameters (YYYY-MM-DD) to specify a custom range with a maximum span of 90 days. + Parameters ---------- identifier : GetContactStatsRequestIdentifier Email (urlencoded) OR ID of the contact start_date : typing.Optional[str] - **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate. Must not be greater than the current date. end_date : typing.Optional[str] - **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Must not be greater than the current date. Maximum difference between startDate and endDate should not be greater than 90 days. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2446,12 +2522,15 @@ async def get_contacts( modified_since: typing.Optional[str] = None, created_since: typing.Optional[str] = None, sort: typing.Optional[GetContactsRequestSort] = None, + ids: typing.Optional[typing.Union[int, typing.Sequence[int]]] = None, segment_id: typing.Optional[int] = None, list_ids: typing.Optional[typing.Union[int, typing.Sequence[int]]] = None, filter: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetContacts]: """ + Retrieve all contacts from your Brevo account with support for pagination, filtering, and sorting. Results default to 50 contacts per page (maximum 1000) sorted in descending order of creation, and can be filtered by modification date, creation date, contact IDs (up to 20), list IDs, segment ID, or contact attributes using the equals operator. Note that either listIds or segmentId can be passed but not both simultaneously. + Parameters ---------- limit : typing.Optional[int] @@ -2469,8 +2548,11 @@ async def get_contacts( sort : typing.Optional[GetContactsRequestSort] Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + ids : typing.Optional[typing.Union[int, typing.Sequence[int]]] + Filter by a list of contact IDs. You can pass a **maximum of 20 IDs**. All elements must be integers. + segment_id : typing.Optional[int] - Id of the segment. **Either listIds or segmentId can be passed.** + Id of the segment. **Either listIds or segmentId can be passed.** Must be a positive integer (minimum value of 1). list_ids : typing.Optional[typing.Union[int, typing.Sequence[int]]] Ids of the list. **Either listIds or segmentId can be passed.** @@ -2495,6 +2577,7 @@ async def get_contacts( "modifiedSince": modified_since, "createdSince": created_since, "sort": sort, + "ids": ids, "segmentId": segment_id, "listIds": list_ids, "filter": filter, @@ -2553,6 +2636,8 @@ async def create_contact( sms_blacklisted: typing.Optional[bool] = OMIT, smtp_blacklist_sender: typing.Optional[typing.Sequence[str]] = OMIT, update_enabled: typing.Optional[bool] = OMIT, + force_merge: typing.Optional[bool] = OMIT, + get_id: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[typing.Optional[CreateContactResponse]]: """ @@ -2586,6 +2671,12 @@ async def create_contact( update_enabled : typing.Optional[bool] Facilitate to update the existing contact in the same request (updateEnabled = true) + force_merge : typing.Optional[bool] + When true, if the contact being created shares an identifier (email, SMS, ext_id, whatsapp, landline) with an existing contact, the two contacts are force-merged. The contact with the most recent `last_modified` timestamp is retained; the other is deleted. When false (default), a 4xx error is returned on identifier conflict. + + get_id : typing.Optional[bool] + When true, the response returns the `id` of the surviving contact after merge. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2610,6 +2701,8 @@ async def create_contact( "smsBlacklisted": sms_blacklisted, "smtpBlacklistSender": smtp_blacklist_sender, "updateEnabled": update_enabled, + "forceMerge": force_merge, + "getId": get_id, }, headers={ "content-type": "application/json", @@ -2664,6 +2757,8 @@ async def get_attributes( self, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[GetAttributesResponse]: """ + Retrieve all contact attributes defined in your Brevo account, grouped by category (normal, transactional, category, calculated, global). Each attribute includes its name, type, and category, along with enumeration values for category-type attributes and options for multiple-choice-type attributes. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -2689,6 +2784,17 @@ async def get_attributes( ), ) return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -2711,6 +2817,8 @@ async def create_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Create a new contact attribute under the specified category and name. The required body properties depend on the category: use "type" for normal, transactional, or category attributes; use "value" for calculated or global attributes; use "enumeration" for category attributes; and use "multiCategoryOptions" for normal multiple-choice attributes. None of the category or multicategory option values can exceed 200 characters. + Parameters ---------- attribute_category : CreateAttributeRequestAttributeCategory @@ -2795,6 +2903,8 @@ async def update_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Update an existing contact attribute identified by its category and name. For category-type attributes, you can update the enumeration values; for calculated or global attributes, update the computed value formula; and for normal multiple-choice attributes, update the multicategory options. None of the category or multicategory option values can exceed 200 characters. + Parameters ---------- attribute_category : UpdateAttributeRequestAttributeCategory @@ -2879,6 +2989,8 @@ async def delete_attribute( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Permanently delete an existing contact attribute by its category and name. The attribute must exist in the specified category (normal, transactional, category, calculated, or global), otherwise a 404 error is returned. + Parameters ---------- attribute_category : DeleteAttributeRequestAttributeCategory @@ -2941,6 +3053,8 @@ async def delete_multi_attribute_options( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Delete a specific option from an existing multiple-choice contact attribute. The attribute type must be "multiple-choice", and both the attribute name and the option to delete must already exist in your account. + Parameters ---------- multiple_choice_attribute : str @@ -3002,6 +3116,8 @@ async def update_batch_contacts( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Update multiple contacts in a single API call by passing an array of contact objects. Each contact in the array must be identified by one of: email, id, or sms (only one identifier per contact). You can update attributes, blacklist status, list memberships, ext_id, and transactional email forbidden senders for each contact in the batch. + Parameters ---------- contacts : typing.Optional[typing.Sequence[UpdateBatchContactsRequestContactsItem]] @@ -3330,6 +3446,8 @@ async def create_folder( self, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[CreateFolderResponse]: """ + Create a new folder to organize your contact lists. Folders serve as containers for grouping related lists together. The folder name is required and must be provided in the request body. + Parameters ---------- name : typing.Optional[str] @@ -3460,6 +3578,8 @@ async def update_folder( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Update the name of an existing folder identified by its ID. The new folder name must be provided in the request body. Returns a 404 error if the folder ID does not exist. + Parameters ---------- folder_id : int @@ -3525,6 +3645,8 @@ async def delete_folder( self, folder_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Permanently delete a folder identified by its ID. Deleting a folder will also delete all the contact lists contained within it. This action cannot be undone. + Parameters ---------- folder_id : int @@ -3857,6 +3979,8 @@ async def create_list( self, *, folder_id: int, name: str, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[CreateListResponse]: """ + Create a new contact list inside a specified folder. Both the list name and the parent folder ID are required. The newly created list will be empty and ready to receive contacts via the add contacts endpoint. + Parameters ---------- folder_id : int @@ -3925,13 +4049,15 @@ async def get_list( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetListResponse]: """ + Retrieve the details of a specific contact list by its ID, including its name, folder ID, creation date, subscriber counts, and campaign statistics. You can optionally filter campaign statistics by providing startDate and endDate parameters (both must be used together in YYYY-MM-DD format). + Parameters ---------- list_id : int Id of the list start_date : typing.Optional[str] - **Mandatory if endDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** + **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** end_date : typing.Optional[str] **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** @@ -4003,6 +4129,8 @@ async def update_list( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Update an existing contact list identified by its ID. You can update the list name, move it to a different folder by providing a new folderId, or both. Only one of the two parameters (name, folderId) needs to be provided per request. + Parameters ---------- list_id : int @@ -4072,6 +4200,8 @@ async def delete_list( self, list_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Permanently delete a contact list identified by its ID. The contacts in the list are not deleted; they are only removed from this list. Returns a 404 error if the list ID does not exist. + Parameters ---------- list_id : int @@ -4134,6 +4264,8 @@ async def get_contacts_from_list( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetContacts]: """ + Retrieve all contacts belonging to a specific list, identified by its list ID. Results are paginated with a default of 50 contacts per page (maximum 500) and sorted in descending order of creation. You can optionally filter contacts by their modification date using the modifiedSince parameter. + Parameters ---------- list_id : int @@ -4202,6 +4334,17 @@ async def get_contacts_from_list( ), ), ) + if _response.status_code == 429: + raise TooManyRequestsError( + headers=dict(_response.headers), + body=typing.cast( + ErrorModel, + construct_type( + type_=ErrorModel, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -4372,6 +4515,8 @@ async def get_segments( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetSegmentsResponse]: """ + Retrieve all contact segments defined in your Brevo account with support for pagination and sorting. Results default to 10 segments per page (maximum 50) sorted in descending order of creation. Each segment includes its ID, name, category name, and last update timestamp. + Parameters ---------- limit : typing.Optional[int] @@ -4454,10 +4599,10 @@ async def get_contact_info( email_id for Email, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute start_date : typing.Optional[str] - **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate. Must not be greater than the current date. end_date : typing.Optional[str] - **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Must not be greater than the current date. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -4530,6 +4675,7 @@ async def update_contact( sms_blacklisted: typing.Optional[bool] = OMIT, smtp_blacklist_sender: typing.Optional[typing.Sequence[str]] = OMIT, unlink_list_ids: typing.Optional[typing.Sequence[int]] = OMIT, + force_merge: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ @@ -4540,10 +4686,10 @@ async def update_contact( Parameters ---------- identifier : UpdateContactRequestIdentifier - Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE attribute value + Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE_NUMBER attribute value identifier_type : typing.Optional[UpdateContactRequestIdentifierType] - email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE attribute + email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute attributes : typing.Optional[typing.Dict[str, UpdateContactRequestAttributesValue]] Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, **{ "EMAIL":"newemail@domain.com", "FNAME":"Ellie", "LNAME":"Roger", "COUNTRIES":["India","China"]}**. The attribute's parameter should be passed in capital letter while updating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored .Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"}** @@ -4566,6 +4712,9 @@ async def update_contact( unlink_list_ids : typing.Optional[typing.Sequence[int]] Ids of the lists to remove the contact from + force_merge : typing.Optional[bool] + When true, if the contact being updated shares an identifier (email, SMS, ext_id, whatsapp, landline) with an existing contact, the two contacts are force-merged. The contact with the most recent `last_modified` timestamp is retained; the other is deleted. When false (default), a 4xx error is returned on identifier conflict. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -4591,6 +4740,7 @@ async def update_contact( "smsBlacklisted": sms_blacklisted, "smtpBlacklistSender": smtp_blacklist_sender, "unlinkListIds": unlink_list_ids, + "forceMerge": force_merge, }, headers={ "content-type": "application/json", @@ -4730,16 +4880,18 @@ async def get_contact_stats( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetContactStatsResponse]: """ + Retrieve email campaign statistics for a specific contact identified by email address or numeric ID. Statistics include messages sent, opens, clicks, hard/soft bounces, deliveries, unsubscriptions, complaints, and transactional attributes. By default, data covers the last 90 days; use startDate and endDate parameters (YYYY-MM-DD) to specify a custom range with a maximum span of 90 days. + Parameters ---------- identifier : GetContactStatsRequestIdentifier Email (urlencoded) OR ID of the contact start_date : typing.Optional[str] - **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate. Must not be greater than the current date. end_date : typing.Optional[str] - **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Must not be greater than the current date. Maximum difference between startDate and endDate should not be greater than 90 days. request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/src/brevo/contacts/types/get_attributes_response_attributes_item_enumeration_item.py b/src/brevo/contacts/types/get_attributes_response_attributes_item_enumeration_item.py index dd26404..a465f89 100644 --- a/src/brevo/contacts/types/get_attributes_response_attributes_item_enumeration_item.py +++ b/src/brevo/contacts/types/get_attributes_response_attributes_item_enumeration_item.py @@ -3,7 +3,9 @@ import typing import pydantic +import typing_extensions from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata from ...core.unchecked_base_model import UncheckedBaseModel @@ -15,9 +17,18 @@ class GetAttributesResponseAttributesItemEnumerationItem(UncheckedBaseModel): value: int = pydantic.Field() """ - ID of Value of the "category" type attribute + Numeric ID of the "category" type attribute value. Set to 0 when the raw value cannot be converted to an integer (for example non-numeric values such as "en" or "fr"). Refer to `valueStr` for the original string representation. """ + value_str: typing_extensions.Annotated[ + str, + FieldMetadata(alias="valueStr"), + pydantic.Field( + alias="valueStr", + description='String representation of the "category" type attribute value. Always contains the original value as stored. Use this field when the attribute value is non-numeric (e.g. "en", "fr") or when you need the exact string form alongside the numeric `value`.', + ), + ] + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/brevo/contacts/types/get_contact_info_response.py b/src/brevo/contacts/types/get_contact_info_response.py index 559a8c8..fa113e0 100644 --- a/src/brevo/contacts/types/get_contact_info_response.py +++ b/src/brevo/contacts/types/get_contact_info_response.py @@ -65,6 +65,14 @@ class GetContactInfoResponse(UncheckedBaseModel): description="Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted)", ), ] + whatsapp_blacklisted: typing_extensions.Annotated[ + bool, + FieldMetadata(alias="whatsappBlacklisted"), + pydantic.Field( + alias="whatsappBlacklisted", + description="Blacklist status for WhatsApp campaigns (true=blacklisted, false=not blacklisted)", + ), + ] statistics: GetContactInfoResponseStatistics = pydantic.Field() """ Campaign statistics of the contact diff --git a/src/brevo/contacts/types/get_contact_info_response_statistics.py b/src/brevo/contacts/types/get_contact_info_response_statistics.py index f595610..fef7343 100644 --- a/src/brevo/contacts/types/get_contact_info_response_statistics.py +++ b/src/brevo/contacts/types/get_contact_info_response_statistics.py @@ -47,7 +47,7 @@ class GetContactInfoResponseStatistics(UncheckedBaseModel): hard_bounces: typing_extensions.Annotated[ typing.Optional[typing.List[GetContactInfoResponseStatisticsHardBouncesItem]], FieldMetadata(alias="hardBounces"), - pydantic.Field(alias="hardBounces", description="Listing of the hardbounes generated by the contact"), + pydantic.Field(alias="hardBounces", description="Listing of the hard bounces generated by the contact"), ] = None messages_sent: typing_extensions.Annotated[ typing.Optional[typing.List[GetContactInfoResponseStatisticsMessagesSentItem]], @@ -62,7 +62,7 @@ class GetContactInfoResponseStatistics(UncheckedBaseModel): soft_bounces: typing_extensions.Annotated[ typing.Optional[typing.List[GetContactInfoResponseStatisticsSoftBouncesItem]], FieldMetadata(alias="softBounces"), - pydantic.Field(alias="softBounces", description="Listing of the softbounes generated by the contact"), + pydantic.Field(alias="softBounces", description="Listing of the soft bounces generated by the contact"), ] = None transac_attributes: typing_extensions.Annotated[ typing.Optional[typing.List[GetContactInfoResponseStatisticsTransacAttributesItem]], diff --git a/src/brevo/contacts/types/get_segments_response_segments_item.py b/src/brevo/contacts/types/get_segments_response_segments_item.py index 5684aa6..f976f15 100644 --- a/src/brevo/contacts/types/get_segments_response_segments_item.py +++ b/src/brevo/contacts/types/get_segments_response_segments_item.py @@ -17,7 +17,7 @@ class GetSegmentsResponseSegmentsItem(UncheckedBaseModel): ] id: int = pydantic.Field() """ - ID of the list + ID of the segment """ segment_name: typing_extensions.Annotated[ @@ -27,7 +27,7 @@ class GetSegmentsResponseSegmentsItem(UncheckedBaseModel): typing.Optional[str], FieldMetadata(alias="updatedAt"), pydantic.Field( - alias="updatedAt", description="Updation UTC date-time of the segment (YYYY-MM-DDTHH:mm:ss.SSSZ)" + alias="updatedAt", description="Last update UTC date-time of the segment (YYYY-MM-DDTHH:mm:ss.SSSZ)" ), ] = None diff --git a/src/brevo/conversations/client.py b/src/brevo/conversations/client.py index cbf5a03..4d2587f 100644 --- a/src/brevo/conversations/client.py +++ b/src/brevo/conversations/client.py @@ -30,28 +30,28 @@ def with_raw_response(self) -> RawConversationsClient: def sets_agents_status_to_online_for23minutes( self, *, - agent_email: typing.Optional[typing.Any] = OMIT, - agent_id: typing.Optional[typing.Any] = OMIT, - agent_name: typing.Optional[typing.Any] = OMIT, - received_from: typing.Optional[typing.Any] = OMIT, + agent_email: typing.Optional[str] = OMIT, + agent_id: typing.Optional[str] = OMIT, + agent_name: typing.Optional[str] = OMIT, + received_from: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> None: """ - We recommend pinging this endpoint every minute for as long as the agent has to be considered online. + Sets the agent's status to online for 2-3 minutes. We recommend pinging this endpoint every minute for as long as the agent has to be considered online. You must provide either `agentId` alone, or all three of `agentEmail` + `agentName` + `receivedFrom`. Parameters ---------- - agent_email : typing.Optional[typing.Any] - agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically. + agent_email : typing.Optional[str] + Agent's email address. When sending online pings from a standalone system, it's hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there's no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically. - agent_id : typing.Optional[typing.Any] - agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + agent_id : typing.Optional[str] + Agent ID. It can be found on the agent's page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). - agent_name : typing.Optional[typing.Any] - agent name + agent_name : typing.Optional[str] + Agent's name. - received_from : typing.Optional[typing.Any] - mark your messages to distinguish messages created by you from the others. + received_from : typing.Optional[str] + Mark your messages to distinguish messages created by you from the others. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -83,32 +83,36 @@ def sets_agents_status_to_online_for23minutes( def send_a_message_as_an_agent( self, *, - text: typing.Any, - visitor_id: typing.Any, - agent_email: typing.Optional[typing.Any] = OMIT, - agent_id: typing.Optional[typing.Any] = OMIT, - agent_name: typing.Optional[typing.Any] = OMIT, - received_from: typing.Optional[typing.Any] = OMIT, + text: str, + visitor_id: str, + agent_email: typing.Optional[str] = OMIT, + agent_id: typing.Optional[str] = OMIT, + agent_name: typing.Optional[str] = OMIT, + received_from: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ConversationsMessage: """ + Send a message as an agent to an existing visitor's conversation. You must provide either `agentId` alone, or all three of `agentEmail` + `agentName` + `receivedFrom` to identify the agent. + Parameters ---------- - text : typing.Any + text : str + Message text. - visitor_id : typing.Any + visitor_id : str + Visitor's ID received from a webhook or generated by you to bind an existing user account to Conversations. - agent_email : typing.Optional[typing.Any] - agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. + agent_email : typing.Optional[str] + Agent's email address. When sending messages from a standalone system, it's hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. - agent_id : typing.Optional[typing.Any] - agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + agent_id : typing.Optional[str] + Agent ID. It can be found on the agent's page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). - agent_name : typing.Optional[typing.Any] - agent name + agent_name : typing.Optional[str] + Agent's name. - received_from : typing.Optional[typing.Any] - mark your messages to distinguish messages created by you from the others. + received_from : typing.Optional[str] + Mark your messages to distinguish messages created by you from the others. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -116,7 +120,7 @@ def send_a_message_as_an_agent( Returns ------- ConversationsMessage - Newly created message is returned as a response + Newly created message is returned as a response. Examples -------- @@ -146,6 +150,8 @@ def get_a_message( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> ConversationsMessage: """ + Retrieve a single message by its ID. + Parameters ---------- id : str @@ -157,7 +163,7 @@ def get_a_message( Returns ------- ConversationsMessage - Requested message is returned as a response + Requested message is returned as a response. Examples -------- @@ -177,7 +183,7 @@ def update_a_message_sent_by_an_agent( self, id: str, *, text: str, request_options: typing.Optional[RequestOptions] = None ) -> ConversationsMessage: """ - Only agents’ messages can be edited. + Update the text of a message sent by an agent. Only messages of type `agent` can be edited. The `text` and `html` fields of the message will be updated. Parameters ---------- @@ -185,7 +191,7 @@ def update_a_message_sent_by_an_agent( ID of the message text : str - edited message text + The new message text. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -193,7 +199,7 @@ def update_a_message_sent_by_an_agent( Returns ------- ConversationsMessage - Updated message is returned as a response + Updated message is returned as a response. Examples -------- @@ -214,7 +220,7 @@ def delete_a_message_sent_by_an_agent( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ - Only agents’ messages can be deleted. + Delete a message sent by an agent. Only messages of type `agent` can be deleted. Parameters ---------- @@ -245,26 +251,28 @@ def delete_a_message_sent_by_an_agent( def send_an_automated_message_to_a_visitor( self, *, - text: typing.Any, - visitor_id: typing.Any, - agent_id: typing.Optional[typing.Any] = OMIT, - group_id: typing.Optional[typing.Any] = OMIT, + text: str, + visitor_id: str, + agent_id: typing.Optional[str] = OMIT, + group_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ConversationsMessage: """ - Example of automated messages: order status, announce new features in your web app, etc. + Send an automated (pushed) message to a visitor on behalf of an agent. Example use cases: order status updates, announcing new features in your web app, etc. Parameters ---------- - text : typing.Any + text : str + Message text. - visitor_id : typing.Any + visitor_id : str + Visitor's ID received from a webhook or generated by you to bind an existing user account to Conversations. - agent_id : typing.Optional[typing.Any] - agent ID. It can be found on agent’s page or received from a webhook. + agent_id : typing.Optional[str] + Agent ID. It can be found on the agent's page or received from a webhook. - group_id : typing.Optional[typing.Any] - group ID. It can be found on group’s page. + group_id : typing.Optional[str] + Group ID. It can be found on the group's page. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -272,7 +280,7 @@ def send_an_automated_message_to_a_visitor( Returns ------- ConversationsMessage - Newly created message is returned as a response + Newly created message is returned as a response. Examples -------- @@ -283,7 +291,7 @@ def send_an_automated_message_to_a_visitor( ) client.conversations.send_an_automated_message_to_a_visitor( group_id="PjRBMhWGen6aRHjif", - text="Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88", + text="Your order has shipped! Here's your tracking number: 9114 5847 3325 9667 4328 88", visitor_id="kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", ) """ @@ -296,6 +304,8 @@ def get_an_automated_message( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> ConversationsMessage: """ + Retrieve a single automated (pushed) message by its ID. + Parameters ---------- id : str @@ -307,7 +317,7 @@ def get_an_automated_message( Returns ------- ConversationsMessage - Requested message is returned as a response + Requested message is returned as a response. Examples -------- @@ -327,13 +337,15 @@ def update_an_automated_message( self, id: str, *, text: str, request_options: typing.Optional[RequestOptions] = None ) -> ConversationsMessage: """ + Update the text of an automated (pushed) message. The `text` and `html` fields of the message will be updated. + Parameters ---------- id : str ID of the message text : str - edited message text + The new message text. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -341,7 +353,7 @@ def update_an_automated_message( Returns ------- ConversationsMessage - Updated message is returned as a response + Updated message is returned as a response. Examples -------- @@ -352,7 +364,7 @@ def update_an_automated_message( ) client.conversations.update_an_automated_message( id="id", - text="Your order has shipped! Here’s your tracking number: 9114 5847 4668 7775 9233 54", + text="Your order has shipped! Here's your tracking number: 9114 5847 4668 7775 9233 54", ) """ _response = self._raw_client.update_an_automated_message(id, text=text, request_options=request_options) @@ -360,6 +372,8 @@ def update_an_automated_message( def delete_an_automated_message(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Delete an automated (pushed) message by its ID. + Parameters ---------- id : str @@ -437,28 +451,28 @@ def with_raw_response(self) -> AsyncRawConversationsClient: async def sets_agents_status_to_online_for23minutes( self, *, - agent_email: typing.Optional[typing.Any] = OMIT, - agent_id: typing.Optional[typing.Any] = OMIT, - agent_name: typing.Optional[typing.Any] = OMIT, - received_from: typing.Optional[typing.Any] = OMIT, + agent_email: typing.Optional[str] = OMIT, + agent_id: typing.Optional[str] = OMIT, + agent_name: typing.Optional[str] = OMIT, + received_from: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> None: """ - We recommend pinging this endpoint every minute for as long as the agent has to be considered online. + Sets the agent's status to online for 2-3 minutes. We recommend pinging this endpoint every minute for as long as the agent has to be considered online. You must provide either `agentId` alone, or all three of `agentEmail` + `agentName` + `receivedFrom`. Parameters ---------- - agent_email : typing.Optional[typing.Any] - agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically. + agent_email : typing.Optional[str] + Agent's email address. When sending online pings from a standalone system, it's hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there's no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically. - agent_id : typing.Optional[typing.Any] - agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + agent_id : typing.Optional[str] + Agent ID. It can be found on the agent's page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). - agent_name : typing.Optional[typing.Any] - agent name + agent_name : typing.Optional[str] + Agent's name. - received_from : typing.Optional[typing.Any] - mark your messages to distinguish messages created by you from the others. + received_from : typing.Optional[str] + Mark your messages to distinguish messages created by you from the others. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -498,32 +512,36 @@ async def main() -> None: async def send_a_message_as_an_agent( self, *, - text: typing.Any, - visitor_id: typing.Any, - agent_email: typing.Optional[typing.Any] = OMIT, - agent_id: typing.Optional[typing.Any] = OMIT, - agent_name: typing.Optional[typing.Any] = OMIT, - received_from: typing.Optional[typing.Any] = OMIT, + text: str, + visitor_id: str, + agent_email: typing.Optional[str] = OMIT, + agent_id: typing.Optional[str] = OMIT, + agent_name: typing.Optional[str] = OMIT, + received_from: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ConversationsMessage: """ + Send a message as an agent to an existing visitor's conversation. You must provide either `agentId` alone, or all three of `agentEmail` + `agentName` + `receivedFrom` to identify the agent. + Parameters ---------- - text : typing.Any + text : str + Message text. - visitor_id : typing.Any + visitor_id : str + Visitor's ID received from a webhook or generated by you to bind an existing user account to Conversations. - agent_email : typing.Optional[typing.Any] - agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. + agent_email : typing.Optional[str] + Agent's email address. When sending messages from a standalone system, it's hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. - agent_id : typing.Optional[typing.Any] - agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + agent_id : typing.Optional[str] + Agent ID. It can be found on the agent's page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). - agent_name : typing.Optional[typing.Any] - agent name + agent_name : typing.Optional[str] + Agent's name. - received_from : typing.Optional[typing.Any] - mark your messages to distinguish messages created by you from the others. + received_from : typing.Optional[str] + Mark your messages to distinguish messages created by you from the others. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -531,7 +549,7 @@ async def send_a_message_as_an_agent( Returns ------- ConversationsMessage - Newly created message is returned as a response + Newly created message is returned as a response. Examples -------- @@ -569,6 +587,8 @@ async def get_a_message( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> ConversationsMessage: """ + Retrieve a single message by its ID. + Parameters ---------- id : str @@ -580,7 +600,7 @@ async def get_a_message( Returns ------- ConversationsMessage - Requested message is returned as a response + Requested message is returned as a response. Examples -------- @@ -608,7 +628,7 @@ async def update_a_message_sent_by_an_agent( self, id: str, *, text: str, request_options: typing.Optional[RequestOptions] = None ) -> ConversationsMessage: """ - Only agents’ messages can be edited. + Update the text of a message sent by an agent. Only messages of type `agent` can be edited. The `text` and `html` fields of the message will be updated. Parameters ---------- @@ -616,7 +636,7 @@ async def update_a_message_sent_by_an_agent( ID of the message text : str - edited message text + The new message text. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -624,7 +644,7 @@ async def update_a_message_sent_by_an_agent( Returns ------- ConversationsMessage - Updated message is returned as a response + Updated message is returned as a response. Examples -------- @@ -655,7 +675,7 @@ async def delete_a_message_sent_by_an_agent( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ - Only agents’ messages can be deleted. + Delete a message sent by an agent. Only messages of type `agent` can be deleted. Parameters ---------- @@ -694,26 +714,28 @@ async def main() -> None: async def send_an_automated_message_to_a_visitor( self, *, - text: typing.Any, - visitor_id: typing.Any, - agent_id: typing.Optional[typing.Any] = OMIT, - group_id: typing.Optional[typing.Any] = OMIT, + text: str, + visitor_id: str, + agent_id: typing.Optional[str] = OMIT, + group_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ConversationsMessage: """ - Example of automated messages: order status, announce new features in your web app, etc. + Send an automated (pushed) message to a visitor on behalf of an agent. Example use cases: order status updates, announcing new features in your web app, etc. Parameters ---------- - text : typing.Any + text : str + Message text. - visitor_id : typing.Any + visitor_id : str + Visitor's ID received from a webhook or generated by you to bind an existing user account to Conversations. - agent_id : typing.Optional[typing.Any] - agent ID. It can be found on agent’s page or received from a webhook. + agent_id : typing.Optional[str] + Agent ID. It can be found on the agent's page or received from a webhook. - group_id : typing.Optional[typing.Any] - group ID. It can be found on group’s page. + group_id : typing.Optional[str] + Group ID. It can be found on the group's page. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -721,7 +743,7 @@ async def send_an_automated_message_to_a_visitor( Returns ------- ConversationsMessage - Newly created message is returned as a response + Newly created message is returned as a response. Examples -------- @@ -737,7 +759,7 @@ async def send_an_automated_message_to_a_visitor( async def main() -> None: await client.conversations.send_an_automated_message_to_a_visitor( group_id="PjRBMhWGen6aRHjif", - text="Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88", + text="Your order has shipped! Here's your tracking number: 9114 5847 3325 9667 4328 88", visitor_id="kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", ) @@ -753,6 +775,8 @@ async def get_an_automated_message( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> ConversationsMessage: """ + Retrieve a single automated (pushed) message by its ID. + Parameters ---------- id : str @@ -764,7 +788,7 @@ async def get_an_automated_message( Returns ------- ConversationsMessage - Requested message is returned as a response + Requested message is returned as a response. Examples -------- @@ -792,13 +816,15 @@ async def update_an_automated_message( self, id: str, *, text: str, request_options: typing.Optional[RequestOptions] = None ) -> ConversationsMessage: """ + Update the text of an automated (pushed) message. The `text` and `html` fields of the message will be updated. + Parameters ---------- id : str ID of the message text : str - edited message text + The new message text. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -806,7 +832,7 @@ async def update_an_automated_message( Returns ------- ConversationsMessage - Updated message is returned as a response + Updated message is returned as a response. Examples -------- @@ -822,7 +848,7 @@ async def update_an_automated_message( async def main() -> None: await client.conversations.update_an_automated_message( id="id", - text="Your order has shipped! Here’s your tracking number: 9114 5847 4668 7775 9233 54", + text="Your order has shipped! Here's your tracking number: 9114 5847 4668 7775 9233 54", ) @@ -835,6 +861,8 @@ async def delete_an_automated_message( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ + Delete an automated (pushed) message by its ID. + Parameters ---------- id : str diff --git a/src/brevo/conversations/raw_client.py b/src/brevo/conversations/raw_client.py index 74d76fd..df67d8c 100644 --- a/src/brevo/conversations/raw_client.py +++ b/src/brevo/conversations/raw_client.py @@ -27,28 +27,28 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def sets_agents_status_to_online_for23minutes( self, *, - agent_email: typing.Optional[typing.Any] = OMIT, - agent_id: typing.Optional[typing.Any] = OMIT, - agent_name: typing.Optional[typing.Any] = OMIT, - received_from: typing.Optional[typing.Any] = OMIT, + agent_email: typing.Optional[str] = OMIT, + agent_id: typing.Optional[str] = OMIT, + agent_name: typing.Optional[str] = OMIT, + received_from: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ - We recommend pinging this endpoint every minute for as long as the agent has to be considered online. + Sets the agent's status to online for 2-3 minutes. We recommend pinging this endpoint every minute for as long as the agent has to be considered online. You must provide either `agentId` alone, or all three of `agentEmail` + `agentName` + `receivedFrom`. Parameters ---------- - agent_email : typing.Optional[typing.Any] - agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically. + agent_email : typing.Optional[str] + Agent's email address. When sending online pings from a standalone system, it's hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there's no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically. - agent_id : typing.Optional[typing.Any] - agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + agent_id : typing.Optional[str] + Agent ID. It can be found on the agent's page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). - agent_name : typing.Optional[typing.Any] - agent name + agent_name : typing.Optional[str] + Agent's name. - received_from : typing.Optional[typing.Any] - mark your messages to distinguish messages created by you from the others. + received_from : typing.Optional[str] + Mark your messages to distinguish messages created by you from the others. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -98,32 +98,36 @@ def sets_agents_status_to_online_for23minutes( def send_a_message_as_an_agent( self, *, - text: typing.Any, - visitor_id: typing.Any, - agent_email: typing.Optional[typing.Any] = OMIT, - agent_id: typing.Optional[typing.Any] = OMIT, - agent_name: typing.Optional[typing.Any] = OMIT, - received_from: typing.Optional[typing.Any] = OMIT, + text: str, + visitor_id: str, + agent_email: typing.Optional[str] = OMIT, + agent_id: typing.Optional[str] = OMIT, + agent_name: typing.Optional[str] = OMIT, + received_from: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ConversationsMessage]: """ + Send a message as an agent to an existing visitor's conversation. You must provide either `agentId` alone, or all three of `agentEmail` + `agentName` + `receivedFrom` to identify the agent. + Parameters ---------- - text : typing.Any + text : str + Message text. - visitor_id : typing.Any + visitor_id : str + Visitor's ID received from a webhook or generated by you to bind an existing user account to Conversations. - agent_email : typing.Optional[typing.Any] - agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. + agent_email : typing.Optional[str] + Agent's email address. When sending messages from a standalone system, it's hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. - agent_id : typing.Optional[typing.Any] - agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + agent_id : typing.Optional[str] + Agent ID. It can be found on the agent's page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). - agent_name : typing.Optional[typing.Any] - agent name + agent_name : typing.Optional[str] + Agent's name. - received_from : typing.Optional[typing.Any] - mark your messages to distinguish messages created by you from the others. + received_from : typing.Optional[str] + Mark your messages to distinguish messages created by you from the others. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -131,7 +135,7 @@ def send_a_message_as_an_agent( Returns ------- HttpResponse[ConversationsMessage] - Newly created message is returned as a response + Newly created message is returned as a response. """ _response = self._client_wrapper.httpx_client.request( "conversations/messages", @@ -184,6 +188,8 @@ def get_a_message( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[ConversationsMessage]: """ + Retrieve a single message by its ID. + Parameters ---------- id : str @@ -195,7 +201,7 @@ def get_a_message( Returns ------- HttpResponse[ConversationsMessage] - Requested message is returned as a response + Requested message is returned as a response. """ _response = self._client_wrapper.httpx_client.request( f"conversations/messages/{jsonable_encoder(id)}", @@ -247,7 +253,7 @@ def update_a_message_sent_by_an_agent( self, id: str, *, text: str, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[ConversationsMessage]: """ - Only agents’ messages can be edited. + Update the text of a message sent by an agent. Only messages of type `agent` can be edited. The `text` and `html` fields of the message will be updated. Parameters ---------- @@ -255,7 +261,7 @@ def update_a_message_sent_by_an_agent( ID of the message text : str - edited message text + The new message text. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -263,7 +269,7 @@ def update_a_message_sent_by_an_agent( Returns ------- HttpResponse[ConversationsMessage] - Updated message is returned as a response + Updated message is returned as a response. """ _response = self._client_wrapper.httpx_client.request( f"conversations/messages/{jsonable_encoder(id)}", @@ -322,7 +328,7 @@ def delete_a_message_sent_by_an_agent( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ - Only agents’ messages can be deleted. + Delete a message sent by an agent. Only messages of type `agent` can be deleted. Parameters ---------- @@ -378,26 +384,28 @@ def delete_a_message_sent_by_an_agent( def send_an_automated_message_to_a_visitor( self, *, - text: typing.Any, - visitor_id: typing.Any, - agent_id: typing.Optional[typing.Any] = OMIT, - group_id: typing.Optional[typing.Any] = OMIT, + text: str, + visitor_id: str, + agent_id: typing.Optional[str] = OMIT, + group_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ConversationsMessage]: """ - Example of automated messages: order status, announce new features in your web app, etc. + Send an automated (pushed) message to a visitor on behalf of an agent. Example use cases: order status updates, announcing new features in your web app, etc. Parameters ---------- - text : typing.Any + text : str + Message text. - visitor_id : typing.Any + visitor_id : str + Visitor's ID received from a webhook or generated by you to bind an existing user account to Conversations. - agent_id : typing.Optional[typing.Any] - agent ID. It can be found on agent’s page or received from a webhook. + agent_id : typing.Optional[str] + Agent ID. It can be found on the agent's page or received from a webhook. - group_id : typing.Optional[typing.Any] - group ID. It can be found on group’s page. + group_id : typing.Optional[str] + Group ID. It can be found on the group's page. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -405,7 +413,7 @@ def send_an_automated_message_to_a_visitor( Returns ------- HttpResponse[ConversationsMessage] - Newly created message is returned as a response + Newly created message is returned as a response. """ _response = self._client_wrapper.httpx_client.request( "conversations/pushedMessages", @@ -456,6 +464,8 @@ def get_an_automated_message( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[ConversationsMessage]: """ + Retrieve a single automated (pushed) message by its ID. + Parameters ---------- id : str @@ -467,7 +477,7 @@ def get_an_automated_message( Returns ------- HttpResponse[ConversationsMessage] - Requested message is returned as a response + Requested message is returned as a response. """ _response = self._client_wrapper.httpx_client.request( f"conversations/pushedMessages/{jsonable_encoder(id)}", @@ -519,13 +529,15 @@ def update_an_automated_message( self, id: str, *, text: str, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[ConversationsMessage]: """ + Update the text of an automated (pushed) message. The `text` and `html` fields of the message will be updated. + Parameters ---------- id : str ID of the message text : str - edited message text + The new message text. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -533,7 +545,7 @@ def update_an_automated_message( Returns ------- HttpResponse[ConversationsMessage] - Updated message is returned as a response + Updated message is returned as a response. """ _response = self._client_wrapper.httpx_client.request( f"conversations/pushedMessages/{jsonable_encoder(id)}", @@ -592,6 +604,8 @@ def delete_an_automated_message( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ + Delete an automated (pushed) message by its ID. + Parameters ---------- id : str @@ -722,28 +736,28 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): async def sets_agents_status_to_online_for23minutes( self, *, - agent_email: typing.Optional[typing.Any] = OMIT, - agent_id: typing.Optional[typing.Any] = OMIT, - agent_name: typing.Optional[typing.Any] = OMIT, - received_from: typing.Optional[typing.Any] = OMIT, + agent_email: typing.Optional[str] = OMIT, + agent_id: typing.Optional[str] = OMIT, + agent_name: typing.Optional[str] = OMIT, + received_from: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ - We recommend pinging this endpoint every minute for as long as the agent has to be considered online. + Sets the agent's status to online for 2-3 minutes. We recommend pinging this endpoint every minute for as long as the agent has to be considered online. You must provide either `agentId` alone, or all three of `agentEmail` + `agentName` + `receivedFrom`. Parameters ---------- - agent_email : typing.Optional[typing.Any] - agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically. + agent_email : typing.Optional[str] + Agent's email address. When sending online pings from a standalone system, it's hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there's no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically. - agent_id : typing.Optional[typing.Any] - agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + agent_id : typing.Optional[str] + Agent ID. It can be found on the agent's page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). - agent_name : typing.Optional[typing.Any] - agent name + agent_name : typing.Optional[str] + Agent's name. - received_from : typing.Optional[typing.Any] - mark your messages to distinguish messages created by you from the others. + received_from : typing.Optional[str] + Mark your messages to distinguish messages created by you from the others. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -793,32 +807,36 @@ async def sets_agents_status_to_online_for23minutes( async def send_a_message_as_an_agent( self, *, - text: typing.Any, - visitor_id: typing.Any, - agent_email: typing.Optional[typing.Any] = OMIT, - agent_id: typing.Optional[typing.Any] = OMIT, - agent_name: typing.Optional[typing.Any] = OMIT, - received_from: typing.Optional[typing.Any] = OMIT, + text: str, + visitor_id: str, + agent_email: typing.Optional[str] = OMIT, + agent_id: typing.Optional[str] = OMIT, + agent_name: typing.Optional[str] = OMIT, + received_from: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ConversationsMessage]: """ + Send a message as an agent to an existing visitor's conversation. You must provide either `agentId` alone, or all three of `agentEmail` + `agentName` + `receivedFrom` to identify the agent. + Parameters ---------- - text : typing.Any + text : str + Message text. - visitor_id : typing.Any + visitor_id : str + Visitor's ID received from a webhook or generated by you to bind an existing user account to Conversations. - agent_email : typing.Optional[typing.Any] - agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. + agent_email : typing.Optional[str] + Agent's email address. When sending messages from a standalone system, it's hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. - agent_id : typing.Optional[typing.Any] - agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). + agent_id : typing.Optional[str] + Agent ID. It can be found on the agent's page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). - agent_name : typing.Optional[typing.Any] - agent name + agent_name : typing.Optional[str] + Agent's name. - received_from : typing.Optional[typing.Any] - mark your messages to distinguish messages created by you from the others. + received_from : typing.Optional[str] + Mark your messages to distinguish messages created by you from the others. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -826,7 +844,7 @@ async def send_a_message_as_an_agent( Returns ------- AsyncHttpResponse[ConversationsMessage] - Newly created message is returned as a response + Newly created message is returned as a response. """ _response = await self._client_wrapper.httpx_client.request( "conversations/messages", @@ -879,6 +897,8 @@ async def get_a_message( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[ConversationsMessage]: """ + Retrieve a single message by its ID. + Parameters ---------- id : str @@ -890,7 +910,7 @@ async def get_a_message( Returns ------- AsyncHttpResponse[ConversationsMessage] - Requested message is returned as a response + Requested message is returned as a response. """ _response = await self._client_wrapper.httpx_client.request( f"conversations/messages/{jsonable_encoder(id)}", @@ -942,7 +962,7 @@ async def update_a_message_sent_by_an_agent( self, id: str, *, text: str, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[ConversationsMessage]: """ - Only agents’ messages can be edited. + Update the text of a message sent by an agent. Only messages of type `agent` can be edited. The `text` and `html` fields of the message will be updated. Parameters ---------- @@ -950,7 +970,7 @@ async def update_a_message_sent_by_an_agent( ID of the message text : str - edited message text + The new message text. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -958,7 +978,7 @@ async def update_a_message_sent_by_an_agent( Returns ------- AsyncHttpResponse[ConversationsMessage] - Updated message is returned as a response + Updated message is returned as a response. """ _response = await self._client_wrapper.httpx_client.request( f"conversations/messages/{jsonable_encoder(id)}", @@ -1017,7 +1037,7 @@ async def delete_a_message_sent_by_an_agent( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ - Only agents’ messages can be deleted. + Delete a message sent by an agent. Only messages of type `agent` can be deleted. Parameters ---------- @@ -1073,26 +1093,28 @@ async def delete_a_message_sent_by_an_agent( async def send_an_automated_message_to_a_visitor( self, *, - text: typing.Any, - visitor_id: typing.Any, - agent_id: typing.Optional[typing.Any] = OMIT, - group_id: typing.Optional[typing.Any] = OMIT, + text: str, + visitor_id: str, + agent_id: typing.Optional[str] = OMIT, + group_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ConversationsMessage]: """ - Example of automated messages: order status, announce new features in your web app, etc. + Send an automated (pushed) message to a visitor on behalf of an agent. Example use cases: order status updates, announcing new features in your web app, etc. Parameters ---------- - text : typing.Any + text : str + Message text. - visitor_id : typing.Any + visitor_id : str + Visitor's ID received from a webhook or generated by you to bind an existing user account to Conversations. - agent_id : typing.Optional[typing.Any] - agent ID. It can be found on agent’s page or received from a webhook. + agent_id : typing.Optional[str] + Agent ID. It can be found on the agent's page or received from a webhook. - group_id : typing.Optional[typing.Any] - group ID. It can be found on group’s page. + group_id : typing.Optional[str] + Group ID. It can be found on the group's page. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1100,7 +1122,7 @@ async def send_an_automated_message_to_a_visitor( Returns ------- AsyncHttpResponse[ConversationsMessage] - Newly created message is returned as a response + Newly created message is returned as a response. """ _response = await self._client_wrapper.httpx_client.request( "conversations/pushedMessages", @@ -1151,6 +1173,8 @@ async def get_an_automated_message( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[ConversationsMessage]: """ + Retrieve a single automated (pushed) message by its ID. + Parameters ---------- id : str @@ -1162,7 +1186,7 @@ async def get_an_automated_message( Returns ------- AsyncHttpResponse[ConversationsMessage] - Requested message is returned as a response + Requested message is returned as a response. """ _response = await self._client_wrapper.httpx_client.request( f"conversations/pushedMessages/{jsonable_encoder(id)}", @@ -1214,13 +1238,15 @@ async def update_an_automated_message( self, id: str, *, text: str, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[ConversationsMessage]: """ + Update the text of an automated (pushed) message. The `text` and `html` fields of the message will be updated. + Parameters ---------- id : str ID of the message text : str - edited message text + The new message text. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1228,7 +1254,7 @@ async def update_an_automated_message( Returns ------- AsyncHttpResponse[ConversationsMessage] - Updated message is returned as a response + Updated message is returned as a response. """ _response = await self._client_wrapper.httpx_client.request( f"conversations/pushedMessages/{jsonable_encoder(id)}", @@ -1287,6 +1313,8 @@ async def delete_an_automated_message( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Delete an automated (pushed) message by its ID. + Parameters ---------- id : str diff --git a/src/brevo/core/client_wrapper.py b/src/brevo/core/client_wrapper.py index 8d7b089..9d24c09 100644 --- a/src/brevo/core/client_wrapper.py +++ b/src/brevo/core/client_wrapper.py @@ -27,12 +27,12 @@ def get_headers(self) -> typing.Dict[str, str]: import platform headers: typing.Dict[str, str] = { - "User-Agent": "brevo-python/4.0.10", + "User-Agent": "brevo-python/v5.0.0-rc.1", "X-Fern-Language": "Python", "X-Fern-Runtime": f"python/{platform.python_version()}", "X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}", "X-Fern-SDK-Name": "brevo-python", - "X-Fern-SDK-Version": "4.0.10", + "X-Fern-SDK-Version": "v5.0.0-rc.1", **(self.get_custom_headers() or {}), } headers["api-key"] = self.api_key diff --git a/src/brevo/coupons/client.py b/src/brevo/coupons/client.py index 2b19b58..176222c 100644 --- a/src/brevo/coupons/client.py +++ b/src/brevo/coupons/client.py @@ -41,6 +41,8 @@ def get_coupon_collections( request_options: typing.Optional[RequestOptions] = None, ) -> GetCouponCollection: """ + Retrieve a paginated list of all coupon collections in your Brevo account. Results can be sorted by creation date, remaining coupons count, or expiration date, in ascending or descending order. Pagination defaults to 50 collections per page (maximum 100). + Parameters ---------- limit : typing.Optional[int] @@ -88,6 +90,8 @@ def create_coupon_collection( request_options: typing.Optional[RequestOptions] = None, ) -> CreateCouponCollectionResponse: """ + Create a new coupon collection with a name and a default coupon value. You can optionally set an expiration date in RFC3339 format and configure alert thresholds to receive email notifications when remaining coupons or remaining days before expiration fall below a specified number. The collection ID is auto-generated as a UUID and returned in the response. + Parameters ---------- default_coupon : str @@ -139,6 +143,8 @@ def get_coupon_collection( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetCouponCollection: """ + Retrieve the details of a single coupon collection by its UUID. The response includes the collection name, default coupon value, total and remaining coupon counts, and creation timestamp. Returns a `404` error if no collection matches the provided ID. + Parameters ---------- id : str @@ -177,6 +183,8 @@ def update_coupon_collection( request_options: typing.Optional[RequestOptions] = None, ) -> UpdateCouponCollectionResponse: """ + Update an existing coupon collection by its UUID. You can modify the default coupon value, set or remove the expiration date (pass `null` to remove), and configure or disable alert thresholds for remaining coupons or remaining days. Only the fields included in the request body are updated; omitted fields remain unchanged. + Parameters ---------- id : str @@ -231,6 +239,8 @@ def create_coupons( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Add coupons to an existing coupon collection. The `coupons` array must contain between 1 and 10,000 unique coupon code strings, all associated with the specified `collectionId`. Coupon creation is processed asynchronously and a `204` status is returned immediately upon acceptance. Returns a `404` error if the specified coupon collection does not exist. + Parameters ---------- collection_id : str @@ -288,6 +298,8 @@ async def get_coupon_collections( request_options: typing.Optional[RequestOptions] = None, ) -> GetCouponCollection: """ + Retrieve a paginated list of all coupon collections in your Brevo account. Results can be sorted by creation date, remaining coupons count, or expiration date, in ascending or descending order. Pagination defaults to 50 collections per page (maximum 100). + Parameters ---------- limit : typing.Optional[int] @@ -343,6 +355,8 @@ async def create_coupon_collection( request_options: typing.Optional[RequestOptions] = None, ) -> CreateCouponCollectionResponse: """ + Create a new coupon collection with a name and a default coupon value. You can optionally set an expiration date in RFC3339 format and configure alert thresholds to receive email notifications when remaining coupons or remaining days before expiration fall below a specified number. The collection ID is auto-generated as a UUID and returned in the response. + Parameters ---------- default_coupon : str @@ -402,6 +416,8 @@ async def get_coupon_collection( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetCouponCollection: """ + Retrieve the details of a single coupon collection by its UUID. The response includes the collection name, default coupon value, total and remaining coupon counts, and creation timestamp. Returns a `404` error if no collection matches the provided ID. + Parameters ---------- id : str @@ -448,6 +464,8 @@ async def update_coupon_collection( request_options: typing.Optional[RequestOptions] = None, ) -> UpdateCouponCollectionResponse: """ + Update an existing coupon collection by its UUID. You can modify the default coupon value, set or remove the expiration date (pass `null` to remove), and configure or disable alert thresholds for remaining coupons or remaining days. Only the fields included in the request body are updated; omitted fields remain unchanged. + Parameters ---------- id : str @@ -510,6 +528,8 @@ async def create_coupons( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Add coupons to an existing coupon collection. The `coupons` array must contain between 1 and 10,000 unique coupon code strings, all associated with the specified `collectionId`. Coupon creation is processed asynchronously and a `204` status is returned immediately upon acceptance. Returns a `404` error if the specified coupon collection does not exist. + Parameters ---------- collection_id : str diff --git a/src/brevo/coupons/raw_client.py b/src/brevo/coupons/raw_client.py index 474a06c..33e476e 100644 --- a/src/brevo/coupons/raw_client.py +++ b/src/brevo/coupons/raw_client.py @@ -39,6 +39,8 @@ def get_coupon_collections( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetCouponCollection]: """ + Retrieve a paginated list of all coupon collections in your Brevo account. Results can be sorted by creation date, remaining coupons count, or expiration date, in ascending or descending order. Pagination defaults to 50 collections per page (maximum 100). + Parameters ---------- limit : typing.Optional[int] @@ -124,6 +126,8 @@ def create_coupon_collection( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreateCouponCollectionResponse]: """ + Create a new coupon collection with a name and a default coupon value. You can optionally set an expiration date in RFC3339 format and configure alert thresholds to receive email notifications when remaining coupons or remaining days before expiration fall below a specified number. The collection ID is auto-generated as a UUID and returned in the response. + Parameters ---------- default_coupon : str @@ -210,6 +214,8 @@ def get_coupon_collection( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[GetCouponCollection]: """ + Retrieve the details of a single coupon collection by its UUID. The response includes the collection name, default coupon value, total and remaining coupon counts, and creation timestamp. Returns a `404` error if no collection matches the provided ID. + Parameters ---------- id : str @@ -291,6 +297,8 @@ def update_coupon_collection( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[UpdateCouponCollectionResponse]: """ + Update an existing coupon collection by its UUID. You can modify the default coupon value, set or remove the expiration date (pass `null` to remove), and configure or disable alert thresholds for remaining coupons or remaining days. Only the fields included in the request body are updated; omitted fields remain unchanged. + Parameters ---------- id : str @@ -380,6 +388,8 @@ def create_coupons( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Add coupons to an existing coupon collection. The `coupons` array must contain between 1 and 10,000 unique coupon code strings, all associated with the specified `collectionId`. Coupon creation is processed asynchronously and a `204` status is returned immediately upon acceptance. Returns a `404` error if the specified coupon collection does not exist. + Parameters ---------- collection_id : str @@ -467,6 +477,8 @@ async def get_coupon_collections( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetCouponCollection]: """ + Retrieve a paginated list of all coupon collections in your Brevo account. Results can be sorted by creation date, remaining coupons count, or expiration date, in ascending or descending order. Pagination defaults to 50 collections per page (maximum 100). + Parameters ---------- limit : typing.Optional[int] @@ -552,6 +564,8 @@ async def create_coupon_collection( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreateCouponCollectionResponse]: """ + Create a new coupon collection with a name and a default coupon value. You can optionally set an expiration date in RFC3339 format and configure alert thresholds to receive email notifications when remaining coupons or remaining days before expiration fall below a specified number. The collection ID is auto-generated as a UUID and returned in the response. + Parameters ---------- default_coupon : str @@ -638,6 +652,8 @@ async def get_coupon_collection( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[GetCouponCollection]: """ + Retrieve the details of a single coupon collection by its UUID. The response includes the collection name, default coupon value, total and remaining coupon counts, and creation timestamp. Returns a `404` error if no collection matches the provided ID. + Parameters ---------- id : str @@ -719,6 +735,8 @@ async def update_coupon_collection( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[UpdateCouponCollectionResponse]: """ + Update an existing coupon collection by its UUID. You can modify the default coupon value, set or remove the expiration date (pass `null` to remove), and configure or disable alert thresholds for remaining coupons or remaining days. Only the fields included in the request body are updated; omitted fields remain unchanged. + Parameters ---------- id : str @@ -808,6 +826,8 @@ async def create_coupons( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Add coupons to an existing coupon collection. The `coupons` array must contain between 1 and 10,000 unique coupon code strings, all associated with the specified `collectionId`. Coupon creation is processed asynchronously and a `204` status is returned immediately upon acceptance. Returns a `404` error if the specified coupon collection does not exist. + Parameters ---------- collection_id : str diff --git a/src/brevo/custom_objects/__init__.py b/src/brevo/custom_objects/__init__.py index 17a7597..b7dd4bb 100644 --- a/src/brevo/custom_objects/__init__.py +++ b/src/brevo/custom_objects/__init__.py @@ -31,14 +31,9 @@ GetrecordsResponseRecordsItemIdentifiers, UpsertrecordsRequestRecordsItem, UpsertrecordsRequestRecordsItemAssociationsItem, - UpsertrecordsRequestRecordsItemAssociationsItemOne, - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItem, - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemOne, - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZero, - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZeroIdentifiers, - UpsertrecordsRequestRecordsItemAssociationsItemZero, - UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItem, - UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItemIdentifiers, + UpsertrecordsRequestRecordsItemAssociationsItemAction, + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem, + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers, UpsertrecordsRequestRecordsItemIdentifiers, UpsertrecordsResponse, ) @@ -67,14 +62,9 @@ "GetrecordsResponseRecordsItemIdentifiers": ".types", "UpsertrecordsRequestRecordsItem": ".types", "UpsertrecordsRequestRecordsItemAssociationsItem": ".types", - "UpsertrecordsRequestRecordsItemAssociationsItemOne": ".types", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItem": ".types", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemOne": ".types", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZero": ".types", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZeroIdentifiers": ".types", - "UpsertrecordsRequestRecordsItemAssociationsItemZero": ".types", - "UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItem": ".types", - "UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItemIdentifiers": ".types", + "UpsertrecordsRequestRecordsItemAssociationsItemAction": ".types", + "UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem": ".types", + "UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers": ".types", "UpsertrecordsRequestRecordsItemIdentifiers": ".types", "UpsertrecordsResponse": ".types", } @@ -126,14 +116,9 @@ def __dir__(): "GetrecordsResponseRecordsItemIdentifiers", "UpsertrecordsRequestRecordsItem", "UpsertrecordsRequestRecordsItemAssociationsItem", - "UpsertrecordsRequestRecordsItemAssociationsItemOne", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItem", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemOne", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZero", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZeroIdentifiers", - "UpsertrecordsRequestRecordsItemAssociationsItemZero", - "UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItem", - "UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItemIdentifiers", + "UpsertrecordsRequestRecordsItemAssociationsItemAction", + "UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem", + "UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers", "UpsertrecordsRequestRecordsItemIdentifiers", "UpsertrecordsResponse", ] diff --git a/src/brevo/custom_objects/client.py b/src/brevo/custom_objects/client.py index e60c8bc..ff4a289 100644 --- a/src/brevo/custom_objects/client.py +++ b/src/brevo/custom_objects/client.py @@ -42,29 +42,56 @@ def upsertrecords( """ Custom objects are only available to Enterprise plans. This feature is in beta. These are subject to change. - This API allows bulk upsert of object records in a single request. Each object record may include - - Attributes - - Identifiers - - Associations - **Response:** - The API processes the request asynchronously and returns a processId that you can use to track the background process status. - **API and Schema Limitation:** - - Size: - - Max 1000 objects records per request - - Max request body size: 1 MB - - Max 500 attributes defined per object record upsert request - - This is coherent with schema limitation: an object cannot have more than 500 attributes. - - Worth noting: Nothing happens If an attribute is mentioned in the request, but was not previously defined for the object schema (no error, no attribute creation) - - Max 10 associations defined per associated object type, in each record of the request - - This is not a schema limitation. You can associate an object record to an unlimited number of other object records by running multiple requests. + Performs bulk create or update (upsert) operations for object records in a single asynchronous request. This endpoint is optimized for high-volume data imports and synchronization scenarios. + + **How Upsert Works:** + - **Create**: Omit `identifiers`, or provide only `ext_id` (if it doesn't already exist). A new record is created with a Brevo-generated `id`. + - **Update**: Provide `id` (Brevo internal ID) or an `ext_id` that already exists. The matching record is updated with the new attribute values. + - **Important:** `id` is for **updates only**. Providing an `id` that does not belong to an existing record will fail during async processing (the HTTP response will still be 202, but the record will be rejected in the background). To create a new record with a stable external reference, use `ext_id` instead. + + **Request Structure:** + Each object record in the `records` array can include: + - `identifiers`: Either `id` (internal Brevo ID) or `ext_id` (your external system ID) β€” required for updates. **Note:** use `id` (singular), not `ids`. + - `attributes`: Key-value pairs where each key is the attribute **key** (e.g., `company_name`), not the attribute label (e.g., "Company Name"). + - `associations`: Controls linking and unlinking of associated records (optional). Each entry specifies: + - `object_type`: The type of the associated object + - `action`: `link` (default) to create the association, or `unlink` to remove it + - `records`: The associated records to link or unlink (each identified by `ext_id` or `id`) + - **Unlink is idempotent** β€” unlinking a non-existing association is a no-op (no error returned) + - `link` and `unlink` actions can be submitted for the same `object_type` in a single record entry + - Both associated records must already exist before a link can be created + + > **Common mistake:** Passing the attribute **label** (the display name you see in the UI) instead of the attribute **key** will cause the attribute to be silently ignored and the record may not be created as expected. + + **Asynchronous Processing:** + - Returns immediately with a `processId` (HTTP 202 Accepted) + - Use the processId to track status via the Get process API + + **API and Schema Limitations:** + - Max 1000 object records per request + - Max request body size: 1 MB + - Max 500 attributes per object record (matches the schema limit of 500 attributes per object) + - Unknown attribute keys are silently ignored (no error, no attribute creation) + - Max 10 association records per associated object-type in each record of the request. If you need more, send multiple requests. + + **Important Behaviors:** + - The object schema must be created before upserting records + - Unknown attribute keys are silently ignored (no error, no creation) + - Both associated object records must already exist before creating a link association + - Unlink operations are idempotent: attempting to unlink a non-existing association returns success + - `link` and `unlink` actions can be submitted for the same `object_type` in a single record entry + - Contact objects cannot be created via this endpoint + - For `category` and `multiple_category` attributes, pass the option **key** as the value (not the option label or option ID). + - The `id` identifier (internal Brevo ID) can only be used for **updating** existing records. To create new records, either omit identifiers (Brevo auto-generates an ID) or provide an `ext_id`. + **Errors:** - - Make sure both object records exist before associating them, else the API will return an error. - - This route does not create objects. The object where the object records are upserted by this API must be created already else the API will return an error "invalid object type". + - Make sure both object records exist before associating them, else the API will return an error. + - This route does not create objects. The object where the object records are upserted by this API must be created already else the API will return an error "invalid object type". Parameters ---------- object_type : str - object type for the attribute + Object type for the records to upsert. Must be a previously created custom object type. Only lowercase alphanumeric characters and underscores are allowed (max 32 characters). records : typing.Sequence[UpsertrecordsRequestRecordsItem] List of object records to be upsert. Each record can have attributes, identifiers, and associations. @@ -80,14 +107,56 @@ def upsertrecords( Examples -------- from brevo import Brevo - from brevo.custom_objects import UpsertrecordsRequestRecordsItem + from brevo.custom_objects import ( + UpsertrecordsRequestRecordsItem, + UpsertrecordsRequestRecordsItemAssociationsItem, + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem, + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers, + UpsertrecordsRequestRecordsItemIdentifiers, + ) client = Brevo( api_key="YOUR_API_KEY", ) client.custom_objects.upsertrecords( object_type="vehicle", - records=[UpsertrecordsRequestRecordsItem()], + records=[ + UpsertrecordsRequestRecordsItem( + associations=[ + UpsertrecordsRequestRecordsItemAssociationsItem( + object_type="garage", + action="link", + records=[ + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem( + identifiers=UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers( + id=435435, + ), + ) + ], + ), + UpsertrecordsRequestRecordsItemAssociationsItem( + object_type="garage", + action="unlink", + records=[ + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem( + identifiers=UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers( + ext_id="old-garage-001", + ), + ) + ], + ), + ], + attributes={ + "make": "Toyota", + "model": "Camry", + "year": 2020, + "engine_type": "hybrid", + }, + identifiers=UpsertrecordsRequestRecordsItemIdentifiers( + ext_id="VIN123", + ), + ) + ], ) """ _response = self._raw_client.upsertrecords(object_type, records=records, request_options=request_options) @@ -111,7 +180,7 @@ def getrecords( Parameters ---------- object_type : str - object type for the attribute + Object type for the records to retrieve. Must be a previously created custom object type. Contact as object type is not supported in this endpoint. limit : int Number of records returned per page @@ -165,8 +234,8 @@ def batch_delete_object_records( ) -> BatchDeleteObjectRecordsResponse: """ Use this endpoint to delete multiple object records of the same object-type in one request. - The request is accepted and processed asynchronously. You can track the status of the deletion process using the returned **processId**. - **API and Schema Limitations:** - Each request can contain up to **1000** object record identifiers - If more records must be deleted β†’ send multiple batch requests + The request is accepted and processed asynchronously. You can track the status of the deletion process using the returned **processId**. + **Limitations:** - Each request can contain up to **1000** object record identifiers - Either `ids` or `ext_ids` must be provided, but **not both** in the same request - Deletion of Brevo standard object records is not supported via this endpoint - If more records must be deleted, send multiple batch requests Parameters ---------- @@ -174,7 +243,7 @@ def batch_delete_object_records( Object type for the records to delete identifiers : typing.Optional[BatchDeleteObjectRecordsRequestIdentifiers] - One of the below must be provided + Either `ids` or `ext_ids` must be provided, but not both in the same request. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -232,29 +301,56 @@ async def upsertrecords( """ Custom objects are only available to Enterprise plans. This feature is in beta. These are subject to change. - This API allows bulk upsert of object records in a single request. Each object record may include - - Attributes - - Identifiers - - Associations - **Response:** - The API processes the request asynchronously and returns a processId that you can use to track the background process status. - **API and Schema Limitation:** - - Size: - - Max 1000 objects records per request - - Max request body size: 1 MB - - Max 500 attributes defined per object record upsert request - - This is coherent with schema limitation: an object cannot have more than 500 attributes. - - Worth noting: Nothing happens If an attribute is mentioned in the request, but was not previously defined for the object schema (no error, no attribute creation) - - Max 10 associations defined per associated object type, in each record of the request - - This is not a schema limitation. You can associate an object record to an unlimited number of other object records by running multiple requests. + Performs bulk create or update (upsert) operations for object records in a single asynchronous request. This endpoint is optimized for high-volume data imports and synchronization scenarios. + + **How Upsert Works:** + - **Create**: Omit `identifiers`, or provide only `ext_id` (if it doesn't already exist). A new record is created with a Brevo-generated `id`. + - **Update**: Provide `id` (Brevo internal ID) or an `ext_id` that already exists. The matching record is updated with the new attribute values. + - **Important:** `id` is for **updates only**. Providing an `id` that does not belong to an existing record will fail during async processing (the HTTP response will still be 202, but the record will be rejected in the background). To create a new record with a stable external reference, use `ext_id` instead. + + **Request Structure:** + Each object record in the `records` array can include: + - `identifiers`: Either `id` (internal Brevo ID) or `ext_id` (your external system ID) β€” required for updates. **Note:** use `id` (singular), not `ids`. + - `attributes`: Key-value pairs where each key is the attribute **key** (e.g., `company_name`), not the attribute label (e.g., "Company Name"). + - `associations`: Controls linking and unlinking of associated records (optional). Each entry specifies: + - `object_type`: The type of the associated object + - `action`: `link` (default) to create the association, or `unlink` to remove it + - `records`: The associated records to link or unlink (each identified by `ext_id` or `id`) + - **Unlink is idempotent** β€” unlinking a non-existing association is a no-op (no error returned) + - `link` and `unlink` actions can be submitted for the same `object_type` in a single record entry + - Both associated records must already exist before a link can be created + + > **Common mistake:** Passing the attribute **label** (the display name you see in the UI) instead of the attribute **key** will cause the attribute to be silently ignored and the record may not be created as expected. + + **Asynchronous Processing:** + - Returns immediately with a `processId` (HTTP 202 Accepted) + - Use the processId to track status via the Get process API + + **API and Schema Limitations:** + - Max 1000 object records per request + - Max request body size: 1 MB + - Max 500 attributes per object record (matches the schema limit of 500 attributes per object) + - Unknown attribute keys are silently ignored (no error, no attribute creation) + - Max 10 association records per associated object-type in each record of the request. If you need more, send multiple requests. + + **Important Behaviors:** + - The object schema must be created before upserting records + - Unknown attribute keys are silently ignored (no error, no creation) + - Both associated object records must already exist before creating a link association + - Unlink operations are idempotent: attempting to unlink a non-existing association returns success + - `link` and `unlink` actions can be submitted for the same `object_type` in a single record entry + - Contact objects cannot be created via this endpoint + - For `category` and `multiple_category` attributes, pass the option **key** as the value (not the option label or option ID). + - The `id` identifier (internal Brevo ID) can only be used for **updating** existing records. To create new records, either omit identifiers (Brevo auto-generates an ID) or provide an `ext_id`. + **Errors:** - - Make sure both object records exist before associating them, else the API will return an error. - - This route does not create objects. The object where the object records are upserted by this API must be created already else the API will return an error "invalid object type". + - Make sure both object records exist before associating them, else the API will return an error. + - This route does not create objects. The object where the object records are upserted by this API must be created already else the API will return an error "invalid object type". Parameters ---------- object_type : str - object type for the attribute + Object type for the records to upsert. Must be a previously created custom object type. Only lowercase alphanumeric characters and underscores are allowed (max 32 characters). records : typing.Sequence[UpsertrecordsRequestRecordsItem] List of object records to be upsert. Each record can have attributes, identifiers, and associations. @@ -272,7 +368,13 @@ async def upsertrecords( import asyncio from brevo import AsyncBrevo - from brevo.custom_objects import UpsertrecordsRequestRecordsItem + from brevo.custom_objects import ( + UpsertrecordsRequestRecordsItem, + UpsertrecordsRequestRecordsItemAssociationsItem, + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem, + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers, + UpsertrecordsRequestRecordsItemIdentifiers, + ) client = AsyncBrevo( api_key="YOUR_API_KEY", @@ -282,7 +384,43 @@ async def upsertrecords( async def main() -> None: await client.custom_objects.upsertrecords( object_type="vehicle", - records=[UpsertrecordsRequestRecordsItem()], + records=[ + UpsertrecordsRequestRecordsItem( + associations=[ + UpsertrecordsRequestRecordsItemAssociationsItem( + object_type="garage", + action="link", + records=[ + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem( + identifiers=UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers( + id=435435, + ), + ) + ], + ), + UpsertrecordsRequestRecordsItemAssociationsItem( + object_type="garage", + action="unlink", + records=[ + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem( + identifiers=UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers( + ext_id="old-garage-001", + ), + ) + ], + ), + ], + attributes={ + "make": "Toyota", + "model": "Camry", + "year": 2020, + "engine_type": "hybrid", + }, + identifiers=UpsertrecordsRequestRecordsItemIdentifiers( + ext_id="VIN123", + ), + ) + ], ) @@ -309,7 +447,7 @@ async def getrecords( Parameters ---------- object_type : str - object type for the attribute + Object type for the records to retrieve. Must be a previously created custom object type. Contact as object type is not supported in this endpoint. limit : int Number of records returned per page @@ -371,8 +509,8 @@ async def batch_delete_object_records( ) -> BatchDeleteObjectRecordsResponse: """ Use this endpoint to delete multiple object records of the same object-type in one request. - The request is accepted and processed asynchronously. You can track the status of the deletion process using the returned **processId**. - **API and Schema Limitations:** - Each request can contain up to **1000** object record identifiers - If more records must be deleted β†’ send multiple batch requests + The request is accepted and processed asynchronously. You can track the status of the deletion process using the returned **processId**. + **Limitations:** - Each request can contain up to **1000** object record identifiers - Either `ids` or `ext_ids` must be provided, but **not both** in the same request - Deletion of Brevo standard object records is not supported via this endpoint - If more records must be deleted, send multiple batch requests Parameters ---------- @@ -380,7 +518,7 @@ async def batch_delete_object_records( Object type for the records to delete identifiers : typing.Optional[BatchDeleteObjectRecordsRequestIdentifiers] - One of the below must be provided + Either `ids` or `ext_ids` must be provided, but not both in the same request. request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/src/brevo/custom_objects/raw_client.py b/src/brevo/custom_objects/raw_client.py index 9c6201f..8dce55b 100644 --- a/src/brevo/custom_objects/raw_client.py +++ b/src/brevo/custom_objects/raw_client.py @@ -43,29 +43,56 @@ def upsertrecords( """ Custom objects are only available to Enterprise plans. This feature is in beta. These are subject to change. - This API allows bulk upsert of object records in a single request. Each object record may include - - Attributes - - Identifiers - - Associations - **Response:** - The API processes the request asynchronously and returns a processId that you can use to track the background process status. - **API and Schema Limitation:** - - Size: - - Max 1000 objects records per request - - Max request body size: 1 MB - - Max 500 attributes defined per object record upsert request - - This is coherent with schema limitation: an object cannot have more than 500 attributes. - - Worth noting: Nothing happens If an attribute is mentioned in the request, but was not previously defined for the object schema (no error, no attribute creation) - - Max 10 associations defined per associated object type, in each record of the request - - This is not a schema limitation. You can associate an object record to an unlimited number of other object records by running multiple requests. + Performs bulk create or update (upsert) operations for object records in a single asynchronous request. This endpoint is optimized for high-volume data imports and synchronization scenarios. + + **How Upsert Works:** + - **Create**: Omit `identifiers`, or provide only `ext_id` (if it doesn't already exist). A new record is created with a Brevo-generated `id`. + - **Update**: Provide `id` (Brevo internal ID) or an `ext_id` that already exists. The matching record is updated with the new attribute values. + - **Important:** `id` is for **updates only**. Providing an `id` that does not belong to an existing record will fail during async processing (the HTTP response will still be 202, but the record will be rejected in the background). To create a new record with a stable external reference, use `ext_id` instead. + + **Request Structure:** + Each object record in the `records` array can include: + - `identifiers`: Either `id` (internal Brevo ID) or `ext_id` (your external system ID) β€” required for updates. **Note:** use `id` (singular), not `ids`. + - `attributes`: Key-value pairs where each key is the attribute **key** (e.g., `company_name`), not the attribute label (e.g., "Company Name"). + - `associations`: Controls linking and unlinking of associated records (optional). Each entry specifies: + - `object_type`: The type of the associated object + - `action`: `link` (default) to create the association, or `unlink` to remove it + - `records`: The associated records to link or unlink (each identified by `ext_id` or `id`) + - **Unlink is idempotent** β€” unlinking a non-existing association is a no-op (no error returned) + - `link` and `unlink` actions can be submitted for the same `object_type` in a single record entry + - Both associated records must already exist before a link can be created + + > **Common mistake:** Passing the attribute **label** (the display name you see in the UI) instead of the attribute **key** will cause the attribute to be silently ignored and the record may not be created as expected. + + **Asynchronous Processing:** + - Returns immediately with a `processId` (HTTP 202 Accepted) + - Use the processId to track status via the Get process API + + **API and Schema Limitations:** + - Max 1000 object records per request + - Max request body size: 1 MB + - Max 500 attributes per object record (matches the schema limit of 500 attributes per object) + - Unknown attribute keys are silently ignored (no error, no attribute creation) + - Max 10 association records per associated object-type in each record of the request. If you need more, send multiple requests. + + **Important Behaviors:** + - The object schema must be created before upserting records + - Unknown attribute keys are silently ignored (no error, no creation) + - Both associated object records must already exist before creating a link association + - Unlink operations are idempotent: attempting to unlink a non-existing association returns success + - `link` and `unlink` actions can be submitted for the same `object_type` in a single record entry + - Contact objects cannot be created via this endpoint + - For `category` and `multiple_category` attributes, pass the option **key** as the value (not the option label or option ID). + - The `id` identifier (internal Brevo ID) can only be used for **updating** existing records. To create new records, either omit identifiers (Brevo auto-generates an ID) or provide an `ext_id`. + **Errors:** - - Make sure both object records exist before associating them, else the API will return an error. - - This route does not create objects. The object where the object records are upserted by this API must be created already else the API will return an error "invalid object type". + - Make sure both object records exist before associating them, else the API will return an error. + - This route does not create objects. The object where the object records are upserted by this API must be created already else the API will return an error "invalid object type". Parameters ---------- object_type : str - object type for the attribute + Object type for the records to upsert. Must be a previously created custom object type. Only lowercase alphanumeric characters and underscores are allowed (max 32 characters). records : typing.Sequence[UpsertrecordsRequestRecordsItem] List of object records to be upsert. Each record can have attributes, identifiers, and associations. @@ -173,7 +200,7 @@ def getrecords( Parameters ---------- object_type : str - object type for the attribute + Object type for the records to retrieve. Must be a previously created custom object type. Contact as object type is not supported in this endpoint. limit : int Number of records returned per page @@ -278,8 +305,8 @@ def batch_delete_object_records( ) -> HttpResponse[BatchDeleteObjectRecordsResponse]: """ Use this endpoint to delete multiple object records of the same object-type in one request. - The request is accepted and processed asynchronously. You can track the status of the deletion process using the returned **processId**. - **API and Schema Limitations:** - Each request can contain up to **1000** object record identifiers - If more records must be deleted β†’ send multiple batch requests + The request is accepted and processed asynchronously. You can track the status of the deletion process using the returned **processId**. + **Limitations:** - Each request can contain up to **1000** object record identifiers - Either `ids` or `ext_ids` must be provided, but **not both** in the same request - Deletion of Brevo standard object records is not supported via this endpoint - If more records must be deleted, send multiple batch requests Parameters ---------- @@ -287,7 +314,7 @@ def batch_delete_object_records( Object type for the records to delete identifiers : typing.Optional[BatchDeleteObjectRecordsRequestIdentifiers] - One of the below must be provided + Either `ids` or `ext_ids` must be provided, but not both in the same request. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -343,17 +370,6 @@ def batch_delete_object_records( ), ), ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - construct_type( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) if _response.status_code == 500: raise InternalServerError( headers=dict(_response.headers), @@ -389,29 +405,56 @@ async def upsertrecords( """ Custom objects are only available to Enterprise plans. This feature is in beta. These are subject to change. - This API allows bulk upsert of object records in a single request. Each object record may include - - Attributes - - Identifiers - - Associations - **Response:** - The API processes the request asynchronously and returns a processId that you can use to track the background process status. - **API and Schema Limitation:** - - Size: - - Max 1000 objects records per request - - Max request body size: 1 MB - - Max 500 attributes defined per object record upsert request - - This is coherent with schema limitation: an object cannot have more than 500 attributes. - - Worth noting: Nothing happens If an attribute is mentioned in the request, but was not previously defined for the object schema (no error, no attribute creation) - - Max 10 associations defined per associated object type, in each record of the request - - This is not a schema limitation. You can associate an object record to an unlimited number of other object records by running multiple requests. + Performs bulk create or update (upsert) operations for object records in a single asynchronous request. This endpoint is optimized for high-volume data imports and synchronization scenarios. + + **How Upsert Works:** + - **Create**: Omit `identifiers`, or provide only `ext_id` (if it doesn't already exist). A new record is created with a Brevo-generated `id`. + - **Update**: Provide `id` (Brevo internal ID) or an `ext_id` that already exists. The matching record is updated with the new attribute values. + - **Important:** `id` is for **updates only**. Providing an `id` that does not belong to an existing record will fail during async processing (the HTTP response will still be 202, but the record will be rejected in the background). To create a new record with a stable external reference, use `ext_id` instead. + + **Request Structure:** + Each object record in the `records` array can include: + - `identifiers`: Either `id` (internal Brevo ID) or `ext_id` (your external system ID) β€” required for updates. **Note:** use `id` (singular), not `ids`. + - `attributes`: Key-value pairs where each key is the attribute **key** (e.g., `company_name`), not the attribute label (e.g., "Company Name"). + - `associations`: Controls linking and unlinking of associated records (optional). Each entry specifies: + - `object_type`: The type of the associated object + - `action`: `link` (default) to create the association, or `unlink` to remove it + - `records`: The associated records to link or unlink (each identified by `ext_id` or `id`) + - **Unlink is idempotent** β€” unlinking a non-existing association is a no-op (no error returned) + - `link` and `unlink` actions can be submitted for the same `object_type` in a single record entry + - Both associated records must already exist before a link can be created + + > **Common mistake:** Passing the attribute **label** (the display name you see in the UI) instead of the attribute **key** will cause the attribute to be silently ignored and the record may not be created as expected. + + **Asynchronous Processing:** + - Returns immediately with a `processId` (HTTP 202 Accepted) + - Use the processId to track status via the Get process API + + **API and Schema Limitations:** + - Max 1000 object records per request + - Max request body size: 1 MB + - Max 500 attributes per object record (matches the schema limit of 500 attributes per object) + - Unknown attribute keys are silently ignored (no error, no attribute creation) + - Max 10 association records per associated object-type in each record of the request. If you need more, send multiple requests. + + **Important Behaviors:** + - The object schema must be created before upserting records + - Unknown attribute keys are silently ignored (no error, no creation) + - Both associated object records must already exist before creating a link association + - Unlink operations are idempotent: attempting to unlink a non-existing association returns success + - `link` and `unlink` actions can be submitted for the same `object_type` in a single record entry + - Contact objects cannot be created via this endpoint + - For `category` and `multiple_category` attributes, pass the option **key** as the value (not the option label or option ID). + - The `id` identifier (internal Brevo ID) can only be used for **updating** existing records. To create new records, either omit identifiers (Brevo auto-generates an ID) or provide an `ext_id`. + **Errors:** - - Make sure both object records exist before associating them, else the API will return an error. - - This route does not create objects. The object where the object records are upserted by this API must be created already else the API will return an error "invalid object type". + - Make sure both object records exist before associating them, else the API will return an error. + - This route does not create objects. The object where the object records are upserted by this API must be created already else the API will return an error "invalid object type". Parameters ---------- object_type : str - object type for the attribute + Object type for the records to upsert. Must be a previously created custom object type. Only lowercase alphanumeric characters and underscores are allowed (max 32 characters). records : typing.Sequence[UpsertrecordsRequestRecordsItem] List of object records to be upsert. Each record can have attributes, identifiers, and associations. @@ -519,7 +562,7 @@ async def getrecords( Parameters ---------- object_type : str - object type for the attribute + Object type for the records to retrieve. Must be a previously created custom object type. Contact as object type is not supported in this endpoint. limit : int Number of records returned per page @@ -624,8 +667,8 @@ async def batch_delete_object_records( ) -> AsyncHttpResponse[BatchDeleteObjectRecordsResponse]: """ Use this endpoint to delete multiple object records of the same object-type in one request. - The request is accepted and processed asynchronously. You can track the status of the deletion process using the returned **processId**. - **API and Schema Limitations:** - Each request can contain up to **1000** object record identifiers - If more records must be deleted β†’ send multiple batch requests + The request is accepted and processed asynchronously. You can track the status of the deletion process using the returned **processId**. + **Limitations:** - Each request can contain up to **1000** object record identifiers - Either `ids` or `ext_ids` must be provided, but **not both** in the same request - Deletion of Brevo standard object records is not supported via this endpoint - If more records must be deleted, send multiple batch requests Parameters ---------- @@ -633,7 +676,7 @@ async def batch_delete_object_records( Object type for the records to delete identifiers : typing.Optional[BatchDeleteObjectRecordsRequestIdentifiers] - One of the below must be provided + Either `ids` or `ext_ids` must be provided, but not both in the same request. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -689,17 +732,6 @@ async def batch_delete_object_records( ), ), ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - construct_type( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) if _response.status_code == 500: raise InternalServerError( headers=dict(_response.headers), diff --git a/src/brevo/custom_objects/types/__init__.py b/src/brevo/custom_objects/types/__init__.py index 9b69374..a293d7e 100644 --- a/src/brevo/custom_objects/types/__init__.py +++ b/src/brevo/custom_objects/types/__init__.py @@ -54,29 +54,14 @@ from .getrecords_response_records_item_identifiers import GetrecordsResponseRecordsItemIdentifiers from .upsertrecords_request_records_item import UpsertrecordsRequestRecordsItem from .upsertrecords_request_records_item_associations_item import UpsertrecordsRequestRecordsItemAssociationsItem - from .upsertrecords_request_records_item_associations_item_one import ( - UpsertrecordsRequestRecordsItemAssociationsItemOne, + from .upsertrecords_request_records_item_associations_item_action import ( + UpsertrecordsRequestRecordsItemAssociationsItemAction, ) - from .upsertrecords_request_records_item_associations_item_one_records_item import ( - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItem, + from .upsertrecords_request_records_item_associations_item_records_item import ( + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem, ) - from .upsertrecords_request_records_item_associations_item_one_records_item_one import ( - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemOne, - ) - from .upsertrecords_request_records_item_associations_item_one_records_item_zero import ( - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZero, - ) - from .upsertrecords_request_records_item_associations_item_one_records_item_zero_identifiers import ( - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZeroIdentifiers, - ) - from .upsertrecords_request_records_item_associations_item_zero import ( - UpsertrecordsRequestRecordsItemAssociationsItemZero, - ) - from .upsertrecords_request_records_item_associations_item_zero_records_item import ( - UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItem, - ) - from .upsertrecords_request_records_item_associations_item_zero_records_item_identifiers import ( - UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItemIdentifiers, + from .upsertrecords_request_records_item_associations_item_records_item_identifiers import ( + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers, ) from .upsertrecords_request_records_item_identifiers import UpsertrecordsRequestRecordsItemIdentifiers from .upsertrecords_response import UpsertrecordsResponse @@ -105,14 +90,9 @@ "GetrecordsResponseRecordsItemIdentifiers": ".getrecords_response_records_item_identifiers", "UpsertrecordsRequestRecordsItem": ".upsertrecords_request_records_item", "UpsertrecordsRequestRecordsItemAssociationsItem": ".upsertrecords_request_records_item_associations_item", - "UpsertrecordsRequestRecordsItemAssociationsItemOne": ".upsertrecords_request_records_item_associations_item_one", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItem": ".upsertrecords_request_records_item_associations_item_one_records_item", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemOne": ".upsertrecords_request_records_item_associations_item_one_records_item_one", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZero": ".upsertrecords_request_records_item_associations_item_one_records_item_zero", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZeroIdentifiers": ".upsertrecords_request_records_item_associations_item_one_records_item_zero_identifiers", - "UpsertrecordsRequestRecordsItemAssociationsItemZero": ".upsertrecords_request_records_item_associations_item_zero", - "UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItem": ".upsertrecords_request_records_item_associations_item_zero_records_item", - "UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItemIdentifiers": ".upsertrecords_request_records_item_associations_item_zero_records_item_identifiers", + "UpsertrecordsRequestRecordsItemAssociationsItemAction": ".upsertrecords_request_records_item_associations_item_action", + "UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem": ".upsertrecords_request_records_item_associations_item_records_item", + "UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers": ".upsertrecords_request_records_item_associations_item_records_item_identifiers", "UpsertrecordsRequestRecordsItemIdentifiers": ".upsertrecords_request_records_item_identifiers", "UpsertrecordsResponse": ".upsertrecords_response", } @@ -164,14 +144,9 @@ def __dir__(): "GetrecordsResponseRecordsItemIdentifiers", "UpsertrecordsRequestRecordsItem", "UpsertrecordsRequestRecordsItemAssociationsItem", - "UpsertrecordsRequestRecordsItemAssociationsItemOne", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItem", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemOne", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZero", - "UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZeroIdentifiers", - "UpsertrecordsRequestRecordsItemAssociationsItemZero", - "UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItem", - "UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItemIdentifiers", + "UpsertrecordsRequestRecordsItemAssociationsItemAction", + "UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem", + "UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers", "UpsertrecordsRequestRecordsItemIdentifiers", "UpsertrecordsResponse", ] diff --git a/src/brevo/custom_objects/types/getrecords_response_records_item.py b/src/brevo/custom_objects/types/getrecords_response_records_item.py index 7f97e54..25b2b4d 100644 --- a/src/brevo/custom_objects/types/getrecords_response_records_item.py +++ b/src/brevo/custom_objects/types/getrecords_response_records_item.py @@ -22,7 +22,8 @@ class GetrecordsResponseRecordsItem(UncheckedBaseModel): attributes: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) """ - Attributes attached with the object record. Only the already created attributes will be used with records. Minimum 1 attribute is required. + Key-value pairs of attribute data for the object record. Each key is the attribute **key** (e.g., `company_name`, `engine_type`), not the attribute label (e.g., "Company Name", "Engine Type"). Only attributes that already exist in the object schema will be present. + For `category` or `multiple_category` attributes, the value is the option **key** (not the option label or option ID). """ created_at: typing_extensions.Annotated[ @@ -32,7 +33,9 @@ class GetrecordsResponseRecordsItem(UncheckedBaseModel): ] = None identifiers: typing.Optional[GetrecordsResponseRecordsItemIdentifiers] = pydantic.Field(default=None) """ - Identifiers attached with the object record. It can have id or ext_id. ext_id is ID of record in the external system that client want to store in the object system, id is an internal ID of object record generated by Brevo system. + Identifiers for the object record. Supports `id` (singular, not `ids`) or `ext_id`. + - `ext_id`: Your external system's identifier for this record. + - `id`: Internal Brevo record ID. """ updated_at: typing_extensions.Annotated[ diff --git a/src/brevo/custom_objects/types/getrecords_response_records_item_identifiers.py b/src/brevo/custom_objects/types/getrecords_response_records_item_identifiers.py index 42abd91..30cf471 100644 --- a/src/brevo/custom_objects/types/getrecords_response_records_item_identifiers.py +++ b/src/brevo/custom_objects/types/getrecords_response_records_item_identifiers.py @@ -9,17 +9,19 @@ class GetrecordsResponseRecordsItemIdentifiers(UncheckedBaseModel): """ - Identifiers attached with the object record. It can have id or ext_id. ext_id is ID of record in the external system that client want to store in the object system, id is an internal ID of object record generated by Brevo system. + Identifiers for the object record. Supports `id` (singular, not `ids`) or `ext_id`. + - `ext_id`: Your external system's identifier for this record. + - `id`: Internal Brevo record ID. """ ext_id: typing.Optional[str] = pydantic.Field(default=None) """ - ext_id is ID of record in the external system that client_dev want to store in the object system. + External ID of the record in your system. """ id: typing.Optional[int] = pydantic.Field(default=None) """ - Internal ID of the object record generated by Brevo + Internal ID of the object record generated by Brevo. """ if IS_PYDANTIC_V2: diff --git a/src/brevo/custom_objects/types/upsertrecords_request_records_item.py b/src/brevo/custom_objects/types/upsertrecords_request_records_item.py index 151d903..d97c297 100644 --- a/src/brevo/custom_objects/types/upsertrecords_request_records_item.py +++ b/src/brevo/custom_objects/types/upsertrecords_request_records_item.py @@ -10,15 +10,32 @@ class UpsertrecordsRequestRecordsItem(UncheckedBaseModel): - associations: typing.Optional[typing.List[UpsertrecordsRequestRecordsItemAssociationsItem]] = None + associations: typing.Optional[typing.List[UpsertrecordsRequestRecordsItemAssociationsItem]] = pydantic.Field( + default=None + ) + """ + List of associations for the object record. Maximum 20 total entries allowed, with a maximum of 10 link actions and 10 unlink actions. Each entry specifies an object_type and an action (link or unlink). Unlink is idempotent β€” removing a non-existing association does not return an error. Both associated records must already exist before creating a link. + """ + attributes: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) """ - Attributes attached with the object record. Only the already created attributes will be used with records. Pass the value with the attributes key you want to set or update for the object record. Minimum 1 attribute is required. + Key-value pairs of attribute data for the object record. Each key must be the attribute **key** (e.g., `company_name`, `engine_type`), not the attribute label (e.g., "Company Name", "Engine Type"). Only attributes that already exist in the object schema will be accepted β€” unknown keys are silently ignored. Minimum 1 attribute is required. + + For `category` or `multiple_category` attributes, set the value to the option **key** (not the option label or option ID). You can find available option keys in the `options` array returned by the GET attributes endpoint, or in the frontend under each attribute's settings. + + For example, use the option key "hybrid" not the label "Hybrid" β€” using the label will be silently ignored. + + For `multiple_choice` type, pass an **array of option keys** (not display labels). For example, if options have keys `"sunroof"` and `"leather_seats"`, pass `["sunroof", "leather_seats"]`. """ identifiers: typing.Optional[UpsertrecordsRequestRecordsItemIdentifiers] = pydantic.Field(default=None) """ - Identifiers attached with the object record. It can have id or ext_id. ext_id is ID of record in the external system that client want to store in the object system, id is an internal ID of object record generated by Brevo system. NOTE: - Its an optional field, if identifier is not provided, then id of object records will be generated by Brevo. This id can be used for further operation with the object record. - Both ext_id and id cannot be provided in the same request. + Identifiers for the object record. Supports `id` (singular, not `ids`) or `ext_id`. + - `ext_id`: Your external system's identifier for this record. + - `id`: Internal Brevo record ID β€” can only be used for **updating** existing records, not for creation. + NOTE: + - This is an optional field. If no identifier is provided, Brevo auto-generates an internal ID that you can use for future operations. + - If both `ext_id` and `id` are provided, `id` takes precedence and the operation is treated as an update. It is recommended to provide only one identifier per record. """ if IS_PYDANTIC_V2: diff --git a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item.py b/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item.py index 64ebc4c..b3e7b3a 100644 --- a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item.py +++ b/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item.py @@ -2,11 +2,35 @@ import typing -from .upsertrecords_request_records_item_associations_item_one import UpsertrecordsRequestRecordsItemAssociationsItemOne -from .upsertrecords_request_records_item_associations_item_zero import ( - UpsertrecordsRequestRecordsItemAssociationsItemZero, +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.unchecked_base_model import UncheckedBaseModel +from .upsertrecords_request_records_item_associations_item_action import ( + UpsertrecordsRequestRecordsItemAssociationsItemAction, ) +from .upsertrecords_request_records_item_associations_item_records_item import ( + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem, +) + + +class UpsertrecordsRequestRecordsItemAssociationsItem(UncheckedBaseModel): + object_type: str = pydantic.Field() + """ + Type of the associated object + """ + + action: typing.Optional[UpsertrecordsRequestRecordsItemAssociationsItemAction] = pydantic.Field(default=None) + """ + Action to perform on the association. - `link`: Create association between records (default if not provided) - `unlink`: Remove association between records. Idempotent β€” unlinking a non-existing association is a no-op success. + """ + + records: typing.List[UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: -UpsertrecordsRequestRecordsItemAssociationsItem = typing.Union[ - UpsertrecordsRequestRecordsItemAssociationsItemZero, UpsertrecordsRequestRecordsItemAssociationsItemOne -] + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_action.py b/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_action.py new file mode 100644 index 0000000..2400de9 --- /dev/null +++ b/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_action.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpsertrecordsRequestRecordsItemAssociationsItemAction = typing.Union[typing.Literal["link", "unlink"], typing.Any] diff --git a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one.py b/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one.py deleted file mode 100644 index 2530883..0000000 --- a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ...core.pydantic_utilities import IS_PYDANTIC_V2 -from ...core.unchecked_base_model import UncheckedBaseModel -from .upsertrecords_request_records_item_associations_item_one_records_item import ( - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItem, -) - - -class UpsertrecordsRequestRecordsItemAssociationsItemOne(UncheckedBaseModel): - object_type: typing.Optional[str] = pydantic.Field(default=None) - """ - Type of the associated object - """ - - records: typing.Optional[typing.List[UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItem]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item.py b/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item.py deleted file mode 100644 index 718b141..0000000 --- a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .upsertrecords_request_records_item_associations_item_one_records_item_one import ( - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemOne, -) -from .upsertrecords_request_records_item_associations_item_one_records_item_zero import ( - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZero, -) - -UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItem = typing.Union[ - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZero, - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemOne, -] diff --git a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_zero.py b/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_zero.py deleted file mode 100644 index dc07d72..0000000 --- a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_zero.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ...core.pydantic_utilities import IS_PYDANTIC_V2 -from ...core.unchecked_base_model import UncheckedBaseModel -from .upsertrecords_request_records_item_associations_item_one_records_item_zero_identifiers import ( - UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZeroIdentifiers, -) - - -class UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZero(UncheckedBaseModel): - identifiers: typing.Optional[UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZeroIdentifiers] = ( - pydantic.Field(default=None) - ) - """ - Identifiers attached with the associated object record. It can be ext_id or id. NOTE: - Either ext_id or id is required, if both are not provided, then error will be returned. - Both ext_id and id cannot be provided in the same request. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_zero_identifiers.py b/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_zero_identifiers.py deleted file mode 100644 index 9ae5150..0000000 --- a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_zero_identifiers.py +++ /dev/null @@ -1,32 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ...core.pydantic_utilities import IS_PYDANTIC_V2 -from ...core.unchecked_base_model import UncheckedBaseModel - - -class UpsertrecordsRequestRecordsItemAssociationsItemOneRecordsItemZeroIdentifiers(UncheckedBaseModel): - """ - Identifiers attached with the associated object record. It can be ext_id or id. NOTE: - Either ext_id or id is required, if both are not provided, then error will be returned. - Both ext_id and id cannot be provided in the same request. - """ - - ext_id: typing.Optional[str] = pydantic.Field(default=None) - """ - ext_id is ID of record in the external system that client_dev want to store in the object system. - """ - - id: typing.Optional[int] = pydantic.Field(default=None) - """ - Internal ID of the object record generated by Brevo - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero_records_item.py b/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_records_item.py similarity index 56% rename from src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero_records_item.py rename to src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_records_item.py index a037621..6694092 100644 --- a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero_records_item.py +++ b/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_records_item.py @@ -5,13 +5,18 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2 from ...core.unchecked_base_model import UncheckedBaseModel -from .upsertrecords_request_records_item_associations_item_zero_records_item_identifiers import ( - UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItemIdentifiers, +from .upsertrecords_request_records_item_associations_item_records_item_identifiers import ( + UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers, ) -class UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItem(UncheckedBaseModel): - identifiers: typing.Optional[UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItemIdentifiers] = None +class UpsertrecordsRequestRecordsItemAssociationsItemRecordsItem(UncheckedBaseModel): + identifiers: typing.Optional[UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers] = ( + pydantic.Field(default=None) + ) + """ + Identifiers for the associated object record. Provide either `ext_id` or `id`. + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero_records_item_identifiers.py b/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_records_item_identifiers.py similarity index 67% rename from src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero_records_item_identifiers.py rename to src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_records_item_identifiers.py index 92c4e9e..7177c38 100644 --- a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero_records_item_identifiers.py +++ b/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_records_item_identifiers.py @@ -7,15 +7,19 @@ from ...core.unchecked_base_model import UncheckedBaseModel -class UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItemIdentifiers(UncheckedBaseModel): +class UpsertrecordsRequestRecordsItemAssociationsItemRecordsItemIdentifiers(UncheckedBaseModel): + """ + Identifiers for the associated object record. Provide either `ext_id` or `id`. + """ + ext_id: typing.Optional[str] = pydantic.Field(default=None) """ - ext_id is ID of record in the external system that client_dev want to store in the object system. + External ID of the associated record in your system. """ id: typing.Optional[int] = pydantic.Field(default=None) """ - Internal ID of the object record generated by Brevo + Internal ID of the associated object record generated by Brevo. """ if IS_PYDANTIC_V2: diff --git a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero.py b/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero.py deleted file mode 100644 index b2b870b..0000000 --- a/src/brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ...core.pydantic_utilities import IS_PYDANTIC_V2 -from ...core.unchecked_base_model import UncheckedBaseModel -from .upsertrecords_request_records_item_associations_item_zero_records_item import ( - UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItem, -) - - -class UpsertrecordsRequestRecordsItemAssociationsItemZero(UncheckedBaseModel): - object_type: typing.Optional[str] = pydantic.Field(default=None) - """ - Type of the associated object - """ - - records: typing.Optional[typing.List[UpsertrecordsRequestRecordsItemAssociationsItemZeroRecordsItem]] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/brevo/custom_objects/types/upsertrecords_request_records_item_identifiers.py b/src/brevo/custom_objects/types/upsertrecords_request_records_item_identifiers.py index e56e74b..7d15097 100644 --- a/src/brevo/custom_objects/types/upsertrecords_request_records_item_identifiers.py +++ b/src/brevo/custom_objects/types/upsertrecords_request_records_item_identifiers.py @@ -9,12 +9,17 @@ class UpsertrecordsRequestRecordsItemIdentifiers(UncheckedBaseModel): """ - Identifiers attached with the object record. It can have id or ext_id. ext_id is ID of record in the external system that client want to store in the object system, id is an internal ID of object record generated by Brevo system. NOTE: - Its an optional field, if identifier is not provided, then id of object records will be generated by Brevo. This id can be used for further operation with the object record. - Both ext_id and id cannot be provided in the same request. + Identifiers for the object record. Supports `id` (singular, not `ids`) or `ext_id`. + - `ext_id`: Your external system's identifier for this record. + - `id`: Internal Brevo record ID β€” can only be used for **updating** existing records, not for creation. + NOTE: + - This is an optional field. If no identifier is provided, Brevo auto-generates an internal ID that you can use for future operations. + - If both `ext_id` and `id` are provided, `id` takes precedence and the operation is treated as an update. It is recommended to provide only one identifier per record. """ ext_id: typing.Optional[str] = pydantic.Field(default=None) """ - ext_id is ID of record in the external system that client_dev want to store in the object system. + ext_id is ID of record in the external system that client wants to store in the object system. """ id: typing.Optional[int] = pydantic.Field(default=None) diff --git a/src/brevo/deals/__init__.py b/src/brevo/deals/__init__.py index 4344771..f426944 100644 --- a/src/brevo/deals/__init__.py +++ b/src/brevo/deals/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .types import ( GetCrmAttributesDealsResponseItem, + GetCrmAttributesDealsResponseItemAttributeOptionsItem, GetCrmDealsRequestSort, GetCrmDealsResponse, PostCrmDealsImportResponse, @@ -15,6 +16,7 @@ ) _dynamic_imports: typing.Dict[str, str] = { "GetCrmAttributesDealsResponseItem": ".types", + "GetCrmAttributesDealsResponseItemAttributeOptionsItem": ".types", "GetCrmDealsRequestSort": ".types", "GetCrmDealsResponse": ".types", "PostCrmDealsImportResponse": ".types", @@ -45,6 +47,7 @@ def __dir__(): __all__ = [ "GetCrmAttributesDealsResponseItem", + "GetCrmAttributesDealsResponseItemAttributeOptionsItem", "GetCrmDealsRequestSort", "GetCrmDealsResponse", "PostCrmDealsImportResponse", diff --git a/src/brevo/deals/client.py b/src/brevo/deals/client.py index 6ec5a44..de40ac8 100644 --- a/src/brevo/deals/client.py +++ b/src/brevo/deals/client.py @@ -38,6 +38,8 @@ def get_deal_attributes( self, *, request_options: typing.Optional[RequestOptions] = None ) -> typing.List[GetCrmAttributesDealsResponseItem]: """ + Retrieve the list of all attributes defined for deals, including both system-default and custom attributes. Each attribute includes its label, internal name, type, required status, and available options for select-type attributes. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -71,9 +73,12 @@ def get_all_deals( offset: typing.Optional[int] = None, limit: typing.Optional[int] = None, sort: typing.Optional[GetCrmDealsRequestSort] = None, + sort_by: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetCrmDealsResponse: """ + Retrieve a paginated list of deals with optional filtering, sorting, and search capabilities. Results can be filtered by attributes such as deal name or owner, linked companies, linked contacts, or modification/creation timestamps. Default sort order is descending by creation date. + Parameters ---------- filters_attributes_deal_name : typing.Optional[str] @@ -83,13 +88,13 @@ def get_all_deals( Filter by linked companies ids filters_linked_contacts_ids : typing.Optional[str] - Filter by linked companies ids + Filter by linked contacts ids modified_since : typing.Optional[str] - Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the deals modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. created_since : typing.Optional[str] - Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the deals created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. offset : typing.Optional[int] Index of the first document of the page @@ -100,6 +105,9 @@ def get_all_deals( sort : typing.Optional[GetCrmDealsRequestSort] Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + sort_by : typing.Optional[str] + The field used to sort field names. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -126,6 +134,7 @@ def get_all_deals( offset=offset, limit=limit, sort=sort, + sort_by=sort_by, request_options=request_options, ) return _response.data @@ -140,6 +149,8 @@ def create_a_deal( request_options: typing.Optional[RequestOptions] = None, ) -> PostCrmDealsResponse: """ + Create a new deal in the CRM with the specified name, attributes, and optional associations to contacts and companies. You can assign the deal to a specific pipeline and stage by providing `pipeline` and `deal_stage` attribute IDs, which can be retrieved from the pipeline details endpoint. + Parameters ---------- name : str @@ -201,7 +212,7 @@ def import_deals_creation_and_updation( The mapping options in JSON format. Here is an example of the JSON structure: ```json { "link_entities": true, // Determines whether to link related entities during the import process "unlink_entities": false, // Determines whether to unlink related entities during the import process - "update_existing_records": true, // Determines whether to update based on company ID or treat every row as create + "update_existing_records": true, // Determines whether to update based on deal ID or treat every row as create "unset_empty_attributes": false // Determines whether to unset a specific attribute during update if the values input is blank } ``` @@ -238,6 +249,8 @@ def link_and_unlink_a_deal_with_contacts_and_companies( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Link or unlink contacts and companies with a specific deal in a single request. You can simultaneously link new contacts/companies and unlink existing ones by providing the respective ID arrays in the request body. + Parameters ---------- id : str @@ -284,6 +297,8 @@ def link_and_unlink_a_deal_with_contacts_and_companies( def get_a_deal(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Deal: """ + Retrieve the full details of a single deal by its identifier, including its attributes, pipeline stage, linked contacts, and linked companies. Returns a 404 error if the deal does not exist. + Parameters ---------- id : str @@ -312,6 +327,8 @@ def get_a_deal(self, id: str, *, request_options: typing.Optional[RequestOptions def delete_a_deal(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently delete a deal by its identifier. The requesting user must be the deal owner or have manage permission on deals; otherwise, a 403 Forbidden error is returned. + Parameters ---------- id : str @@ -348,6 +365,8 @@ def update_a_deal( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing deal''s attributes, name, linked contacts, or linked companies. Note that passing `linkedContactsIds` or `linkedCompaniesIds` replaces the entire list of associations, so omitted IDs will be removed. To move a deal to a different pipeline or stage, provide both the `pipeline` and `deal_stage` attribute IDs. + Parameters ---------- id : str @@ -356,7 +375,7 @@ def update_a_deal( Attributes for deal update To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. If you wish to update the pipeline of a deal you need to provide the `pipeline` and the `deal_stage` Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}` linked_companies_ids : typing.Optional[typing.Sequence[str]] - Warning - Using PATCH on linkedCompaniesIds replaces the list of linked contacts. Omitted IDs will be removed. + Warning - Using PATCH on linkedCompaniesIds replaces the list of linked companies. Omitted IDs will be removed. linked_contacts_ids : typing.Optional[typing.Sequence[int]] Warning - Using PATCH on linkedContactIds replaces the list of linked contacts. Omitted IDs will be removed. @@ -420,6 +439,8 @@ def get_pipeline_stages(self, *, request_options: typing.Optional[RequestOptions def get_all_pipelines(self, *, request_options: typing.Optional[RequestOptions] = None) -> Pipelines: """ + Retrieve the list of all deal pipelines configured for your account, including each pipeline''s stages and settings. If no pipelines have been configured yet, a default pipeline is automatically created and returned. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -428,7 +449,7 @@ def get_all_pipelines(self, *, request_options: typing.Optional[RequestOptions] Returns ------- Pipelines - Returns list of pipelines and and there details + Returns list of pipelines and their details Examples -------- @@ -444,6 +465,8 @@ def get_all_pipelines(self, *, request_options: typing.Optional[RequestOptions] def get_a_pipeline(self, pipeline_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Pipelines: """ + Retrieve the details of a specific deal pipeline by its identifier, including its stages, stage ordering, and configuration. Use this endpoint to obtain the pipeline and stage IDs needed when creating or updating deals. + Parameters ---------- pipeline_id : str @@ -490,6 +513,8 @@ async def get_deal_attributes( self, *, request_options: typing.Optional[RequestOptions] = None ) -> typing.List[GetCrmAttributesDealsResponseItem]: """ + Retrieve the list of all attributes defined for deals, including both system-default and custom attributes. Each attribute includes its label, internal name, type, required status, and available options for select-type attributes. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -531,9 +556,12 @@ async def get_all_deals( offset: typing.Optional[int] = None, limit: typing.Optional[int] = None, sort: typing.Optional[GetCrmDealsRequestSort] = None, + sort_by: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetCrmDealsResponse: """ + Retrieve a paginated list of deals with optional filtering, sorting, and search capabilities. Results can be filtered by attributes such as deal name or owner, linked companies, linked contacts, or modification/creation timestamps. Default sort order is descending by creation date. + Parameters ---------- filters_attributes_deal_name : typing.Optional[str] @@ -543,13 +571,13 @@ async def get_all_deals( Filter by linked companies ids filters_linked_contacts_ids : typing.Optional[str] - Filter by linked companies ids + Filter by linked contacts ids modified_since : typing.Optional[str] - Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the deals modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. created_since : typing.Optional[str] - Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the deals created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. offset : typing.Optional[int] Index of the first document of the page @@ -560,6 +588,9 @@ async def get_all_deals( sort : typing.Optional[GetCrmDealsRequestSort] Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + sort_by : typing.Optional[str] + The field used to sort field names. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -594,6 +625,7 @@ async def main() -> None: offset=offset, limit=limit, sort=sort, + sort_by=sort_by, request_options=request_options, ) return _response.data @@ -608,6 +640,8 @@ async def create_a_deal( request_options: typing.Optional[RequestOptions] = None, ) -> PostCrmDealsResponse: """ + Create a new deal in the CRM with the specified name, attributes, and optional associations to contacts and companies. You can assign the deal to a specific pipeline and stage by providing `pipeline` and `deal_stage` attribute IDs, which can be retrieved from the pipeline details endpoint. + Parameters ---------- name : str @@ -677,7 +711,7 @@ async def import_deals_creation_and_updation( The mapping options in JSON format. Here is an example of the JSON structure: ```json { "link_entities": true, // Determines whether to link related entities during the import process "unlink_entities": false, // Determines whether to unlink related entities during the import process - "update_existing_records": true, // Determines whether to update based on company ID or treat every row as create + "update_existing_records": true, // Determines whether to update based on deal ID or treat every row as create "unset_empty_attributes": false // Determines whether to unset a specific attribute during update if the values input is blank } ``` @@ -722,6 +756,8 @@ async def link_and_unlink_a_deal_with_contacts_and_companies( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Link or unlink contacts and companies with a specific deal in a single request. You can simultaneously link new contacts/companies and unlink existing ones by providing the respective ID arrays in the request body. + Parameters ---------- id : str @@ -776,6 +812,8 @@ async def main() -> None: async def get_a_deal(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Deal: """ + Retrieve the full details of a single deal by its identifier, including its attributes, pipeline stage, linked contacts, and linked companies. Returns a 404 error if the deal does not exist. + Parameters ---------- id : str @@ -812,6 +850,8 @@ async def main() -> None: async def delete_a_deal(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently delete a deal by its identifier. The requesting user must be the deal owner or have manage permission on deals; otherwise, a 403 Forbidden error is returned. + Parameters ---------- id : str @@ -856,6 +896,8 @@ async def update_a_deal( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing deal''s attributes, name, linked contacts, or linked companies. Note that passing `linkedContactsIds` or `linkedCompaniesIds` replaces the entire list of associations, so omitted IDs will be removed. To move a deal to a different pipeline or stage, provide both the `pipeline` and `deal_stage` attribute IDs. + Parameters ---------- id : str @@ -864,7 +906,7 @@ async def update_a_deal( Attributes for deal update To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. If you wish to update the pipeline of a deal you need to provide the `pipeline` and the `deal_stage` Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}` linked_companies_ids : typing.Optional[typing.Sequence[str]] - Warning - Using PATCH on linkedCompaniesIds replaces the list of linked contacts. Omitted IDs will be removed. + Warning - Using PATCH on linkedCompaniesIds replaces the list of linked companies. Omitted IDs will be removed. linked_contacts_ids : typing.Optional[typing.Sequence[int]] Warning - Using PATCH on linkedContactIds replaces the list of linked contacts. Omitted IDs will be removed. @@ -944,6 +986,8 @@ async def main() -> None: async def get_all_pipelines(self, *, request_options: typing.Optional[RequestOptions] = None) -> Pipelines: """ + Retrieve the list of all deal pipelines configured for your account, including each pipeline''s stages and settings. If no pipelines have been configured yet, a default pipeline is automatically created and returned. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -952,7 +996,7 @@ async def get_all_pipelines(self, *, request_options: typing.Optional[RequestOpt Returns ------- Pipelines - Returns list of pipelines and and there details + Returns list of pipelines and their details Examples -------- @@ -978,6 +1022,8 @@ async def get_a_pipeline( self, pipeline_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> Pipelines: """ + Retrieve the details of a specific deal pipeline by its identifier, including its stages, stage ordering, and configuration. Use this endpoint to obtain the pipeline and stage IDs needed when creating or updating deals. + Parameters ---------- pipeline_id : str diff --git a/src/brevo/deals/raw_client.py b/src/brevo/deals/raw_client.py index f241764..3fa1865 100644 --- a/src/brevo/deals/raw_client.py +++ b/src/brevo/deals/raw_client.py @@ -36,6 +36,8 @@ def get_deal_attributes( self, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[typing.List[GetCrmAttributesDealsResponseItem]]: """ + Retrieve the list of all attributes defined for deals, including both system-default and custom attributes. Each attribute includes its label, internal name, type, required status, and available options for select-type attributes. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -61,6 +63,17 @@ def get_deal_attributes( ), ) return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -81,9 +94,12 @@ def get_all_deals( offset: typing.Optional[int] = None, limit: typing.Optional[int] = None, sort: typing.Optional[GetCrmDealsRequestSort] = None, + sort_by: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetCrmDealsResponse]: """ + Retrieve a paginated list of deals with optional filtering, sorting, and search capabilities. Results can be filtered by attributes such as deal name or owner, linked companies, linked contacts, or modification/creation timestamps. Default sort order is descending by creation date. + Parameters ---------- filters_attributes_deal_name : typing.Optional[str] @@ -93,13 +109,13 @@ def get_all_deals( Filter by linked companies ids filters_linked_contacts_ids : typing.Optional[str] - Filter by linked companies ids + Filter by linked contacts ids modified_since : typing.Optional[str] - Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the deals modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. created_since : typing.Optional[str] - Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the deals created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. offset : typing.Optional[int] Index of the first document of the page @@ -110,6 +126,9 @@ def get_all_deals( sort : typing.Optional[GetCrmDealsRequestSort] Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + sort_by : typing.Optional[str] + The field used to sort field names. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -130,6 +149,7 @@ def get_all_deals( "offset": offset, "limit": limit, "sort": sort, + "sortBy": sort_by, }, request_options=request_options, ) @@ -173,6 +193,8 @@ def create_a_deal( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PostCrmDealsResponse]: """ + Create a new deal in the CRM with the specified name, attributes, and optional associations to contacts and companies. You can assign the deal to a specific pipeline and stage by providing `pipeline` and `deal_stage` attribute IDs, which can be retrieved from the pipeline details endpoint. + Parameters ---------- name : str @@ -259,7 +281,7 @@ def import_deals_creation_and_updation( The mapping options in JSON format. Here is an example of the JSON structure: ```json { "link_entities": true, // Determines whether to link related entities during the import process "unlink_entities": false, // Determines whether to unlink related entities during the import process - "update_existing_records": true, // Determines whether to update based on company ID or treat every row as create + "update_existing_records": true, // Determines whether to update based on deal ID or treat every row as create "unset_empty_attributes": false // Determines whether to unset a specific attribute during update if the values input is blank } ``` @@ -325,6 +347,8 @@ def link_and_unlink_a_deal_with_contacts_and_companies( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Link or unlink contacts and companies with a specific deal in a single request. You can simultaneously link new contacts/companies and unlink existing ones by providing the respective ID arrays in the request body. + Parameters ---------- id : str @@ -388,6 +412,8 @@ def link_and_unlink_a_deal_with_contacts_and_companies( def get_a_deal(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Deal]: """ + Retrieve the full details of a single deal by its identifier, including its attributes, pipeline stage, linked contacts, and linked companies. Returns a 404 error if the deal does not exist. + Parameters ---------- id : str @@ -448,6 +474,8 @@ def get_a_deal(self, id: str, *, request_options: typing.Optional[RequestOptions def delete_a_deal(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]: """ + Permanently delete a deal by its identifier. The requesting user must be the deal owner or have manage permission on deals; otherwise, a 403 Forbidden error is returned. + Parameters ---------- id : str @@ -509,6 +537,8 @@ def update_a_deal( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Update an existing deal''s attributes, name, linked contacts, or linked companies. Note that passing `linkedContactsIds` or `linkedCompaniesIds` replaces the entire list of associations, so omitted IDs will be removed. To move a deal to a different pipeline or stage, provide both the `pipeline` and `deal_stage` attribute IDs. + Parameters ---------- id : str @@ -517,7 +547,7 @@ def update_a_deal( Attributes for deal update To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. If you wish to update the pipeline of a deal you need to provide the `pipeline` and the `deal_stage` Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}` linked_companies_ids : typing.Optional[typing.Sequence[str]] - Warning - Using PATCH on linkedCompaniesIds replaces the list of linked contacts. Omitted IDs will be removed. + Warning - Using PATCH on linkedCompaniesIds replaces the list of linked companies. Omitted IDs will be removed. linked_contacts_ids : typing.Optional[typing.Sequence[int]] Warning - Using PATCH on linkedContactIds replaces the list of linked contacts. Omitted IDs will be removed. @@ -610,6 +640,17 @@ def get_pipeline_stages(self, *, request_options: typing.Optional[RequestOptions ), ) return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -621,6 +662,8 @@ def get_pipeline_stages(self, *, request_options: typing.Optional[RequestOptions def get_all_pipelines(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Pipelines]: """ + Retrieve the list of all deal pipelines configured for your account, including each pipeline''s stages and settings. If no pipelines have been configured yet, a default pipeline is automatically created and returned. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -629,7 +672,7 @@ def get_all_pipelines(self, *, request_options: typing.Optional[RequestOptions] Returns ------- HttpResponse[Pipelines] - Returns list of pipelines and and there details + Returns list of pipelines and their details """ _response = self._client_wrapper.httpx_client.request( "crm/pipeline/details/all", @@ -670,6 +713,8 @@ def get_a_pipeline( self, pipeline_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[Pipelines]: """ + Retrieve the details of a specific deal pipeline by its identifier, including its stages, stage ordering, and configuration. Use this endpoint to obtain the pipeline and stage IDs needed when creating or updating deals. + Parameters ---------- pipeline_id : str @@ -726,6 +771,8 @@ async def get_deal_attributes( self, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[typing.List[GetCrmAttributesDealsResponseItem]]: """ + Retrieve the list of all attributes defined for deals, including both system-default and custom attributes. Each attribute includes its label, internal name, type, required status, and available options for select-type attributes. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -751,6 +798,17 @@ async def get_deal_attributes( ), ) return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -771,9 +829,12 @@ async def get_all_deals( offset: typing.Optional[int] = None, limit: typing.Optional[int] = None, sort: typing.Optional[GetCrmDealsRequestSort] = None, + sort_by: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetCrmDealsResponse]: """ + Retrieve a paginated list of deals with optional filtering, sorting, and search capabilities. Results can be filtered by attributes such as deal name or owner, linked companies, linked contacts, or modification/creation timestamps. Default sort order is descending by creation date. + Parameters ---------- filters_attributes_deal_name : typing.Optional[str] @@ -783,13 +844,13 @@ async def get_all_deals( Filter by linked companies ids filters_linked_contacts_ids : typing.Optional[str] - Filter by linked companies ids + Filter by linked contacts ids modified_since : typing.Optional[str] - Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the deals modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. created_since : typing.Optional[str] - Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + Filter (urlencoded) the deals created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. offset : typing.Optional[int] Index of the first document of the page @@ -800,6 +861,9 @@ async def get_all_deals( sort : typing.Optional[GetCrmDealsRequestSort] Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + sort_by : typing.Optional[str] + The field used to sort field names. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -820,6 +884,7 @@ async def get_all_deals( "offset": offset, "limit": limit, "sort": sort, + "sortBy": sort_by, }, request_options=request_options, ) @@ -863,6 +928,8 @@ async def create_a_deal( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PostCrmDealsResponse]: """ + Create a new deal in the CRM with the specified name, attributes, and optional associations to contacts and companies. You can assign the deal to a specific pipeline and stage by providing `pipeline` and `deal_stage` attribute IDs, which can be retrieved from the pipeline details endpoint. + Parameters ---------- name : str @@ -949,7 +1016,7 @@ async def import_deals_creation_and_updation( The mapping options in JSON format. Here is an example of the JSON structure: ```json { "link_entities": true, // Determines whether to link related entities during the import process "unlink_entities": false, // Determines whether to unlink related entities during the import process - "update_existing_records": true, // Determines whether to update based on company ID or treat every row as create + "update_existing_records": true, // Determines whether to update based on deal ID or treat every row as create "unset_empty_attributes": false // Determines whether to unset a specific attribute during update if the values input is blank } ``` @@ -1015,6 +1082,8 @@ async def link_and_unlink_a_deal_with_contacts_and_companies( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Link or unlink contacts and companies with a specific deal in a single request. You can simultaneously link new contacts/companies and unlink existing ones by providing the respective ID arrays in the request body. + Parameters ---------- id : str @@ -1080,6 +1149,8 @@ async def get_a_deal( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[Deal]: """ + Retrieve the full details of a single deal by its identifier, including its attributes, pipeline stage, linked contacts, and linked companies. Returns a 404 error if the deal does not exist. + Parameters ---------- id : str @@ -1142,6 +1213,8 @@ async def delete_a_deal( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Permanently delete a deal by its identifier. The requesting user must be the deal owner or have manage permission on deals; otherwise, a 403 Forbidden error is returned. + Parameters ---------- id : str @@ -1203,6 +1276,8 @@ async def update_a_deal( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Update an existing deal''s attributes, name, linked contacts, or linked companies. Note that passing `linkedContactsIds` or `linkedCompaniesIds` replaces the entire list of associations, so omitted IDs will be removed. To move a deal to a different pipeline or stage, provide both the `pipeline` and `deal_stage` attribute IDs. + Parameters ---------- id : str @@ -1211,7 +1286,7 @@ async def update_a_deal( Attributes for deal update To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. If you wish to update the pipeline of a deal you need to provide the `pipeline` and the `deal_stage` Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}` linked_companies_ids : typing.Optional[typing.Sequence[str]] - Warning - Using PATCH on linkedCompaniesIds replaces the list of linked contacts. Omitted IDs will be removed. + Warning - Using PATCH on linkedCompaniesIds replaces the list of linked companies. Omitted IDs will be removed. linked_contacts_ids : typing.Optional[typing.Sequence[int]] Warning - Using PATCH on linkedContactIds replaces the list of linked contacts. Omitted IDs will be removed. @@ -1306,6 +1381,17 @@ async def get_pipeline_stages( ), ) return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -1319,6 +1405,8 @@ async def get_all_pipelines( self, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[Pipelines]: """ + Retrieve the list of all deal pipelines configured for your account, including each pipeline''s stages and settings. If no pipelines have been configured yet, a default pipeline is automatically created and returned. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -1327,7 +1415,7 @@ async def get_all_pipelines( Returns ------- AsyncHttpResponse[Pipelines] - Returns list of pipelines and and there details + Returns list of pipelines and their details """ _response = await self._client_wrapper.httpx_client.request( "crm/pipeline/details/all", @@ -1368,6 +1456,8 @@ async def get_a_pipeline( self, pipeline_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[Pipelines]: """ + Retrieve the details of a specific deal pipeline by its identifier, including its stages, stage ordering, and configuration. Use this endpoint to obtain the pipeline and stage IDs needed when creating or updating deals. + Parameters ---------- pipeline_id : str diff --git a/src/brevo/deals/types/__init__.py b/src/brevo/deals/types/__init__.py index 1c7b99e..e297ed1 100644 --- a/src/brevo/deals/types/__init__.py +++ b/src/brevo/deals/types/__init__.py @@ -7,12 +7,16 @@ if typing.TYPE_CHECKING: from .get_crm_attributes_deals_response_item import GetCrmAttributesDealsResponseItem + from .get_crm_attributes_deals_response_item_attribute_options_item import ( + GetCrmAttributesDealsResponseItemAttributeOptionsItem, + ) from .get_crm_deals_request_sort import GetCrmDealsRequestSort from .get_crm_deals_response import GetCrmDealsResponse from .post_crm_deals_import_response import PostCrmDealsImportResponse from .post_crm_deals_response import PostCrmDealsResponse _dynamic_imports: typing.Dict[str, str] = { "GetCrmAttributesDealsResponseItem": ".get_crm_attributes_deals_response_item", + "GetCrmAttributesDealsResponseItemAttributeOptionsItem": ".get_crm_attributes_deals_response_item_attribute_options_item", "GetCrmDealsRequestSort": ".get_crm_deals_request_sort", "GetCrmDealsResponse": ".get_crm_deals_response", "PostCrmDealsImportResponse": ".post_crm_deals_import_response", @@ -43,6 +47,7 @@ def __dir__(): __all__ = [ "GetCrmAttributesDealsResponseItem", + "GetCrmAttributesDealsResponseItemAttributeOptionsItem", "GetCrmDealsRequestSort", "GetCrmDealsResponse", "PostCrmDealsImportResponse", diff --git a/src/brevo/deals/types/get_crm_attributes_deals_response_item.py b/src/brevo/deals/types/get_crm_attributes_deals_response_item.py index 1ded485..2da71d3 100644 --- a/src/brevo/deals/types/get_crm_attributes_deals_response_item.py +++ b/src/brevo/deals/types/get_crm_attributes_deals_response_item.py @@ -7,28 +7,46 @@ from ...core.pydantic_utilities import IS_PYDANTIC_V2 from ...core.serialization import FieldMetadata from ...core.unchecked_base_model import UncheckedBaseModel +from .get_crm_attributes_deals_response_item_attribute_options_item import ( + GetCrmAttributesDealsResponseItemAttributeOptionsItem, +) class GetCrmAttributesDealsResponseItem(UncheckedBaseModel): """ - List of attributes + Deal attribute details """ - attribute_options: typing_extensions.Annotated[ - typing.Optional[typing.List[typing.Dict[str, typing.Any]]], - FieldMetadata(alias="attributeOptions"), - pydantic.Field(alias="attributeOptions"), + internal_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="internalName"), + pydantic.Field(alias="internalName", description="Internal name of the attribute"), ] = None attribute_type_name: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="attributeTypeName"), pydantic.Field(alias="attributeTypeName") + typing.Optional[str], + FieldMetadata(alias="attributeTypeName"), + pydantic.Field(alias="attributeTypeName", description="Type of the attribute"), ] = None - internal_name: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="internalName"), pydantic.Field(alias="internalName") + label: typing.Optional[str] = pydantic.Field(default=None) + """ + Display label of the attribute + """ + + attribute_options: typing_extensions.Annotated[ + typing.Optional[typing.List[GetCrmAttributesDealsResponseItemAttributeOptionsItem]], + FieldMetadata(alias="attributeOptions"), + pydantic.Field(alias="attributeOptions", description="Options for single-select or multi-choice attributes"), ] = None is_required: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="isRequired"), pydantic.Field(alias="isRequired") + typing.Optional[bool], + FieldMetadata(alias="isRequired"), + pydantic.Field(alias="isRequired", description="Whether this attribute is required"), + ] = None + is_value_readonly: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isValueReadonly"), + pydantic.Field(alias="isValueReadonly", description="Whether this attribute value is read-only"), ] = None - label: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/deals/types/get_crm_attributes_deals_response_item_attribute_options_item.py b/src/brevo/deals/types/get_crm_attributes_deals_response_item_attribute_options_item.py new file mode 100644 index 0000000..f3a0142 --- /dev/null +++ b/src/brevo/deals/types/get_crm_attributes_deals_response_item_attribute_options_item.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.unchecked_base_model import UncheckedBaseModel + + +class GetCrmAttributesDealsResponseItemAttributeOptionsItem(UncheckedBaseModel): + key: typing.Optional[str] = None + value: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/ecommerce/__init__.py b/src/brevo/ecommerce/__init__.py index 2ec6dc8..01ae7dd 100644 --- a/src/brevo/ecommerce/__init__.py +++ b/src/brevo/ecommerce/__init__.py @@ -30,6 +30,7 @@ GetEcommerceConfigDisplayCurrencyResponse, GetOrdersRequestSort, GetProductsRequestSort, + GetProductsRequestSortByField, GetProductsResponse, SetConfigDisplayCurrencyResponse, ) @@ -57,6 +58,7 @@ "GetEcommerceConfigDisplayCurrencyResponse": ".types", "GetOrdersRequestSort": ".types", "GetProductsRequestSort": ".types", + "GetProductsRequestSortByField": ".types", "GetProductsResponse": ".types", "SetConfigDisplayCurrencyResponse": ".types", } @@ -107,6 +109,7 @@ def __dir__(): "GetEcommerceConfigDisplayCurrencyResponse", "GetOrdersRequestSort", "GetProductsRequestSort", + "GetProductsRequestSortByField", "GetProductsResponse", "SetConfigDisplayCurrencyResponse", ] diff --git a/src/brevo/ecommerce/client.py b/src/brevo/ecommerce/client.py index 51c8a2e..4088d41 100644 --- a/src/brevo/ecommerce/client.py +++ b/src/brevo/ecommerce/client.py @@ -40,6 +40,7 @@ from .types.get_ecommerce_config_display_currency_response import GetEcommerceConfigDisplayCurrencyResponse from .types.get_orders_request_sort import GetOrdersRequestSort from .types.get_products_request_sort import GetProductsRequestSort +from .types.get_products_request_sort_by_field import GetProductsRequestSortByField from .types.get_products_response import GetProductsResponse from .types.set_config_display_currency_response import SetConfigDisplayCurrencyResponse @@ -76,6 +77,8 @@ def get_categories( request_options: typing.Optional[RequestOptions] = None, ) -> GetCategoriesResponse: """ + Retrieve a paginated list of all ecommerce categories stored in your Brevo account. Results are sorted by creation date in descending order by default, and can be filtered by category IDs, name, modification date, creation date, or deletion status. The response includes a `count` field with the total number of matching categories, and pagination defaults to 50 categories per page (maximum 100). + Parameters ---------- limit : typing.Optional[int] @@ -144,6 +147,8 @@ def create_update_category( request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[CreateUpdateCategoryResponse]: """ + Create a new ecommerce category or update an existing one, identified by the mandatory `id` field. When `updateEnabled` is set to `false` (the default), the endpoint performs an insert and returns `201`; if the category ID already exists, a `400` error is returned. When `updateEnabled` is `true`, the endpoint performs an upsert, returning `201` for a new category or `204` when an existing category is updated. The `name` field is mandatory for creation but optional for updates. + Parameters ---------- id : str @@ -202,6 +207,8 @@ def create_update_batch_category( request_options: typing.Optional[RequestOptions] = None, ) -> CreateUpdateBatchCategoryResponse: """ + Create or update multiple ecommerce categories in a single request. The `categories` array accepts up to 100 category objects, each requiring a unique `id`. When `updateEnabled` is `false` (the default), all categories are inserted as new; if any ID already exists, a `400` error is returned. When `updateEnabled` is `true`, existing categories are updated and new ones are created via upsert. Duplicate IDs within the same request payload are rejected. The response returns the count of created and updated categories. + Parameters ---------- categories : typing.Sequence[CreateUpdateBatchCategoryRequestCategoriesItem] @@ -243,6 +250,8 @@ def get_category_info( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetCategoryDetails: """ + Retrieve the full details of a single ecommerce category by its unique ID. The response includes the category name, URL, creation and modification timestamps, and deletion status. Returns a `404` error if no category matches the provided ID. + Parameters ---------- id : str @@ -254,7 +263,7 @@ def get_category_info( Returns ------- GetCategoryDetails - Category informations + Category details Examples -------- @@ -307,6 +316,8 @@ def get_attribution_metrics_for_one_or_more_brevo_campaigns_or_workflows( request_options: typing.Optional[RequestOptions] = None, ) -> GetEcommerceAttributionMetricsResponse: """ + Retrieve aggregated ecommerce attribution metrics for one or more Brevo email campaigns, SMS campaigns, or automation workflows. You can optionally filter by a date range using `periodFrom` and `periodTo` in RFC3339 format. The response includes per-source metrics (orders count, revenue, and average basket) as well as aggregated totals across all requested sources. + Parameters ---------- period_from : typing.Optional[dt.datetime] @@ -351,6 +362,7 @@ def get_attribution_metrics_for_one_or_more_brevo_campaigns_or_workflows( period_to=datetime.datetime.fromisoformat( "2022-01-03 00:00:00+00:00", ), + email_campaign_id_array=["sale"], ) """ _response = self._raw_client.get_attribution_metrics_for_one_or_more_brevo_campaigns_or_workflows( @@ -372,6 +384,8 @@ def get_detailed_attribution_metrics_for_a_single_brevo_campaign_or_workflow( request_options: typing.Optional[RequestOptions] = None, ) -> GetEcommerceAttributionMetricsConversionSourceConversionSourceIdResponse: """ + Retrieve detailed attribution metrics for a single Brevo campaign or automation workflow, identified by its conversion source type and ID. The response includes orders count, revenue, average basket value, and the number of new customers attributed to that specific campaign or workflow. + Parameters ---------- conversion_source : GetEcommerceAttributionMetricsConversionSourceConversionSourceIdRequestConversionSource @@ -413,6 +427,8 @@ def get_attributed_product_sales_for_a_single_brevo_campaign_or_workflow( request_options: typing.Optional[RequestOptions] = None, ) -> GetEcommerceAttributionProductsConversionSourceConversionSourceIdResponse: """ + Retrieve the list of products whose sales have been attributed to a specific Brevo campaign or automation workflow. Each product entry includes its ID, name, SKU, image URL, product URL, price, revenue, and orders count. The conversion source type must be one of `email_campaign`, `sms_campaign`, `automation_workflow_email`, or `automation_workflow_sms`. + Parameters ---------- conversion_source : GetEcommerceAttributionProductsConversionSourceConversionSourceIdRequestConversionSource @@ -450,6 +466,8 @@ def get_the_iso4217compliant_display_currency_code_for_your_brevo_account( self, *, request_options: typing.Optional[RequestOptions] = None ) -> GetEcommerceConfigDisplayCurrencyResponse: """ + Retrieve the ISO 4217 display currency code currently configured for your Brevo ecommerce account. This currency is used to display monetary values across the ecommerce dashboard and reports. Returns a `403` error if ecommerce is not activated on the account. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -478,6 +496,8 @@ def set_config_display_currency( self, *, code: str, request_options: typing.Optional[RequestOptions] = None ) -> SetConfigDisplayCurrencyResponse: """ + Set or update the ISO 4217 display currency code for your Brevo ecommerce account. This currency determines how monetary values are displayed in the ecommerce dashboard and reports. The provided currency code must be a valid ISO 4217 code; invalid codes result in a `422` error. Returns a `403` error if ecommerce is not activated on the account. + Parameters ---------- code : str @@ -610,7 +630,7 @@ def create_order( Identifies the contact associated with the order. meta_info : typing.Optional[typing.Dict[str, OrderMetaInfoValue]] - Meta data of order to store additional detal such as custom message, customer type, source. + Meta data of order to store additional detail such as custom message, customer type, source. store_id : typing.Optional[str] ID of store where the order is placed @@ -676,10 +696,10 @@ def create_batch_order( array of order objects historical : typing.Optional[bool] - Defines wether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual. + Defines whether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual. notify_url : typing.Optional[str] - Notify Url provided by client_dev to get the status of batch request + Webhook URL to receive the status of the batch request request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -726,6 +746,7 @@ def get_products( offset: typing.Optional[int] = None, sort: typing.Optional[GetProductsRequestSort] = None, ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + search: typing.Optional[str] = None, name: typing.Optional[str] = None, price_lte: typing.Optional[float] = None, price_gte: typing.Optional[float] = None, @@ -733,13 +754,22 @@ def get_products( price_gt: typing.Optional[float] = None, price_eq: typing.Optional[float] = None, price_ne: typing.Optional[float] = None, + alternative_price_lte: typing.Optional[float] = None, + alternative_price_gte: typing.Optional[float] = None, + alternative_price_lt: typing.Optional[float] = None, + alternative_price_gt: typing.Optional[float] = None, + alternative_price_eq: typing.Optional[float] = None, + alternative_price_ne: typing.Optional[float] = None, categories: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, modified_since: typing.Optional[str] = None, created_since: typing.Optional[str] = None, + sort_by_field: typing.Optional[GetProductsRequestSortByField] = None, is_deleted: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetProductsResponse: """ + Retrieve a paginated list of all ecommerce products stored in your Brevo account. Results are sorted by creation date in descending order by default, and can be filtered by product IDs, name (minimum 3 characters), price range, category IDs, modification date, creation date, or deletion status. Use the `search` parameter to query across SKU, name, and ID simultaneously β€” results are prioritized as exact SKU match > SKU prefix match > name match > ID match. Pagination defaults to 50 products per page (maximum 1000), and the response includes a `count` field with the total number of matching products. + Parameters ---------- limit : typing.Optional[int] @@ -754,6 +784,9 @@ def get_products( ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] Filter by product ids + search : typing.Optional[str] + Search products simultaneously across SKU, name, and ID fields. Results are returned in the following priority order: **exact SKU match** > **SKU prefix match** > **name match** > **ID match**. For example, `?search=123` on products with `{sku: "123"}` and `{sku: "123456"}` returns the exact SKU match first. + name : typing.Optional[str] Filter by product name, minimum 3 characters should be present for search. @@ -775,14 +808,35 @@ def get_products( price_ne : typing.Optional[float] Price filter for products not equals to particular amount + alternative_price_lte : typing.Optional[float] + Alternative price filter for products less than and equals to particular amount + + alternative_price_gte : typing.Optional[float] + Alternative price filter for products greater than and equals to particular amount + + alternative_price_lt : typing.Optional[float] + Alternative price filter for products less than particular amount + + alternative_price_gt : typing.Optional[float] + Alternative price filter for products greater than particular amount + + alternative_price_eq : typing.Optional[float] + Alternative price filter for products equals to particular amount + + alternative_price_ne : typing.Optional[float] + Alternative price filter for products not equals to particular amount + categories : typing.Optional[typing.Union[str, typing.Sequence[str]]] Filter by categories ids modified_since : typing.Optional[str] - Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + Filter (urlencoded) the products modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** created_since : typing.Optional[str] - Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + Filter (urlencoded) the products created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + + sort_by_field : typing.Optional[GetProductsRequestSortByField] + Sort the results by a specific field. Default sort field is `created_at` when not passed. is_deleted : typing.Optional[str] Filter products by their deletion status. If `false` is passed, only products that are not deleted will be returned. @@ -809,6 +863,7 @@ def get_products( offset=offset, sort=sort, ids=ids, + search=search, name=name, price_lte=price_lte, price_gte=price_gte, @@ -816,9 +871,16 @@ def get_products( price_gt=price_gt, price_eq=price_eq, price_ne=price_ne, + alternative_price_lte=alternative_price_lte, + alternative_price_gte=alternative_price_gte, + alternative_price_lt=alternative_price_lt, + alternative_price_gt=alternative_price_gt, + alternative_price_eq=alternative_price_eq, + alternative_price_ne=alternative_price_ne, categories=categories, modified_since=modified_since, created_since=created_since, + sort_by_field=sort_by_field, is_deleted=is_deleted, request_options=request_options, ) @@ -838,6 +900,7 @@ def create_update_product( meta_info: typing.Optional[typing.Dict[str, CreateUpdateProductRequestMetaInfoValue]] = OMIT, parent_id: typing.Optional[str] = OMIT, price: typing.Optional[float] = OMIT, + alternative_price: typing.Optional[float] = OMIT, sku: typing.Optional[str] = OMIT, stock: typing.Optional[float] = OMIT, update_enabled: typing.Optional[bool] = OMIT, @@ -845,13 +908,15 @@ def create_update_product( request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[CreateUpdateProductResponse]: """ + Create a new ecommerce product or update an existing one, identified by the mandatory `id` field. When `updateEnabled` is `false` (the default), the endpoint inserts a new product and returns `201`; if the product ID already exists, a `400` error is returned. When `updateEnabled` is `true`, the endpoint performs an upsert, returning `201` for a new product or `204` for an update. The `name` field is mandatory for creation but optional for updates. Product images are downloaded, validated (max 5 MB, formats: jpeg, jpg, png, bmp, gif, webp), and re-hosted on S3. The `metaInfo` object supports up to 20 keys with a cumulative size limit of approximately 1000 KB. + Parameters ---------- id : str Product ID for which you requested the details name : str - Mandatory in case of creation**. Name of the product for which you requested the details + **Mandatory in case of creation**. Name of the product, as displayed in the shop brand : typing.Optional[str] Brand of the product @@ -880,6 +945,9 @@ def create_update_product( price : typing.Optional[float] Price of the product + alternative_price : typing.Optional[float] + Alternative price of the product + sku : typing.Optional[str] Product identifier from the shop @@ -887,7 +955,7 @@ def create_update_product( Current stock value of the product from the shop's database update_enabled : typing.Optional[bool] - Facilitate to update the existing category in the same request (updateEnabled = true) + Facilitate to update the existing product in the same request (updateEnabled = true) url : typing.Optional[str] URL to the product @@ -924,6 +992,7 @@ def create_update_product( meta_info=meta_info, parent_id=parent_id, price=price, + alternative_price=alternative_price, sku=sku, stock=stock, update_enabled=update_enabled, @@ -940,13 +1009,15 @@ def create_update_batch_products( request_options: typing.Optional[RequestOptions] = None, ) -> CreateUpdateBatchProductsResponse: """ + Create or update multiple ecommerce products in a single request. The `products` array accepts up to 100 product objects for creation (or up to 1000 when `updateEnabled` is `true` and the account has an increased limit). Each product requires a unique `id` and `name` (name is mandatory for creation only). When `updateEnabled` is `false`, all products are inserted as new; if any ID already exists, a `400` error is returned. When `updateEnabled` is `true`, existing products are updated and new ones are created via upsert. Duplicate IDs within the same request payload are rejected. The response returns the count of created and updated products. + Parameters ---------- products : typing.Sequence[CreateUpdateBatchProductsRequestProductsItem] array of products objects update_enabled : typing.Optional[bool] - Facilitate to update the existing categories in the same request (updateEnabled = true) + Facilitate to update the existing products in the same request (updateEnabled = true) request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -982,6 +1053,8 @@ def get_product_info( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetProductDetails: """ + Retrieve the full details of a single ecommerce product by its unique ID. The response includes the product name, price, SKU, URL, image URLs (original and thumbnails), categories, stock level, meta information, creation and modification timestamps, and deletion status. Returns a `404` error if no product matches the provided ID. + Parameters ---------- id : str @@ -993,7 +1066,7 @@ def get_product_info( Returns ------- GetProductDetails - Product informations + Product details Examples -------- @@ -1017,6 +1090,8 @@ def create_product_alert( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Register a contact to receive an alert for a specific product event, such as `back_in_stock`. At least one contact identifier (`ext_id`, `email`, or `sms`) must be provided; when multiple are given, priority is `ext_id` > `email` > `sms`. Returns a `404` error if the product ID does not exist, and a `403` error if product alerts are not enabled for the account. + Parameters ---------- id : str @@ -1077,6 +1152,8 @@ async def get_categories( request_options: typing.Optional[RequestOptions] = None, ) -> GetCategoriesResponse: """ + Retrieve a paginated list of all ecommerce categories stored in your Brevo account. Results are sorted by creation date in descending order by default, and can be filtered by category IDs, name, modification date, creation date, or deletion status. The response includes a `count` field with the total number of matching categories, and pagination defaults to 50 categories per page (maximum 100). + Parameters ---------- limit : typing.Optional[int] @@ -1153,6 +1230,8 @@ async def create_update_category( request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[CreateUpdateCategoryResponse]: """ + Create a new ecommerce category or update an existing one, identified by the mandatory `id` field. When `updateEnabled` is set to `false` (the default), the endpoint performs an insert and returns `201`; if the category ID already exists, a `400` error is returned. When `updateEnabled` is `true`, the endpoint performs an upsert, returning `201` for a new category or `204` when an existing category is updated. The `name` field is mandatory for creation but optional for updates. + Parameters ---------- id : str @@ -1219,6 +1298,8 @@ async def create_update_batch_category( request_options: typing.Optional[RequestOptions] = None, ) -> CreateUpdateBatchCategoryResponse: """ + Create or update multiple ecommerce categories in a single request. The `categories` array accepts up to 100 category objects, each requiring a unique `id`. When `updateEnabled` is `false` (the default), all categories are inserted as new; if any ID already exists, a `400` error is returned. When `updateEnabled` is `true`, existing categories are updated and new ones are created via upsert. Duplicate IDs within the same request payload are rejected. The response returns the count of created and updated categories. + Parameters ---------- categories : typing.Sequence[CreateUpdateBatchCategoryRequestCategoriesItem] @@ -1268,6 +1349,8 @@ async def get_category_info( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetCategoryDetails: """ + Retrieve the full details of a single ecommerce category by its unique ID. The response includes the category name, URL, creation and modification timestamps, and deletion status. Returns a `404` error if no category matches the provided ID. + Parameters ---------- id : str @@ -1279,7 +1362,7 @@ async def get_category_info( Returns ------- GetCategoryDetails - Category informations + Category details Examples -------- @@ -1348,6 +1431,8 @@ async def get_attribution_metrics_for_one_or_more_brevo_campaigns_or_workflows( request_options: typing.Optional[RequestOptions] = None, ) -> GetEcommerceAttributionMetricsResponse: """ + Retrieve aggregated ecommerce attribution metrics for one or more Brevo email campaigns, SMS campaigns, or automation workflows. You can optionally filter by a date range using `periodFrom` and `periodTo` in RFC3339 format. The response includes per-source metrics (orders count, revenue, and average basket) as well as aggregated totals across all requested sources. + Parameters ---------- period_from : typing.Optional[dt.datetime] @@ -1396,6 +1481,7 @@ async def main() -> None: period_to=datetime.datetime.fromisoformat( "2022-01-03 00:00:00+00:00", ), + email_campaign_id_array=["sale"], ) @@ -1420,6 +1506,8 @@ async def get_detailed_attribution_metrics_for_a_single_brevo_campaign_or_workfl request_options: typing.Optional[RequestOptions] = None, ) -> GetEcommerceAttributionMetricsConversionSourceConversionSourceIdResponse: """ + Retrieve detailed attribution metrics for a single Brevo campaign or automation workflow, identified by its conversion source type and ID. The response includes orders count, revenue, average basket value, and the number of new customers attributed to that specific campaign or workflow. + Parameters ---------- conversion_source : GetEcommerceAttributionMetricsConversionSourceConversionSourceIdRequestConversionSource @@ -1469,6 +1557,8 @@ async def get_attributed_product_sales_for_a_single_brevo_campaign_or_workflow( request_options: typing.Optional[RequestOptions] = None, ) -> GetEcommerceAttributionProductsConversionSourceConversionSourceIdResponse: """ + Retrieve the list of products whose sales have been attributed to a specific Brevo campaign or automation workflow. Each product entry includes its ID, name, SKU, image URL, product URL, price, revenue, and orders count. The conversion source type must be one of `email_campaign`, `sms_campaign`, `automation_workflow_email`, or `automation_workflow_sms`. + Parameters ---------- conversion_source : GetEcommerceAttributionProductsConversionSourceConversionSourceIdRequestConversionSource @@ -1514,6 +1604,8 @@ async def get_the_iso4217compliant_display_currency_code_for_your_brevo_account( self, *, request_options: typing.Optional[RequestOptions] = None ) -> GetEcommerceConfigDisplayCurrencyResponse: """ + Retrieve the ISO 4217 display currency code currently configured for your Brevo ecommerce account. This currency is used to display monetary values across the ecommerce dashboard and reports. Returns a `403` error if ecommerce is not activated on the account. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -1550,6 +1642,8 @@ async def set_config_display_currency( self, *, code: str, request_options: typing.Optional[RequestOptions] = None ) -> SetConfigDisplayCurrencyResponse: """ + Set or update the ISO 4217 display currency code for your Brevo ecommerce account. This currency determines how monetary values are displayed in the ecommerce dashboard and reports. The provided currency code must be a valid ISO 4217 code; invalid codes result in a `422` error. Returns a `403` error if ecommerce is not activated on the account. + Parameters ---------- code : str @@ -1698,7 +1792,7 @@ async def create_order( Identifies the contact associated with the order. meta_info : typing.Optional[typing.Dict[str, OrderMetaInfoValue]] - Meta data of order to store additional detal such as custom message, customer type, source. + Meta data of order to store additional detail such as custom message, customer type, source. store_id : typing.Optional[str] ID of store where the order is placed @@ -1772,10 +1866,10 @@ async def create_batch_order( array of order objects historical : typing.Optional[bool] - Defines wether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual. + Defines whether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual. notify_url : typing.Optional[str] - Notify Url provided by client_dev to get the status of batch request + Webhook URL to receive the status of the batch request request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1830,6 +1924,7 @@ async def get_products( offset: typing.Optional[int] = None, sort: typing.Optional[GetProductsRequestSort] = None, ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + search: typing.Optional[str] = None, name: typing.Optional[str] = None, price_lte: typing.Optional[float] = None, price_gte: typing.Optional[float] = None, @@ -1837,13 +1932,22 @@ async def get_products( price_gt: typing.Optional[float] = None, price_eq: typing.Optional[float] = None, price_ne: typing.Optional[float] = None, + alternative_price_lte: typing.Optional[float] = None, + alternative_price_gte: typing.Optional[float] = None, + alternative_price_lt: typing.Optional[float] = None, + alternative_price_gt: typing.Optional[float] = None, + alternative_price_eq: typing.Optional[float] = None, + alternative_price_ne: typing.Optional[float] = None, categories: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, modified_since: typing.Optional[str] = None, created_since: typing.Optional[str] = None, + sort_by_field: typing.Optional[GetProductsRequestSortByField] = None, is_deleted: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetProductsResponse: """ + Retrieve a paginated list of all ecommerce products stored in your Brevo account. Results are sorted by creation date in descending order by default, and can be filtered by product IDs, name (minimum 3 characters), price range, category IDs, modification date, creation date, or deletion status. Use the `search` parameter to query across SKU, name, and ID simultaneously β€” results are prioritized as exact SKU match > SKU prefix match > name match > ID match. Pagination defaults to 50 products per page (maximum 1000), and the response includes a `count` field with the total number of matching products. + Parameters ---------- limit : typing.Optional[int] @@ -1858,6 +1962,9 @@ async def get_products( ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] Filter by product ids + search : typing.Optional[str] + Search products simultaneously across SKU, name, and ID fields. Results are returned in the following priority order: **exact SKU match** > **SKU prefix match** > **name match** > **ID match**. For example, `?search=123` on products with `{sku: "123"}` and `{sku: "123456"}` returns the exact SKU match first. + name : typing.Optional[str] Filter by product name, minimum 3 characters should be present for search. @@ -1879,14 +1986,35 @@ async def get_products( price_ne : typing.Optional[float] Price filter for products not equals to particular amount + alternative_price_lte : typing.Optional[float] + Alternative price filter for products less than and equals to particular amount + + alternative_price_gte : typing.Optional[float] + Alternative price filter for products greater than and equals to particular amount + + alternative_price_lt : typing.Optional[float] + Alternative price filter for products less than particular amount + + alternative_price_gt : typing.Optional[float] + Alternative price filter for products greater than particular amount + + alternative_price_eq : typing.Optional[float] + Alternative price filter for products equals to particular amount + + alternative_price_ne : typing.Optional[float] + Alternative price filter for products not equals to particular amount + categories : typing.Optional[typing.Union[str, typing.Sequence[str]]] Filter by categories ids modified_since : typing.Optional[str] - Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + Filter (urlencoded) the products modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** created_since : typing.Optional[str] - Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + Filter (urlencoded) the products created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + + sort_by_field : typing.Optional[GetProductsRequestSortByField] + Sort the results by a specific field. Default sort field is `created_at` when not passed. is_deleted : typing.Optional[str] Filter products by their deletion status. If `false` is passed, only products that are not deleted will be returned. @@ -1921,6 +2049,7 @@ async def main() -> None: offset=offset, sort=sort, ids=ids, + search=search, name=name, price_lte=price_lte, price_gte=price_gte, @@ -1928,9 +2057,16 @@ async def main() -> None: price_gt=price_gt, price_eq=price_eq, price_ne=price_ne, + alternative_price_lte=alternative_price_lte, + alternative_price_gte=alternative_price_gte, + alternative_price_lt=alternative_price_lt, + alternative_price_gt=alternative_price_gt, + alternative_price_eq=alternative_price_eq, + alternative_price_ne=alternative_price_ne, categories=categories, modified_since=modified_since, created_since=created_since, + sort_by_field=sort_by_field, is_deleted=is_deleted, request_options=request_options, ) @@ -1950,6 +2086,7 @@ async def create_update_product( meta_info: typing.Optional[typing.Dict[str, CreateUpdateProductRequestMetaInfoValue]] = OMIT, parent_id: typing.Optional[str] = OMIT, price: typing.Optional[float] = OMIT, + alternative_price: typing.Optional[float] = OMIT, sku: typing.Optional[str] = OMIT, stock: typing.Optional[float] = OMIT, update_enabled: typing.Optional[bool] = OMIT, @@ -1957,13 +2094,15 @@ async def create_update_product( request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[CreateUpdateProductResponse]: """ + Create a new ecommerce product or update an existing one, identified by the mandatory `id` field. When `updateEnabled` is `false` (the default), the endpoint inserts a new product and returns `201`; if the product ID already exists, a `400` error is returned. When `updateEnabled` is `true`, the endpoint performs an upsert, returning `201` for a new product or `204` for an update. The `name` field is mandatory for creation but optional for updates. Product images are downloaded, validated (max 5 MB, formats: jpeg, jpg, png, bmp, gif, webp), and re-hosted on S3. The `metaInfo` object supports up to 20 keys with a cumulative size limit of approximately 1000 KB. + Parameters ---------- id : str Product ID for which you requested the details name : str - Mandatory in case of creation**. Name of the product for which you requested the details + **Mandatory in case of creation**. Name of the product, as displayed in the shop brand : typing.Optional[str] Brand of the product @@ -1992,6 +2131,9 @@ async def create_update_product( price : typing.Optional[float] Price of the product + alternative_price : typing.Optional[float] + Alternative price of the product + sku : typing.Optional[str] Product identifier from the shop @@ -1999,7 +2141,7 @@ async def create_update_product( Current stock value of the product from the shop's database update_enabled : typing.Optional[bool] - Facilitate to update the existing category in the same request (updateEnabled = true) + Facilitate to update the existing product in the same request (updateEnabled = true) url : typing.Optional[str] URL to the product @@ -2044,6 +2186,7 @@ async def main() -> None: meta_info=meta_info, parent_id=parent_id, price=price, + alternative_price=alternative_price, sku=sku, stock=stock, update_enabled=update_enabled, @@ -2060,13 +2203,15 @@ async def create_update_batch_products( request_options: typing.Optional[RequestOptions] = None, ) -> CreateUpdateBatchProductsResponse: """ + Create or update multiple ecommerce products in a single request. The `products` array accepts up to 100 product objects for creation (or up to 1000 when `updateEnabled` is `true` and the account has an increased limit). Each product requires a unique `id` and `name` (name is mandatory for creation only). When `updateEnabled` is `false`, all products are inserted as new; if any ID already exists, a `400` error is returned. When `updateEnabled` is `true`, existing products are updated and new ones are created via upsert. Duplicate IDs within the same request payload are rejected. The response returns the count of created and updated products. + Parameters ---------- products : typing.Sequence[CreateUpdateBatchProductsRequestProductsItem] array of products objects update_enabled : typing.Optional[bool] - Facilitate to update the existing categories in the same request (updateEnabled = true) + Facilitate to update the existing products in the same request (updateEnabled = true) request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2110,6 +2255,8 @@ async def get_product_info( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetProductDetails: """ + Retrieve the full details of a single ecommerce product by its unique ID. The response includes the product name, price, SKU, URL, image URLs (original and thumbnails), categories, stock level, meta information, creation and modification timestamps, and deletion status. Returns a `404` error if no product matches the provided ID. + Parameters ---------- id : str @@ -2121,7 +2268,7 @@ async def get_product_info( Returns ------- GetProductDetails - Product informations + Product details Examples -------- @@ -2153,6 +2300,8 @@ async def create_product_alert( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Register a contact to receive an alert for a specific product event, such as `back_in_stock`. At least one contact identifier (`ext_id`, `email`, or `sms`) must be provided; when multiple are given, priority is `ext_id` > `email` > `sms`. Returns a `404` error if the product ID does not exist, and a `403` error if product alerts are not enabled for the account. + Parameters ---------- id : str diff --git a/src/brevo/ecommerce/raw_client.py b/src/brevo/ecommerce/raw_client.py index b876dd4..1a3741e 100644 --- a/src/brevo/ecommerce/raw_client.py +++ b/src/brevo/ecommerce/raw_client.py @@ -53,6 +53,7 @@ from .types.get_ecommerce_config_display_currency_response import GetEcommerceConfigDisplayCurrencyResponse from .types.get_orders_request_sort import GetOrdersRequestSort from .types.get_products_request_sort import GetProductsRequestSort +from .types.get_products_request_sort_by_field import GetProductsRequestSortByField from .types.get_products_response import GetProductsResponse from .types.set_config_display_currency_response import SetConfigDisplayCurrencyResponse from pydantic import ValidationError @@ -79,6 +80,8 @@ def get_categories( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetCategoriesResponse]: """ + Retrieve a paginated list of all ecommerce categories stored in your Brevo account. Results are sorted by creation date in descending order by default, and can be filtered by category IDs, name, modification date, creation date, or deletion status. The response includes a `count` field with the total number of matching categories, and pagination defaults to 50 categories per page (maximum 100). + Parameters ---------- limit : typing.Optional[int] @@ -170,6 +173,8 @@ def create_update_category( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[typing.Optional[CreateUpdateCategoryResponse]]: """ + Create a new ecommerce category or update an existing one, identified by the mandatory `id` field. When `updateEnabled` is set to `false` (the default), the endpoint performs an insert and returns `201`; if the category ID already exists, a `400` error is returned. When `updateEnabled` is `true`, the endpoint performs an upsert, returning `201` for a new category or `204` when an existing category is updated. The `name` field is mandatory for creation but optional for updates. + Parameters ---------- id : str @@ -255,6 +260,8 @@ def create_update_batch_category( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreateUpdateBatchCategoryResponse]: """ + Create or update multiple ecommerce categories in a single request. The `categories` array accepts up to 100 category objects, each requiring a unique `id`. When `updateEnabled` is `false` (the default), all categories are inserted as new; if any ID already exists, a `400` error is returned. When `updateEnabled` is `true`, existing categories are updated and new ones are created via upsert. Duplicate IDs within the same request payload are rejected. The response returns the count of created and updated categories. + Parameters ---------- categories : typing.Sequence[CreateUpdateBatchCategoryRequestCategoriesItem] @@ -322,6 +329,8 @@ def get_category_info( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[GetCategoryDetails]: """ + Retrieve the full details of a single ecommerce category by its unique ID. The response includes the category name, URL, creation and modification timestamps, and deletion status. Returns a `404` error if no category matches the provided ID. + Parameters ---------- id : str @@ -333,7 +342,7 @@ def get_category_info( Returns ------- HttpResponse[GetCategoryDetails] - Category informations + Category details """ _response = self._client_wrapper.httpx_client.request( f"categories/{jsonable_encoder(id)}", @@ -447,6 +456,8 @@ def get_attribution_metrics_for_one_or_more_brevo_campaigns_or_workflows( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetEcommerceAttributionMetricsResponse]: """ + Retrieve aggregated ecommerce attribution metrics for one or more Brevo email campaigns, SMS campaigns, or automation workflows. You can optionally filter by a date range using `periodFrom` and `periodTo` in RFC3339 format. The response includes per-source metrics (orders count, revenue, and average basket) as well as aggregated totals across all requested sources. + Parameters ---------- period_from : typing.Optional[dt.datetime] @@ -526,6 +537,8 @@ def get_detailed_attribution_metrics_for_a_single_brevo_campaign_or_workflow( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetEcommerceAttributionMetricsConversionSourceConversionSourceIdResponse]: """ + Retrieve detailed attribution metrics for a single Brevo campaign or automation workflow, identified by its conversion source type and ID. The response includes orders count, revenue, average basket value, and the number of new customers attributed to that specific campaign or workflow. + Parameters ---------- conversion_source : GetEcommerceAttributionMetricsConversionSourceConversionSourceIdRequestConversionSource @@ -585,6 +598,8 @@ def get_attributed_product_sales_for_a_single_brevo_campaign_or_workflow( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetEcommerceAttributionProductsConversionSourceConversionSourceIdResponse]: """ + Retrieve the list of products whose sales have been attributed to a specific Brevo campaign or automation workflow. Each product entry includes its ID, name, SKU, image URL, product URL, price, revenue, and orders count. The conversion source type must be one of `email_campaign`, `sms_campaign`, `automation_workflow_email`, or `automation_workflow_sms`. + Parameters ---------- conversion_source : GetEcommerceAttributionProductsConversionSourceConversionSourceIdRequestConversionSource @@ -640,6 +655,8 @@ def get_the_iso4217compliant_display_currency_code_for_your_brevo_account( self, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[GetEcommerceConfigDisplayCurrencyResponse]: """ + Retrieve the ISO 4217 display currency code currently configured for your Brevo ecommerce account. This currency is used to display monetary values across the ecommerce dashboard and reports. Returns a `403` error if ecommerce is not activated on the account. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -711,6 +728,8 @@ def set_config_display_currency( self, *, code: str, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[SetConfigDisplayCurrencyResponse]: """ + Set or update the ISO 4217 display currency code for your Brevo ecommerce account. This currency determines how monetary values are displayed in the ecommerce dashboard and reports. The provided currency code must be a valid ISO 4217 code; invalid codes result in a `422` error. Returns a `403` error if ecommerce is not activated on the account. + Parameters ---------- code : str @@ -929,7 +948,7 @@ def create_order( Identifies the contact associated with the order. meta_info : typing.Optional[typing.Dict[str, OrderMetaInfoValue]] - Meta data of order to store additional detal such as custom message, customer type, source. + Meta data of order to store additional detail such as custom message, customer type, source. store_id : typing.Optional[str] ID of store where the order is placed @@ -1011,10 +1030,10 @@ def create_batch_order( array of order objects historical : typing.Optional[bool] - Defines wether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual. + Defines whether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual. notify_url : typing.Optional[str] - Notify Url provided by client_dev to get the status of batch request + Webhook URL to receive the status of the batch request request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1077,6 +1096,7 @@ def get_products( offset: typing.Optional[int] = None, sort: typing.Optional[GetProductsRequestSort] = None, ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + search: typing.Optional[str] = None, name: typing.Optional[str] = None, price_lte: typing.Optional[float] = None, price_gte: typing.Optional[float] = None, @@ -1084,13 +1104,22 @@ def get_products( price_gt: typing.Optional[float] = None, price_eq: typing.Optional[float] = None, price_ne: typing.Optional[float] = None, + alternative_price_lte: typing.Optional[float] = None, + alternative_price_gte: typing.Optional[float] = None, + alternative_price_lt: typing.Optional[float] = None, + alternative_price_gt: typing.Optional[float] = None, + alternative_price_eq: typing.Optional[float] = None, + alternative_price_ne: typing.Optional[float] = None, categories: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, modified_since: typing.Optional[str] = None, created_since: typing.Optional[str] = None, + sort_by_field: typing.Optional[GetProductsRequestSortByField] = None, is_deleted: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetProductsResponse]: """ + Retrieve a paginated list of all ecommerce products stored in your Brevo account. Results are sorted by creation date in descending order by default, and can be filtered by product IDs, name (minimum 3 characters), price range, category IDs, modification date, creation date, or deletion status. Use the `search` parameter to query across SKU, name, and ID simultaneously β€” results are prioritized as exact SKU match > SKU prefix match > name match > ID match. Pagination defaults to 50 products per page (maximum 1000), and the response includes a `count` field with the total number of matching products. + Parameters ---------- limit : typing.Optional[int] @@ -1105,6 +1134,9 @@ def get_products( ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] Filter by product ids + search : typing.Optional[str] + Search products simultaneously across SKU, name, and ID fields. Results are returned in the following priority order: **exact SKU match** > **SKU prefix match** > **name match** > **ID match**. For example, `?search=123` on products with `{sku: "123"}` and `{sku: "123456"}` returns the exact SKU match first. + name : typing.Optional[str] Filter by product name, minimum 3 characters should be present for search. @@ -1126,14 +1158,35 @@ def get_products( price_ne : typing.Optional[float] Price filter for products not equals to particular amount + alternative_price_lte : typing.Optional[float] + Alternative price filter for products less than and equals to particular amount + + alternative_price_gte : typing.Optional[float] + Alternative price filter for products greater than and equals to particular amount + + alternative_price_lt : typing.Optional[float] + Alternative price filter for products less than particular amount + + alternative_price_gt : typing.Optional[float] + Alternative price filter for products greater than particular amount + + alternative_price_eq : typing.Optional[float] + Alternative price filter for products equals to particular amount + + alternative_price_ne : typing.Optional[float] + Alternative price filter for products not equals to particular amount + categories : typing.Optional[typing.Union[str, typing.Sequence[str]]] Filter by categories ids modified_since : typing.Optional[str] - Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + Filter (urlencoded) the products modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** created_since : typing.Optional[str] - Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + Filter (urlencoded) the products created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + + sort_by_field : typing.Optional[GetProductsRequestSortByField] + Sort the results by a specific field. Default sort field is `created_at` when not passed. is_deleted : typing.Optional[str] Filter products by their deletion status. If `false` is passed, only products that are not deleted will be returned. @@ -1154,6 +1207,7 @@ def get_products( "offset": offset, "sort": sort, "ids": ids, + "search": search, "name": name, "price[lte]": price_lte, "price[gte]": price_gte, @@ -1161,9 +1215,16 @@ def get_products( "price[gt]": price_gt, "price[eq]": price_eq, "price[ne]": price_ne, + "alternativePrice[lte]": alternative_price_lte, + "alternativePrice[gte]": alternative_price_gte, + "alternativePrice[lt]": alternative_price_lt, + "alternativePrice[gt]": alternative_price_gt, + "alternativePrice[eq]": alternative_price_eq, + "alternativePrice[ne]": alternative_price_ne, "categories": categories, "modifiedSince": modified_since, "createdSince": created_since, + "sortByField": sort_by_field, "isDeleted": is_deleted, }, request_options=request_options, @@ -1212,6 +1273,7 @@ def create_update_product( meta_info: typing.Optional[typing.Dict[str, CreateUpdateProductRequestMetaInfoValue]] = OMIT, parent_id: typing.Optional[str] = OMIT, price: typing.Optional[float] = OMIT, + alternative_price: typing.Optional[float] = OMIT, sku: typing.Optional[str] = OMIT, stock: typing.Optional[float] = OMIT, update_enabled: typing.Optional[bool] = OMIT, @@ -1219,13 +1281,15 @@ def create_update_product( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[typing.Optional[CreateUpdateProductResponse]]: """ + Create a new ecommerce product or update an existing one, identified by the mandatory `id` field. When `updateEnabled` is `false` (the default), the endpoint inserts a new product and returns `201`; if the product ID already exists, a `400` error is returned. When `updateEnabled` is `true`, the endpoint performs an upsert, returning `201` for a new product or `204` for an update. The `name` field is mandatory for creation but optional for updates. Product images are downloaded, validated (max 5 MB, formats: jpeg, jpg, png, bmp, gif, webp), and re-hosted on S3. The `metaInfo` object supports up to 20 keys with a cumulative size limit of approximately 1000 KB. + Parameters ---------- id : str Product ID for which you requested the details name : str - Mandatory in case of creation**. Name of the product for which you requested the details + **Mandatory in case of creation**. Name of the product, as displayed in the shop brand : typing.Optional[str] Brand of the product @@ -1254,6 +1318,9 @@ def create_update_product( price : typing.Optional[float] Price of the product + alternative_price : typing.Optional[float] + Alternative price of the product + sku : typing.Optional[str] Product identifier from the shop @@ -1261,7 +1328,7 @@ def create_update_product( Current stock value of the product from the shop's database update_enabled : typing.Optional[bool] - Facilitate to update the existing category in the same request (updateEnabled = true) + Facilitate to update the existing product in the same request (updateEnabled = true) url : typing.Optional[str] URL to the product @@ -1293,6 +1360,7 @@ def create_update_product( "name": name, "parentId": parent_id, "price": price, + "alternativePrice": alternative_price, "sku": sku, "stock": stock, "updateEnabled": update_enabled, @@ -1344,13 +1412,15 @@ def create_update_batch_products( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreateUpdateBatchProductsResponse]: """ + Create or update multiple ecommerce products in a single request. The `products` array accepts up to 100 product objects for creation (or up to 1000 when `updateEnabled` is `true` and the account has an increased limit). Each product requires a unique `id` and `name` (name is mandatory for creation only). When `updateEnabled` is `false`, all products are inserted as new; if any ID already exists, a `400` error is returned. When `updateEnabled` is `true`, existing products are updated and new ones are created via upsert. Duplicate IDs within the same request payload are rejected. The response returns the count of created and updated products. + Parameters ---------- products : typing.Sequence[CreateUpdateBatchProductsRequestProductsItem] array of products objects update_enabled : typing.Optional[bool] - Facilitate to update the existing categories in the same request (updateEnabled = true) + Facilitate to update the existing products in the same request (updateEnabled = true) request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1411,6 +1481,8 @@ def get_product_info( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[GetProductDetails]: """ + Retrieve the full details of a single ecommerce product by its unique ID. The response includes the product name, price, SKU, URL, image URLs (original and thumbnails), categories, stock level, meta information, creation and modification timestamps, and deletion status. Returns a `404` error if no product matches the provided ID. + Parameters ---------- id : str @@ -1422,7 +1494,7 @@ def get_product_info( Returns ------- HttpResponse[GetProductDetails] - Product informations + Product details """ _response = self._client_wrapper.httpx_client.request( f"products/{jsonable_encoder(id)}", @@ -1478,6 +1550,8 @@ def create_product_alert( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Register a contact to receive an alert for a specific product event, such as `back_in_stock`. At least one contact identifier (`ext_id`, `email`, or `sms`) must be provided; when multiple are given, priority is `ext_id` > `email` > `sms`. Returns a `404` error if the product ID does not exist, and a `403` error if product alerts are not enabled for the account. + Parameters ---------- id : str @@ -1583,6 +1657,8 @@ async def get_categories( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetCategoriesResponse]: """ + Retrieve a paginated list of all ecommerce categories stored in your Brevo account. Results are sorted by creation date in descending order by default, and can be filtered by category IDs, name, modification date, creation date, or deletion status. The response includes a `count` field with the total number of matching categories, and pagination defaults to 50 categories per page (maximum 100). + Parameters ---------- limit : typing.Optional[int] @@ -1674,6 +1750,8 @@ async def create_update_category( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[typing.Optional[CreateUpdateCategoryResponse]]: """ + Create a new ecommerce category or update an existing one, identified by the mandatory `id` field. When `updateEnabled` is set to `false` (the default), the endpoint performs an insert and returns `201`; if the category ID already exists, a `400` error is returned. When `updateEnabled` is `true`, the endpoint performs an upsert, returning `201` for a new category or `204` when an existing category is updated. The `name` field is mandatory for creation but optional for updates. + Parameters ---------- id : str @@ -1759,6 +1837,8 @@ async def create_update_batch_category( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreateUpdateBatchCategoryResponse]: """ + Create or update multiple ecommerce categories in a single request. The `categories` array accepts up to 100 category objects, each requiring a unique `id`. When `updateEnabled` is `false` (the default), all categories are inserted as new; if any ID already exists, a `400` error is returned. When `updateEnabled` is `true`, existing categories are updated and new ones are created via upsert. Duplicate IDs within the same request payload are rejected. The response returns the count of created and updated categories. + Parameters ---------- categories : typing.Sequence[CreateUpdateBatchCategoryRequestCategoriesItem] @@ -1826,6 +1906,8 @@ async def get_category_info( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[GetCategoryDetails]: """ + Retrieve the full details of a single ecommerce category by its unique ID. The response includes the category name, URL, creation and modification timestamps, and deletion status. Returns a `404` error if no category matches the provided ID. + Parameters ---------- id : str @@ -1837,7 +1919,7 @@ async def get_category_info( Returns ------- AsyncHttpResponse[GetCategoryDetails] - Category informations + Category details """ _response = await self._client_wrapper.httpx_client.request( f"categories/{jsonable_encoder(id)}", @@ -1951,6 +2033,8 @@ async def get_attribution_metrics_for_one_or_more_brevo_campaigns_or_workflows( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetEcommerceAttributionMetricsResponse]: """ + Retrieve aggregated ecommerce attribution metrics for one or more Brevo email campaigns, SMS campaigns, or automation workflows. You can optionally filter by a date range using `periodFrom` and `periodTo` in RFC3339 format. The response includes per-source metrics (orders count, revenue, and average basket) as well as aggregated totals across all requested sources. + Parameters ---------- period_from : typing.Optional[dt.datetime] @@ -2030,6 +2114,8 @@ async def get_detailed_attribution_metrics_for_a_single_brevo_campaign_or_workfl request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetEcommerceAttributionMetricsConversionSourceConversionSourceIdResponse]: """ + Retrieve detailed attribution metrics for a single Brevo campaign or automation workflow, identified by its conversion source type and ID. The response includes orders count, revenue, average basket value, and the number of new customers attributed to that specific campaign or workflow. + Parameters ---------- conversion_source : GetEcommerceAttributionMetricsConversionSourceConversionSourceIdRequestConversionSource @@ -2089,6 +2175,8 @@ async def get_attributed_product_sales_for_a_single_brevo_campaign_or_workflow( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetEcommerceAttributionProductsConversionSourceConversionSourceIdResponse]: """ + Retrieve the list of products whose sales have been attributed to a specific Brevo campaign or automation workflow. Each product entry includes its ID, name, SKU, image URL, product URL, price, revenue, and orders count. The conversion source type must be one of `email_campaign`, `sms_campaign`, `automation_workflow_email`, or `automation_workflow_sms`. + Parameters ---------- conversion_source : GetEcommerceAttributionProductsConversionSourceConversionSourceIdRequestConversionSource @@ -2144,6 +2232,8 @@ async def get_the_iso4217compliant_display_currency_code_for_your_brevo_account( self, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[GetEcommerceConfigDisplayCurrencyResponse]: """ + Retrieve the ISO 4217 display currency code currently configured for your Brevo ecommerce account. This currency is used to display monetary values across the ecommerce dashboard and reports. Returns a `403` error if ecommerce is not activated on the account. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -2215,6 +2305,8 @@ async def set_config_display_currency( self, *, code: str, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[SetConfigDisplayCurrencyResponse]: """ + Set or update the ISO 4217 display currency code for your Brevo ecommerce account. This currency determines how monetary values are displayed in the ecommerce dashboard and reports. The provided currency code must be a valid ISO 4217 code; invalid codes result in a `422` error. Returns a `403` error if ecommerce is not activated on the account. + Parameters ---------- code : str @@ -2433,7 +2525,7 @@ async def create_order( Identifies the contact associated with the order. meta_info : typing.Optional[typing.Dict[str, OrderMetaInfoValue]] - Meta data of order to store additional detal such as custom message, customer type, source. + Meta data of order to store additional detail such as custom message, customer type, source. store_id : typing.Optional[str] ID of store where the order is placed @@ -2515,10 +2607,10 @@ async def create_batch_order( array of order objects historical : typing.Optional[bool] - Defines wether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual. + Defines whether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual. notify_url : typing.Optional[str] - Notify Url provided by client_dev to get the status of batch request + Webhook URL to receive the status of the batch request request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2581,6 +2673,7 @@ async def get_products( offset: typing.Optional[int] = None, sort: typing.Optional[GetProductsRequestSort] = None, ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + search: typing.Optional[str] = None, name: typing.Optional[str] = None, price_lte: typing.Optional[float] = None, price_gte: typing.Optional[float] = None, @@ -2588,13 +2681,22 @@ async def get_products( price_gt: typing.Optional[float] = None, price_eq: typing.Optional[float] = None, price_ne: typing.Optional[float] = None, + alternative_price_lte: typing.Optional[float] = None, + alternative_price_gte: typing.Optional[float] = None, + alternative_price_lt: typing.Optional[float] = None, + alternative_price_gt: typing.Optional[float] = None, + alternative_price_eq: typing.Optional[float] = None, + alternative_price_ne: typing.Optional[float] = None, categories: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, modified_since: typing.Optional[str] = None, created_since: typing.Optional[str] = None, + sort_by_field: typing.Optional[GetProductsRequestSortByField] = None, is_deleted: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetProductsResponse]: """ + Retrieve a paginated list of all ecommerce products stored in your Brevo account. Results are sorted by creation date in descending order by default, and can be filtered by product IDs, name (minimum 3 characters), price range, category IDs, modification date, creation date, or deletion status. Use the `search` parameter to query across SKU, name, and ID simultaneously β€” results are prioritized as exact SKU match > SKU prefix match > name match > ID match. Pagination defaults to 50 products per page (maximum 1000), and the response includes a `count` field with the total number of matching products. + Parameters ---------- limit : typing.Optional[int] @@ -2609,6 +2711,9 @@ async def get_products( ids : typing.Optional[typing.Union[str, typing.Sequence[str]]] Filter by product ids + search : typing.Optional[str] + Search products simultaneously across SKU, name, and ID fields. Results are returned in the following priority order: **exact SKU match** > **SKU prefix match** > **name match** > **ID match**. For example, `?search=123` on products with `{sku: "123"}` and `{sku: "123456"}` returns the exact SKU match first. + name : typing.Optional[str] Filter by product name, minimum 3 characters should be present for search. @@ -2630,14 +2735,35 @@ async def get_products( price_ne : typing.Optional[float] Price filter for products not equals to particular amount + alternative_price_lte : typing.Optional[float] + Alternative price filter for products less than and equals to particular amount + + alternative_price_gte : typing.Optional[float] + Alternative price filter for products greater than and equals to particular amount + + alternative_price_lt : typing.Optional[float] + Alternative price filter for products less than particular amount + + alternative_price_gt : typing.Optional[float] + Alternative price filter for products greater than particular amount + + alternative_price_eq : typing.Optional[float] + Alternative price filter for products equals to particular amount + + alternative_price_ne : typing.Optional[float] + Alternative price filter for products not equals to particular amount + categories : typing.Optional[typing.Union[str, typing.Sequence[str]]] Filter by categories ids modified_since : typing.Optional[str] - Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + Filter (urlencoded) the products modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** created_since : typing.Optional[str] - Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + Filter (urlencoded) the products created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** + + sort_by_field : typing.Optional[GetProductsRequestSortByField] + Sort the results by a specific field. Default sort field is `created_at` when not passed. is_deleted : typing.Optional[str] Filter products by their deletion status. If `false` is passed, only products that are not deleted will be returned. @@ -2658,6 +2784,7 @@ async def get_products( "offset": offset, "sort": sort, "ids": ids, + "search": search, "name": name, "price[lte]": price_lte, "price[gte]": price_gte, @@ -2665,9 +2792,16 @@ async def get_products( "price[gt]": price_gt, "price[eq]": price_eq, "price[ne]": price_ne, + "alternativePrice[lte]": alternative_price_lte, + "alternativePrice[gte]": alternative_price_gte, + "alternativePrice[lt]": alternative_price_lt, + "alternativePrice[gt]": alternative_price_gt, + "alternativePrice[eq]": alternative_price_eq, + "alternativePrice[ne]": alternative_price_ne, "categories": categories, "modifiedSince": modified_since, "createdSince": created_since, + "sortByField": sort_by_field, "isDeleted": is_deleted, }, request_options=request_options, @@ -2716,6 +2850,7 @@ async def create_update_product( meta_info: typing.Optional[typing.Dict[str, CreateUpdateProductRequestMetaInfoValue]] = OMIT, parent_id: typing.Optional[str] = OMIT, price: typing.Optional[float] = OMIT, + alternative_price: typing.Optional[float] = OMIT, sku: typing.Optional[str] = OMIT, stock: typing.Optional[float] = OMIT, update_enabled: typing.Optional[bool] = OMIT, @@ -2723,13 +2858,15 @@ async def create_update_product( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[typing.Optional[CreateUpdateProductResponse]]: """ + Create a new ecommerce product or update an existing one, identified by the mandatory `id` field. When `updateEnabled` is `false` (the default), the endpoint inserts a new product and returns `201`; if the product ID already exists, a `400` error is returned. When `updateEnabled` is `true`, the endpoint performs an upsert, returning `201` for a new product or `204` for an update. The `name` field is mandatory for creation but optional for updates. Product images are downloaded, validated (max 5 MB, formats: jpeg, jpg, png, bmp, gif, webp), and re-hosted on S3. The `metaInfo` object supports up to 20 keys with a cumulative size limit of approximately 1000 KB. + Parameters ---------- id : str Product ID for which you requested the details name : str - Mandatory in case of creation**. Name of the product for which you requested the details + **Mandatory in case of creation**. Name of the product, as displayed in the shop brand : typing.Optional[str] Brand of the product @@ -2758,6 +2895,9 @@ async def create_update_product( price : typing.Optional[float] Price of the product + alternative_price : typing.Optional[float] + Alternative price of the product + sku : typing.Optional[str] Product identifier from the shop @@ -2765,7 +2905,7 @@ async def create_update_product( Current stock value of the product from the shop's database update_enabled : typing.Optional[bool] - Facilitate to update the existing category in the same request (updateEnabled = true) + Facilitate to update the existing product in the same request (updateEnabled = true) url : typing.Optional[str] URL to the product @@ -2797,6 +2937,7 @@ async def create_update_product( "name": name, "parentId": parent_id, "price": price, + "alternativePrice": alternative_price, "sku": sku, "stock": stock, "updateEnabled": update_enabled, @@ -2848,13 +2989,15 @@ async def create_update_batch_products( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreateUpdateBatchProductsResponse]: """ + Create or update multiple ecommerce products in a single request. The `products` array accepts up to 100 product objects for creation (or up to 1000 when `updateEnabled` is `true` and the account has an increased limit). Each product requires a unique `id` and `name` (name is mandatory for creation only). When `updateEnabled` is `false`, all products are inserted as new; if any ID already exists, a `400` error is returned. When `updateEnabled` is `true`, existing products are updated and new ones are created via upsert. Duplicate IDs within the same request payload are rejected. The response returns the count of created and updated products. + Parameters ---------- products : typing.Sequence[CreateUpdateBatchProductsRequestProductsItem] array of products objects update_enabled : typing.Optional[bool] - Facilitate to update the existing categories in the same request (updateEnabled = true) + Facilitate to update the existing products in the same request (updateEnabled = true) request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2915,6 +3058,8 @@ async def get_product_info( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[GetProductDetails]: """ + Retrieve the full details of a single ecommerce product by its unique ID. The response includes the product name, price, SKU, URL, image URLs (original and thumbnails), categories, stock level, meta information, creation and modification timestamps, and deletion status. Returns a `404` error if no product matches the provided ID. + Parameters ---------- id : str @@ -2926,7 +3071,7 @@ async def get_product_info( Returns ------- AsyncHttpResponse[GetProductDetails] - Product informations + Product details """ _response = await self._client_wrapper.httpx_client.request( f"products/{jsonable_encoder(id)}", @@ -2982,6 +3127,8 @@ async def create_product_alert( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Register a contact to receive an alert for a specific product event, such as `back_in_stock`. At least one contact identifier (`ext_id`, `email`, or `sms`) must be provided; when multiple are given, priority is `ext_id` > `email` > `sms`. Returns a `404` error if the product ID does not exist, and a `403` error if product alerts are not enabled for the account. + Parameters ---------- id : str diff --git a/src/brevo/ecommerce/types/__init__.py b/src/brevo/ecommerce/types/__init__.py index c3bb06b..08fdcb0 100644 --- a/src/brevo/ecommerce/types/__init__.py +++ b/src/brevo/ecommerce/types/__init__.py @@ -43,6 +43,7 @@ from .get_ecommerce_config_display_currency_response import GetEcommerceConfigDisplayCurrencyResponse from .get_orders_request_sort import GetOrdersRequestSort from .get_products_request_sort import GetProductsRequestSort + from .get_products_request_sort_by_field import GetProductsRequestSortByField from .get_products_response import GetProductsResponse from .set_config_display_currency_response import SetConfigDisplayCurrencyResponse _dynamic_imports: typing.Dict[str, str] = { @@ -69,6 +70,7 @@ "GetEcommerceConfigDisplayCurrencyResponse": ".get_ecommerce_config_display_currency_response", "GetOrdersRequestSort": ".get_orders_request_sort", "GetProductsRequestSort": ".get_products_request_sort", + "GetProductsRequestSortByField": ".get_products_request_sort_by_field", "GetProductsResponse": ".get_products_response", "SetConfigDisplayCurrencyResponse": ".set_config_display_currency_response", } @@ -119,6 +121,7 @@ def __dir__(): "GetEcommerceConfigDisplayCurrencyResponse", "GetOrdersRequestSort", "GetProductsRequestSort", + "GetProductsRequestSortByField", "GetProductsResponse", "SetConfigDisplayCurrencyResponse", ] diff --git a/src/brevo/ecommerce/types/create_update_batch_products_request_products_item.py b/src/brevo/ecommerce/types/create_update_batch_products_request_products_item.py index fc87083..8affa3c 100644 --- a/src/brevo/ecommerce/types/create_update_batch_products_request_products_item.py +++ b/src/brevo/ecommerce/types/create_update_batch_products_request_products_item.py @@ -61,7 +61,7 @@ class CreateUpdateBatchProductsRequestProductsItem(UncheckedBaseModel): ] = None name: str = pydantic.Field() """ - Mandatory in case of creation**. Name of the product for which you requested the details + **Mandatory in case of creation**. Name of the product, as displayed in the shop """ parent_id: typing_extensions.Annotated[ @@ -74,6 +74,11 @@ class CreateUpdateBatchProductsRequestProductsItem(UncheckedBaseModel): Price of the product """ + alternative_price: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="alternativePrice"), + pydantic.Field(alias="alternativePrice", description="Alternative price of the product"), + ] = None sku: typing.Optional[str] = pydantic.Field(default=None) """ Product identifier from the shop diff --git a/src/brevo/ecommerce/types/create_update_category_response.py b/src/brevo/ecommerce/types/create_update_category_response.py index c5aecf7..b3b0944 100644 --- a/src/brevo/ecommerce/types/create_update_category_response.py +++ b/src/brevo/ecommerce/types/create_update_category_response.py @@ -8,7 +8,7 @@ class CreateUpdateCategoryResponse(UncheckedBaseModel): - id: typing.Optional[int] = pydantic.Field(default=None) + id: typing.Optional[str] = pydantic.Field(default=None) """ ID of the category when a new category is created """ diff --git a/src/brevo/ecommerce/types/create_update_product_response.py b/src/brevo/ecommerce/types/create_update_product_response.py index 40b944b..64b9179 100644 --- a/src/brevo/ecommerce/types/create_update_product_response.py +++ b/src/brevo/ecommerce/types/create_update_product_response.py @@ -8,9 +8,9 @@ class CreateUpdateProductResponse(UncheckedBaseModel): - id: typing.Optional[int] = pydantic.Field(default=None) + id: typing.Optional[str] = pydantic.Field(default=None) """ - ID of the Product when a new product is created + ID of the product when a new product is created """ if IS_PYDANTIC_V2: diff --git a/src/brevo/ecommerce/types/get_products_request_sort_by_field.py b/src/brevo/ecommerce/types/get_products_request_sort_by_field.py new file mode 100644 index 0000000..b4336bb --- /dev/null +++ b/src/brevo/ecommerce/types/get_products_request_sort_by_field.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GetProductsRequestSortByField = typing.Union[typing.Literal["created_at", "name", "price", "id"], typing.Any] diff --git a/src/brevo/email_campaigns/__init__.py b/src/brevo/email_campaigns/__init__.py index ba1c7cc..f698560 100644 --- a/src/brevo/email_campaigns/__init__.py +++ b/src/brevo/email_campaigns/__init__.py @@ -22,6 +22,8 @@ GetAbTestCampaignResultResponseWinningVersion, GetEmailCampaignRequestStatistics, GetEmailCampaignResponse, + GetEmailCampaignResponseEmailExpirationDate, + GetEmailCampaignResponseEmailExpirationDateUnit, GetEmailCampaignResponseSender, GetEmailCampaignResponseStatus, GetEmailCampaignResponseType, @@ -31,6 +33,8 @@ GetEmailCampaignsRequestType, GetEmailCampaignsResponse, GetEmailCampaignsResponseCampaignsItem, + GetEmailCampaignsResponseCampaignsItemEmailExpirationDate, + GetEmailCampaignsResponseCampaignsItemEmailExpirationDateUnit, GetEmailCampaignsResponseCampaignsItemSender, GetEmailCampaignsResponseCampaignsItemStatus, GetEmailCampaignsResponseCampaignsItemType, @@ -58,6 +62,8 @@ "GetAbTestCampaignResultResponseWinningVersion": ".types", "GetEmailCampaignRequestStatistics": ".types", "GetEmailCampaignResponse": ".types", + "GetEmailCampaignResponseEmailExpirationDate": ".types", + "GetEmailCampaignResponseEmailExpirationDateUnit": ".types", "GetEmailCampaignResponseSender": ".types", "GetEmailCampaignResponseStatus": ".types", "GetEmailCampaignResponseType": ".types", @@ -67,6 +73,8 @@ "GetEmailCampaignsRequestType": ".types", "GetEmailCampaignsResponse": ".types", "GetEmailCampaignsResponseCampaignsItem": ".types", + "GetEmailCampaignsResponseCampaignsItemEmailExpirationDate": ".types", + "GetEmailCampaignsResponseCampaignsItemEmailExpirationDateUnit": ".types", "GetEmailCampaignsResponseCampaignsItemSender": ".types", "GetEmailCampaignsResponseCampaignsItemStatus": ".types", "GetEmailCampaignsResponseCampaignsItemType": ".types", @@ -117,6 +125,8 @@ def __dir__(): "GetAbTestCampaignResultResponseWinningVersion", "GetEmailCampaignRequestStatistics", "GetEmailCampaignResponse", + "GetEmailCampaignResponseEmailExpirationDate", + "GetEmailCampaignResponseEmailExpirationDateUnit", "GetEmailCampaignResponseSender", "GetEmailCampaignResponseStatus", "GetEmailCampaignResponseType", @@ -126,6 +136,8 @@ def __dir__(): "GetEmailCampaignsRequestType", "GetEmailCampaignsResponse", "GetEmailCampaignsResponseCampaignsItem", + "GetEmailCampaignsResponseCampaignsItemEmailExpirationDate", + "GetEmailCampaignsResponseCampaignsItemEmailExpirationDateUnit", "GetEmailCampaignsResponseCampaignsItemSender", "GetEmailCampaignsResponseCampaignsItemStatus", "GetEmailCampaignsResponseCampaignsItemType", diff --git a/src/brevo/email_campaigns/client.py b/src/brevo/email_campaigns/client.py index cdd70a4..961c092 100644 --- a/src/brevo/email_campaigns/client.py +++ b/src/brevo/email_campaigns/client.py @@ -61,11 +61,12 @@ def get_email_campaigns( offset: typing.Optional[int] = None, sort: typing.Optional[GetEmailCampaignsRequestSort] = None, exclude_html_content: typing.Optional[bool] = None, + exclude_pdf_attachment: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetEmailCampaignsResponse: """ The response payload for this endpoint has changed - You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/get-all-marketing-campaigns). + You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/2023/2/7). Parameters ---------- @@ -76,13 +77,13 @@ def get_email_campaigns( Filter on the status of the campaign statistics : typing.Optional[GetEmailCampaignsRequestStatistics] - Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the **Get Campaign Report** endpoint. + Filter on the type of statistics required. Example: **globalStats** value will only fetch globalStats info of the campaign in the returned response. This option only returns data for events that occurred in the last 6 months. For older campaigns, it is advisable to use the **Get Campaign Report** endpoint. start_date : typing.Optional[str] - **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. The date range between `startDate` and `endDate` must not exceed 2 years. `startDate` must not be in the future. end_date : typing.Optional[str] - **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. The date range between `startDate` and `endDate` must not exceed 2 years. `endDate` must not be in the future. limit : typing.Optional[int] Number of documents per page @@ -94,7 +95,10 @@ def get_email_campaigns( Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed exclude_html_content : typing.Optional[bool] - Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body + Use this flag to exclude htmlContent from the response body. If set to **true**, the htmlContent field will be returned as an empty string in the response body. + + exclude_pdf_attachment : typing.Optional[bool] + Use this flag to filter out campaigns that have a PDF attachment. If set to **true**, only campaigns without a PDF attachment (or with no attachment at all) will be returned. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -102,7 +106,7 @@ def get_email_campaigns( Returns ------- GetEmailCampaignsResponse - Email campaigns informations + Email campaigns information Examples -------- @@ -123,6 +127,7 @@ def get_email_campaigns( offset=offset, sort=sort, exclude_html_content=exclude_html_content, + exclude_pdf_attachment=exclude_pdf_attachment, request_options=request_options, ) return _response.data @@ -165,13 +170,15 @@ def create_email_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> CreateEmailCampaignResponse: """ + Create a new email campaign. The campaign requires at minimum a name and sender details, and is created in draft status by default. You must provide email content via one of three mutually exclusive options: htmlContent (inline HTML), htmlUrl (remote URL), or templateId (existing template); additionally, A/B testing can be enabled by setting abTesting to true with subjectA and subjectB, but this is incompatible with sendAtBestTime. + Parameters ---------- name : str Name of the campaign sender : CreateEmailCampaignRequestSender - Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{"name":"xyz", "email":"example@abc.com"}** **{"name":"xyz", "id":123}** + Sender details including id or email and name (optional). Only one of either Sender’s email or Sender’s ID shall be passed in one request at a time. Passing both `email` and `id` will result in an error. For example: **{"name":"xyz", "email":"example@abc.com"}** or **{"name":"xyz", "id":123}** ab_testing : typing.Optional[bool] Status of A/B Test. abTesting = false means it is disabled & abTesting = true means it is enabled. **subjectA, subjectB, splitRule, winnerCriteria & winnerDelay** will be considered when abTesting is set to true. subjectA & subjectB are mandatory together & subject if passed is ignored. **Can be set to true only if sendAtBestTime is false**. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B @@ -189,10 +196,10 @@ def create_email_campaign( Header of the email campaign html_content : typing.Optional[str] - Mandatory if htmlUrl and templateId are empty. Body of the message (HTML). + **Mandatory if htmlUrl and templateId are empty.** Body of the message (HTML). Must have more than 10 characters and be less than 1MB in size. Cannot be used together with `htmlUrl` or `templateId`. html_url : typing.Optional[str] - **Mandatory if htmlContent and templateId are empty**. Url to the message (HTML). For example: **https://html.domain.com** + **Mandatory if htmlContent and templateId are empty.** URL to the message (HTML). Cannot be used together with `htmlContent` or `templateId`. For example: **https://html.domain.com** increase_rate : typing.Optional[int] **Mandatory if ipWarmupEnable is set to true**. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. @@ -243,7 +250,7 @@ def create_email_campaign( Tag of the campaign template_id : typing.Optional[int] - **Mandatory if htmlContent and htmlUrl are empty**. Id of the transactional email template with status _active_. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. + **Mandatory if htmlContent and htmlUrl are empty.** Id of the transactional email template with status _active_. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. Cannot be used together with `htmlContent` or `htmlUrl`. to_field : typing.Optional[str] To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization @@ -329,6 +336,8 @@ def upload_image_to_gallery( request_options: typing.Optional[RequestOptions] = None, ) -> UploadImageToGalleryResponse: """ + Upload an image to your account''s image gallery by providing an absolute URL to the image. The maximum allowed image size is 2MB and supported formats are jpeg, jpg, png, bmp, and gif; local file uploads are not supported. + Parameters ---------- image_url : str @@ -370,13 +379,15 @@ def get_email_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> GetEmailCampaignResponse: """ + Retrieve detailed information about a specific email campaign by its ID, including recipients, statistics, and HTML content. Use the statistics query parameter to select which statistics to include (globalStats, linksStats, statsByDomain, statsByDevice, or statsByBrowser); statsByDevice and statsByBrowser are only available on this single-campaign endpoint. You can exclude HTML content from the response by setting excludeHtmlContent to true. + Parameters ---------- campaign_id : int Id of the campaign statistics : typing.Optional[GetEmailCampaignRequestStatistics] - Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. + Filter on the type of statistics required. Example: **globalStats** value will only fetch globalStats info of the campaign in the returned response. `statsByDevice` and `statsByBrowser` are only available when retrieving a single campaign (not in the list endpoint). exclude_html_content : typing.Optional[bool] Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body @@ -387,7 +398,7 @@ def get_email_campaign( Returns ------- GetEmailCampaignResponse - Email campaign informations + Email campaign information Examples -------- @@ -447,6 +458,8 @@ def update_email_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing email campaign''s properties such as name, subject, content, sender, recipients, schedule, and A/B testing configuration. The campaign must exist and the request body must contain at least one valid field to update. Only draft or scheduled campaigns can be modified; if sendAtBestTime is enabled, IP warmup will be automatically disabled. + Parameters ---------- campaign_id : int @@ -608,6 +621,8 @@ def delete_email_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ + Delete an email campaign by its campaign ID. Only campaigns that have not been scheduled can be deleted; attempting to delete a campaign that has already been scheduled will return a 403 permission denied error. Related data in templates, newsletter builder, and schedule collections is also cleaned up. + Parameters ---------- campaign_id : int @@ -676,6 +691,8 @@ def email_export_recipients( request_options: typing.Optional[RequestOptions] = None, ) -> EmailExportRecipientsResponse: """ + Export the recipients of a sent email campaign as an asynchronous process, filtered by recipient type (e.g. openers, clickers, hardBounces). The recipientsType field is required and determines which subset of recipients to export. An optional notifyURL webhook will be called once the export is complete, and the response returns a processId to track the export status. + Parameters ---------- campaign_id : int @@ -716,6 +733,8 @@ def send_email_campaign_now( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ + Send an existing email campaign immediately by scheduling it for the current time. The campaign must have valid recipients and content configured before sending. The system verifies your account''s send limit and credit balance before dispatching; if credits are insufficient, a 402 error is returned. + Parameters ---------- campaign_id : int @@ -799,6 +818,8 @@ def send_test_email( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Send a test version of an email campaign to specified email addresses or your entire test list. If the emailTo array is left empty, the test mail will be sent to all addresses in your test list. You can send a maximum of 50 test emails per day. + Parameters ---------- campaign_id : int @@ -869,6 +890,8 @@ def update_campaign_status( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update the status of an email campaign, such as suspending, archiving, or replicating it. Available status values include suspended, archive, darchive, sent, queued, replicate, replicateTemplate, cancel, and draft. Note that the replicateTemplate status is only available for template type campaigns. + Parameters ---------- campaign_id : int @@ -926,11 +949,12 @@ async def get_email_campaigns( offset: typing.Optional[int] = None, sort: typing.Optional[GetEmailCampaignsRequestSort] = None, exclude_html_content: typing.Optional[bool] = None, + exclude_pdf_attachment: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetEmailCampaignsResponse: """ The response payload for this endpoint has changed - You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/get-all-marketing-campaigns). + You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/2023/2/7). Parameters ---------- @@ -941,13 +965,13 @@ async def get_email_campaigns( Filter on the status of the campaign statistics : typing.Optional[GetEmailCampaignsRequestStatistics] - Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the **Get Campaign Report** endpoint. + Filter on the type of statistics required. Example: **globalStats** value will only fetch globalStats info of the campaign in the returned response. This option only returns data for events that occurred in the last 6 months. For older campaigns, it is advisable to use the **Get Campaign Report** endpoint. start_date : typing.Optional[str] - **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. The date range between `startDate` and `endDate` must not exceed 2 years. `startDate` must not be in the future. end_date : typing.Optional[str] - **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. The date range between `startDate` and `endDate` must not exceed 2 years. `endDate` must not be in the future. limit : typing.Optional[int] Number of documents per page @@ -959,7 +983,10 @@ async def get_email_campaigns( Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed exclude_html_content : typing.Optional[bool] - Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body + Use this flag to exclude htmlContent from the response body. If set to **true**, the htmlContent field will be returned as an empty string in the response body. + + exclude_pdf_attachment : typing.Optional[bool] + Use this flag to filter out campaigns that have a PDF attachment. If set to **true**, only campaigns without a PDF attachment (or with no attachment at all) will be returned. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -967,7 +994,7 @@ async def get_email_campaigns( Returns ------- GetEmailCampaignsResponse - Email campaigns informations + Email campaigns information Examples -------- @@ -996,6 +1023,7 @@ async def main() -> None: offset=offset, sort=sort, exclude_html_content=exclude_html_content, + exclude_pdf_attachment=exclude_pdf_attachment, request_options=request_options, ) return _response.data @@ -1038,13 +1066,15 @@ async def create_email_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> CreateEmailCampaignResponse: """ + Create a new email campaign. The campaign requires at minimum a name and sender details, and is created in draft status by default. You must provide email content via one of three mutually exclusive options: htmlContent (inline HTML), htmlUrl (remote URL), or templateId (existing template); additionally, A/B testing can be enabled by setting abTesting to true with subjectA and subjectB, but this is incompatible with sendAtBestTime. + Parameters ---------- name : str Name of the campaign sender : CreateEmailCampaignRequestSender - Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{"name":"xyz", "email":"example@abc.com"}** **{"name":"xyz", "id":123}** + Sender details including id or email and name (optional). Only one of either Sender’s email or Sender’s ID shall be passed in one request at a time. Passing both `email` and `id` will result in an error. For example: **{"name":"xyz", "email":"example@abc.com"}** or **{"name":"xyz", "id":123}** ab_testing : typing.Optional[bool] Status of A/B Test. abTesting = false means it is disabled & abTesting = true means it is enabled. **subjectA, subjectB, splitRule, winnerCriteria & winnerDelay** will be considered when abTesting is set to true. subjectA & subjectB are mandatory together & subject if passed is ignored. **Can be set to true only if sendAtBestTime is false**. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B @@ -1062,10 +1092,10 @@ async def create_email_campaign( Header of the email campaign html_content : typing.Optional[str] - Mandatory if htmlUrl and templateId are empty. Body of the message (HTML). + **Mandatory if htmlUrl and templateId are empty.** Body of the message (HTML). Must have more than 10 characters and be less than 1MB in size. Cannot be used together with `htmlUrl` or `templateId`. html_url : typing.Optional[str] - **Mandatory if htmlContent and templateId are empty**. Url to the message (HTML). For example: **https://html.domain.com** + **Mandatory if htmlContent and templateId are empty.** URL to the message (HTML). Cannot be used together with `htmlContent` or `templateId`. For example: **https://html.domain.com** increase_rate : typing.Optional[int] **Mandatory if ipWarmupEnable is set to true**. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. @@ -1116,7 +1146,7 @@ async def create_email_campaign( Tag of the campaign template_id : typing.Optional[int] - **Mandatory if htmlContent and htmlUrl are empty**. Id of the transactional email template with status _active_. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. + **Mandatory if htmlContent and htmlUrl are empty.** Id of the transactional email template with status _active_. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. Cannot be used together with `htmlContent` or `htmlUrl`. to_field : typing.Optional[str] To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization @@ -1210,6 +1240,8 @@ async def upload_image_to_gallery( request_options: typing.Optional[RequestOptions] = None, ) -> UploadImageToGalleryResponse: """ + Upload an image to your account''s image gallery by providing an absolute URL to the image. The maximum allowed image size is 2MB and supported formats are jpeg, jpg, png, bmp, and gif; local file uploads are not supported. + Parameters ---------- image_url : str @@ -1259,13 +1291,15 @@ async def get_email_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> GetEmailCampaignResponse: """ + Retrieve detailed information about a specific email campaign by its ID, including recipients, statistics, and HTML content. Use the statistics query parameter to select which statistics to include (globalStats, linksStats, statsByDomain, statsByDevice, or statsByBrowser); statsByDevice and statsByBrowser are only available on this single-campaign endpoint. You can exclude HTML content from the response by setting excludeHtmlContent to true. + Parameters ---------- campaign_id : int Id of the campaign statistics : typing.Optional[GetEmailCampaignRequestStatistics] - Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. + Filter on the type of statistics required. Example: **globalStats** value will only fetch globalStats info of the campaign in the returned response. `statsByDevice` and `statsByBrowser` are only available when retrieving a single campaign (not in the list endpoint). exclude_html_content : typing.Optional[bool] Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body @@ -1276,7 +1310,7 @@ async def get_email_campaign( Returns ------- GetEmailCampaignResponse - Email campaign informations + Email campaign information Examples -------- @@ -1344,6 +1378,8 @@ async def update_email_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing email campaign''s properties such as name, subject, content, sender, recipients, schedule, and A/B testing configuration. The campaign must exist and the request body must contain at least one valid field to update. Only draft or scheduled campaigns can be modified; if sendAtBestTime is enabled, IP warmup will be automatically disabled. + Parameters ---------- campaign_id : int @@ -1513,6 +1549,8 @@ async def delete_email_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ + Delete an email campaign by its campaign ID. Only campaigns that have not been scheduled can be deleted; attempting to delete a campaign that has already been scheduled will return a 403 permission denied error. Related data in templates, newsletter builder, and schedule collections is also cleaned up. + Parameters ---------- campaign_id : int @@ -1597,6 +1635,8 @@ async def email_export_recipients( request_options: typing.Optional[RequestOptions] = None, ) -> EmailExportRecipientsResponse: """ + Export the recipients of a sent email campaign as an asynchronous process, filtered by recipient type (e.g. openers, clickers, hardBounces). The recipientsType field is required and determines which subset of recipients to export. An optional notifyURL webhook will be called once the export is complete, and the response returns a processId to track the export status. + Parameters ---------- campaign_id : int @@ -1645,6 +1685,8 @@ async def send_email_campaign_now( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ + Send an existing email campaign immediately by scheduling it for the current time. The campaign must have valid recipients and content configured before sending. The system verifies your account''s send limit and credit balance before dispatching; if credits are insufficient, a 402 error is returned. + Parameters ---------- campaign_id : int @@ -1744,6 +1786,8 @@ async def send_test_email( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Send a test version of an email campaign to specified email addresses or your entire test list. If the emailTo array is left empty, the test mail will be sent to all addresses in your test list. You can send a maximum of 50 test emails per day. + Parameters ---------- campaign_id : int @@ -1832,6 +1876,8 @@ async def update_campaign_status( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update the status of an email campaign, such as suspending, archiving, or replicating it. Available status values include suspended, archive, darchive, sent, queued, replicate, replicateTemplate, cancel, and draft. Note that the replicateTemplate status is only available for template type campaigns. + Parameters ---------- campaign_id : int diff --git a/src/brevo/email_campaigns/raw_client.py b/src/brevo/email_campaigns/raw_client.py index 406285a..59eb67f 100644 --- a/src/brevo/email_campaigns/raw_client.py +++ b/src/brevo/email_campaigns/raw_client.py @@ -12,6 +12,7 @@ from ..core.serialization import convert_and_respect_annotation_metadata from ..core.unchecked_base_model import construct_type from ..errors.bad_request_error import BadRequestError +from ..errors.forbidden_error import ForbiddenError from ..errors.method_not_allowed_error import MethodNotAllowedError from ..errors.not_found_error import NotFoundError from ..errors.payment_required_error import PaymentRequiredError @@ -62,11 +63,12 @@ def get_email_campaigns( offset: typing.Optional[int] = None, sort: typing.Optional[GetEmailCampaignsRequestSort] = None, exclude_html_content: typing.Optional[bool] = None, + exclude_pdf_attachment: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetEmailCampaignsResponse]: """ The response payload for this endpoint has changed - You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/get-all-marketing-campaigns). + You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/2023/2/7). Parameters ---------- @@ -77,13 +79,13 @@ def get_email_campaigns( Filter on the status of the campaign statistics : typing.Optional[GetEmailCampaignsRequestStatistics] - Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the **Get Campaign Report** endpoint. + Filter on the type of statistics required. Example: **globalStats** value will only fetch globalStats info of the campaign in the returned response. This option only returns data for events that occurred in the last 6 months. For older campaigns, it is advisable to use the **Get Campaign Report** endpoint. start_date : typing.Optional[str] - **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. The date range between `startDate` and `endDate` must not exceed 2 years. `startDate` must not be in the future. end_date : typing.Optional[str] - **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. The date range between `startDate` and `endDate` must not exceed 2 years. `endDate` must not be in the future. limit : typing.Optional[int] Number of documents per page @@ -95,7 +97,10 @@ def get_email_campaigns( Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed exclude_html_content : typing.Optional[bool] - Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body + Use this flag to exclude htmlContent from the response body. If set to **true**, the htmlContent field will be returned as an empty string in the response body. + + exclude_pdf_attachment : typing.Optional[bool] + Use this flag to filter out campaigns that have a PDF attachment. If set to **true**, only campaigns without a PDF attachment (or with no attachment at all) will be returned. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -103,7 +108,7 @@ def get_email_campaigns( Returns ------- HttpResponse[GetEmailCampaignsResponse] - Email campaigns informations + Email campaigns information """ _response = self._client_wrapper.httpx_client.request( "emailCampaigns", @@ -118,6 +123,7 @@ def get_email_campaigns( "offset": offset, "sort": sort, "excludeHtmlContent": exclude_html_content, + "excludePdfAttachment": exclude_pdf_attachment, }, request_options=request_options, ) @@ -189,13 +195,15 @@ def create_email_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreateEmailCampaignResponse]: """ + Create a new email campaign. The campaign requires at minimum a name and sender details, and is created in draft status by default. You must provide email content via one of three mutually exclusive options: htmlContent (inline HTML), htmlUrl (remote URL), or templateId (existing template); additionally, A/B testing can be enabled by setting abTesting to true with subjectA and subjectB, but this is incompatible with sendAtBestTime. + Parameters ---------- name : str Name of the campaign sender : CreateEmailCampaignRequestSender - Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{"name":"xyz", "email":"example@abc.com"}** **{"name":"xyz", "id":123}** + Sender details including id or email and name (optional). Only one of either Sender’s email or Sender’s ID shall be passed in one request at a time. Passing both `email` and `id` will result in an error. For example: **{"name":"xyz", "email":"example@abc.com"}** or **{"name":"xyz", "id":123}** ab_testing : typing.Optional[bool] Status of A/B Test. abTesting = false means it is disabled & abTesting = true means it is enabled. **subjectA, subjectB, splitRule, winnerCriteria & winnerDelay** will be considered when abTesting is set to true. subjectA & subjectB are mandatory together & subject if passed is ignored. **Can be set to true only if sendAtBestTime is false**. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B @@ -213,10 +221,10 @@ def create_email_campaign( Header of the email campaign html_content : typing.Optional[str] - Mandatory if htmlUrl and templateId are empty. Body of the message (HTML). + **Mandatory if htmlUrl and templateId are empty.** Body of the message (HTML). Must have more than 10 characters and be less than 1MB in size. Cannot be used together with `htmlUrl` or `templateId`. html_url : typing.Optional[str] - **Mandatory if htmlContent and templateId are empty**. Url to the message (HTML). For example: **https://html.domain.com** + **Mandatory if htmlContent and templateId are empty.** URL to the message (HTML). Cannot be used together with `htmlContent` or `templateId`. For example: **https://html.domain.com** increase_rate : typing.Optional[int] **Mandatory if ipWarmupEnable is set to true**. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. @@ -267,7 +275,7 @@ def create_email_campaign( Tag of the campaign template_id : typing.Optional[int] - **Mandatory if htmlContent and htmlUrl are empty**. Id of the transactional email template with status _active_. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. + **Mandatory if htmlContent and htmlUrl are empty.** Id of the transactional email template with status _active_. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. Cannot be used together with `htmlContent` or `htmlUrl`. to_field : typing.Optional[str] To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization @@ -367,6 +375,17 @@ def create_email_campaign( ), ), ) + if _response.status_code == 405: + raise MethodNotAllowedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorModel, + construct_type( + type_=ErrorModel, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -384,6 +403,8 @@ def upload_image_to_gallery( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[UploadImageToGalleryResponse]: """ + Upload an image to your account''s image gallery by providing an absolute URL to the image. The maximum allowed image size is 2MB and supported formats are jpeg, jpg, png, bmp, and gif; local file uploads are not supported. + Parameters ---------- image_url : str @@ -452,13 +473,15 @@ def get_email_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetEmailCampaignResponse]: """ + Retrieve detailed information about a specific email campaign by its ID, including recipients, statistics, and HTML content. Use the statistics query parameter to select which statistics to include (globalStats, linksStats, statsByDomain, statsByDevice, or statsByBrowser); statsByDevice and statsByBrowser are only available on this single-campaign endpoint. You can exclude HTML content from the response by setting excludeHtmlContent to true. + Parameters ---------- campaign_id : int Id of the campaign statistics : typing.Optional[GetEmailCampaignRequestStatistics] - Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. + Filter on the type of statistics required. Example: **globalStats** value will only fetch globalStats info of the campaign in the returned response. `statsByDevice` and `statsByBrowser` are only available when retrieving a single campaign (not in the list endpoint). exclude_html_content : typing.Optional[bool] Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body @@ -469,7 +492,7 @@ def get_email_campaign( Returns ------- HttpResponse[GetEmailCampaignResponse] - Email campaign informations + Email campaign information """ _response = self._client_wrapper.httpx_client.request( f"emailCampaigns/{jsonable_encoder(campaign_id)}", @@ -560,6 +583,8 @@ def update_email_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Update an existing email campaign''s properties such as name, subject, content, sender, recipients, schedule, and A/B testing configuration. The campaign must exist and the request body must contain at least one valid field to update. Only draft or scheduled campaigns can be modified; if sendAtBestTime is enabled, IP warmup will be automatically disabled. + Parameters ---------- campaign_id : int @@ -744,6 +769,17 @@ def update_email_campaign( ), ), ) + if _response.status_code == 405: + raise MethodNotAllowedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorModel, + construct_type( + type_=ErrorModel, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -757,6 +793,8 @@ def delete_email_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ + Delete an email campaign by its campaign ID. Only campaigns that have not been scheduled can be deleted; attempting to delete a campaign that has already been scheduled will return a 403 permission denied error. Related data in templates, newsletter builder, and schedule collections is also cleaned up. + Parameters ---------- campaign_id : int @@ -788,6 +826,17 @@ def delete_email_campaign( ), ), ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) if _response.status_code == 404: raise NotFoundError( headers=dict(_response.headers), @@ -882,6 +931,8 @@ def email_export_recipients( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[EmailExportRecipientsResponse]: """ + Export the recipients of a sent email campaign as an asynchronous process, filtered by recipient type (e.g. openers, clickers, hardBounces). The recipientsType field is required and determines which subset of recipients to export. An optional notifyURL webhook will be called once the export is complete, and the response returns a processId to track the export status. + Parameters ---------- campaign_id : int @@ -959,6 +1010,8 @@ def send_email_campaign_now( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ + Send an existing email campaign immediately by scheduling it for the current time. The campaign must have valid recipients and content configured before sending. The system verifies your account''s send limit and credit balance before dispatching; if credits are insufficient, a 402 error is returned. + Parameters ---------- campaign_id : int @@ -1107,6 +1160,8 @@ def send_test_email( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Send a test version of an email campaign to specified email addresses or your entire test list. If the emailTo array is left empty, the test mail will be sent to all addresses in your test list. You can send a maximum of 50 test emails per day. + Parameters ---------- campaign_id : int @@ -1252,6 +1307,8 @@ def update_campaign_status( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Update the status of an email campaign, such as suspending, archiving, or replicating it. Available status values include suspended, archive, darchive, sent, queued, replicate, replicateTemplate, cancel, and draft. Note that the replicateTemplate status is only available for template type campaigns. + Parameters ---------- campaign_id : int @@ -1330,11 +1387,12 @@ async def get_email_campaigns( offset: typing.Optional[int] = None, sort: typing.Optional[GetEmailCampaignsRequestSort] = None, exclude_html_content: typing.Optional[bool] = None, + exclude_pdf_attachment: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetEmailCampaignsResponse]: """ The response payload for this endpoint has changed - You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/get-all-marketing-campaigns). + You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/2023/2/7). Parameters ---------- @@ -1345,13 +1403,13 @@ async def get_email_campaigns( Filter on the status of the campaign statistics : typing.Optional[GetEmailCampaignsRequestStatistics] - Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the **Get Campaign Report** endpoint. + Filter on the type of statistics required. Example: **globalStats** value will only fetch globalStats info of the campaign in the returned response. This option only returns data for events that occurred in the last 6 months. For older campaigns, it is advisable to use the **Get Campaign Report** endpoint. start_date : typing.Optional[str] - **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. The date range between `startDate` and `endDate` must not exceed 2 years. `startDate` must not be in the future. end_date : typing.Optional[str] - **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. The date range between `startDate` and `endDate` must not exceed 2 years. `endDate` must not be in the future. limit : typing.Optional[int] Number of documents per page @@ -1363,7 +1421,10 @@ async def get_email_campaigns( Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed exclude_html_content : typing.Optional[bool] - Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body + Use this flag to exclude htmlContent from the response body. If set to **true**, the htmlContent field will be returned as an empty string in the response body. + + exclude_pdf_attachment : typing.Optional[bool] + Use this flag to filter out campaigns that have a PDF attachment. If set to **true**, only campaigns without a PDF attachment (or with no attachment at all) will be returned. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1371,7 +1432,7 @@ async def get_email_campaigns( Returns ------- AsyncHttpResponse[GetEmailCampaignsResponse] - Email campaigns informations + Email campaigns information """ _response = await self._client_wrapper.httpx_client.request( "emailCampaigns", @@ -1386,6 +1447,7 @@ async def get_email_campaigns( "offset": offset, "sort": sort, "excludeHtmlContent": exclude_html_content, + "excludePdfAttachment": exclude_pdf_attachment, }, request_options=request_options, ) @@ -1457,13 +1519,15 @@ async def create_email_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreateEmailCampaignResponse]: """ + Create a new email campaign. The campaign requires at minimum a name and sender details, and is created in draft status by default. You must provide email content via one of three mutually exclusive options: htmlContent (inline HTML), htmlUrl (remote URL), or templateId (existing template); additionally, A/B testing can be enabled by setting abTesting to true with subjectA and subjectB, but this is incompatible with sendAtBestTime. + Parameters ---------- name : str Name of the campaign sender : CreateEmailCampaignRequestSender - Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{"name":"xyz", "email":"example@abc.com"}** **{"name":"xyz", "id":123}** + Sender details including id or email and name (optional). Only one of either Sender’s email or Sender’s ID shall be passed in one request at a time. Passing both `email` and `id` will result in an error. For example: **{"name":"xyz", "email":"example@abc.com"}** or **{"name":"xyz", "id":123}** ab_testing : typing.Optional[bool] Status of A/B Test. abTesting = false means it is disabled & abTesting = true means it is enabled. **subjectA, subjectB, splitRule, winnerCriteria & winnerDelay** will be considered when abTesting is set to true. subjectA & subjectB are mandatory together & subject if passed is ignored. **Can be set to true only if sendAtBestTime is false**. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B @@ -1481,10 +1545,10 @@ async def create_email_campaign( Header of the email campaign html_content : typing.Optional[str] - Mandatory if htmlUrl and templateId are empty. Body of the message (HTML). + **Mandatory if htmlUrl and templateId are empty.** Body of the message (HTML). Must have more than 10 characters and be less than 1MB in size. Cannot be used together with `htmlUrl` or `templateId`. html_url : typing.Optional[str] - **Mandatory if htmlContent and templateId are empty**. Url to the message (HTML). For example: **https://html.domain.com** + **Mandatory if htmlContent and templateId are empty.** URL to the message (HTML). Cannot be used together with `htmlContent` or `templateId`. For example: **https://html.domain.com** increase_rate : typing.Optional[int] **Mandatory if ipWarmupEnable is set to true**. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. @@ -1535,7 +1599,7 @@ async def create_email_campaign( Tag of the campaign template_id : typing.Optional[int] - **Mandatory if htmlContent and htmlUrl are empty**. Id of the transactional email template with status _active_. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. + **Mandatory if htmlContent and htmlUrl are empty.** Id of the transactional email template with status _active_. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. Cannot be used together with `htmlContent` or `htmlUrl`. to_field : typing.Optional[str] To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization @@ -1635,6 +1699,17 @@ async def create_email_campaign( ), ), ) + if _response.status_code == 405: + raise MethodNotAllowedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorModel, + construct_type( + type_=ErrorModel, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -1652,6 +1727,8 @@ async def upload_image_to_gallery( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[UploadImageToGalleryResponse]: """ + Upload an image to your account''s image gallery by providing an absolute URL to the image. The maximum allowed image size is 2MB and supported formats are jpeg, jpg, png, bmp, and gif; local file uploads are not supported. + Parameters ---------- image_url : str @@ -1720,13 +1797,15 @@ async def get_email_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetEmailCampaignResponse]: """ + Retrieve detailed information about a specific email campaign by its ID, including recipients, statistics, and HTML content. Use the statistics query parameter to select which statistics to include (globalStats, linksStats, statsByDomain, statsByDevice, or statsByBrowser); statsByDevice and statsByBrowser are only available on this single-campaign endpoint. You can exclude HTML content from the response by setting excludeHtmlContent to true. + Parameters ---------- campaign_id : int Id of the campaign statistics : typing.Optional[GetEmailCampaignRequestStatistics] - Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. + Filter on the type of statistics required. Example: **globalStats** value will only fetch globalStats info of the campaign in the returned response. `statsByDevice` and `statsByBrowser` are only available when retrieving a single campaign (not in the list endpoint). exclude_html_content : typing.Optional[bool] Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body @@ -1737,7 +1816,7 @@ async def get_email_campaign( Returns ------- AsyncHttpResponse[GetEmailCampaignResponse] - Email campaign informations + Email campaign information """ _response = await self._client_wrapper.httpx_client.request( f"emailCampaigns/{jsonable_encoder(campaign_id)}", @@ -1828,6 +1907,8 @@ async def update_email_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Update an existing email campaign''s properties such as name, subject, content, sender, recipients, schedule, and A/B testing configuration. The campaign must exist and the request body must contain at least one valid field to update. Only draft or scheduled campaigns can be modified; if sendAtBestTime is enabled, IP warmup will be automatically disabled. + Parameters ---------- campaign_id : int @@ -2012,6 +2093,17 @@ async def update_email_campaign( ), ), ) + if _response.status_code == 405: + raise MethodNotAllowedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorModel, + construct_type( + type_=ErrorModel, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -2025,6 +2117,8 @@ async def delete_email_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Delete an email campaign by its campaign ID. Only campaigns that have not been scheduled can be deleted; attempting to delete a campaign that has already been scheduled will return a 403 permission denied error. Related data in templates, newsletter builder, and schedule collections is also cleaned up. + Parameters ---------- campaign_id : int @@ -2056,6 +2150,17 @@ async def delete_email_campaign( ), ), ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) if _response.status_code == 404: raise NotFoundError( headers=dict(_response.headers), @@ -2150,6 +2255,8 @@ async def email_export_recipients( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[EmailExportRecipientsResponse]: """ + Export the recipients of a sent email campaign as an asynchronous process, filtered by recipient type (e.g. openers, clickers, hardBounces). The recipientsType field is required and determines which subset of recipients to export. An optional notifyURL webhook will be called once the export is complete, and the response returns a processId to track the export status. + Parameters ---------- campaign_id : int @@ -2227,6 +2334,8 @@ async def send_email_campaign_now( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Send an existing email campaign immediately by scheduling it for the current time. The campaign must have valid recipients and content configured before sending. The system verifies your account''s send limit and credit balance before dispatching; if credits are insufficient, a 402 error is returned. + Parameters ---------- campaign_id : int @@ -2375,6 +2484,8 @@ async def send_test_email( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Send a test version of an email campaign to specified email addresses or your entire test list. If the emailTo array is left empty, the test mail will be sent to all addresses in your test list. You can send a maximum of 50 test emails per day. + Parameters ---------- campaign_id : int @@ -2520,6 +2631,8 @@ async def update_campaign_status( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Update the status of an email campaign, such as suspending, archiving, or replicating it. Available status values include suspended, archive, darchive, sent, queued, replicate, replicateTemplate, cancel, and draft. Note that the replicateTemplate status is only available for template type campaigns. + Parameters ---------- campaign_id : int diff --git a/src/brevo/email_campaigns/types/__init__.py b/src/brevo/email_campaigns/types/__init__.py index a784d57..b6c641e 100644 --- a/src/brevo/email_campaigns/types/__init__.py +++ b/src/brevo/email_campaigns/types/__init__.py @@ -23,6 +23,8 @@ from .get_ab_test_campaign_result_response_winning_version import GetAbTestCampaignResultResponseWinningVersion from .get_email_campaign_request_statistics import GetEmailCampaignRequestStatistics from .get_email_campaign_response import GetEmailCampaignResponse + from .get_email_campaign_response_email_expiration_date import GetEmailCampaignResponseEmailExpirationDate + from .get_email_campaign_response_email_expiration_date_unit import GetEmailCampaignResponseEmailExpirationDateUnit from .get_email_campaign_response_sender import GetEmailCampaignResponseSender from .get_email_campaign_response_status import GetEmailCampaignResponseStatus from .get_email_campaign_response_type import GetEmailCampaignResponseType @@ -32,6 +34,12 @@ from .get_email_campaigns_request_type import GetEmailCampaignsRequestType from .get_email_campaigns_response import GetEmailCampaignsResponse from .get_email_campaigns_response_campaigns_item import GetEmailCampaignsResponseCampaignsItem + from .get_email_campaigns_response_campaigns_item_email_expiration_date import ( + GetEmailCampaignsResponseCampaignsItemEmailExpirationDate, + ) + from .get_email_campaigns_response_campaigns_item_email_expiration_date_unit import ( + GetEmailCampaignsResponseCampaignsItemEmailExpirationDateUnit, + ) from .get_email_campaigns_response_campaigns_item_sender import GetEmailCampaignsResponseCampaignsItemSender from .get_email_campaigns_response_campaigns_item_status import GetEmailCampaignsResponseCampaignsItemStatus from .get_email_campaigns_response_campaigns_item_type import GetEmailCampaignsResponseCampaignsItemType @@ -60,6 +68,8 @@ "GetAbTestCampaignResultResponseWinningVersion": ".get_ab_test_campaign_result_response_winning_version", "GetEmailCampaignRequestStatistics": ".get_email_campaign_request_statistics", "GetEmailCampaignResponse": ".get_email_campaign_response", + "GetEmailCampaignResponseEmailExpirationDate": ".get_email_campaign_response_email_expiration_date", + "GetEmailCampaignResponseEmailExpirationDateUnit": ".get_email_campaign_response_email_expiration_date_unit", "GetEmailCampaignResponseSender": ".get_email_campaign_response_sender", "GetEmailCampaignResponseStatus": ".get_email_campaign_response_status", "GetEmailCampaignResponseType": ".get_email_campaign_response_type", @@ -69,6 +79,8 @@ "GetEmailCampaignsRequestType": ".get_email_campaigns_request_type", "GetEmailCampaignsResponse": ".get_email_campaigns_response", "GetEmailCampaignsResponseCampaignsItem": ".get_email_campaigns_response_campaigns_item", + "GetEmailCampaignsResponseCampaignsItemEmailExpirationDate": ".get_email_campaigns_response_campaigns_item_email_expiration_date", + "GetEmailCampaignsResponseCampaignsItemEmailExpirationDateUnit": ".get_email_campaigns_response_campaigns_item_email_expiration_date_unit", "GetEmailCampaignsResponseCampaignsItemSender": ".get_email_campaigns_response_campaigns_item_sender", "GetEmailCampaignsResponseCampaignsItemStatus": ".get_email_campaigns_response_campaigns_item_status", "GetEmailCampaignsResponseCampaignsItemType": ".get_email_campaigns_response_campaigns_item_type", @@ -119,6 +131,8 @@ def __dir__(): "GetAbTestCampaignResultResponseWinningVersion", "GetEmailCampaignRequestStatistics", "GetEmailCampaignResponse", + "GetEmailCampaignResponseEmailExpirationDate", + "GetEmailCampaignResponseEmailExpirationDateUnit", "GetEmailCampaignResponseSender", "GetEmailCampaignResponseStatus", "GetEmailCampaignResponseType", @@ -128,6 +142,8 @@ def __dir__(): "GetEmailCampaignsRequestType", "GetEmailCampaignsResponse", "GetEmailCampaignsResponseCampaignsItem", + "GetEmailCampaignsResponseCampaignsItemEmailExpirationDate", + "GetEmailCampaignsResponseCampaignsItemEmailExpirationDateUnit", "GetEmailCampaignsResponseCampaignsItemSender", "GetEmailCampaignsResponseCampaignsItemStatus", "GetEmailCampaignsResponseCampaignsItemType", diff --git a/src/brevo/email_campaigns/types/create_email_campaign_request_sender.py b/src/brevo/email_campaigns/types/create_email_campaign_request_sender.py index e22b535..5855c4f 100644 --- a/src/brevo/email_campaigns/types/create_email_campaign_request_sender.py +++ b/src/brevo/email_campaigns/types/create_email_campaign_request_sender.py @@ -9,17 +9,17 @@ class CreateEmailCampaignRequestSender(UncheckedBaseModel): """ - Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{"name":"xyz", "email":"example@abc.com"}** **{"name":"xyz", "id":123}** + Sender details including id or email and name (optional). Only one of either Sender’s email or Sender’s ID shall be passed in one request at a time. Passing both `email` and `id` will result in an error. For example: **{"name":"xyz", "email":"example@abc.com"}** or **{"name":"xyz", "id":123}** """ email: typing.Optional[str] = pydantic.Field(default=None) """ - Sender email + Sender email. Must be a valid email address. Cannot be used together with `id` in the same request. """ id: typing.Optional[int] = pydantic.Field(default=None) """ - Select the sender for the campaign on the basis of sender id. _In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email)_. + Select the sender for the campaign on the basis of sender id. Cannot be used together with `email` in the same request. _In order to select a sender with a specific pool of IPs, dedicated IP users shall pass id (instead of email)._ """ name: typing.Optional[str] = pydantic.Field(default=None) diff --git a/src/brevo/email_campaigns/types/get_email_campaign_response.py b/src/brevo/email_campaigns/types/get_email_campaign_response.py index a8e3b1b..0a89419 100644 --- a/src/brevo/email_campaigns/types/get_email_campaign_response.py +++ b/src/brevo/email_campaigns/types/get_email_campaign_response.py @@ -9,6 +9,7 @@ from ...core.unchecked_base_model import UncheckedBaseModel from ...types.get_campaign_recipients import GetCampaignRecipients from ...types.get_extended_campaign_stats import GetExtendedCampaignStats +from .get_email_campaign_response_email_expiration_date import GetEmailCampaignResponseEmailExpirationDate from .get_email_campaign_response_sender import GetEmailCampaignResponseSender from .get_email_campaign_response_status import GetEmailCampaignResponseStatus from .get_email_campaign_response_type import GetEmailCampaignResponseType @@ -116,6 +117,14 @@ class GetEmailCampaignResponse(UncheckedBaseModel): description="The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true`", ), ] = None + attachment_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="attachmentUrl"), + pydantic.Field( + alias="attachmentUrl", + description="URL of the attachment file associated with the campaign. Empty string if no attachment is present.", + ), + ] = None created_at: typing_extensions.Annotated[ str, FieldMetadata(alias="createdAt"), @@ -123,6 +132,14 @@ class GetEmailCampaignResponse(UncheckedBaseModel): alias="createdAt", description="Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)" ), ] + email_expiration_date: typing_extensions.Annotated[ + typing.Optional[GetEmailCampaignResponseEmailExpirationDate], + FieldMetadata(alias="emailExpirationDate"), + pydantic.Field( + alias="emailExpirationDate", + description="Expiration date configuration for the email campaign, if set. Contains the duration and unit of the email expiry.", + ), + ] = None footer: str = pydantic.Field() """ Footer of the campaign @@ -191,7 +208,10 @@ class GetEmailCampaignResponse(UncheckedBaseModel): share_link: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="shareLink"), - pydantic.Field(alias="shareLink", description="Link to share the campaign on social medias"), + pydantic.Field( + alias="shareLink", + description="Link to share the campaign on social media. For trigger campaigns, this returns a descriptive message instead of a URL. For classic campaigns that have not been sent, this also returns a descriptive message.", + ), ] = None tag: typing.Optional[str] = pydantic.Field(default=None) """ @@ -219,20 +239,32 @@ class GetEmailCampaignResponse(UncheckedBaseModel): utm_campaign_value: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="utmCampaignValue"), - pydantic.Field(alias="utmCampaignValue", description="utm parameter associated with campaign"), + pydantic.Field( + alias="utmCampaignValue", + description="The utm_campaign value associated with the campaign. Only present if a UTM campaign value was set.", + ), ] = None - utm_id_active: typing_extensions.Annotated[ - typing.Optional[bool], - FieldMetadata(alias="utmIDActive"), - pydantic.Field(alias="utmIDActive", description="utm id active"), + utm_id: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="utmID"), + pydantic.Field( + alias="utmID", + description="The campaign ID used as utm_id parameter. Only present if UTM campaign tracking with ID is enabled.", + ), ] = None utm_medium: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="utmMedium"), pydantic.Field(alias="utmMedium") + typing.Optional[str], + FieldMetadata(alias="utmMedium"), + pydantic.Field( + alias="utmMedium", description='The utm_medium value. Set to "EMAIL" when UTM campaign tracking is enabled.' + ), ] = None utm_source: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="utmSource"), - pydantic.Field(alias="utmSource", description="source of utm"), + pydantic.Field( + alias="utmSource", description='The utm_source value. Set to "Brevo" when UTM campaign tracking is enabled.' + ), ] = None recipients: GetCampaignRecipients statistics: GetExtendedCampaignStats diff --git a/src/brevo/process/types/get_processes_response_processes_item_info_export.py b/src/brevo/email_campaigns/types/get_email_campaign_response_email_expiration_date.py similarity index 51% rename from src/brevo/process/types/get_processes_response_processes_item_info_export.py rename to src/brevo/email_campaigns/types/get_email_campaign_response_email_expiration_date.py index e1ac468..8581267 100644 --- a/src/brevo/process/types/get_processes_response_processes_item_info_export.py +++ b/src/brevo/email_campaigns/types/get_email_campaign_response_email_expiration_date.py @@ -5,21 +5,22 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2 from ...core.unchecked_base_model import UncheckedBaseModel +from .get_email_campaign_response_email_expiration_date_unit import GetEmailCampaignResponseEmailExpirationDateUnit -class GetProcessesResponseProcessesItemInfoExport(UncheckedBaseModel): +class GetEmailCampaignResponseEmailExpirationDate(UncheckedBaseModel): """ - Export process details + Expiration date configuration for the email campaign, if set. Contains the duration and unit of the email expiry. """ - total_records: typing.Optional[int] = pydantic.Field(default=None) + duration: typing.Optional[int] = pydantic.Field(default=None) """ - Total number of exported records + Duration of the email expiry """ - file_size: typing.Optional[int] = pydantic.Field(default=None) + unit: typing.Optional[GetEmailCampaignResponseEmailExpirationDateUnit] = pydantic.Field(default=None) """ - Size of exported file in bytes + Unit of the duration """ if IS_PYDANTIC_V2: diff --git a/src/brevo/email_campaigns/types/get_email_campaign_response_email_expiration_date_unit.py b/src/brevo/email_campaigns/types/get_email_campaign_response_email_expiration_date_unit.py new file mode 100644 index 0000000..e96403d --- /dev/null +++ b/src/brevo/email_campaigns/types/get_email_campaign_response_email_expiration_date_unit.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GetEmailCampaignResponseEmailExpirationDateUnit = typing.Union[typing.Literal["days", "weeks", "months"], typing.Any] diff --git a/src/brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item.py b/src/brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item.py index c20b183..899d900 100644 --- a/src/brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item.py +++ b/src/brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item.py @@ -9,6 +9,9 @@ from ...core.unchecked_base_model import UncheckedBaseModel from ...types.get_campaign_recipients import GetCampaignRecipients from ...types.get_extended_campaign_stats import GetExtendedCampaignStats +from .get_email_campaigns_response_campaigns_item_email_expiration_date import ( + GetEmailCampaignsResponseCampaignsItemEmailExpirationDate, +) from .get_email_campaigns_response_campaigns_item_sender import GetEmailCampaignsResponseCampaignsItemSender from .get_email_campaigns_response_campaigns_item_status import GetEmailCampaignsResponseCampaignsItemStatus from .get_email_campaigns_response_campaigns_item_type import GetEmailCampaignsResponseCampaignsItemType @@ -116,6 +119,14 @@ class GetEmailCampaignsResponseCampaignsItem(UncheckedBaseModel): description="The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true`", ), ] = None + attachment_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="attachmentUrl"), + pydantic.Field( + alias="attachmentUrl", + description="URL of the attachment file associated with the campaign. Empty string if no attachment is present.", + ), + ] = None created_at: typing_extensions.Annotated[ str, FieldMetadata(alias="createdAt"), @@ -123,6 +134,14 @@ class GetEmailCampaignsResponseCampaignsItem(UncheckedBaseModel): alias="createdAt", description="Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)" ), ] + email_expiration_date: typing_extensions.Annotated[ + typing.Optional[GetEmailCampaignsResponseCampaignsItemEmailExpirationDate], + FieldMetadata(alias="emailExpirationDate"), + pydantic.Field( + alias="emailExpirationDate", + description="Expiration date configuration for the email campaign, if set. Contains the duration and unit of the email expiry.", + ), + ] = None footer: str = pydantic.Field() """ Footer of the campaign @@ -219,20 +238,32 @@ class GetEmailCampaignsResponseCampaignsItem(UncheckedBaseModel): utm_campaign_value: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="utmCampaignValue"), - pydantic.Field(alias="utmCampaignValue", description="utm parameter associated with campaign"), + pydantic.Field( + alias="utmCampaignValue", + description="The utm_campaign value associated with the campaign. Only present if a UTM campaign value was set.", + ), ] = None - utm_id_active: typing_extensions.Annotated[ - typing.Optional[bool], - FieldMetadata(alias="utmIDActive"), - pydantic.Field(alias="utmIDActive", description="utm id active"), + utm_id: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="utmID"), + pydantic.Field( + alias="utmID", + description="The campaign ID used as utm_id parameter. Only present if UTM campaign tracking with ID is enabled.", + ), ] = None utm_medium: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="utmMedium"), pydantic.Field(alias="utmMedium") + typing.Optional[str], + FieldMetadata(alias="utmMedium"), + pydantic.Field( + alias="utmMedium", description='The utm_medium value. Set to "EMAIL" when UTM campaign tracking is enabled.' + ), ] = None utm_source: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="utmSource"), - pydantic.Field(alias="utmSource", description="source of utm"), + pydantic.Field( + alias="utmSource", description='The utm_source value. Set to "Brevo" when UTM campaign tracking is enabled.' + ), ] = None recipients: GetCampaignRecipients statistics: GetExtendedCampaignStats diff --git a/src/brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_email_expiration_date.py b/src/brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_email_expiration_date.py new file mode 100644 index 0000000..3b03b1d --- /dev/null +++ b/src/brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_email_expiration_date.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.unchecked_base_model import UncheckedBaseModel +from .get_email_campaigns_response_campaigns_item_email_expiration_date_unit import ( + GetEmailCampaignsResponseCampaignsItemEmailExpirationDateUnit, +) + + +class GetEmailCampaignsResponseCampaignsItemEmailExpirationDate(UncheckedBaseModel): + """ + Expiration date configuration for the email campaign, if set. Contains the duration and unit of the email expiry. + """ + + duration: typing.Optional[int] = pydantic.Field(default=None) + """ + Duration of the email expiry + """ + + unit: typing.Optional[GetEmailCampaignsResponseCampaignsItemEmailExpirationDateUnit] = pydantic.Field(default=None) + """ + Unit of the duration + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_email_expiration_date_unit.py b/src/brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_email_expiration_date_unit.py new file mode 100644 index 0000000..7794466 --- /dev/null +++ b/src/brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_email_expiration_date_unit.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GetEmailCampaignsResponseCampaignsItemEmailExpirationDateUnit = typing.Union[ + typing.Literal["days", "weeks", "months"], typing.Any +] diff --git a/src/brevo/event/__init__.py b/src/brevo/event/__init__.py index d34bb1a..f965400 100644 --- a/src/brevo/event/__init__.py +++ b/src/brevo/event/__init__.py @@ -7,12 +7,12 @@ if typing.TYPE_CHECKING: from .types import ( - CreateBatchEventsRequestItem, - CreateBatchEventsRequestItemContactPropertiesValue, - CreateBatchEventsRequestItemEventPropertiesValue, - CreateBatchEventsRequestItemIdentifiers, - CreateBatchEventsRequestItemObject, - CreateBatchEventsRequestItemObjectIdentifiers, + CreateBatchEventsRequestEventsItem, + CreateBatchEventsRequestEventsItemContactPropertiesValue, + CreateBatchEventsRequestEventsItemEventPropertiesValue, + CreateBatchEventsRequestEventsItemIdentifiers, + CreateBatchEventsRequestEventsItemObject, + CreateBatchEventsRequestEventsItemObjectIdentifiers, CreateEventRequestContactPropertiesValue, CreateEventRequestEventPropertiesValue, CreateEventRequestIdentifiers, @@ -20,12 +20,12 @@ CreateEventRequestObjectIdentifiers, ) _dynamic_imports: typing.Dict[str, str] = { - "CreateBatchEventsRequestItem": ".types", - "CreateBatchEventsRequestItemContactPropertiesValue": ".types", - "CreateBatchEventsRequestItemEventPropertiesValue": ".types", - "CreateBatchEventsRequestItemIdentifiers": ".types", - "CreateBatchEventsRequestItemObject": ".types", - "CreateBatchEventsRequestItemObjectIdentifiers": ".types", + "CreateBatchEventsRequestEventsItem": ".types", + "CreateBatchEventsRequestEventsItemContactPropertiesValue": ".types", + "CreateBatchEventsRequestEventsItemEventPropertiesValue": ".types", + "CreateBatchEventsRequestEventsItemIdentifiers": ".types", + "CreateBatchEventsRequestEventsItemObject": ".types", + "CreateBatchEventsRequestEventsItemObjectIdentifiers": ".types", "CreateEventRequestContactPropertiesValue": ".types", "CreateEventRequestEventPropertiesValue": ".types", "CreateEventRequestIdentifiers": ".types", @@ -56,12 +56,12 @@ def __dir__(): __all__ = [ - "CreateBatchEventsRequestItem", - "CreateBatchEventsRequestItemContactPropertiesValue", - "CreateBatchEventsRequestItemEventPropertiesValue", - "CreateBatchEventsRequestItemIdentifiers", - "CreateBatchEventsRequestItemObject", - "CreateBatchEventsRequestItemObjectIdentifiers", + "CreateBatchEventsRequestEventsItem", + "CreateBatchEventsRequestEventsItemContactPropertiesValue", + "CreateBatchEventsRequestEventsItemEventPropertiesValue", + "CreateBatchEventsRequestEventsItemIdentifiers", + "CreateBatchEventsRequestEventsItemObject", + "CreateBatchEventsRequestEventsItemObjectIdentifiers", "CreateEventRequestContactPropertiesValue", "CreateEventRequestEventPropertiesValue", "CreateEventRequestIdentifiers", diff --git a/src/brevo/event/client.py b/src/brevo/event/client.py index e5554f1..ba401a8 100644 --- a/src/brevo/event/client.py +++ b/src/brevo/event/client.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper @@ -7,7 +8,7 @@ from ..types.batch_accepted_response import BatchAcceptedResponse from ..types.get_events_list import GetEventsList from .raw_client import AsyncRawEventClient, RawEventClient -from .types.create_batch_events_request_item import CreateBatchEventsRequestItem +from .types.create_batch_events_request_events_item import CreateBatchEventsRequestEventsItem from .types.create_event_request_contact_properties_value import CreateEventRequestContactPropertiesValue from .types.create_event_request_event_properties_value import CreateEventRequestEventPropertiesValue from .types.create_event_request_identifiers import CreateEventRequestIdentifiers @@ -109,7 +110,7 @@ def create_event( event_name: str, identifiers: CreateEventRequestIdentifiers, contact_properties: typing.Optional[typing.Dict[str, CreateEventRequestContactPropertiesValue]] = OMIT, - event_date: typing.Optional[str] = OMIT, + event_date: typing.Optional[dt.datetime] = OMIT, event_properties: typing.Optional[typing.Dict[str, CreateEventRequestEventPropertiesValue]] = OMIT, object: typing.Optional[CreateEventRequestObject] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -120,7 +121,7 @@ def create_event( Parameters ---------- event_name : str - The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters, alphanumerical characters and - _ only. + The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters; only alphanumeric characters, hyphens (-), and underscores (_) are allowed. identifiers : CreateEventRequestIdentifiers Identifies the contact associated with the event. At least one identifier is required. @@ -128,11 +129,11 @@ def create_event( contact_properties : typing.Optional[typing.Dict[str, CreateEventRequestContactPropertiesValue]] Properties defining the state of the contact associated to this event. Useful to update contact attributes defined in your contacts database while passing the event. For example: **"FIRSTNAME": "Jane" , "AGE": 37** - event_date : typing.Optional[str] - Timestamp of when the event occurred (e.g. "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp of the event creation is used. + event_date : typing.Optional[dt.datetime] + ISO 8601 timestamp of when the event occurred (e.g. "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp of the event creation is used. event_properties : typing.Optional[typing.Dict[str, CreateEventRequestEventPropertiesValue]] - Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb. + Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field types are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50KB. object : typing.Optional[CreateEventRequestObject] Identifiers of the object record associated with this event. Ignored if the object type or identifier for this record does not exist on the account. @@ -171,7 +172,7 @@ def create_event( def create_batch_events( self, *, - request: typing.Sequence[CreateBatchEventsRequestItem], + events: typing.Sequence[CreateBatchEventsRequestEventsItem], request_options: typing.Optional[RequestOptions] = None, ) -> BatchAcceptedResponse: """ @@ -179,7 +180,7 @@ def create_batch_events( Parameters ---------- - request : typing.Sequence[CreateBatchEventsRequestItem] + events : typing.Sequence[CreateBatchEventsRequestEventsItem] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -193,23 +194,23 @@ def create_batch_events( -------- from brevo import Brevo from brevo.event import ( - CreateBatchEventsRequestItem, - CreateBatchEventsRequestItemIdentifiers, + CreateBatchEventsRequestEventsItem, + CreateBatchEventsRequestEventsItemIdentifiers, ) client = Brevo( api_key="YOUR_API_KEY", ) client.event.create_batch_events( - request=[ - CreateBatchEventsRequestItem( + events=[ + CreateBatchEventsRequestEventsItem( event_name="order_created", - identifiers=CreateBatchEventsRequestItemIdentifiers(), + identifiers=CreateBatchEventsRequestEventsItemIdentifiers(), ) ], ) """ - _response = self._raw_client.create_batch_events(request=request, request_options=request_options) + _response = self._raw_client.create_batch_events(events=events, request_options=request_options) return _response.data @@ -313,7 +314,7 @@ async def create_event( event_name: str, identifiers: CreateEventRequestIdentifiers, contact_properties: typing.Optional[typing.Dict[str, CreateEventRequestContactPropertiesValue]] = OMIT, - event_date: typing.Optional[str] = OMIT, + event_date: typing.Optional[dt.datetime] = OMIT, event_properties: typing.Optional[typing.Dict[str, CreateEventRequestEventPropertiesValue]] = OMIT, object: typing.Optional[CreateEventRequestObject] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -324,7 +325,7 @@ async def create_event( Parameters ---------- event_name : str - The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters, alphanumerical characters and - _ only. + The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters; only alphanumeric characters, hyphens (-), and underscores (_) are allowed. identifiers : CreateEventRequestIdentifiers Identifies the contact associated with the event. At least one identifier is required. @@ -332,11 +333,11 @@ async def create_event( contact_properties : typing.Optional[typing.Dict[str, CreateEventRequestContactPropertiesValue]] Properties defining the state of the contact associated to this event. Useful to update contact attributes defined in your contacts database while passing the event. For example: **"FIRSTNAME": "Jane" , "AGE": 37** - event_date : typing.Optional[str] - Timestamp of when the event occurred (e.g. "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp of the event creation is used. + event_date : typing.Optional[dt.datetime] + ISO 8601 timestamp of when the event occurred (e.g. "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp of the event creation is used. event_properties : typing.Optional[typing.Dict[str, CreateEventRequestEventPropertiesValue]] - Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb. + Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field types are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50KB. object : typing.Optional[CreateEventRequestObject] Identifiers of the object record associated with this event. Ignored if the object type or identifier for this record does not exist on the account. @@ -383,7 +384,7 @@ async def main() -> None: async def create_batch_events( self, *, - request: typing.Sequence[CreateBatchEventsRequestItem], + events: typing.Sequence[CreateBatchEventsRequestEventsItem], request_options: typing.Optional[RequestOptions] = None, ) -> BatchAcceptedResponse: """ @@ -391,7 +392,7 @@ async def create_batch_events( Parameters ---------- - request : typing.Sequence[CreateBatchEventsRequestItem] + events : typing.Sequence[CreateBatchEventsRequestEventsItem] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -407,8 +408,8 @@ async def create_batch_events( from brevo import AsyncBrevo from brevo.event import ( - CreateBatchEventsRequestItem, - CreateBatchEventsRequestItemIdentifiers, + CreateBatchEventsRequestEventsItem, + CreateBatchEventsRequestEventsItemIdentifiers, ) client = AsyncBrevo( @@ -418,10 +419,10 @@ async def create_batch_events( async def main() -> None: await client.event.create_batch_events( - request=[ - CreateBatchEventsRequestItem( + events=[ + CreateBatchEventsRequestEventsItem( event_name="order_created", - identifiers=CreateBatchEventsRequestItemIdentifiers(), + identifiers=CreateBatchEventsRequestEventsItemIdentifiers(), ) ], ) @@ -429,5 +430,5 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.create_batch_events(request=request, request_options=request_options) + _response = await self._raw_client.create_batch_events(events=events, request_options=request_options) return _response.data diff --git a/src/brevo/event/raw_client.py b/src/brevo/event/raw_client.py index 7c1153c..38dedff 100644 --- a/src/brevo/event/raw_client.py +++ b/src/brevo/event/raw_client.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing from json.decoder import JSONDecodeError @@ -15,7 +16,7 @@ from ..errors.unauthorized_error import UnauthorizedError from ..types.batch_accepted_response import BatchAcceptedResponse from ..types.get_events_list import GetEventsList -from .types.create_batch_events_request_item import CreateBatchEventsRequestItem +from .types.create_batch_events_request_events_item import CreateBatchEventsRequestEventsItem from .types.create_event_request_contact_properties_value import CreateEventRequestContactPropertiesValue from .types.create_event_request_event_properties_value import CreateEventRequestEventPropertiesValue from .types.create_event_request_identifiers import CreateEventRequestIdentifiers @@ -152,7 +153,7 @@ def create_event( event_name: str, identifiers: CreateEventRequestIdentifiers, contact_properties: typing.Optional[typing.Dict[str, CreateEventRequestContactPropertiesValue]] = OMIT, - event_date: typing.Optional[str] = OMIT, + event_date: typing.Optional[dt.datetime] = OMIT, event_properties: typing.Optional[typing.Dict[str, CreateEventRequestEventPropertiesValue]] = OMIT, object: typing.Optional[CreateEventRequestObject] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -163,7 +164,7 @@ def create_event( Parameters ---------- event_name : str - The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters, alphanumerical characters and - _ only. + The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters; only alphanumeric characters, hyphens (-), and underscores (_) are allowed. identifiers : CreateEventRequestIdentifiers Identifies the contact associated with the event. At least one identifier is required. @@ -171,11 +172,11 @@ def create_event( contact_properties : typing.Optional[typing.Dict[str, CreateEventRequestContactPropertiesValue]] Properties defining the state of the contact associated to this event. Useful to update contact attributes defined in your contacts database while passing the event. For example: **"FIRSTNAME": "Jane" , "AGE": 37** - event_date : typing.Optional[str] - Timestamp of when the event occurred (e.g. "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp of the event creation is used. + event_date : typing.Optional[dt.datetime] + ISO 8601 timestamp of when the event occurred (e.g. "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp of the event creation is used. event_properties : typing.Optional[typing.Dict[str, CreateEventRequestEventPropertiesValue]] - Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb. + Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field types are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50KB. object : typing.Optional[CreateEventRequestObject] Identifiers of the object record associated with this event. Ignored if the object type or identifier for this record does not exist on the account. @@ -253,7 +254,7 @@ def create_event( def create_batch_events( self, *, - request: typing.Sequence[CreateBatchEventsRequestItem], + events: typing.Sequence[CreateBatchEventsRequestEventsItem], request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[BatchAcceptedResponse]: """ @@ -261,7 +262,7 @@ def create_batch_events( Parameters ---------- - request : typing.Sequence[CreateBatchEventsRequestItem] + events : typing.Sequence[CreateBatchEventsRequestEventsItem] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -274,9 +275,11 @@ def create_batch_events( _response = self._client_wrapper.httpx_client.request( "events/batch", method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=typing.Sequence[CreateBatchEventsRequestItem], direction="write" - ), + json={ + "events": convert_and_respect_annotation_metadata( + object_=events, annotation=typing.Sequence[CreateBatchEventsRequestEventsItem], direction="write" + ), + }, headers={ "content-type": "application/json", }, @@ -451,7 +454,7 @@ async def create_event( event_name: str, identifiers: CreateEventRequestIdentifiers, contact_properties: typing.Optional[typing.Dict[str, CreateEventRequestContactPropertiesValue]] = OMIT, - event_date: typing.Optional[str] = OMIT, + event_date: typing.Optional[dt.datetime] = OMIT, event_properties: typing.Optional[typing.Dict[str, CreateEventRequestEventPropertiesValue]] = OMIT, object: typing.Optional[CreateEventRequestObject] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -462,7 +465,7 @@ async def create_event( Parameters ---------- event_name : str - The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters, alphanumerical characters and - _ only. + The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters; only alphanumeric characters, hyphens (-), and underscores (_) are allowed. identifiers : CreateEventRequestIdentifiers Identifies the contact associated with the event. At least one identifier is required. @@ -470,11 +473,11 @@ async def create_event( contact_properties : typing.Optional[typing.Dict[str, CreateEventRequestContactPropertiesValue]] Properties defining the state of the contact associated to this event. Useful to update contact attributes defined in your contacts database while passing the event. For example: **"FIRSTNAME": "Jane" , "AGE": 37** - event_date : typing.Optional[str] - Timestamp of when the event occurred (e.g. "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp of the event creation is used. + event_date : typing.Optional[dt.datetime] + ISO 8601 timestamp of when the event occurred (e.g. "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp of the event creation is used. event_properties : typing.Optional[typing.Dict[str, CreateEventRequestEventPropertiesValue]] - Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb. + Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field types are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50KB. object : typing.Optional[CreateEventRequestObject] Identifiers of the object record associated with this event. Ignored if the object type or identifier for this record does not exist on the account. @@ -552,7 +555,7 @@ async def create_event( async def create_batch_events( self, *, - request: typing.Sequence[CreateBatchEventsRequestItem], + events: typing.Sequence[CreateBatchEventsRequestEventsItem], request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[BatchAcceptedResponse]: """ @@ -560,7 +563,7 @@ async def create_batch_events( Parameters ---------- - request : typing.Sequence[CreateBatchEventsRequestItem] + events : typing.Sequence[CreateBatchEventsRequestEventsItem] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -573,9 +576,11 @@ async def create_batch_events( _response = await self._client_wrapper.httpx_client.request( "events/batch", method="POST", - json=convert_and_respect_annotation_metadata( - object_=request, annotation=typing.Sequence[CreateBatchEventsRequestItem], direction="write" - ), + json={ + "events": convert_and_respect_annotation_metadata( + object_=events, annotation=typing.Sequence[CreateBatchEventsRequestEventsItem], direction="write" + ), + }, headers={ "content-type": "application/json", }, diff --git a/src/brevo/event/types/__init__.py b/src/brevo/event/types/__init__.py index 4756a15..507e07c 100644 --- a/src/brevo/event/types/__init__.py +++ b/src/brevo/event/types/__init__.py @@ -6,28 +6,30 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .create_batch_events_request_item import CreateBatchEventsRequestItem - from .create_batch_events_request_item_contact_properties_value import ( - CreateBatchEventsRequestItemContactPropertiesValue, + from .create_batch_events_request_events_item import CreateBatchEventsRequestEventsItem + from .create_batch_events_request_events_item_contact_properties_value import ( + CreateBatchEventsRequestEventsItemContactPropertiesValue, ) - from .create_batch_events_request_item_event_properties_value import ( - CreateBatchEventsRequestItemEventPropertiesValue, + from .create_batch_events_request_events_item_event_properties_value import ( + CreateBatchEventsRequestEventsItemEventPropertiesValue, + ) + from .create_batch_events_request_events_item_identifiers import CreateBatchEventsRequestEventsItemIdentifiers + from .create_batch_events_request_events_item_object import CreateBatchEventsRequestEventsItemObject + from .create_batch_events_request_events_item_object_identifiers import ( + CreateBatchEventsRequestEventsItemObjectIdentifiers, ) - from .create_batch_events_request_item_identifiers import CreateBatchEventsRequestItemIdentifiers - from .create_batch_events_request_item_object import CreateBatchEventsRequestItemObject - from .create_batch_events_request_item_object_identifiers import CreateBatchEventsRequestItemObjectIdentifiers from .create_event_request_contact_properties_value import CreateEventRequestContactPropertiesValue from .create_event_request_event_properties_value import CreateEventRequestEventPropertiesValue from .create_event_request_identifiers import CreateEventRequestIdentifiers from .create_event_request_object import CreateEventRequestObject from .create_event_request_object_identifiers import CreateEventRequestObjectIdentifiers _dynamic_imports: typing.Dict[str, str] = { - "CreateBatchEventsRequestItem": ".create_batch_events_request_item", - "CreateBatchEventsRequestItemContactPropertiesValue": ".create_batch_events_request_item_contact_properties_value", - "CreateBatchEventsRequestItemEventPropertiesValue": ".create_batch_events_request_item_event_properties_value", - "CreateBatchEventsRequestItemIdentifiers": ".create_batch_events_request_item_identifiers", - "CreateBatchEventsRequestItemObject": ".create_batch_events_request_item_object", - "CreateBatchEventsRequestItemObjectIdentifiers": ".create_batch_events_request_item_object_identifiers", + "CreateBatchEventsRequestEventsItem": ".create_batch_events_request_events_item", + "CreateBatchEventsRequestEventsItemContactPropertiesValue": ".create_batch_events_request_events_item_contact_properties_value", + "CreateBatchEventsRequestEventsItemEventPropertiesValue": ".create_batch_events_request_events_item_event_properties_value", + "CreateBatchEventsRequestEventsItemIdentifiers": ".create_batch_events_request_events_item_identifiers", + "CreateBatchEventsRequestEventsItemObject": ".create_batch_events_request_events_item_object", + "CreateBatchEventsRequestEventsItemObjectIdentifiers": ".create_batch_events_request_events_item_object_identifiers", "CreateEventRequestContactPropertiesValue": ".create_event_request_contact_properties_value", "CreateEventRequestEventPropertiesValue": ".create_event_request_event_properties_value", "CreateEventRequestIdentifiers": ".create_event_request_identifiers", @@ -58,12 +60,12 @@ def __dir__(): __all__ = [ - "CreateBatchEventsRequestItem", - "CreateBatchEventsRequestItemContactPropertiesValue", - "CreateBatchEventsRequestItemEventPropertiesValue", - "CreateBatchEventsRequestItemIdentifiers", - "CreateBatchEventsRequestItemObject", - "CreateBatchEventsRequestItemObjectIdentifiers", + "CreateBatchEventsRequestEventsItem", + "CreateBatchEventsRequestEventsItemContactPropertiesValue", + "CreateBatchEventsRequestEventsItemEventPropertiesValue", + "CreateBatchEventsRequestEventsItemIdentifiers", + "CreateBatchEventsRequestEventsItemObject", + "CreateBatchEventsRequestEventsItemObjectIdentifiers", "CreateEventRequestContactPropertiesValue", "CreateEventRequestEventPropertiesValue", "CreateEventRequestIdentifiers", diff --git a/src/brevo/event/types/create_batch_events_request_item.py b/src/brevo/event/types/create_batch_events_request_events_item.py similarity index 70% rename from src/brevo/event/types/create_batch_events_request_item.py rename to src/brevo/event/types/create_batch_events_request_events_item.py index c4f0679..5d35b2d 100644 --- a/src/brevo/event/types/create_batch_events_request_item.py +++ b/src/brevo/event/types/create_batch_events_request_events_item.py @@ -5,16 +5,18 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2 from ...core.unchecked_base_model import UncheckedBaseModel -from .create_batch_events_request_item_contact_properties_value import ( - CreateBatchEventsRequestItemContactPropertiesValue, +from .create_batch_events_request_events_item_contact_properties_value import ( + CreateBatchEventsRequestEventsItemContactPropertiesValue, ) -from .create_batch_events_request_item_event_properties_value import CreateBatchEventsRequestItemEventPropertiesValue -from .create_batch_events_request_item_identifiers import CreateBatchEventsRequestItemIdentifiers -from .create_batch_events_request_item_object import CreateBatchEventsRequestItemObject +from .create_batch_events_request_events_item_event_properties_value import ( + CreateBatchEventsRequestEventsItemEventPropertiesValue, +) +from .create_batch_events_request_events_item_identifiers import CreateBatchEventsRequestEventsItemIdentifiers +from .create_batch_events_request_events_item_object import CreateBatchEventsRequestEventsItemObject -class CreateBatchEventsRequestItem(UncheckedBaseModel): - contact_properties: typing.Optional[typing.Dict[str, CreateBatchEventsRequestItemContactPropertiesValue]] = ( +class CreateBatchEventsRequestEventsItem(UncheckedBaseModel): + contact_properties: typing.Optional[typing.Dict[str, CreateBatchEventsRequestEventsItemContactPropertiesValue]] = ( pydantic.Field(default=None) ) """ @@ -31,19 +33,19 @@ class CreateBatchEventsRequestItem(UncheckedBaseModel): The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters, alphanumerical characters and - _ only. """ - event_properties: typing.Optional[typing.Dict[str, CreateBatchEventsRequestItemEventPropertiesValue]] = ( + event_properties: typing.Optional[typing.Dict[str, CreateBatchEventsRequestEventsItemEventPropertiesValue]] = ( pydantic.Field(default=None) ) """ Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb. """ - identifiers: CreateBatchEventsRequestItemIdentifiers = pydantic.Field() + identifiers: CreateBatchEventsRequestEventsItemIdentifiers = pydantic.Field() """ Identifies the contact associated with the event. At least one identifier is required. """ - object: typing.Optional[CreateBatchEventsRequestItemObject] = pydantic.Field(default=None) + object: typing.Optional[CreateBatchEventsRequestEventsItemObject] = pydantic.Field(default=None) """ Identifiers of the object record associated with this event. Ignored if the object type or identifier for this record does not exist on the account. """ diff --git a/src/brevo/event/types/create_batch_events_request_events_item_contact_properties_value.py b/src/brevo/event/types/create_batch_events_request_events_item_contact_properties_value.py new file mode 100644 index 0000000..a3b5016 --- /dev/null +++ b/src/brevo/event/types/create_batch_events_request_events_item_contact_properties_value.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateBatchEventsRequestEventsItemContactPropertiesValue = typing.Union[str, int] diff --git a/src/brevo/event/types/create_batch_events_request_events_item_event_properties_value.py b/src/brevo/event/types/create_batch_events_request_events_item_event_properties_value.py new file mode 100644 index 0000000..bd4a99c --- /dev/null +++ b/src/brevo/event/types/create_batch_events_request_events_item_event_properties_value.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateBatchEventsRequestEventsItemEventPropertiesValue = typing.Union[ + str, int, typing.Dict[str, typing.Any], typing.List[typing.Any] +] diff --git a/src/brevo/event/types/create_batch_events_request_item_identifiers.py b/src/brevo/event/types/create_batch_events_request_events_item_identifiers.py similarity index 95% rename from src/brevo/event/types/create_batch_events_request_item_identifiers.py rename to src/brevo/event/types/create_batch_events_request_events_item_identifiers.py index 10b9844..e392ea2 100644 --- a/src/brevo/event/types/create_batch_events_request_item_identifiers.py +++ b/src/brevo/event/types/create_batch_events_request_events_item_identifiers.py @@ -7,7 +7,7 @@ from ...core.unchecked_base_model import UncheckedBaseModel -class CreateBatchEventsRequestItemIdentifiers(UncheckedBaseModel): +class CreateBatchEventsRequestEventsItemIdentifiers(UncheckedBaseModel): """ Identifies the contact associated with the event. At least one identifier is required. """ diff --git a/src/brevo/event/types/create_batch_events_request_item_object.py b/src/brevo/event/types/create_batch_events_request_events_item_object.py similarity index 72% rename from src/brevo/event/types/create_batch_events_request_item_object.py rename to src/brevo/event/types/create_batch_events_request_events_item_object.py index 82f513b..e54d32e 100644 --- a/src/brevo/event/types/create_batch_events_request_item_object.py +++ b/src/brevo/event/types/create_batch_events_request_events_item_object.py @@ -5,15 +5,17 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2 from ...core.unchecked_base_model import UncheckedBaseModel -from .create_batch_events_request_item_object_identifiers import CreateBatchEventsRequestItemObjectIdentifiers +from .create_batch_events_request_events_item_object_identifiers import ( + CreateBatchEventsRequestEventsItemObjectIdentifiers, +) -class CreateBatchEventsRequestItemObject(UncheckedBaseModel): +class CreateBatchEventsRequestEventsItemObject(UncheckedBaseModel): """ Identifiers of the object record associated with this event. Ignored if the object type or identifier for this record does not exist on the account. """ - identifiers: typing.Optional[CreateBatchEventsRequestItemObjectIdentifiers] = pydantic.Field(default=None) + identifiers: typing.Optional[CreateBatchEventsRequestEventsItemObjectIdentifiers] = pydantic.Field(default=None) """ Identifiers for the object. """ diff --git a/src/brevo/event/types/create_batch_events_request_item_object_identifiers.py b/src/brevo/event/types/create_batch_events_request_events_item_object_identifiers.py similarity index 90% rename from src/brevo/event/types/create_batch_events_request_item_object_identifiers.py rename to src/brevo/event/types/create_batch_events_request_events_item_object_identifiers.py index 7e3278d..7daf800 100644 --- a/src/brevo/event/types/create_batch_events_request_item_object_identifiers.py +++ b/src/brevo/event/types/create_batch_events_request_events_item_object_identifiers.py @@ -7,7 +7,7 @@ from ...core.unchecked_base_model import UncheckedBaseModel -class CreateBatchEventsRequestItemObjectIdentifiers(UncheckedBaseModel): +class CreateBatchEventsRequestEventsItemObjectIdentifiers(UncheckedBaseModel): """ Identifiers for the object. """ diff --git a/src/brevo/event/types/create_batch_events_request_item_contact_properties_value.py b/src/brevo/event/types/create_batch_events_request_item_contact_properties_value.py deleted file mode 100644 index cbff3ef..0000000 --- a/src/brevo/event/types/create_batch_events_request_item_contact_properties_value.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CreateBatchEventsRequestItemContactPropertiesValue = typing.Union[str, int, bool] diff --git a/src/brevo/event/types/create_batch_events_request_item_event_properties_value.py b/src/brevo/event/types/create_batch_events_request_item_event_properties_value.py deleted file mode 100644 index 20b1f6a..0000000 --- a/src/brevo/event/types/create_batch_events_request_item_event_properties_value.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -CreateBatchEventsRequestItemEventPropertiesValue = typing.Union[ - str, int, bool, typing.Dict[str, typing.Any], typing.List[typing.Any] -] diff --git a/src/brevo/external_feeds/types/get_all_external_feeds_response_feeds_item.py b/src/brevo/external_feeds/types/get_all_external_feeds_response_feeds_item.py index 776efe8..fbcee7c 100644 --- a/src/brevo/external_feeds/types/get_all_external_feeds_response_feeds_item.py +++ b/src/brevo/external_feeds/types/get_all_external_feeds_response_feeds_item.py @@ -23,11 +23,6 @@ class GetAllExternalFeedsResponseFeedsItem(UncheckedBaseModel): Name of the feed """ - alias: str = pydantic.Field() - """ - URL-friendly alias for the feed - """ - url: str = pydantic.Field() """ URL of the external data source @@ -40,17 +35,17 @@ class GetAllExternalFeedsResponseFeedsItem(UncheckedBaseModel): ] username: typing.Optional[str] = pydantic.Field(default=None) """ - Username for basic authentication + Username for basic authentication. Only returned when authType is 'basic'. Excluded when authType is 'token'. """ password: typing.Optional[str] = pydantic.Field(default=None) """ - Password for basic authentication + Password for basic authentication. Only returned when authType is 'basic'. Excluded when authType is 'token'. """ token: typing.Optional[str] = pydantic.Field(default=None) """ - Token for token-based authentication + Token for token-based authentication. Only returned when authType is 'token'. Excluded when authType is 'basic' or 'noAuth'. """ max_retries: typing_extensions.Annotated[ @@ -63,11 +58,6 @@ class GetAllExternalFeedsResponseFeedsItem(UncheckedBaseModel): Whether to cache the feed response """ - is_internal: typing_extensions.Annotated[ - bool, - FieldMetadata(alias="isInternal"), - pydantic.Field(alias="isInternal", description="Whether this is an internal Brevo system feed"), - ] headers: typing.Optional[typing.List[GetAllExternalFeedsResponseFeedsItemHeadersItem]] = pydantic.Field( default=None ) diff --git a/src/brevo/external_feeds/types/get_external_feed_by_uuid_response.py b/src/brevo/external_feeds/types/get_external_feed_by_uuid_response.py index 0dfa77c..62ce69b 100644 --- a/src/brevo/external_feeds/types/get_external_feed_by_uuid_response.py +++ b/src/brevo/external_feeds/types/get_external_feed_by_uuid_response.py @@ -35,40 +35,19 @@ class GetExternalFeedByUuidResponse(UncheckedBaseModel): ] username: typing.Optional[str] = pydantic.Field(default=None) """ - Username for basic authentication (null if not using basic auth) + Username for basic authentication. Only returned when authType is 'basic'. Excluded from response when authType is 'token'. """ password: typing.Optional[str] = pydantic.Field(default=None) """ - Password for basic authentication (null if not using basic auth) + Password for basic authentication. Only returned when authType is 'basic'. Excluded from response when authType is 'token'. """ token: typing.Optional[str] = pydantic.Field(default=None) """ - Token for token-based authentication (null if not using token auth) + Token for token-based authentication. Only returned when authType is 'token'. Excluded from response when authType is 'basic' or 'noAuth'. """ - personalization: bool = pydantic.Field() - """ - Whether personalization is enabled for this feed - """ - - default_attr: typing_extensions.Annotated[ - str, - FieldMetadata(alias="defaultAttr"), - pydantic.Field( - alias="defaultAttr", - description="Default attribute name for personalization fallback (empty string if not set)", - ), - ] - default_contact: typing_extensions.Annotated[ - str, - FieldMetadata(alias="defaultContact"), - pydantic.Field( - alias="defaultContact", - description="Default contact email for personalization fallback (empty string if not set)", - ), - ] headers: typing.Optional[typing.List[GetExternalFeedByUuidResponseHeadersItem]] = pydantic.Field(default=None) """ Custom HTTP headers for the feed request diff --git a/src/brevo/files/client.py b/src/brevo/files/client.py index 7009caf..4dc9494 100644 --- a/src/brevo/files/client.py +++ b/src/brevo/files/client.py @@ -43,6 +43,8 @@ def get_all_files( request_options: typing.Optional[RequestOptions] = None, ) -> typing.List[FileData]: """ + Retrieve a paginated list of CRM files with optional filtering by entity type, entity IDs, and date range. Results are sorted by creation date in descending order by default, with a default limit of 50 files per page. + Parameters ---------- entity : typing.Optional[GetCrmFilesRequestEntity] @@ -105,6 +107,8 @@ def upload_a_file( request_options: typing.Optional[RequestOptions] = None, ) -> FileData: """ + Upload a file and associate it with a contact, company, or deal. The file must be sent as multipart form data with a maximum size of 10 MB. You can optionally link the file to a specific entity by providing the corresponding entity ID. + Parameters ---------- file : core.File @@ -142,6 +146,8 @@ def download_a_file( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetCrmFilesIdResponse: """ + Get a temporary download URL for a CRM file by its identifier. The returned URL is valid for 5 minutes only and provides direct access to the file content. + Parameters ---------- id : str @@ -171,6 +177,8 @@ def download_a_file( def delete_a_file(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently delete a CRM file by its identifier. This removes the file from storage and unlinks it from any associated contacts, companies, or deals. + Parameters ---------- id : str @@ -199,6 +207,8 @@ def delete_a_file(self, id: str, *, request_options: typing.Optional[RequestOpti def get_file_details(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> FileData: """ + Retrieve the metadata and details of a specific CRM file by its identifier. This returns information such as the file name, size, type, creation date, and associated entities, but does not include the file content itself. + Parameters ---------- id : str @@ -255,6 +265,8 @@ async def get_all_files( request_options: typing.Optional[RequestOptions] = None, ) -> typing.List[FileData]: """ + Retrieve a paginated list of CRM files with optional filtering by entity type, entity IDs, and date range. Results are sorted by creation date in descending order by default, with a default limit of 50 files per page. + Parameters ---------- entity : typing.Optional[GetCrmFilesRequestEntity] @@ -325,6 +337,8 @@ async def upload_a_file( request_options: typing.Optional[RequestOptions] = None, ) -> FileData: """ + Upload a file and associate it with a contact, company, or deal. The file must be sent as multipart form data with a maximum size of 10 MB. You can optionally link the file to a specific entity by providing the corresponding entity ID. + Parameters ---------- file : core.File @@ -370,6 +384,8 @@ async def download_a_file( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetCrmFilesIdResponse: """ + Get a temporary download URL for a CRM file by its identifier. The returned URL is valid for 5 minutes only and provides direct access to the file content. + Parameters ---------- id : str @@ -407,6 +423,8 @@ async def main() -> None: async def delete_a_file(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently delete a CRM file by its identifier. This removes the file from storage and unlinks it from any associated contacts, companies, or deals. + Parameters ---------- id : str @@ -443,6 +461,8 @@ async def main() -> None: async def get_file_details(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> FileData: """ + Retrieve the metadata and details of a specific CRM file by its identifier. This returns information such as the file name, size, type, creation date, and associated entities, but does not include the file content itself. + Parameters ---------- id : str diff --git a/src/brevo/files/raw_client.py b/src/brevo/files/raw_client.py index 1f292fa..b4522f7 100644 --- a/src/brevo/files/raw_client.py +++ b/src/brevo/files/raw_client.py @@ -40,6 +40,8 @@ def get_all_files( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[typing.List[FileData]]: """ + Retrieve a paginated list of CRM files with optional filtering by entity type, entity IDs, and date range. Results are sorted by creation date in descending order by default, with a default limit of 50 files per page. + Parameters ---------- entity : typing.Optional[GetCrmFilesRequestEntity] @@ -125,6 +127,8 @@ def upload_a_file( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[FileData]: """ + Upload a file and associate it with a contact, company, or deal. The file must be sent as multipart form data with a maximum size of 10 MB. You can optionally link the file to a specific entity by providing the corresponding entity ID. + Parameters ---------- file : core.File @@ -193,6 +197,8 @@ def download_a_file( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[GetCrmFilesIdResponse]: """ + Get a temporary download URL for a CRM file by its identifier. The returned URL is valid for 5 minutes only and provides direct access to the file content. + Parameters ---------- id : str @@ -254,6 +260,8 @@ def download_a_file( def delete_a_file(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]: """ + Permanently delete a CRM file by its identifier. This removes the file from storage and unlinks it from any associated contacts, companies, or deals. + Parameters ---------- id : str @@ -309,6 +317,8 @@ def get_file_details( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[FileData]: """ + Retrieve the metadata and details of a specific CRM file by its identifier. This returns information such as the file name, size, type, creation date, and associated entities, but does not include the file content itself. + Parameters ---------- id : str @@ -386,6 +396,8 @@ async def get_all_files( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[typing.List[FileData]]: """ + Retrieve a paginated list of CRM files with optional filtering by entity type, entity IDs, and date range. Results are sorted by creation date in descending order by default, with a default limit of 50 files per page. + Parameters ---------- entity : typing.Optional[GetCrmFilesRequestEntity] @@ -471,6 +483,8 @@ async def upload_a_file( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[FileData]: """ + Upload a file and associate it with a contact, company, or deal. The file must be sent as multipart form data with a maximum size of 10 MB. You can optionally link the file to a specific entity by providing the corresponding entity ID. + Parameters ---------- file : core.File @@ -539,6 +553,8 @@ async def download_a_file( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[GetCrmFilesIdResponse]: """ + Get a temporary download URL for a CRM file by its identifier. The returned URL is valid for 5 minutes only and provides direct access to the file content. + Parameters ---------- id : str @@ -602,6 +618,8 @@ async def delete_a_file( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Permanently delete a CRM file by its identifier. This removes the file from storage and unlinks it from any associated contacts, companies, or deals. + Parameters ---------- id : str @@ -657,6 +675,8 @@ async def get_file_details( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[FileData]: """ + Retrieve the metadata and details of a specific CRM file by its identifier. This returns information such as the file name, size, type, creation date, and associated entities, but does not include the file content itself. + Parameters ---------- id : str diff --git a/src/brevo/inbound_parsing/client.py b/src/brevo/inbound_parsing/client.py index 3bff546..922a978 100644 --- a/src/brevo/inbound_parsing/client.py +++ b/src/brevo/inbound_parsing/client.py @@ -37,7 +37,7 @@ def get_inbound_email_events( request_options: typing.Optional[RequestOptions] = None, ) -> GetInboundEmailEventsResponse: """ - This endpoint will show the list of all the events for the received emails. + This endpoint will show the list of all the events for the received emails. When no date range is provided, the last 30 days of events are returned by default. Parameters ---------- @@ -45,10 +45,10 @@ def get_inbound_email_events( Email address of the sender. start_date : typing.Optional[str] - Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month. + Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is 30 days. Must not be in the future. end_date : typing.Optional[str] - Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month. + Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is 30 days. Must not be in the future. limit : typing.Optional[int] Number of documents returned per page @@ -104,7 +104,7 @@ def get_inbound_email_events_by_uuid( Returns ------- GetInboundEmailEventsByUuidResponse - Email campaign informations + Detailed information and event history for the specified received email. Examples -------- @@ -181,7 +181,7 @@ async def get_inbound_email_events( request_options: typing.Optional[RequestOptions] = None, ) -> GetInboundEmailEventsResponse: """ - This endpoint will show the list of all the events for the received emails. + This endpoint will show the list of all the events for the received emails. When no date range is provided, the last 30 days of events are returned by default. Parameters ---------- @@ -189,10 +189,10 @@ async def get_inbound_email_events( Email address of the sender. start_date : typing.Optional[str] - Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month. + Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is 30 days. Must not be in the future. end_date : typing.Optional[str] - Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month. + Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is 30 days. Must not be in the future. limit : typing.Optional[int] Number of documents returned per page @@ -256,7 +256,7 @@ async def get_inbound_email_events_by_uuid( Returns ------- GetInboundEmailEventsByUuidResponse - Email campaign informations + Detailed information and event history for the specified received email. Examples -------- diff --git a/src/brevo/inbound_parsing/raw_client.py b/src/brevo/inbound_parsing/raw_client.py index 2781da0..01dc886 100644 --- a/src/brevo/inbound_parsing/raw_client.py +++ b/src/brevo/inbound_parsing/raw_client.py @@ -35,7 +35,7 @@ def get_inbound_email_events( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetInboundEmailEventsResponse]: """ - This endpoint will show the list of all the events for the received emails. + This endpoint will show the list of all the events for the received emails. When no date range is provided, the last 30 days of events are returned by default. Parameters ---------- @@ -43,10 +43,10 @@ def get_inbound_email_events( Email address of the sender. start_date : typing.Optional[str] - Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month. + Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is 30 days. Must not be in the future. end_date : typing.Optional[str] - Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month. + Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is 30 days. Must not be in the future. limit : typing.Optional[int] Number of documents returned per page @@ -125,7 +125,7 @@ def get_inbound_email_events_by_uuid( Returns ------- HttpResponse[GetInboundEmailEventsByUuidResponse] - Email campaign informations + Detailed information and event history for the specified received email. """ _response = self._client_wrapper.httpx_client.request( f"inbound/events/{jsonable_encoder(uuid_)}", @@ -153,6 +153,17 @@ def get_inbound_email_events_by_uuid( ), ), ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -251,7 +262,7 @@ async def get_inbound_email_events( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetInboundEmailEventsResponse]: """ - This endpoint will show the list of all the events for the received emails. + This endpoint will show the list of all the events for the received emails. When no date range is provided, the last 30 days of events are returned by default. Parameters ---------- @@ -259,10 +270,10 @@ async def get_inbound_email_events( Email address of the sender. start_date : typing.Optional[str] - Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month. + Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is 30 days. Must not be in the future. end_date : typing.Optional[str] - Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month. + Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is 30 days. Must not be in the future. limit : typing.Optional[int] Number of documents returned per page @@ -341,7 +352,7 @@ async def get_inbound_email_events_by_uuid( Returns ------- AsyncHttpResponse[GetInboundEmailEventsByUuidResponse] - Email campaign informations + Detailed information and event history for the specified received email. """ _response = await self._client_wrapper.httpx_client.request( f"inbound/events/{jsonable_encoder(uuid_)}", @@ -369,6 +380,17 @@ async def get_inbound_email_events_by_uuid( ), ), ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) diff --git a/src/brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response.py b/src/brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response.py index f2e7c99..8a2e882 100644 --- a/src/brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response.py +++ b/src/brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response.py @@ -26,12 +26,12 @@ class GetInboundEmailEventsByUuidResponse(UncheckedBaseModel): typing.Optional[dt.datetime], FieldMetadata(alias="deliveredAt"), pydantic.Field( - alias="deliveredAt", description="Date when email was delivered successfully to client_dev’s webhook" + alias="deliveredAt", description="Date when email was delivered successfully to the client’s webhook" ), ] = None logs: typing.Optional[typing.List[GetInboundEmailEventsByUuidResponseLogsItem]] = pydantic.Field(default=None) """ - List of events/logs that describe the lifecycle of the email on SIB platform + List of events/logs that describe the lifecycle of the email on the Brevo platform """ message_id: typing_extensions.Annotated[ diff --git a/src/brevo/master_account/client.py b/src/brevo/master_account/client.py index 9a46ce3..845b8de 100644 --- a/src/brevo/master_account/client.py +++ b/src/brevo/master_account/client.py @@ -734,6 +734,8 @@ def get_sub_account_details( def delete_a_sub_account(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently deletes a sub-account from the corporate master account. Once deleted, all data associated with the sub-account organization is removed and cannot be recovered, so ensure the sub-account is no longer needed before proceeding. + Parameters ---------- id : int @@ -2126,6 +2128,8 @@ async def main() -> None: async def delete_a_sub_account(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently deletes a sub-account from the corporate master account. Once deleted, all data associated with the sub-account organization is removed and cannot be recovered, so ensure the sub-account is no longer needed before proceeding. + Parameters ---------- id : int diff --git a/src/brevo/master_account/raw_client.py b/src/brevo/master_account/raw_client.py index 5d19024..1fd30f0 100644 --- a/src/brevo/master_account/raw_client.py +++ b/src/brevo/master_account/raw_client.py @@ -215,6 +215,17 @@ def get_a_group_details( ), ) return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -367,6 +378,17 @@ def get_sub_account_groups( ), ) return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -431,6 +453,17 @@ def get_corporate_invited_users_list( ), ) return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -472,6 +505,17 @@ def list_of_all_i_ps( ), ) return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -1102,6 +1146,8 @@ def delete_a_sub_account( self, id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ + Permanently deletes a sub-account from the corporate master account. Once deleted, all data associated with the sub-account organization is removed and cannot be recovered, so ensure the sub-account is no longer needed before proceeding. + Parameters ---------- id : int @@ -1971,6 +2017,17 @@ async def get_a_group_details( ), ) return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -2125,6 +2182,17 @@ async def get_sub_account_groups( ), ) return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -2189,6 +2257,17 @@ async def get_corporate_invited_users_list( ), ) return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -2230,6 +2309,17 @@ async def list_of_all_i_ps( ), ) return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -2860,6 +2950,8 @@ async def delete_a_sub_account( self, id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Permanently deletes a sub-account from the corporate master account. Once deleted, all data associated with the sub-account organization is removed and cannot be recovered, so ensure the sub-account is no longer needed before proceeding. + Parameters ---------- id : int diff --git a/src/brevo/notes/client.py b/src/brevo/notes/client.py index 244f40c..3ac3622 100644 --- a/src/brevo/notes/client.py +++ b/src/brevo/notes/client.py @@ -42,6 +42,8 @@ def get_all_notes( request_options: typing.Optional[RequestOptions] = None, ) -> typing.List[Note]: """ + Retrieve a paginated list of CRM notes with optional filtering by entity type, entity IDs, and date range. Results are sorted by creation date in descending order by default, with a default limit of 50 notes per page. + Parameters ---------- entity : typing.Optional[GetCrmNotesRequestEntity] @@ -104,10 +106,12 @@ def create_a_note( request_options: typing.Optional[RequestOptions] = None, ) -> PostCrmNotesResponse: """ + Create a new CRM note and optionally associate it with contacts, companies, or deals. The note text content is required, and you can link the note to multiple entities simultaneously during creation. + Parameters ---------- text : str - Text content of a note + Content of the note. Supports HTML for rich text formatting. Supported tags include: `

` (paragraph), `` / `` (bold), `` / `` (italic), `` (underline), `
` (line break), `` (labelled hyperlink). Example labelled link: `Link text`. company_ids : typing.Optional[typing.Sequence[str]] Company Ids linked to a note @@ -134,7 +138,7 @@ def create_a_note( api_key="YOUR_API_KEY", ) client.notes.create_a_note( - text="In communication with client_dev for resolution of queries.", + text='

Meeting notes: Action item - visit Brevo for details.

', ) """ _response = self._raw_client.create_a_note( @@ -148,6 +152,8 @@ def create_a_note( def get_a_note(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Note: """ + Retrieve the full details of a single CRM note by its identifier. The response includes the note''s text content, creation date, author, and any associated contacts, companies, or deals. + Parameters ---------- id : str @@ -177,6 +183,8 @@ def get_a_note(self, id: str, *, request_options: typing.Optional[RequestOptions def delete_a_note(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently delete a CRM note by its identifier. This removes the note and unlinks it from any associated contacts, companies, or deals. + Parameters ---------- id : str @@ -214,13 +222,15 @@ def update_a_note( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing CRM note''s text content and its associations with contacts, companies, or deals. You can modify the note text, change the pinned status, or update the linked entities. + Parameters ---------- id : str Note ID to update text : str - Text content of a note + Content of the note. Supports HTML for rich text formatting. Supported tags include: `

` (paragraph), `` / `` (bold), `` / `` (italic), `` (underline), `
` (line break), `` (labelled hyperlink). Example labelled link: `Link text`. company_ids : typing.Optional[typing.Sequence[str]] Company Ids linked to a note @@ -247,7 +257,7 @@ def update_a_note( ) client.notes.update_a_note( id="id", - text="In communication with client_dev for resolution of queries.", + text='

Meeting notes: Action item - visit Brevo for details.

', ) """ _response = self._raw_client.update_a_note( @@ -289,6 +299,8 @@ async def get_all_notes( request_options: typing.Optional[RequestOptions] = None, ) -> typing.List[Note]: """ + Retrieve a paginated list of CRM notes with optional filtering by entity type, entity IDs, and date range. Results are sorted by creation date in descending order by default, with a default limit of 50 notes per page. + Parameters ---------- entity : typing.Optional[GetCrmNotesRequestEntity] @@ -359,10 +371,12 @@ async def create_a_note( request_options: typing.Optional[RequestOptions] = None, ) -> PostCrmNotesResponse: """ + Create a new CRM note and optionally associate it with contacts, companies, or deals. The note text content is required, and you can link the note to multiple entities simultaneously during creation. + Parameters ---------- text : str - Text content of a note + Content of the note. Supports HTML for rich text formatting. Supported tags include: `

` (paragraph), `` / `` (bold), `` / `` (italic), `` (underline), `
` (line break), `` (labelled hyperlink). Example labelled link: `Link text`. company_ids : typing.Optional[typing.Sequence[str]] Company Ids linked to a note @@ -394,7 +408,7 @@ async def create_a_note( async def main() -> None: await client.notes.create_a_note( - text="In communication with client_dev for resolution of queries.", + text='

Meeting notes: Action item - visit Brevo for details.

', ) @@ -411,6 +425,8 @@ async def main() -> None: async def get_a_note(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Note: """ + Retrieve the full details of a single CRM note by its identifier. The response includes the note''s text content, creation date, author, and any associated contacts, companies, or deals. + Parameters ---------- id : str @@ -448,6 +464,8 @@ async def main() -> None: async def delete_a_note(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently delete a CRM note by its identifier. This removes the note and unlinks it from any associated contacts, companies, or deals. + Parameters ---------- id : str @@ -493,13 +511,15 @@ async def update_a_note( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing CRM note''s text content and its associations with contacts, companies, or deals. You can modify the note text, change the pinned status, or update the linked entities. + Parameters ---------- id : str Note ID to update text : str - Text content of a note + Content of the note. Supports HTML for rich text formatting. Supported tags include: `

` (paragraph), `` / `` (bold), `` / `` (italic), `` (underline), `
` (line break), `` (labelled hyperlink). Example labelled link: `Link text`. company_ids : typing.Optional[typing.Sequence[str]] Company Ids linked to a note @@ -531,7 +551,7 @@ async def update_a_note( async def main() -> None: await client.notes.update_a_note( id="id", - text="In communication with client_dev for resolution of queries.", + text='

Meeting notes: Action item - visit Brevo for details.

', ) diff --git a/src/brevo/notes/raw_client.py b/src/brevo/notes/raw_client.py index 885b1b9..e9b4d29 100644 --- a/src/brevo/notes/raw_client.py +++ b/src/brevo/notes/raw_client.py @@ -41,6 +41,8 @@ def get_all_notes( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[typing.List[Note]]: """ + Retrieve a paginated list of CRM notes with optional filtering by entity type, entity IDs, and date range. Results are sorted by creation date in descending order by default, with a default limit of 50 notes per page. + Parameters ---------- entity : typing.Optional[GetCrmNotesRequestEntity] @@ -126,10 +128,12 @@ def create_a_note( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PostCrmNotesResponse]: """ + Create a new CRM note and optionally associate it with contacts, companies, or deals. The note text content is required, and you can link the note to multiple entities simultaneously during creation. + Parameters ---------- text : str - Text content of a note + Content of the note. Supports HTML for rich text formatting. Supported tags include: `

` (paragraph), `` / `` (bold), `` / `` (italic), `` (underline), `
` (line break), `` (labelled hyperlink). Example labelled link: `Link text`. company_ids : typing.Optional[typing.Sequence[str]] Company Ids linked to a note @@ -206,6 +210,8 @@ def create_a_note( def get_a_note(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Note]: """ + Retrieve the full details of a single CRM note by its identifier. The response includes the note''s text content, creation date, author, and any associated contacts, companies, or deals. + Parameters ---------- id : str @@ -267,6 +273,8 @@ def get_a_note(self, id: str, *, request_options: typing.Optional[RequestOptions def delete_a_note(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]: """ + Permanently delete a CRM note by its identifier. This removes the note and unlinks it from any associated contacts, companies, or deals. + Parameters ---------- id : str @@ -329,13 +337,15 @@ def update_a_note( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Update an existing CRM note''s text content and its associations with contacts, companies, or deals. You can modify the note text, change the pinned status, or update the linked entities. + Parameters ---------- id : str Note ID to update text : str - Text content of a note + Content of the note. Supports HTML for rich text formatting. Supported tags include: `

` (paragraph), `` / `` (bold), `` / `` (italic), `` (underline), `
` (line break), `` (labelled hyperlink). Example labelled link: `Link text`. company_ids : typing.Optional[typing.Sequence[str]] Company Ids linked to a note @@ -431,6 +441,8 @@ async def get_all_notes( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[typing.List[Note]]: """ + Retrieve a paginated list of CRM notes with optional filtering by entity type, entity IDs, and date range. Results are sorted by creation date in descending order by default, with a default limit of 50 notes per page. + Parameters ---------- entity : typing.Optional[GetCrmNotesRequestEntity] @@ -516,10 +528,12 @@ async def create_a_note( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PostCrmNotesResponse]: """ + Create a new CRM note and optionally associate it with contacts, companies, or deals. The note text content is required, and you can link the note to multiple entities simultaneously during creation. + Parameters ---------- text : str - Text content of a note + Content of the note. Supports HTML for rich text formatting. Supported tags include: `

` (paragraph), `` / `` (bold), `` / `` (italic), `` (underline), `
` (line break), `` (labelled hyperlink). Example labelled link: `Link text`. company_ids : typing.Optional[typing.Sequence[str]] Company Ids linked to a note @@ -598,6 +612,8 @@ async def get_a_note( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[Note]: """ + Retrieve the full details of a single CRM note by its identifier. The response includes the note''s text content, creation date, author, and any associated contacts, companies, or deals. + Parameters ---------- id : str @@ -661,6 +677,8 @@ async def delete_a_note( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Permanently delete a CRM note by its identifier. This removes the note and unlinks it from any associated contacts, companies, or deals. + Parameters ---------- id : str @@ -723,13 +741,15 @@ async def update_a_note( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Update an existing CRM note''s text content and its associations with contacts, companies, or deals. You can modify the note text, change the pinned status, or update the linked entities. + Parameters ---------- id : str Note ID to update text : str - Text content of a note + Content of the note. Supports HTML for rich text formatting. Supported tags include: `

` (paragraph), `` / `` (bold), `` / `` (italic), `` (underline), `
` (line break), `` (labelled hyperlink). Example labelled link: `Link text`. company_ids : typing.Optional[typing.Sequence[str]] Company Ids linked to a note diff --git a/src/brevo/notes/types/post_crm_notes_response.py b/src/brevo/notes/types/post_crm_notes_response.py index 329067d..a3e28a0 100644 --- a/src/brevo/notes/types/post_crm_notes_response.py +++ b/src/brevo/notes/types/post_crm_notes_response.py @@ -9,7 +9,7 @@ class PostCrmNotesResponse(UncheckedBaseModel): """ - Updated Note ID + Created Note ID """ id: typing.Optional[str] = pydantic.Field(default=None) diff --git a/src/brevo/payments/client.py b/src/brevo/payments/client.py index 220539c..93377cb 100644 --- a/src/brevo/payments/client.py +++ b/src/brevo/payments/client.py @@ -42,6 +42,8 @@ def create_payment_request( request_options: typing.Optional[RequestOptions] = None, ) -> CreatePaymentRequestResponse: """ + Create a new payment request for a Brevo contact. The request requires a reference (displayed on the payment page), a contact ID, and a cart with currency and amount in cents. You can optionally configure a custom success redirect URL and enable email notifications with reminders. Returns the payment request ID and its public payment URL. A `403` error is returned if Brevo Payments is not activated or the account is not validated. + Parameters ---------- cart : Cart @@ -97,6 +99,8 @@ def get_payment_request( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetPaymentRequestResponse: """ + Retrieve the details of a specific payment request by its ID. The response includes the reference, status (created, sent, reminderSent, or paid), cart details, notification configuration, contact ID, and the number of reminders sent. Returns a `404` error if no payment request matches the provided ID. + Parameters ---------- id : str @@ -126,6 +130,8 @@ def get_payment_request( def delete_payment_request(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Delete a payment request by its UUID. Once deleted, the payment request can no longer be accessed or paid. Returns a `404` error if no payment request matches the provided ID, and a `403` error if Brevo Payments is not activated or the account is not validated. + Parameters ---------- id : str @@ -180,6 +186,8 @@ async def create_payment_request( request_options: typing.Optional[RequestOptions] = None, ) -> CreatePaymentRequestResponse: """ + Create a new payment request for a Brevo contact. The request requires a reference (displayed on the payment page), a contact ID, and a cart with currency and amount in cents. You can optionally configure a custom success redirect URL and enable email notifications with reminders. Returns the payment request ID and its public payment URL. A `403` error is returned if Brevo Payments is not activated or the account is not validated. + Parameters ---------- cart : Cart @@ -243,6 +251,8 @@ async def get_payment_request( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetPaymentRequestResponse: """ + Retrieve the details of a specific payment request by its ID. The response includes the reference, status (created, sent, reminderSent, or paid), cart details, notification configuration, contact ID, and the number of reminders sent. Returns a `404` error if no payment request matches the provided ID. + Parameters ---------- id : str @@ -280,6 +290,8 @@ async def main() -> None: async def delete_payment_request(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Delete a payment request by its UUID. Once deleted, the payment request can no longer be accessed or paid. Returns a `404` error if no payment request matches the provided ID, and a `403` error if Brevo Payments is not activated or the account is not validated. + Parameters ---------- id : str diff --git a/src/brevo/payments/raw_client.py b/src/brevo/payments/raw_client.py index 421880d..71f6076 100644 --- a/src/brevo/payments/raw_client.py +++ b/src/brevo/payments/raw_client.py @@ -42,6 +42,8 @@ def create_payment_request( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreatePaymentRequestResponse]: """ + Create a new payment request for a Brevo contact. The request requires a reference (displayed on the payment page), a contact ID, and a cart with currency and amount in cents. You can optionally configure a custom success redirect URL and enable email notifications with reminders. Returns the payment request ID and its public payment URL. A `403` error is returned if Brevo Payments is not activated or the account is not validated. + Parameters ---------- cart : Cart @@ -144,6 +146,8 @@ def get_payment_request( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[GetPaymentRequestResponse]: """ + Retrieve the details of a specific payment request by its ID. The response includes the reference, status (created, sent, reminderSent, or paid), cart details, notification configuration, contact ID, and the number of reminders sent. Returns a `404` error if no payment request matches the provided ID. + Parameters ---------- id : str @@ -229,6 +233,8 @@ def delete_payment_request( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ + Delete a payment request by its UUID. Once deleted, the payment request can no longer be accessed or paid. Returns a `404` error if no payment request matches the provided ID, and a `403` error if Brevo Payments is not activated or the account is not validated. + Parameters ---------- id : str @@ -308,6 +314,8 @@ async def create_payment_request( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreatePaymentRequestResponse]: """ + Create a new payment request for a Brevo contact. The request requires a reference (displayed on the payment page), a contact ID, and a cart with currency and amount in cents. You can optionally configure a custom success redirect URL and enable email notifications with reminders. Returns the payment request ID and its public payment URL. A `403` error is returned if Brevo Payments is not activated or the account is not validated. + Parameters ---------- cart : Cart @@ -410,6 +418,8 @@ async def get_payment_request( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[GetPaymentRequestResponse]: """ + Retrieve the details of a specific payment request by its ID. The response includes the reference, status (created, sent, reminderSent, or paid), cart details, notification configuration, contact ID, and the number of reminders sent. Returns a `404` error if no payment request matches the provided ID. + Parameters ---------- id : str @@ -495,6 +505,8 @@ async def delete_payment_request( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Delete a payment request by its UUID. Once deleted, the payment request can no longer be accessed or paid. Returns a `404` error if no payment request matches the provided ID, and a `403` error if Brevo Payments is not activated or the account is not validated. + Parameters ---------- id : str diff --git a/src/brevo/process/__init__.py b/src/brevo/process/__init__.py index 4d761b4..b301cc9 100644 --- a/src/brevo/process/__init__.py +++ b/src/brevo/process/__init__.py @@ -9,7 +9,6 @@ from .types import ( GetProcessResponse, GetProcessResponseInfo, - GetProcessResponseInfoExport, GetProcessResponseInfoImport, GetProcessResponseName, GetProcessResponseStatus, @@ -17,7 +16,6 @@ GetProcessesResponse, GetProcessesResponseProcessesItem, GetProcessesResponseProcessesItemInfo, - GetProcessesResponseProcessesItemInfoExport, GetProcessesResponseProcessesItemInfoImport, GetProcessesResponseProcessesItemName, GetProcessesResponseProcessesItemStatus, @@ -25,7 +23,6 @@ _dynamic_imports: typing.Dict[str, str] = { "GetProcessResponse": ".types", "GetProcessResponseInfo": ".types", - "GetProcessResponseInfoExport": ".types", "GetProcessResponseInfoImport": ".types", "GetProcessResponseName": ".types", "GetProcessResponseStatus": ".types", @@ -33,7 +30,6 @@ "GetProcessesResponse": ".types", "GetProcessesResponseProcessesItem": ".types", "GetProcessesResponseProcessesItemInfo": ".types", - "GetProcessesResponseProcessesItemInfoExport": ".types", "GetProcessesResponseProcessesItemInfoImport": ".types", "GetProcessesResponseProcessesItemName": ".types", "GetProcessesResponseProcessesItemStatus": ".types", @@ -64,7 +60,6 @@ def __dir__(): __all__ = [ "GetProcessResponse", "GetProcessResponseInfo", - "GetProcessResponseInfoExport", "GetProcessResponseInfoImport", "GetProcessResponseName", "GetProcessResponseStatus", @@ -72,7 +67,6 @@ def __dir__(): "GetProcessesResponse", "GetProcessesResponseProcessesItem", "GetProcessesResponseProcessesItemInfo", - "GetProcessesResponseProcessesItemInfoExport", "GetProcessesResponseProcessesItemInfoImport", "GetProcessesResponseProcessesItemName", "GetProcessesResponseProcessesItemStatus", diff --git a/src/brevo/process/client.py b/src/brevo/process/client.py index fd52d0c..24454a1 100644 --- a/src/brevo/process/client.py +++ b/src/brevo/process/client.py @@ -44,20 +44,19 @@ def get_processes( - Identify failed or stuck processes for troubleshooting **Key information returned:** - - Process details (ID, name, type, status) - - Process creation and completion timestamps - - Process progress and completion status - - Error information for failed processes - - Process result data and download links + - Process details (ID, name, status) + - Export download URLs for completed export processes + - Import details with CSV report URLs for completed import processes + - Total count of processes for pagination **Important considerations:** - Background processes handle long-running operations like imports and exports - - Process status indicates current state (queued, processing, completed, failed, cancelled) + - Process status indicates current state (queued, processing, completed) - Export processes provide download URLs when completed - - Failed processes include error messages for troubleshooting + - Import processes provide CSV report URLs with details about problematic records - Use pagination for accounts with many historical processes - Sort options available for creation order (ascending or descending) - - Different process types handle specific operations (imports, exports, calculations) + - Default limit is 10 results per page, maximum is 50 Parameters ---------- @@ -107,18 +106,14 @@ def get_process( - Track process execution times **Key information returned:** - - Complete process details and status - - Import/export statistics and results - - Error information for troubleshooting - - Download URLs for export processes - - Process timing and performance data + - Complete process details (ID, name, status) + - Download URLs for completed export processes + - Import details with CSV report URLs for completed import processes **Important considerations:** - - Process ID must exist in your account - - Completed processes provide detailed statistics and results - - Export processes include download URLs when successful - - Failed processes contain error messages for debugging - - Timing information helps with performance analysis + - Process ID must exist in your account and not be deleted + - Completed export processes include download URLs + - Completed import processes include CSV report URLs with details about problematic records - Different process types return different result structures Parameters @@ -183,20 +178,19 @@ async def get_processes( - Identify failed or stuck processes for troubleshooting **Key information returned:** - - Process details (ID, name, type, status) - - Process creation and completion timestamps - - Process progress and completion status - - Error information for failed processes - - Process result data and download links + - Process details (ID, name, status) + - Export download URLs for completed export processes + - Import details with CSV report URLs for completed import processes + - Total count of processes for pagination **Important considerations:** - Background processes handle long-running operations like imports and exports - - Process status indicates current state (queued, processing, completed, failed, cancelled) + - Process status indicates current state (queued, processing, completed) - Export processes provide download URLs when completed - - Failed processes include error messages for troubleshooting + - Import processes provide CSV report URLs with details about problematic records - Use pagination for accounts with many historical processes - Sort options available for creation order (ascending or descending) - - Different process types handle specific operations (imports, exports, calculations) + - Default limit is 10 results per page, maximum is 50 Parameters ---------- @@ -254,18 +248,14 @@ async def get_process( - Track process execution times **Key information returned:** - - Complete process details and status - - Import/export statistics and results - - Error information for troubleshooting - - Download URLs for export processes - - Process timing and performance data + - Complete process details (ID, name, status) + - Download URLs for completed export processes + - Import details with CSV report URLs for completed import processes **Important considerations:** - - Process ID must exist in your account - - Completed processes provide detailed statistics and results - - Export processes include download URLs when successful - - Failed processes contain error messages for debugging - - Timing information helps with performance analysis + - Process ID must exist in your account and not be deleted + - Completed export processes include download URLs + - Completed import processes include CSV report URLs with details about problematic records - Different process types return different result structures Parameters diff --git a/src/brevo/process/raw_client.py b/src/brevo/process/raw_client.py index 528842e..ba9e622 100644 --- a/src/brevo/process/raw_client.py +++ b/src/brevo/process/raw_client.py @@ -41,20 +41,19 @@ def get_processes( - Identify failed or stuck processes for troubleshooting **Key information returned:** - - Process details (ID, name, type, status) - - Process creation and completion timestamps - - Process progress and completion status - - Error information for failed processes - - Process result data and download links + - Process details (ID, name, status) + - Export download URLs for completed export processes + - Import details with CSV report URLs for completed import processes + - Total count of processes for pagination **Important considerations:** - Background processes handle long-running operations like imports and exports - - Process status indicates current state (queued, processing, completed, failed, cancelled) + - Process status indicates current state (queued, processing, completed) - Export processes provide download URLs when completed - - Failed processes include error messages for troubleshooting + - Import processes provide CSV report URLs with details about problematic records - Use pagination for accounts with many historical processes - Sort options available for creation order (ascending or descending) - - Different process types handle specific operations (imports, exports, calculations) + - Default limit is 10 results per page, maximum is 50 Parameters ---------- @@ -130,18 +129,14 @@ def get_process( - Track process execution times **Key information returned:** - - Complete process details and status - - Import/export statistics and results - - Error information for troubleshooting - - Download URLs for export processes - - Process timing and performance data + - Complete process details (ID, name, status) + - Download URLs for completed export processes + - Import details with CSV report URLs for completed import processes **Important considerations:** - - Process ID must exist in your account - - Completed processes provide detailed statistics and results - - Export processes include download URLs when successful - - Failed processes contain error messages for debugging - - Timing information helps with performance analysis + - Process ID must exist in your account and not be deleted + - Completed export processes include download URLs + - Completed import processes include CSV report URLs with details about problematic records - Different process types return different result structures Parameters @@ -227,20 +222,19 @@ async def get_processes( - Identify failed or stuck processes for troubleshooting **Key information returned:** - - Process details (ID, name, type, status) - - Process creation and completion timestamps - - Process progress and completion status - - Error information for failed processes - - Process result data and download links + - Process details (ID, name, status) + - Export download URLs for completed export processes + - Import details with CSV report URLs for completed import processes + - Total count of processes for pagination **Important considerations:** - Background processes handle long-running operations like imports and exports - - Process status indicates current state (queued, processing, completed, failed, cancelled) + - Process status indicates current state (queued, processing, completed) - Export processes provide download URLs when completed - - Failed processes include error messages for troubleshooting + - Import processes provide CSV report URLs with details about problematic records - Use pagination for accounts with many historical processes - Sort options available for creation order (ascending or descending) - - Different process types handle specific operations (imports, exports, calculations) + - Default limit is 10 results per page, maximum is 50 Parameters ---------- @@ -316,18 +310,14 @@ async def get_process( - Track process execution times **Key information returned:** - - Complete process details and status - - Import/export statistics and results - - Error information for troubleshooting - - Download URLs for export processes - - Process timing and performance data + - Complete process details (ID, name, status) + - Download URLs for completed export processes + - Import details with CSV report URLs for completed import processes **Important considerations:** - - Process ID must exist in your account - - Completed processes provide detailed statistics and results - - Export processes include download URLs when successful - - Failed processes contain error messages for debugging - - Timing information helps with performance analysis + - Process ID must exist in your account and not be deleted + - Completed export processes include download URLs + - Completed import processes include CSV report URLs with details about problematic records - Different process types return different result structures Parameters diff --git a/src/brevo/process/types/__init__.py b/src/brevo/process/types/__init__.py index a6494ed..9a84a64 100644 --- a/src/brevo/process/types/__init__.py +++ b/src/brevo/process/types/__init__.py @@ -8,7 +8,6 @@ if typing.TYPE_CHECKING: from .get_process_response import GetProcessResponse from .get_process_response_info import GetProcessResponseInfo - from .get_process_response_info_export import GetProcessResponseInfoExport from .get_process_response_info_import import GetProcessResponseInfoImport from .get_process_response_name import GetProcessResponseName from .get_process_response_status import GetProcessResponseStatus @@ -16,14 +15,12 @@ from .get_processes_response import GetProcessesResponse from .get_processes_response_processes_item import GetProcessesResponseProcessesItem from .get_processes_response_processes_item_info import GetProcessesResponseProcessesItemInfo - from .get_processes_response_processes_item_info_export import GetProcessesResponseProcessesItemInfoExport from .get_processes_response_processes_item_info_import import GetProcessesResponseProcessesItemInfoImport from .get_processes_response_processes_item_name import GetProcessesResponseProcessesItemName from .get_processes_response_processes_item_status import GetProcessesResponseProcessesItemStatus _dynamic_imports: typing.Dict[str, str] = { "GetProcessResponse": ".get_process_response", "GetProcessResponseInfo": ".get_process_response_info", - "GetProcessResponseInfoExport": ".get_process_response_info_export", "GetProcessResponseInfoImport": ".get_process_response_info_import", "GetProcessResponseName": ".get_process_response_name", "GetProcessResponseStatus": ".get_process_response_status", @@ -31,7 +28,6 @@ "GetProcessesResponse": ".get_processes_response", "GetProcessesResponseProcessesItem": ".get_processes_response_processes_item", "GetProcessesResponseProcessesItemInfo": ".get_processes_response_processes_item_info", - "GetProcessesResponseProcessesItemInfoExport": ".get_processes_response_processes_item_info_export", "GetProcessesResponseProcessesItemInfoImport": ".get_processes_response_processes_item_info_import", "GetProcessesResponseProcessesItemName": ".get_processes_response_processes_item_name", "GetProcessesResponseProcessesItemStatus": ".get_processes_response_processes_item_status", @@ -62,7 +58,6 @@ def __dir__(): __all__ = [ "GetProcessResponse", "GetProcessResponseInfo", - "GetProcessResponseInfoExport", "GetProcessResponseInfoImport", "GetProcessResponseName", "GetProcessResponseStatus", @@ -70,7 +65,6 @@ def __dir__(): "GetProcessesResponse", "GetProcessesResponseProcessesItem", "GetProcessesResponseProcessesItemInfo", - "GetProcessesResponseProcessesItemInfoExport", "GetProcessesResponseProcessesItemInfoImport", "GetProcessesResponseProcessesItemName", "GetProcessesResponseProcessesItemStatus", diff --git a/src/brevo/process/types/get_process_response.py b/src/brevo/process/types/get_process_response.py index 410c230..77ac24f 100644 --- a/src/brevo/process/types/get_process_response.py +++ b/src/brevo/process/types/get_process_response.py @@ -1,6 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import datetime as dt import typing import pydantic @@ -29,27 +28,12 @@ class GetProcessResponse(UncheckedBaseModel): info: typing.Optional[GetProcessResponseInfo] = pydantic.Field(default=None) """ - Additional process information (for completed processes) + Additional process information, only returned for completed IMPORTUSER processes. Contains URLs to CSV files with details about problematic records. """ export_url: typing.Optional[str] = pydantic.Field(default=None) """ - Download URL for completed export processes - """ - - error: typing.Optional[str] = pydantic.Field(default=None) - """ - Error message for failed processes - """ - - created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) - """ - Process creation timestamp - """ - - completed_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) - """ - Process completion timestamp + Download URL for completed export processes (returned for SEARCH_EXPORT_USERS, SEARCH_EXPORT_USERS_API, CAMPAIGN_USER_DETAILS, and EXPORT_WEBHOOK process types) """ if IS_PYDANTIC_V2: diff --git a/src/brevo/process/types/get_process_response_info.py b/src/brevo/process/types/get_process_response_info.py index 7c8fde6..1583f49 100644 --- a/src/brevo/process/types/get_process_response_info.py +++ b/src/brevo/process/types/get_process_response_info.py @@ -7,24 +7,19 @@ from ...core.pydantic_utilities import IS_PYDANTIC_V2 from ...core.serialization import FieldMetadata from ...core.unchecked_base_model import UncheckedBaseModel -from .get_process_response_info_export import GetProcessResponseInfoExport from .get_process_response_info_import import GetProcessResponseInfoImport class GetProcessResponseInfo(UncheckedBaseModel): """ - Additional process information (for completed processes) + Additional process information, only returned for completed IMPORTUSER processes. Contains URLs to CSV files with details about problematic records. """ import_: typing_extensions.Annotated[ typing.Optional[GetProcessResponseInfoImport], FieldMetadata(alias="import"), - pydantic.Field(alias="import", description="Import process details"), + pydantic.Field(alias="import", description="Import process details with URLs to CSV reports"), ] = None - export: typing.Optional[GetProcessResponseInfoExport] = pydantic.Field(default=None) - """ - Export process details - """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/process/types/get_process_response_info_import.py b/src/brevo/process/types/get_process_response_info_import.py index 79846d3..4e4b225 100644 --- a/src/brevo/process/types/get_process_response_info_import.py +++ b/src/brevo/process/types/get_process_response_info_import.py @@ -9,22 +9,22 @@ class GetProcessResponseInfoImport(UncheckedBaseModel): """ - Import process details + Import process details with URLs to CSV reports """ - invalid_emails: typing.Optional[int] = pydantic.Field(default=None) + invalid_emails: typing.Optional[str] = pydantic.Field(default=None) """ - Number of invalid email addresses + URL to CSV file containing invalid email addresses, or null if none """ - duplicate_contact_id: typing.Optional[int] = pydantic.Field(default=None) + duplicate_contact_id: typing.Optional[str] = pydantic.Field(default=None) """ - Number of duplicate contact IDs + URL to CSV file containing duplicate contact IDs, or null if none """ - duplicate_ext_id: typing.Optional[int] = pydantic.Field(default=None) + duplicate_ext_id: typing.Optional[str] = pydantic.Field(default=None) """ - Number of duplicate external IDs + URL to CSV file containing duplicate external IDs, or null if none """ duplicate_email_id: typing.Optional[str] = pydantic.Field(default=None) @@ -32,19 +32,19 @@ class GetProcessResponseInfoImport(UncheckedBaseModel): URL to CSV file containing duplicate email IDs, or null if none """ - duplicate_phone_id: typing.Optional[int] = pydantic.Field(default=None) + duplicate_phone_id: typing.Optional[str] = pydantic.Field(default=None) """ - Number of duplicate phone numbers + URL to CSV file containing duplicate phone numbers, or null if none """ - duplicate_whatsapp_id: typing.Optional[int] = pydantic.Field(default=None) + duplicate_whatsapp_id: typing.Optional[str] = pydantic.Field(default=None) """ - Number of duplicate WhatsApp numbers + URL to CSV file containing duplicate WhatsApp numbers, or null if none """ - duplicate_landline_number_id: typing.Optional[int] = pydantic.Field(default=None) + duplicate_landline_number_id: typing.Optional[str] = pydantic.Field(default=None) """ - Number of duplicate landline numbers + URL to CSV file containing duplicate landline numbers, or null if none """ if IS_PYDANTIC_V2: diff --git a/src/brevo/process/types/get_processes_response_processes_item.py b/src/brevo/process/types/get_processes_response_processes_item.py index fd3e9a4..fb58df0 100644 --- a/src/brevo/process/types/get_processes_response_processes_item.py +++ b/src/brevo/process/types/get_processes_response_processes_item.py @@ -1,6 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import datetime as dt import typing import pydantic @@ -29,27 +28,12 @@ class GetProcessesResponseProcessesItem(UncheckedBaseModel): info: typing.Optional[GetProcessesResponseProcessesItemInfo] = pydantic.Field(default=None) """ - Additional process information (for completed processes) + Additional process information, only returned for completed IMPORTUSER processes. Contains URLs to CSV files with details about problematic records. """ export_url: typing.Optional[str] = pydantic.Field(default=None) """ - Download URL for completed export processes - """ - - error: typing.Optional[str] = pydantic.Field(default=None) - """ - Error message for failed processes - """ - - created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) - """ - Process creation timestamp - """ - - completed_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) - """ - Process completion timestamp + Download URL for completed export processes (returned for SEARCH_EXPORT_USERS, SEARCH_EXPORT_USERS_API, CAMPAIGN_USER_DETAILS, and EXPORT_WEBHOOK process types) """ if IS_PYDANTIC_V2: diff --git a/src/brevo/process/types/get_processes_response_processes_item_info.py b/src/brevo/process/types/get_processes_response_processes_item_info.py index 24d2515..c7545c3 100644 --- a/src/brevo/process/types/get_processes_response_processes_item_info.py +++ b/src/brevo/process/types/get_processes_response_processes_item_info.py @@ -7,24 +7,19 @@ from ...core.pydantic_utilities import IS_PYDANTIC_V2 from ...core.serialization import FieldMetadata from ...core.unchecked_base_model import UncheckedBaseModel -from .get_processes_response_processes_item_info_export import GetProcessesResponseProcessesItemInfoExport from .get_processes_response_processes_item_info_import import GetProcessesResponseProcessesItemInfoImport class GetProcessesResponseProcessesItemInfo(UncheckedBaseModel): """ - Additional process information (for completed processes) + Additional process information, only returned for completed IMPORTUSER processes. Contains URLs to CSV files with details about problematic records. """ import_: typing_extensions.Annotated[ typing.Optional[GetProcessesResponseProcessesItemInfoImport], FieldMetadata(alias="import"), - pydantic.Field(alias="import", description="Import process details"), + pydantic.Field(alias="import", description="Import process details with URLs to CSV reports"), ] = None - export: typing.Optional[GetProcessesResponseProcessesItemInfoExport] = pydantic.Field(default=None) - """ - Export process details - """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/process/types/get_processes_response_processes_item_info_import.py b/src/brevo/process/types/get_processes_response_processes_item_info_import.py index 02da46f..3be16fe 100644 --- a/src/brevo/process/types/get_processes_response_processes_item_info_import.py +++ b/src/brevo/process/types/get_processes_response_processes_item_info_import.py @@ -9,22 +9,22 @@ class GetProcessesResponseProcessesItemInfoImport(UncheckedBaseModel): """ - Import process details + Import process details with URLs to CSV reports """ - invalid_emails: typing.Optional[int] = pydantic.Field(default=None) + invalid_emails: typing.Optional[str] = pydantic.Field(default=None) """ - Number of invalid email addresses + URL to CSV file containing invalid email addresses, or null if none """ - duplicate_contact_id: typing.Optional[int] = pydantic.Field(default=None) + duplicate_contact_id: typing.Optional[str] = pydantic.Field(default=None) """ - Number of duplicate contact IDs + URL to CSV file containing duplicate contact IDs, or null if none """ - duplicate_ext_id: typing.Optional[int] = pydantic.Field(default=None) + duplicate_ext_id: typing.Optional[str] = pydantic.Field(default=None) """ - Number of duplicate external IDs + URL to CSV file containing duplicate external IDs, or null if none """ duplicate_email_id: typing.Optional[str] = pydantic.Field(default=None) @@ -32,19 +32,19 @@ class GetProcessesResponseProcessesItemInfoImport(UncheckedBaseModel): URL to CSV file containing duplicate email IDs, or null if none """ - duplicate_phone_id: typing.Optional[int] = pydantic.Field(default=None) + duplicate_phone_id: typing.Optional[str] = pydantic.Field(default=None) """ - Number of duplicate phone numbers + URL to CSV file containing duplicate phone numbers, or null if none """ - duplicate_whatsapp_id: typing.Optional[int] = pydantic.Field(default=None) + duplicate_whatsapp_id: typing.Optional[str] = pydantic.Field(default=None) """ - Number of duplicate WhatsApp numbers + URL to CSV file containing duplicate WhatsApp numbers, or null if none """ - duplicate_landline_number_id: typing.Optional[int] = pydantic.Field(default=None) + duplicate_landline_number_id: typing.Optional[str] = pydantic.Field(default=None) """ - Number of duplicate landline numbers + URL to CSV file containing duplicate landline numbers, or null if none """ if IS_PYDANTIC_V2: diff --git a/src/brevo/program/__init__.py b/src/brevo/program/__init__.py index 08b073f..df2f30c 100644 --- a/src/brevo/program/__init__.py +++ b/src/brevo/program/__init__.py @@ -7,6 +7,7 @@ if typing.TYPE_CHECKING: from .types import ( + GetLpListRequestSort, GetLpListRequestSortField, GetLpListResponse, GetParameterSubscriptionInfoResponse, @@ -19,6 +20,7 @@ SubscribeToLoyaltyProgramResponse, ) _dynamic_imports: typing.Dict[str, str] = { + "GetLpListRequestSort": ".types", "GetLpListRequestSortField": ".types", "GetLpListResponse": ".types", "GetParameterSubscriptionInfoResponse": ".types", @@ -54,6 +56,7 @@ def __dir__(): __all__ = [ + "GetLpListRequestSort", "GetLpListRequestSortField", "GetLpListResponse", "GetParameterSubscriptionInfoResponse", diff --git a/src/brevo/program/client.py b/src/brevo/program/client.py index 2fbc2a1..20dd913 100644 --- a/src/brevo/program/client.py +++ b/src/brevo/program/client.py @@ -1,11 +1,13 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from ..types.loyalty_program import LoyaltyProgram from .raw_client import AsyncRawProgramClient, RawProgramClient +from .types.get_lp_list_request_sort import GetLpListRequestSort from .types.get_lp_list_request_sort_field import GetLpListRequestSortField from .types.get_lp_list_response import GetLpListResponse from .types.get_parameter_subscription_info_response import GetParameterSubscriptionInfoResponse @@ -37,7 +39,7 @@ def get_lp_list( limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, sort_field: typing.Optional[GetLpListRequestSortField] = None, - sort: typing.Optional[str] = None, + sort: typing.Optional[GetLpListRequestSort] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetLpListResponse: """ @@ -54,8 +56,8 @@ def get_lp_list( sort_field : typing.Optional[GetLpListRequestSortField] Sort documents by field - sort : typing.Optional[str] - Sort documents by field + sort : typing.Optional[GetLpListRequestSort] + Sort order request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -516,8 +518,9 @@ def subscribe_to_loyalty_program( pid: str, *, contact_id: int, - creation_date: typing.Optional[str] = OMIT, loyalty_subscription_id: typing.Optional[str] = OMIT, + creation_date: typing.Optional[dt.datetime] = OMIT, + meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SubscribeToLoyaltyProgramResponse: """ @@ -531,12 +534,15 @@ def subscribe_to_loyalty_program( contact_id : int Required contact ID; must be greater than 0. - creation_date : typing.Optional[str] - Optional custom date-time format. - loyalty_subscription_id : typing.Optional[str] Optional subscription ID (max length 64). + creation_date : typing.Optional[dt.datetime] + Optional creation date in ISO 8601 format (YYYY-MM-DDThh:mm:ss.ffffff+HH:MM). Must be in the past. + + meta : typing.Optional[typing.Dict[str, typing.Any]] + Optional metadata associated with the subscription. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -554,14 +560,15 @@ def subscribe_to_loyalty_program( ) client.program.subscribe_to_loyalty_program( pid="pid", - contact_id=1, + contact_id=1000000, ) """ _response = self._raw_client.subscribe_to_loyalty_program( pid, contact_id=contact_id, - creation_date=creation_date, loyalty_subscription_id=loyalty_subscription_id, + creation_date=creation_date, + meta=meta, request_options=request_options, ) return _response.data @@ -588,7 +595,7 @@ async def get_lp_list( limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, sort_field: typing.Optional[GetLpListRequestSortField] = None, - sort: typing.Optional[str] = None, + sort: typing.Optional[GetLpListRequestSort] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetLpListResponse: """ @@ -605,8 +612,8 @@ async def get_lp_list( sort_field : typing.Optional[GetLpListRequestSortField] Sort documents by field - sort : typing.Optional[str] - Sort documents by field + sort : typing.Optional[GetLpListRequestSort] + Sort order request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1159,8 +1166,9 @@ async def subscribe_to_loyalty_program( pid: str, *, contact_id: int, - creation_date: typing.Optional[str] = OMIT, loyalty_subscription_id: typing.Optional[str] = OMIT, + creation_date: typing.Optional[dt.datetime] = OMIT, + meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SubscribeToLoyaltyProgramResponse: """ @@ -1174,12 +1182,15 @@ async def subscribe_to_loyalty_program( contact_id : int Required contact ID; must be greater than 0. - creation_date : typing.Optional[str] - Optional custom date-time format. - loyalty_subscription_id : typing.Optional[str] Optional subscription ID (max length 64). + creation_date : typing.Optional[dt.datetime] + Optional creation date in ISO 8601 format (YYYY-MM-DDThh:mm:ss.ffffff+HH:MM). Must be in the past. + + meta : typing.Optional[typing.Dict[str, typing.Any]] + Optional metadata associated with the subscription. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1202,7 +1213,7 @@ async def subscribe_to_loyalty_program( async def main() -> None: await client.program.subscribe_to_loyalty_program( pid="pid", - contact_id=1, + contact_id=1000000, ) @@ -1211,8 +1222,9 @@ async def main() -> None: _response = await self._raw_client.subscribe_to_loyalty_program( pid, contact_id=contact_id, - creation_date=creation_date, loyalty_subscription_id=loyalty_subscription_id, + creation_date=creation_date, + meta=meta, request_options=request_options, ) return _response.data diff --git a/src/brevo/program/raw_client.py b/src/brevo/program/raw_client.py index 1dca195..c071f8e 100644 --- a/src/brevo/program/raw_client.py +++ b/src/brevo/program/raw_client.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing from json.decoder import JSONDecodeError @@ -19,6 +20,7 @@ from ..errors.unprocessable_entity_error import UnprocessableEntityError from ..types.error_model import ErrorModel from ..types.loyalty_program import LoyaltyProgram +from .types.get_lp_list_request_sort import GetLpListRequestSort from .types.get_lp_list_request_sort_field import GetLpListRequestSortField from .types.get_lp_list_response import GetLpListResponse from .types.get_parameter_subscription_info_response import GetParameterSubscriptionInfoResponse @@ -40,7 +42,7 @@ def get_lp_list( limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, sort_field: typing.Optional[GetLpListRequestSortField] = None, - sort: typing.Optional[str] = None, + sort: typing.Optional[GetLpListRequestSort] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetLpListResponse]: """ @@ -57,8 +59,8 @@ def get_lp_list( sort_field : typing.Optional[GetLpListRequestSortField] Sort documents by field - sort : typing.Optional[str] - Sort documents by field + sort : typing.Optional[GetLpListRequestSort] + Sort order request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1303,8 +1305,9 @@ def subscribe_to_loyalty_program( pid: str, *, contact_id: int, - creation_date: typing.Optional[str] = OMIT, loyalty_subscription_id: typing.Optional[str] = OMIT, + creation_date: typing.Optional[dt.datetime] = OMIT, + meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[SubscribeToLoyaltyProgramResponse]: """ @@ -1318,12 +1321,15 @@ def subscribe_to_loyalty_program( contact_id : int Required contact ID; must be greater than 0. - creation_date : typing.Optional[str] - Optional custom date-time format. - loyalty_subscription_id : typing.Optional[str] Optional subscription ID (max length 64). + creation_date : typing.Optional[dt.datetime] + Optional creation date in ISO 8601 format (YYYY-MM-DDThh:mm:ss.ffffff+HH:MM). Must be in the past. + + meta : typing.Optional[typing.Dict[str, typing.Any]] + Optional metadata associated with the subscription. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1337,8 +1343,9 @@ def subscribe_to_loyalty_program( method="POST", json={ "contactId": contact_id, - "creationDate": creation_date, "loyaltySubscriptionId": loyalty_subscription_id, + "creationDate": creation_date, + "meta": meta, }, headers={ "content-type": "application/json", @@ -1442,7 +1449,7 @@ async def get_lp_list( limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, sort_field: typing.Optional[GetLpListRequestSortField] = None, - sort: typing.Optional[str] = None, + sort: typing.Optional[GetLpListRequestSort] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetLpListResponse]: """ @@ -1459,8 +1466,8 @@ async def get_lp_list( sort_field : typing.Optional[GetLpListRequestSortField] Sort documents by field - sort : typing.Optional[str] - Sort documents by field + sort : typing.Optional[GetLpListRequestSort] + Sort order request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2705,8 +2712,9 @@ async def subscribe_to_loyalty_program( pid: str, *, contact_id: int, - creation_date: typing.Optional[str] = OMIT, loyalty_subscription_id: typing.Optional[str] = OMIT, + creation_date: typing.Optional[dt.datetime] = OMIT, + meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[SubscribeToLoyaltyProgramResponse]: """ @@ -2720,12 +2728,15 @@ async def subscribe_to_loyalty_program( contact_id : int Required contact ID; must be greater than 0. - creation_date : typing.Optional[str] - Optional custom date-time format. - loyalty_subscription_id : typing.Optional[str] Optional subscription ID (max length 64). + creation_date : typing.Optional[dt.datetime] + Optional creation date in ISO 8601 format (YYYY-MM-DDThh:mm:ss.ffffff+HH:MM). Must be in the past. + + meta : typing.Optional[typing.Dict[str, typing.Any]] + Optional metadata associated with the subscription. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2739,8 +2750,9 @@ async def subscribe_to_loyalty_program( method="POST", json={ "contactId": contact_id, - "creationDate": creation_date, "loyaltySubscriptionId": loyalty_subscription_id, + "creationDate": creation_date, + "meta": meta, }, headers={ "content-type": "application/json", diff --git a/src/brevo/program/types/__init__.py b/src/brevo/program/types/__init__.py index 8710824..c446e61 100644 --- a/src/brevo/program/types/__init__.py +++ b/src/brevo/program/types/__init__.py @@ -6,6 +6,7 @@ from importlib import import_module if typing.TYPE_CHECKING: + from .get_lp_list_request_sort import GetLpListRequestSort from .get_lp_list_request_sort_field import GetLpListRequestSortField from .get_lp_list_response import GetLpListResponse from .get_parameter_subscription_info_response import GetParameterSubscriptionInfoResponse @@ -19,6 +20,7 @@ from .subscribe_member_to_a_subscription_response import SubscribeMemberToASubscriptionResponse from .subscribe_to_loyalty_program_response import SubscribeToLoyaltyProgramResponse _dynamic_imports: typing.Dict[str, str] = { + "GetLpListRequestSort": ".get_lp_list_request_sort", "GetLpListRequestSortField": ".get_lp_list_request_sort_field", "GetLpListResponse": ".get_lp_list_response", "GetParameterSubscriptionInfoResponse": ".get_parameter_subscription_info_response", @@ -54,6 +56,7 @@ def __dir__(): __all__ = [ + "GetLpListRequestSort", "GetLpListRequestSortField", "GetLpListResponse", "GetParameterSubscriptionInfoResponse", diff --git a/src/brevo/program/types/get_lp_list_request_sort.py b/src/brevo/program/types/get_lp_list_request_sort.py new file mode 100644 index 0000000..c8a9dab --- /dev/null +++ b/src/brevo/program/types/get_lp_list_request_sort.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GetLpListRequestSort = typing.Union[typing.Literal["asc", "desc"], typing.Any] diff --git a/src/brevo/program/types/get_parameter_subscription_info_response_reward_item.py b/src/brevo/program/types/get_parameter_subscription_info_response_reward_item.py index 071677c..aed9b6c 100644 --- a/src/brevo/program/types/get_parameter_subscription_info_response_reward_item.py +++ b/src/brevo/program/types/get_parameter_subscription_info_response_reward_item.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing import pydantic @@ -51,10 +52,15 @@ class GetParameterSubscriptionInfoResponseRewardItem(UncheckedBaseModel): pydantic.Field(alias="rewardId", description="Unique identifier of the reward definition."), ] = None updated_at: typing_extensions.Annotated[ - typing.Optional[str], + typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt", description="Timestamp when the reward was last updated."), ] = None + valid_from: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="validFrom"), + pydantic.Field(alias="validFrom", description="Date from which the voucher becomes valid."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/program/types/subscribe_member_to_a_subscription_response.py b/src/brevo/program/types/subscribe_member_to_a_subscription_response.py index a01368b..87d010e 100644 --- a/src/brevo/program/types/subscribe_member_to_a_subscription_response.py +++ b/src/brevo/program/types/subscribe_member_to_a_subscription_response.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing import pydantic @@ -10,16 +11,6 @@ class SubscribeMemberToASubscriptionResponse(UncheckedBaseModel): - created_at: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="createdAt"), - pydantic.Field(alias="createdAt", description="Timestamp when the subscription member was created."), - ] = None - member_contact_ids: typing_extensions.Annotated[ - typing.Optional[typing.List[int]], - FieldMetadata(alias="memberContactIds"), - pydantic.Field(alias="memberContactIds", description="List of unique member contact IDs."), - ] = None organization_id: typing_extensions.Annotated[ typing.Optional[int], FieldMetadata(alias="organizationId"), @@ -30,8 +21,18 @@ class SubscribeMemberToASubscriptionResponse(UncheckedBaseModel): FieldMetadata(alias="ownerContactId"), pydantic.Field(alias="ownerContactId", description="Unique identifier of the subscription owner."), ] = None + member_contact_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[int]], + FieldMetadata(alias="memberContactIds"), + pydantic.Field(alias="memberContactIds", description="List of unique member contact IDs."), + ] = None + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAt"), + pydantic.Field(alias="createdAt", description="Timestamp when the subscription member was created."), + ] = None updated_at: typing_extensions.Annotated[ - typing.Optional[str], + typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt", description="Timestamp when the subscription member was last updated."), ] = None diff --git a/src/brevo/program/types/subscribe_to_loyalty_program_response.py b/src/brevo/program/types/subscribe_to_loyalty_program_response.py index 930e58a..f7d21fb 100644 --- a/src/brevo/program/types/subscribe_to_loyalty_program_response.py +++ b/src/brevo/program/types/subscribe_to_loyalty_program_response.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing import pydantic @@ -10,41 +11,46 @@ class SubscribeToLoyaltyProgramResponse(UncheckedBaseModel): - contact_id: typing_extensions.Annotated[ + organization_id: typing_extensions.Annotated[ typing.Optional[int], - FieldMetadata(alias="contactId"), - pydantic.Field(alias="contactId", description="Unique identifier of the contact."), - ] = None - created_at: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="createdAt"), - pydantic.Field(alias="createdAt", description="Timestamp when the subscription was created."), + FieldMetadata(alias="organizationId"), + pydantic.Field(alias="organizationId", description="Unique identifier of the organization."), ] = None loyalty_program_id: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="loyaltyProgramId"), pydantic.Field(alias="loyaltyProgramId", description="Unique identifier of the loyalty program."), ] = None + version_id: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="versionId"), + pydantic.Field(alias="versionId", description="Version number of the subscription."), + ] = None + contact_id: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="contactId"), + pydantic.Field(alias="contactId", description="Unique identifier of the contact."), + ] = None loyalty_subscription_id: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="loyaltySubscriptionId"), pydantic.Field(alias="loyaltySubscriptionId", description="Unique identifier of the subscription."), ] = None - organization_id: typing_extensions.Annotated[ - typing.Optional[int], - FieldMetadata(alias="organizationId"), - pydantic.Field(alias="organizationId", description="Unique identifier of the organization."), + meta: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + Metadata associated with the subscription. + """ + + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAt"), + pydantic.Field(alias="createdAt", description="Timestamp when the subscription was created."), ] = None updated_at: typing_extensions.Annotated[ - typing.Optional[str], + typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt", description="Timestamp when the subscription was last updated."), ] = None - version_id: typing_extensions.Annotated[ - typing.Optional[int], - FieldMetadata(alias="versionId"), - pydantic.Field(alias="versionId", description="Version number of the subscription."), - ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/reward/client.py b/src/brevo/reward/client.py index 059dab5..6326b3b 100644 --- a/src/brevo/reward/client.py +++ b/src/brevo/reward/client.py @@ -204,6 +204,7 @@ def create_voucher( loyalty_subscription_id: typing.Optional[str] = OMIT, meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, value: typing.Optional[float] = OMIT, + valid_from: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreateVoucherResponse: """ @@ -235,6 +236,9 @@ def create_voucher( value : typing.Optional[float] Value of the selected reward config + valid_from : typing.Optional[str] + Date from which the voucher becomes valid. Accepts RFC 3339 or DD/MM/YYYY HH:MM AM/PM format. Converted to UTC using the organization's timezone. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -264,6 +268,7 @@ def create_voucher( loyalty_subscription_id=loyalty_subscription_id, meta=meta, value=value, + valid_from=valid_from, request_options=request_options, ) return _response.data @@ -280,6 +285,7 @@ def redeem_voucher( order: typing.Optional[RedeemVoucherRequestOrder] = OMIT, reward_id: typing.Optional[str] = OMIT, ttl: typing.Optional[int] = OMIT, + auto_complete: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Redeem: """ @@ -314,6 +320,9 @@ def redeem_voucher( ttl : typing.Optional[int] Time to live in seconds for the redemption request + auto_complete : typing.Optional[bool] + Whether the redemption should be automatically completed + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -343,6 +352,7 @@ def redeem_voucher( order=order, reward_id=reward_id, ttl=ttl, + auto_complete=auto_complete, request_options=request_options, ) return _response.data @@ -816,6 +826,7 @@ async def create_voucher( loyalty_subscription_id: typing.Optional[str] = OMIT, meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, value: typing.Optional[float] = OMIT, + valid_from: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreateVoucherResponse: """ @@ -847,6 +858,9 @@ async def create_voucher( value : typing.Optional[float] Value of the selected reward config + valid_from : typing.Optional[str] + Date from which the voucher becomes valid. Accepts RFC 3339 or DD/MM/YYYY HH:MM AM/PM format. Converted to UTC using the organization's timezone. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -884,6 +898,7 @@ async def main() -> None: loyalty_subscription_id=loyalty_subscription_id, meta=meta, value=value, + valid_from=valid_from, request_options=request_options, ) return _response.data @@ -900,6 +915,7 @@ async def redeem_voucher( order: typing.Optional[RedeemVoucherRequestOrder] = OMIT, reward_id: typing.Optional[str] = OMIT, ttl: typing.Optional[int] = OMIT, + auto_complete: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Redeem: """ @@ -934,6 +950,9 @@ async def redeem_voucher( ttl : typing.Optional[int] Time to live in seconds for the redemption request + auto_complete : typing.Optional[bool] + Whether the redemption should be automatically completed + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -971,6 +990,7 @@ async def main() -> None: order=order, reward_id=reward_id, ttl=ttl, + auto_complete=auto_complete, request_options=request_options, ) return _response.data diff --git a/src/brevo/reward/raw_client.py b/src/brevo/reward/raw_client.py index 6a1544b..89c267b 100644 --- a/src/brevo/reward/raw_client.py +++ b/src/brevo/reward/raw_client.py @@ -410,6 +410,7 @@ def create_voucher( loyalty_subscription_id: typing.Optional[str] = OMIT, meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, value: typing.Optional[float] = OMIT, + valid_from: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreateVoucherResponse]: """ @@ -441,6 +442,9 @@ def create_voucher( value : typing.Optional[float] Value of the selected reward config + valid_from : typing.Optional[str] + Date from which the voucher becomes valid. Accepts RFC 3339 or DD/MM/YYYY HH:MM AM/PM format. Converted to UTC using the organization's timezone. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -460,6 +464,7 @@ def create_voucher( "meta": meta, "rewardId": reward_id, "value": value, + "validFrom": valid_from, }, headers={ "content-type": "application/json", @@ -564,6 +569,7 @@ def redeem_voucher( order: typing.Optional[RedeemVoucherRequestOrder] = OMIT, reward_id: typing.Optional[str] = OMIT, ttl: typing.Optional[int] = OMIT, + auto_complete: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[Redeem]: """ @@ -598,6 +604,9 @@ def redeem_voucher( ttl : typing.Optional[int] Time to live in seconds for the redemption request + auto_complete : typing.Optional[bool] + Whether the redemption should be automatically completed + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -620,6 +629,7 @@ def redeem_voucher( ), "rewardId": reward_id, "ttl": ttl, + "autoComplete": auto_complete, }, headers={ "content-type": "application/json", @@ -1711,6 +1721,7 @@ async def create_voucher( loyalty_subscription_id: typing.Optional[str] = OMIT, meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, value: typing.Optional[float] = OMIT, + valid_from: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreateVoucherResponse]: """ @@ -1742,6 +1753,9 @@ async def create_voucher( value : typing.Optional[float] Value of the selected reward config + valid_from : typing.Optional[str] + Date from which the voucher becomes valid. Accepts RFC 3339 or DD/MM/YYYY HH:MM AM/PM format. Converted to UTC using the organization's timezone. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1761,6 +1775,7 @@ async def create_voucher( "meta": meta, "rewardId": reward_id, "value": value, + "validFrom": valid_from, }, headers={ "content-type": "application/json", @@ -1865,6 +1880,7 @@ async def redeem_voucher( order: typing.Optional[RedeemVoucherRequestOrder] = OMIT, reward_id: typing.Optional[str] = OMIT, ttl: typing.Optional[int] = OMIT, + auto_complete: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[Redeem]: """ @@ -1899,6 +1915,9 @@ async def redeem_voucher( ttl : typing.Optional[int] Time to live in seconds for the redemption request + auto_complete : typing.Optional[bool] + Whether the redemption should be automatically completed + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1921,6 +1940,7 @@ async def redeem_voucher( ), "rewardId": reward_id, "ttl": ttl, + "autoComplete": auto_complete, }, headers={ "content-type": "application/json", diff --git a/src/brevo/reward/types/create_reward_response.py b/src/brevo/reward/types/create_reward_response.py index d99419e..9f81772 100644 --- a/src/brevo/reward/types/create_reward_response.py +++ b/src/brevo/reward/types/create_reward_response.py @@ -11,11 +11,6 @@ class CreateRewardResponse(UncheckedBaseModel): - created_at: typing_extensions.Annotated[ - typing.Optional[dt.datetime], - FieldMetadata(alias="createdAt"), - pydantic.Field(alias="createdAt", description="Timestamp when the reward was created"), - ] = None id: typing.Optional[str] = pydantic.Field(default=None) """ Unique identifier for the reward @@ -24,9 +19,7 @@ class CreateRewardResponse(UncheckedBaseModel): loyalty_program_id: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="loyaltyProgramId"), - pydantic.Field( - alias="loyaltyProgramId", description="Id of the loyalty program to which the current reward belongs to" - ), + pydantic.Field(alias="loyaltyProgramId", description="Loyalty program to which the reward belongs"), ] = None name: typing.Optional[str] = pydantic.Field(default=None) """ @@ -36,22 +29,27 @@ class CreateRewardResponse(UncheckedBaseModel): public_description: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="publicDescription"), - pydantic.Field(alias="publicDescription", description="Public description for the reward"), + pydantic.Field(alias="publicDescription", description="Public description of the reward"), ] = None public_image: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="publicImage"), - pydantic.Field(alias="publicImage", description="Public Image for the reward"), + pydantic.Field(alias="publicImage", description="Public image URL of the reward"), ] = None public_name: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="publicName"), - pydantic.Field(alias="publicName", description="Public name for the reward"), + pydantic.Field(alias="publicName", description="Public name of the reward"), + ] = None + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAt"), + pydantic.Field(alias="createdAt", description="Timestamp when the reward was created"), ] = None updated_at: typing_extensions.Annotated[ - typing.Optional[str], + typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt"), - pydantic.Field(alias="updatedAt", description="Timestamp for when this reward was last updated."), + pydantic.Field(alias="updatedAt", description="Timestamp when the reward was last updated"), ] = None if IS_PYDANTIC_V2: diff --git a/src/brevo/reward/types/create_voucher_response.py b/src/brevo/reward/types/create_voucher_response.py index 225fd29..e244d7e 100644 --- a/src/brevo/reward/types/create_voucher_response.py +++ b/src/brevo/reward/types/create_voucher_response.py @@ -66,6 +66,12 @@ class CreateVoucherResponse(UncheckedBaseModel): Value of the selected reward config """ + valid_from: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="validFrom"), + pydantic.Field(alias="validFrom", description="Date from which the voucher becomes valid"), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_response_contact_rewards_item.py b/src/brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_response_contact_rewards_item.py index 58a98d2..f9814b3 100644 --- a/src/brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_response_contact_rewards_item.py +++ b/src/brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_response_contact_rewards_item.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing import pydantic @@ -60,6 +61,12 @@ class GetLoyaltyOfferProgramsPidVouchersResponseContactRewardsItem(UncheckedBase Value of the selected reward config """ + valid_from: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="validFrom"), + pydantic.Field(alias="validFrom", description="Date from which the voucher becomes valid"), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/brevo/senders/types/get_ips_response_ips_item.py b/src/brevo/senders/types/get_ips_response_ips_item.py index 3a22c4f..3841cf3 100644 --- a/src/brevo/senders/types/get_ips_response_ips_item.py +++ b/src/brevo/senders/types/get_ips_response_ips_item.py @@ -8,6 +8,11 @@ class GetIpsResponseIpsItem(UncheckedBaseModel): + id: int = pydantic.Field() + """ + ID of the dedicated IP + """ + active: bool = pydantic.Field() """ Status of the IP (true=active, false=inactive) @@ -18,11 +23,6 @@ class GetIpsResponseIpsItem(UncheckedBaseModel): Domain associated to the IP """ - id: int = pydantic.Field() - """ - ID of the dedicated IP - """ - ip: str = pydantic.Field() """ Dedicated IP address diff --git a/src/brevo/sms_campaigns/__init__.py b/src/brevo/sms_campaigns/__init__.py index 41b7138..7f461c6 100644 --- a/src/brevo/sms_campaigns/__init__.py +++ b/src/brevo/sms_campaigns/__init__.py @@ -10,6 +10,9 @@ CreateSmsCampaignRequestRecipients, CreateSmsCampaignResponse, GetSmsCampaignResponse, + GetSmsCampaignResponseRecipients, + GetSmsCampaignResponseRecipientsExclusionListsItem, + GetSmsCampaignResponseRecipientsListsItem, GetSmsCampaignResponseStatus, GetSmsCampaignsRequestSort, GetSmsCampaignsRequestStatus, @@ -24,6 +27,9 @@ "CreateSmsCampaignRequestRecipients": ".types", "CreateSmsCampaignResponse": ".types", "GetSmsCampaignResponse": ".types", + "GetSmsCampaignResponseRecipients": ".types", + "GetSmsCampaignResponseRecipientsExclusionListsItem": ".types", + "GetSmsCampaignResponseRecipientsListsItem": ".types", "GetSmsCampaignResponseStatus": ".types", "GetSmsCampaignsRequestSort": ".types", "GetSmsCampaignsRequestStatus": ".types", @@ -61,6 +67,9 @@ def __dir__(): "CreateSmsCampaignRequestRecipients", "CreateSmsCampaignResponse", "GetSmsCampaignResponse", + "GetSmsCampaignResponseRecipients", + "GetSmsCampaignResponseRecipientsExclusionListsItem", + "GetSmsCampaignResponseRecipientsListsItem", "GetSmsCampaignResponseStatus", "GetSmsCampaignsRequestSort", "GetSmsCampaignsRequestStatus", diff --git a/src/brevo/sms_campaigns/client.py b/src/brevo/sms_campaigns/client.py index e4f30c9..bedb8e3 100644 --- a/src/brevo/sms_campaigns/client.py +++ b/src/brevo/sms_campaigns/client.py @@ -49,19 +49,21 @@ def get_sms_campaigns( request_options: typing.Optional[RequestOptions] = None, ) -> GetSmsCampaignsResponse: """ + Retrieve a paginated list of all your SMS campaigns with their statistics and recipient information. Results can be filtered by status and date range, with a default limit of 500 and maximum of 1000 per page. The sort order defaults to descending by creation date; date filters are only available when status is not passed or is set to sent. + Parameters ---------- status : typing.Optional[GetSmsCampaignsRequestStatus] Status of campaign. start_date : typing.Optional[str] - **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent SMS campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. `startDate` must not be in the future. end_date : typing.Optional[str] - **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent SMS campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. `endDate` must not be in the future. limit : typing.Optional[int] - Number limitation for the result returned + Number of documents per page offset : typing.Optional[int] Beginning point in the list to retrieve from. @@ -75,7 +77,7 @@ def get_sms_campaigns( Returns ------- GetSmsCampaignsResponse - SMS campaigns informations + SMS campaigns information Examples -------- @@ -111,6 +113,8 @@ def create_sms_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> CreateSmsCampaignResponse: """ + Create a new SMS campaign with the required name, sender, and content fields. The sender name is limited to 11 alphanumeric characters or 15 numeric characters, and the content should stay within 160 characters per SMS segment. If a scheduledAt date is provided, listIds in recipients become mandatory; accounts under validation are limited to 4 total campaigns and campaigns with more than 10 recipients will be saved as draft. + Parameters ---------- content : str @@ -174,6 +178,8 @@ def get_sms_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> GetSmsCampaignResponse: """ + Retrieve detailed information about a specific SMS campaign by its ID, including campaign content, sender, recipients with list names, statistics (delivered, sent, bounces, unsubscriptions, answered), and tags. Unlike the list endpoint, recipients are returned as objects with id and name fields rather than plain IDs. + Parameters ---------- campaign_id : int @@ -185,7 +191,7 @@ def get_sms_campaign( Returns ------- GetSmsCampaignResponse - SMS campaign informations + SMS campaign information Examples -------- @@ -216,6 +222,8 @@ def update_sms_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing SMS campaign''s properties such as name, sender, content, recipients, scheduled date, organisation prefix, and unsubscribe instructions. The request body must contain at least one valid field to update. The campaign must exist and must be of type SMS; if a scheduledAt is provided, valid recipients must be present either in the request or already configured on the campaign. + Parameters ---------- campaign_id : int @@ -278,6 +286,8 @@ def update_sms_campaign( def delete_sms_campaign(self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Delete an SMS campaign by its campaign ID. Only campaigns that have not been scheduled or sent can be deleted; attempting to delete a campaign that is queued, in process, or has been sent with recipients will return a 403 permission denied error. + Parameters ---------- campaign_id : int @@ -355,6 +365,8 @@ def send_sms_campaign_now( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ + Send an existing SMS campaign immediately by scheduling it for the current time. The system verifies your account''s SMS credit balance before dispatching; if credits are insufficient or the remaining credit is less than the number of recipients, a 402 error is returned. The campaign must have valid recipients and content already configured. + Parameters ---------- campaign_id : int @@ -438,6 +450,8 @@ def send_test_sms( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Send a test SMS to a specified phone number to preview the campaign before sending it to all recipients. The phone number must belong to one of your existing contacts in your Brevo account and must not be blacklisted. The number should include the country code (e.g. 33689965433). + Parameters ---------- campaign_id : int @@ -477,6 +491,8 @@ def update_sms_campaign_status( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update the status of an SMS campaign, such as suspending, archiving, or replicating it. Available status values include suspended, archive, darchive, sent, queued, replicate, replicateTemplate, cancel, and draft. Note that the replicateTemplate status is only available for template type campaigns. + Parameters ---------- campaign_id : int @@ -536,19 +552,21 @@ async def get_sms_campaigns( request_options: typing.Optional[RequestOptions] = None, ) -> GetSmsCampaignsResponse: """ + Retrieve a paginated list of all your SMS campaigns with their statistics and recipient information. Results can be filtered by status and date range, with a default limit of 500 and maximum of 1000 per page. The sort order defaults to descending by creation date; date filters are only available when status is not passed or is set to sent. + Parameters ---------- status : typing.Optional[GetSmsCampaignsRequestStatus] Status of campaign. start_date : typing.Optional[str] - **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent SMS campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. `startDate` must not be in the future. end_date : typing.Optional[str] - **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent SMS campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. `endDate` must not be in the future. limit : typing.Optional[int] - Number limitation for the result returned + Number of documents per page offset : typing.Optional[int] Beginning point in the list to retrieve from. @@ -562,7 +580,7 @@ async def get_sms_campaigns( Returns ------- GetSmsCampaignsResponse - SMS campaigns informations + SMS campaigns information Examples -------- @@ -606,6 +624,8 @@ async def create_sms_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> CreateSmsCampaignResponse: """ + Create a new SMS campaign with the required name, sender, and content fields. The sender name is limited to 11 alphanumeric characters or 15 numeric characters, and the content should stay within 160 characters per SMS segment. If a scheduledAt date is provided, listIds in recipients become mandatory; accounts under validation are limited to 4 total campaigns and campaigns with more than 10 recipients will be saved as draft. + Parameters ---------- content : str @@ -677,6 +697,8 @@ async def get_sms_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> GetSmsCampaignResponse: """ + Retrieve detailed information about a specific SMS campaign by its ID, including campaign content, sender, recipients with list names, statistics (delivered, sent, bounces, unsubscriptions, answered), and tags. Unlike the list endpoint, recipients are returned as objects with id and name fields rather than plain IDs. + Parameters ---------- campaign_id : int @@ -688,7 +710,7 @@ async def get_sms_campaign( Returns ------- GetSmsCampaignResponse - SMS campaign informations + SMS campaign information Examples -------- @@ -727,6 +749,8 @@ async def update_sms_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing SMS campaign''s properties such as name, sender, content, recipients, scheduled date, organisation prefix, and unsubscribe instructions. The request body must contain at least one valid field to update. The campaign must exist and must be of type SMS; if a scheduledAt is provided, valid recipients must be present either in the request or already configured on the campaign. + Parameters ---------- campaign_id : int @@ -799,6 +823,8 @@ async def delete_sms_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ + Delete an SMS campaign by its campaign ID. Only campaigns that have not been scheduled or sent can be deleted; attempting to delete a campaign that is queued, in process, or has been sent with recipients will return a 403 permission denied error. + Parameters ---------- campaign_id : int @@ -892,6 +918,8 @@ async def send_sms_campaign_now( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ + Send an existing SMS campaign immediately by scheduling it for the current time. The system verifies your account''s SMS credit balance before dispatching; if credits are insufficient or the remaining credit is less than the number of recipients, a 402 error is returned. The campaign must have valid recipients and content already configured. + Parameters ---------- campaign_id : int @@ -991,6 +1019,8 @@ async def send_test_sms( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Send a test SMS to a specified phone number to preview the campaign before sending it to all recipients. The phone number must belong to one of your existing contacts in your Brevo account and must not be blacklisted. The number should include the country code (e.g. 33689965433). + Parameters ---------- campaign_id : int @@ -1038,6 +1068,8 @@ async def update_sms_campaign_status( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update the status of an SMS campaign, such as suspending, archiving, or replicating it. Available status values include suspended, archive, darchive, sent, queued, replicate, replicateTemplate, cancel, and draft. Note that the replicateTemplate status is only available for template type campaigns. + Parameters ---------- campaign_id : int diff --git a/src/brevo/sms_campaigns/raw_client.py b/src/brevo/sms_campaigns/raw_client.py index 4be4c17..c516451 100644 --- a/src/brevo/sms_campaigns/raw_client.py +++ b/src/brevo/sms_campaigns/raw_client.py @@ -49,19 +49,21 @@ def get_sms_campaigns( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetSmsCampaignsResponse]: """ + Retrieve a paginated list of all your SMS campaigns with their statistics and recipient information. Results can be filtered by status and date range, with a default limit of 500 and maximum of 1000 per page. The sort order defaults to descending by creation date; date filters are only available when status is not passed or is set to sent. + Parameters ---------- status : typing.Optional[GetSmsCampaignsRequestStatus] Status of campaign. start_date : typing.Optional[str] - **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent SMS campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. `startDate` must not be in the future. end_date : typing.Optional[str] - **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent SMS campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. `endDate` must not be in the future. limit : typing.Optional[int] - Number limitation for the result returned + Number of documents per page offset : typing.Optional[int] Beginning point in the list to retrieve from. @@ -75,7 +77,7 @@ def get_sms_campaigns( Returns ------- HttpResponse[GetSmsCampaignsResponse] - SMS campaigns informations + SMS campaigns information """ _response = self._client_wrapper.httpx_client.request( "smsCampaigns", @@ -134,6 +136,8 @@ def create_sms_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreateSmsCampaignResponse]: """ + Create a new SMS campaign with the required name, sender, and content fields. The sender name is limited to 11 alphanumeric characters or 15 numeric characters, and the content should stay within 160 characters per SMS segment. If a scheduledAt date is provided, listIds in recipients become mandatory; accounts under validation are limited to 4 total campaigns and campaigns with more than 10 recipients will be saved as draft. + Parameters ---------- content : str @@ -222,6 +226,8 @@ def get_sms_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[GetSmsCampaignResponse]: """ + Retrieve detailed information about a specific SMS campaign by its ID, including campaign content, sender, recipients with list names, statistics (delivered, sent, bounces, unsubscriptions, answered), and tags. Unlike the list endpoint, recipients are returned as objects with id and name fields rather than plain IDs. + Parameters ---------- campaign_id : int @@ -233,7 +239,7 @@ def get_sms_campaign( Returns ------- HttpResponse[GetSmsCampaignResponse] - SMS campaign informations + SMS campaign information """ _response = self._client_wrapper.httpx_client.request( f"smsCampaigns/{jsonable_encoder(campaign_id)}", @@ -296,6 +302,8 @@ def update_sms_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Update an existing SMS campaign''s properties such as name, sender, content, recipients, scheduled date, organisation prefix, and unsubscribe instructions. The request body must contain at least one valid field to update. The campaign must exist and must be of type SMS; if a scheduledAt is provided, valid recipients must be present either in the request or already configured on the campaign. + Parameters ---------- campaign_id : int @@ -390,6 +398,8 @@ def delete_sms_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ + Delete an SMS campaign by its campaign ID. Only campaigns that have not been scheduled or sent can be deleted; attempting to delete a campaign that is queued, in process, or has been sent with recipients will return a 403 permission denied error. + Parameters ---------- campaign_id : int @@ -529,6 +539,8 @@ def send_sms_campaign_now( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ + Send an existing SMS campaign immediately by scheduling it for the current time. The system verifies your account''s SMS credit balance before dispatching; if credits are insufficient or the remaining credit is less than the number of recipients, a 402 error is returned. The campaign must have valid recipients and content already configured. + Parameters ---------- campaign_id : int @@ -677,6 +689,8 @@ def send_test_sms( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Send a test SMS to a specified phone number to preview the campaign before sending it to all recipients. The phone number must belong to one of your existing contacts in your Brevo account and must not be blacklisted. The number should include the country code (e.g. 33689965433). + Parameters ---------- campaign_id : int @@ -746,6 +760,8 @@ def update_sms_campaign_status( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Update the status of an SMS campaign, such as suspending, archiving, or replicating it. Available status values include suspended, archive, darchive, sent, queued, replicate, replicateTemplate, cancel, and draft. Note that the replicateTemplate status is only available for template type campaigns. + Parameters ---------- campaign_id : int @@ -824,19 +840,21 @@ async def get_sms_campaigns( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetSmsCampaignsResponse]: """ + Retrieve a paginated list of all your SMS campaigns with their statistics and recipient information. Results can be filtered by status and date range, with a default limit of 500 and maximum of 1000 per page. The sort order defaults to descending by creation date; date filters are only available when status is not passed or is set to sent. + Parameters ---------- status : typing.Optional[GetSmsCampaignsRequestStatus] Status of campaign. start_date : typing.Optional[str] - **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent SMS campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. `startDate` must not be in the future. end_date : typing.Optional[str] - **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) + **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent SMS campaigns. **Prefer to pass your timezone in date-time format for accurate result.** Only available if `status` is not passed or is set to `sent`. `endDate` must not be in the future. limit : typing.Optional[int] - Number limitation for the result returned + Number of documents per page offset : typing.Optional[int] Beginning point in the list to retrieve from. @@ -850,7 +868,7 @@ async def get_sms_campaigns( Returns ------- AsyncHttpResponse[GetSmsCampaignsResponse] - SMS campaigns informations + SMS campaigns information """ _response = await self._client_wrapper.httpx_client.request( "smsCampaigns", @@ -909,6 +927,8 @@ async def create_sms_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreateSmsCampaignResponse]: """ + Create a new SMS campaign with the required name, sender, and content fields. The sender name is limited to 11 alphanumeric characters or 15 numeric characters, and the content should stay within 160 characters per SMS segment. If a scheduledAt date is provided, listIds in recipients become mandatory; accounts under validation are limited to 4 total campaigns and campaigns with more than 10 recipients will be saved as draft. + Parameters ---------- content : str @@ -997,6 +1017,8 @@ async def get_sms_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[GetSmsCampaignResponse]: """ + Retrieve detailed information about a specific SMS campaign by its ID, including campaign content, sender, recipients with list names, statistics (delivered, sent, bounces, unsubscriptions, answered), and tags. Unlike the list endpoint, recipients are returned as objects with id and name fields rather than plain IDs. + Parameters ---------- campaign_id : int @@ -1008,7 +1030,7 @@ async def get_sms_campaign( Returns ------- AsyncHttpResponse[GetSmsCampaignResponse] - SMS campaign informations + SMS campaign information """ _response = await self._client_wrapper.httpx_client.request( f"smsCampaigns/{jsonable_encoder(campaign_id)}", @@ -1071,6 +1093,8 @@ async def update_sms_campaign( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Update an existing SMS campaign''s properties such as name, sender, content, recipients, scheduled date, organisation prefix, and unsubscribe instructions. The request body must contain at least one valid field to update. The campaign must exist and must be of type SMS; if a scheduledAt is provided, valid recipients must be present either in the request or already configured on the campaign. + Parameters ---------- campaign_id : int @@ -1165,6 +1189,8 @@ async def delete_sms_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Delete an SMS campaign by its campaign ID. Only campaigns that have not been scheduled or sent can be deleted; attempting to delete a campaign that is queued, in process, or has been sent with recipients will return a 403 permission denied error. + Parameters ---------- campaign_id : int @@ -1304,6 +1330,8 @@ async def send_sms_campaign_now( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Send an existing SMS campaign immediately by scheduling it for the current time. The system verifies your account''s SMS credit balance before dispatching; if credits are insufficient or the remaining credit is less than the number of recipients, a 402 error is returned. The campaign must have valid recipients and content already configured. + Parameters ---------- campaign_id : int @@ -1452,6 +1480,8 @@ async def send_test_sms( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Send a test SMS to a specified phone number to preview the campaign before sending it to all recipients. The phone number must belong to one of your existing contacts in your Brevo account and must not be blacklisted. The number should include the country code (e.g. 33689965433). + Parameters ---------- campaign_id : int @@ -1521,6 +1551,8 @@ async def update_sms_campaign_status( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Update the status of an SMS campaign, such as suspending, archiving, or replicating it. Available status values include suspended, archive, darchive, sent, queued, replicate, replicateTemplate, cancel, and draft. Note that the replicateTemplate status is only available for template type campaigns. + Parameters ---------- campaign_id : int diff --git a/src/brevo/sms_campaigns/types/__init__.py b/src/brevo/sms_campaigns/types/__init__.py index 6eaae51..ec3c176 100644 --- a/src/brevo/sms_campaigns/types/__init__.py +++ b/src/brevo/sms_campaigns/types/__init__.py @@ -9,6 +9,11 @@ from .create_sms_campaign_request_recipients import CreateSmsCampaignRequestRecipients from .create_sms_campaign_response import CreateSmsCampaignResponse from .get_sms_campaign_response import GetSmsCampaignResponse + from .get_sms_campaign_response_recipients import GetSmsCampaignResponseRecipients + from .get_sms_campaign_response_recipients_exclusion_lists_item import ( + GetSmsCampaignResponseRecipientsExclusionListsItem, + ) + from .get_sms_campaign_response_recipients_lists_item import GetSmsCampaignResponseRecipientsListsItem from .get_sms_campaign_response_status import GetSmsCampaignResponseStatus from .get_sms_campaigns_request_sort import GetSmsCampaignsRequestSort from .get_sms_campaigns_request_status import GetSmsCampaignsRequestStatus @@ -22,6 +27,9 @@ "CreateSmsCampaignRequestRecipients": ".create_sms_campaign_request_recipients", "CreateSmsCampaignResponse": ".create_sms_campaign_response", "GetSmsCampaignResponse": ".get_sms_campaign_response", + "GetSmsCampaignResponseRecipients": ".get_sms_campaign_response_recipients", + "GetSmsCampaignResponseRecipientsExclusionListsItem": ".get_sms_campaign_response_recipients_exclusion_lists_item", + "GetSmsCampaignResponseRecipientsListsItem": ".get_sms_campaign_response_recipients_lists_item", "GetSmsCampaignResponseStatus": ".get_sms_campaign_response_status", "GetSmsCampaignsRequestSort": ".get_sms_campaigns_request_sort", "GetSmsCampaignsRequestStatus": ".get_sms_campaigns_request_status", @@ -59,6 +67,9 @@ def __dir__(): "CreateSmsCampaignRequestRecipients", "CreateSmsCampaignResponse", "GetSmsCampaignResponse", + "GetSmsCampaignResponseRecipients", + "GetSmsCampaignResponseRecipientsExclusionListsItem", + "GetSmsCampaignResponseRecipientsListsItem", "GetSmsCampaignResponseStatus", "GetSmsCampaignsRequestSort", "GetSmsCampaignsRequestStatus", diff --git a/src/brevo/sms_campaigns/types/get_sms_campaign_response.py b/src/brevo/sms_campaigns/types/get_sms_campaign_response.py index a00020c..e9c459f 100644 --- a/src/brevo/sms_campaigns/types/get_sms_campaign_response.py +++ b/src/brevo/sms_campaigns/types/get_sms_campaign_response.py @@ -7,8 +7,8 @@ from ...core.pydantic_utilities import IS_PYDANTIC_V2 from ...core.serialization import FieldMetadata from ...core.unchecked_base_model import UncheckedBaseModel -from ...types.get_campaign_recipients import GetCampaignRecipients from ...types.get_sms_campaign_stats import GetSmsCampaignStats +from .get_sms_campaign_response_recipients import GetSmsCampaignResponseRecipients from .get_sms_campaign_response_status import GetSmsCampaignResponseStatus @@ -43,12 +43,20 @@ class GetSmsCampaignResponse(UncheckedBaseModel): Name of the SMS Campaign """ + organisation_prefix: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="organisationPrefix"), + pydantic.Field( + alias="organisationPrefix", + description="A recognizable prefix added as the Brand Name before the message content. Empty string if not set.", + ), + ] = None scheduled_at: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="scheduledAt"), pydantic.Field( alias="scheduledAt", - description="UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format", + description="UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format. Empty string if not scheduled.", ), ] = None sender: str = pydantic.Field() @@ -56,13 +64,37 @@ class GetSmsCampaignResponse(UncheckedBaseModel): Sender of the SMS Campaign """ + sent_date: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sentDate"), + pydantic.Field( + alias="sentDate", + description="UTC date-time on which the SMS campaign was sent (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if the campaign status is 'sent'.", + ), + ] = None status: GetSmsCampaignResponseStatus = pydantic.Field() """ Status of the SMS Campaign """ - recipients: GetCampaignRecipients + unsubscribe_instruction: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="unsubscribeInstruction"), + pydantic.Field( + alias="unsubscribeInstruction", + description="Instructions to unsubscribe from future communications. Empty string if not set.", + ), + ] = None + recipients: GetSmsCampaignResponseRecipients = pydantic.Field() + """ + Recipients of the SMS campaign. For a single campaign, lists and exclusion lists are returned as objects with id and name. + """ + statistics: GetSmsCampaignStats + tags: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Tags (labels) associated with the SMS campaign. Only available when retrieving a single campaign. + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/sms_campaigns/types/get_sms_campaign_response_recipients.py b/src/brevo/sms_campaigns/types/get_sms_campaign_response_recipients.py new file mode 100644 index 0000000..44ff6d1 --- /dev/null +++ b/src/brevo/sms_campaigns/types/get_sms_campaign_response_recipients.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel +from .get_sms_campaign_response_recipients_exclusion_lists_item import ( + GetSmsCampaignResponseRecipientsExclusionListsItem, +) +from .get_sms_campaign_response_recipients_lists_item import GetSmsCampaignResponseRecipientsListsItem + + +class GetSmsCampaignResponseRecipients(UncheckedBaseModel): + """ + Recipients of the SMS campaign. For a single campaign, lists and exclusion lists are returned as objects with id and name. + """ + + exclusion_lists: typing_extensions.Annotated[ + typing.Optional[typing.List[GetSmsCampaignResponseRecipientsExclusionListsItem]], + FieldMetadata(alias="exclusionLists"), + pydantic.Field(alias="exclusionLists"), + ] = None + lists: typing.Optional[typing.List[GetSmsCampaignResponseRecipientsListsItem]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/process/types/get_process_response_info_export.py b/src/brevo/sms_campaigns/types/get_sms_campaign_response_recipients_exclusion_lists_item.py similarity index 63% rename from src/brevo/process/types/get_process_response_info_export.py rename to src/brevo/sms_campaigns/types/get_sms_campaign_response_recipients_exclusion_lists_item.py index f70008e..ac8d335 100644 --- a/src/brevo/process/types/get_process_response_info_export.py +++ b/src/brevo/sms_campaigns/types/get_sms_campaign_response_recipients_exclusion_lists_item.py @@ -7,19 +7,15 @@ from ...core.unchecked_base_model import UncheckedBaseModel -class GetProcessResponseInfoExport(UncheckedBaseModel): +class GetSmsCampaignResponseRecipientsExclusionListsItem(UncheckedBaseModel): + id: typing.Optional[int] = pydantic.Field(default=None) """ - Export process details + ID of the exclusion list """ - total_records: typing.Optional[int] = pydantic.Field(default=None) + name: typing.Optional[str] = pydantic.Field(default=None) """ - Total number of exported records - """ - - file_size: typing.Optional[int] = pydantic.Field(default=None) - """ - Size of exported file in bytes + Name of the exclusion list """ if IS_PYDANTIC_V2: diff --git a/src/brevo/sms_campaigns/types/get_sms_campaign_response_recipients_lists_item.py b/src/brevo/sms_campaigns/types/get_sms_campaign_response_recipients_lists_item.py new file mode 100644 index 0000000..8976c93 --- /dev/null +++ b/src/brevo/sms_campaigns/types/get_sms_campaign_response_recipients_lists_item.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.unchecked_base_model import UncheckedBaseModel + + +class GetSmsCampaignResponseRecipientsListsItem(UncheckedBaseModel): + id: typing.Optional[int] = pydantic.Field(default=None) + """ + ID of the list + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + Name of the list + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/sms_campaigns/types/get_sms_campaigns_response_campaigns_item.py b/src/brevo/sms_campaigns/types/get_sms_campaigns_response_campaigns_item.py index d49f777..433cdfe 100644 --- a/src/brevo/sms_campaigns/types/get_sms_campaigns_response_campaigns_item.py +++ b/src/brevo/sms_campaigns/types/get_sms_campaigns_response_campaigns_item.py @@ -43,12 +43,20 @@ class GetSmsCampaignsResponseCampaignsItem(UncheckedBaseModel): Name of the SMS Campaign """ + organisation_prefix: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="organisationPrefix"), + pydantic.Field( + alias="organisationPrefix", + description="A recognizable prefix added as the Brand Name before the message content. Empty string if not set.", + ), + ] = None scheduled_at: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="scheduledAt"), pydantic.Field( alias="scheduledAt", - description="UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format", + description="UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format. Empty string if not scheduled.", ), ] = None sender: str = pydantic.Field() @@ -56,11 +64,27 @@ class GetSmsCampaignsResponseCampaignsItem(UncheckedBaseModel): Sender of the SMS Campaign """ + sent_date: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sentDate"), + pydantic.Field( + alias="sentDate", + description="UTC date-time on which the SMS campaign was sent (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if the campaign status is 'sent'.", + ), + ] = None status: GetSmsCampaignsResponseCampaignsItemStatus = pydantic.Field() """ Status of the SMS Campaign """ + unsubscribe_instruction: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="unsubscribeInstruction"), + pydantic.Field( + alias="unsubscribeInstruction", + description="Instructions to unsubscribe from future communications. Empty string if not set.", + ), + ] = None recipients: GetCampaignRecipients statistics: GetSmsCampaignStats diff --git a/src/brevo/tasks/__init__.py b/src/brevo/tasks/__init__.py index 7f1da8a..1b29ab9 100644 --- a/src/brevo/tasks/__init__.py +++ b/src/brevo/tasks/__init__.py @@ -11,7 +11,7 @@ GetCrmTasksRequestFilterStatus, GetCrmTasksRequestSort, GetCrmTasksResponse, - GetCrmTasktypesResponse, + GetCrmTasktypesResponseItem, PostCrmTasksResponse, ) _dynamic_imports: typing.Dict[str, str] = { @@ -19,7 +19,7 @@ "GetCrmTasksRequestFilterStatus": ".types", "GetCrmTasksRequestSort": ".types", "GetCrmTasksResponse": ".types", - "GetCrmTasktypesResponse": ".types", + "GetCrmTasktypesResponseItem": ".types", "PostCrmTasksResponse": ".types", } @@ -50,6 +50,6 @@ def __dir__(): "GetCrmTasksRequestFilterStatus", "GetCrmTasksRequestSort", "GetCrmTasksResponse", - "GetCrmTasktypesResponse", + "GetCrmTasktypesResponseItem", "PostCrmTasksResponse", ] diff --git a/src/brevo/tasks/client.py b/src/brevo/tasks/client.py index 3fd3fea..8de1039 100644 --- a/src/brevo/tasks/client.py +++ b/src/brevo/tasks/client.py @@ -12,7 +12,7 @@ from .types.get_crm_tasks_request_filter_status import GetCrmTasksRequestFilterStatus from .types.get_crm_tasks_request_sort import GetCrmTasksRequestSort from .types.get_crm_tasks_response import GetCrmTasksResponse -from .types.get_crm_tasktypes_response import GetCrmTasktypesResponse +from .types.get_crm_tasktypes_response_item import GetCrmTasktypesResponseItem from .types.post_crm_tasks_response import PostCrmTasksResponse # this is used as the default value for optional parameters @@ -53,6 +53,8 @@ def get_all_tasks( request_options: typing.Optional[RequestOptions] = None, ) -> GetCrmTasksResponse: """ + Retrieve a paginated list of CRM tasks with optional filtering by task type, status, date range, assignee, and linked entities (contacts, deals, companies). Results are sorted by creation date in descending order by default, with a default limit of 50 tasks per page. + Parameters ---------- filter_type : typing.Optional[str] @@ -148,6 +150,8 @@ def create_a_task( request_options: typing.Optional[RequestOptions] = None, ) -> PostCrmTasksResponse: """ + Create a new CRM task with the specified name, type, due date, and optional associations to contacts, companies, or deals. A task requires a name, task type ID, and due date at minimum. You can also set a duration, notes, a reminder, and assign the task to a specific user. + Parameters ---------- date : dt.datetime @@ -203,7 +207,7 @@ def create_a_task( date=datetime.datetime.fromisoformat( "2021-11-01 17:44:54+00:00", ), - name="Task: Connect with client_dev", + name="Task: Connect with client", task_type_id="61a5cd07ca1347c82306ad09", ) """ @@ -225,6 +229,8 @@ def create_a_task( def get_a_task(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Task: """ + Retrieve the full details of a single CRM task by its identifier. The response includes the task''s name, type, status, due date, duration, notes, assignee, reminder settings, and linked contacts, companies, or deals. + Parameters ---------- id : str @@ -253,6 +259,8 @@ def get_a_task(self, id: str, *, request_options: typing.Optional[RequestOptions def delete_a_task(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently delete a CRM task by its identifier. This removes the task and cancels any associated reminders. The requesting user must be the task assignee or have manage permission on tasks. + Parameters ---------- id : str @@ -296,6 +304,8 @@ def update_a_task( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing CRM task''s properties such as name, type, due date, status, duration, notes, assignee, reminder, or linked entities. Only the fields provided in the request body will be updated; omitted fields remain unchanged. + Parameters ---------- id : str @@ -367,8 +377,12 @@ def update_a_task( ) return _response.data - def get_all_task_types(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetCrmTasktypesResponse: + def get_all_task_types( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.List[GetCrmTasktypesResponseItem]: """ + Retrieve the list of all available task types, such as Email, Call, Meeting, Todo, Lunch, Deadline, and LinkedIn. If no task types exist yet, the default set is automatically created and returned. Use the task type ID when creating or updating tasks. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -376,7 +390,7 @@ def get_all_task_types(self, *, request_options: typing.Optional[RequestOptions] Returns ------- - GetCrmTasktypesResponse + typing.List[GetCrmTasktypesResponseItem] Returns all the Task types Examples @@ -426,6 +440,8 @@ async def get_all_tasks( request_options: typing.Optional[RequestOptions] = None, ) -> GetCrmTasksResponse: """ + Retrieve a paginated list of CRM tasks with optional filtering by task type, status, date range, assignee, and linked entities (contacts, deals, companies). Results are sorted by creation date in descending order by default, with a default limit of 50 tasks per page. + Parameters ---------- filter_type : typing.Optional[str] @@ -529,6 +545,8 @@ async def create_a_task( request_options: typing.Optional[RequestOptions] = None, ) -> PostCrmTasksResponse: """ + Create a new CRM task with the specified name, type, due date, and optional associations to contacts, companies, or deals. A task requires a name, task type ID, and due date at minimum. You can also set a duration, notes, a reminder, and assign the task to a specific user. + Parameters ---------- date : dt.datetime @@ -588,7 +606,7 @@ async def main() -> None: date=datetime.datetime.fromisoformat( "2021-11-01 17:44:54+00:00", ), - name="Task: Connect with client_dev", + name="Task: Connect with client", task_type_id="61a5cd07ca1347c82306ad09", ) @@ -613,6 +631,8 @@ async def main() -> None: async def get_a_task(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Task: """ + Retrieve the full details of a single CRM task by its identifier. The response includes the task''s name, type, status, due date, duration, notes, assignee, reminder settings, and linked contacts, companies, or deals. + Parameters ---------- id : str @@ -649,6 +669,8 @@ async def main() -> None: async def delete_a_task(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ + Permanently delete a CRM task by its identifier. This removes the task and cancels any associated reminders. The requesting user must be the task assignee or have manage permission on tasks. + Parameters ---------- id : str @@ -700,6 +722,8 @@ async def update_a_task( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing CRM task''s properties such as name, type, due date, status, duration, notes, assignee, reminder, or linked entities. Only the fields provided in the request body will be updated; omitted fields remain unchanged. + Parameters ---------- id : str @@ -781,8 +805,10 @@ async def main() -> None: async def get_all_task_types( self, *, request_options: typing.Optional[RequestOptions] = None - ) -> GetCrmTasktypesResponse: + ) -> typing.List[GetCrmTasktypesResponseItem]: """ + Retrieve the list of all available task types, such as Email, Call, Meeting, Todo, Lunch, Deadline, and LinkedIn. If no task types exist yet, the default set is automatically created and returned. Use the task type ID when creating or updating tasks. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -790,7 +816,7 @@ async def get_all_task_types( Returns ------- - GetCrmTasktypesResponse + typing.List[GetCrmTasktypesResponseItem] Returns all the Task types Examples diff --git a/src/brevo/tasks/raw_client.py b/src/brevo/tasks/raw_client.py index 073a071..59d5470 100644 --- a/src/brevo/tasks/raw_client.py +++ b/src/brevo/tasks/raw_client.py @@ -20,7 +20,7 @@ from .types.get_crm_tasks_request_filter_status import GetCrmTasksRequestFilterStatus from .types.get_crm_tasks_request_sort import GetCrmTasksRequestSort from .types.get_crm_tasks_response import GetCrmTasksResponse -from .types.get_crm_tasktypes_response import GetCrmTasktypesResponse +from .types.get_crm_tasktypes_response_item import GetCrmTasktypesResponseItem from .types.post_crm_tasks_response import PostCrmTasksResponse from pydantic import ValidationError @@ -51,6 +51,8 @@ def get_all_tasks( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetCrmTasksResponse]: """ + Retrieve a paginated list of CRM tasks with optional filtering by task type, status, date range, assignee, and linked entities (contacts, deals, companies). Results are sorted by creation date in descending order by default, with a default limit of 50 tasks per page. + Parameters ---------- filter_type : typing.Optional[str] @@ -167,6 +169,8 @@ def create_a_task( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PostCrmTasksResponse]: """ + Create a new CRM task with the specified name, type, due date, and optional associations to contacts, companies, or deals. A task requires a name, task type ID, and due date at minimum. You can also set a duration, notes, a reminder, and assign the task to a specific user. + Parameters ---------- date : dt.datetime @@ -265,6 +269,8 @@ def create_a_task( def get_a_task(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Task]: """ + Retrieve the full details of a single CRM task by its identifier. The response includes the task''s name, type, status, due date, duration, notes, assignee, reminder settings, and linked contacts, companies, or deals. + Parameters ---------- id : str @@ -325,6 +331,8 @@ def get_a_task(self, id: str, *, request_options: typing.Optional[RequestOptions def delete_a_task(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]: """ + Permanently delete a CRM task by its identifier. This removes the task and cancels any associated reminders. The requesting user must be the task assignee or have manage permission on tasks. + Parameters ---------- id : str @@ -393,6 +401,8 @@ def update_a_task( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Update an existing CRM task''s properties such as name, type, due date, status, duration, notes, assignee, reminder, or linked entities. Only the fields provided in the request body will be updated; omitted fields remain unchanged. + Parameters ---------- id : str @@ -496,8 +506,10 @@ def update_a_task( def get_all_task_types( self, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[GetCrmTasktypesResponse]: + ) -> HttpResponse[typing.List[GetCrmTasktypesResponseItem]]: """ + Retrieve the list of all available task types, such as Email, Call, Meeting, Todo, Lunch, Deadline, and LinkedIn. If no task types exist yet, the default set is automatically created and returned. Use the task type ID when creating or updating tasks. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -505,7 +517,7 @@ def get_all_task_types( Returns ------- - HttpResponse[GetCrmTasktypesResponse] + HttpResponse[typing.List[GetCrmTasktypesResponseItem]] Returns all the Task types """ _response = self._client_wrapper.httpx_client.request( @@ -516,13 +528,24 @@ def get_all_task_types( try: if 200 <= _response.status_code < 300: _data = typing.cast( - GetCrmTasktypesResponse, + typing.List[GetCrmTasktypesResponseItem], construct_type( - type_=GetCrmTasktypesResponse, # type: ignore + type_=typing.List[GetCrmTasktypesResponseItem], # type: ignore object_=_response.json(), ), ) return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -556,6 +579,8 @@ async def get_all_tasks( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetCrmTasksResponse]: """ + Retrieve a paginated list of CRM tasks with optional filtering by task type, status, date range, assignee, and linked entities (contacts, deals, companies). Results are sorted by creation date in descending order by default, with a default limit of 50 tasks per page. + Parameters ---------- filter_type : typing.Optional[str] @@ -672,6 +697,8 @@ async def create_a_task( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PostCrmTasksResponse]: """ + Create a new CRM task with the specified name, type, due date, and optional associations to contacts, companies, or deals. A task requires a name, task type ID, and due date at minimum. You can also set a duration, notes, a reminder, and assign the task to a specific user. + Parameters ---------- date : dt.datetime @@ -772,6 +799,8 @@ async def get_a_task( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[Task]: """ + Retrieve the full details of a single CRM task by its identifier. The response includes the task''s name, type, status, due date, duration, notes, assignee, reminder settings, and linked contacts, companies, or deals. + Parameters ---------- id : str @@ -834,6 +863,8 @@ async def delete_a_task( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Permanently delete a CRM task by its identifier. This removes the task and cancels any associated reminders. The requesting user must be the task assignee or have manage permission on tasks. + Parameters ---------- id : str @@ -902,6 +933,8 @@ async def update_a_task( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Update an existing CRM task''s properties such as name, type, due date, status, duration, notes, assignee, reminder, or linked entities. Only the fields provided in the request body will be updated; omitted fields remain unchanged. + Parameters ---------- id : str @@ -1005,8 +1038,10 @@ async def update_a_task( async def get_all_task_types( self, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[GetCrmTasktypesResponse]: + ) -> AsyncHttpResponse[typing.List[GetCrmTasktypesResponseItem]]: """ + Retrieve the list of all available task types, such as Email, Call, Meeting, Todo, Lunch, Deadline, and LinkedIn. If no task types exist yet, the default set is automatically created and returned. Use the task type ID when creating or updating tasks. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -1014,7 +1049,7 @@ async def get_all_task_types( Returns ------- - AsyncHttpResponse[GetCrmTasktypesResponse] + AsyncHttpResponse[typing.List[GetCrmTasktypesResponseItem]] Returns all the Task types """ _response = await self._client_wrapper.httpx_client.request( @@ -1025,13 +1060,24 @@ async def get_all_task_types( try: if 200 <= _response.status_code < 300: _data = typing.cast( - GetCrmTasktypesResponse, + typing.List[GetCrmTasktypesResponseItem], construct_type( - type_=GetCrmTasktypesResponse, # type: ignore + type_=typing.List[GetCrmTasktypesResponseItem], # type: ignore object_=_response.json(), ), ) return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) diff --git a/src/brevo/tasks/types/__init__.py b/src/brevo/tasks/types/__init__.py index 22cd9dc..fda04f3 100644 --- a/src/brevo/tasks/types/__init__.py +++ b/src/brevo/tasks/types/__init__.py @@ -10,14 +10,14 @@ from .get_crm_tasks_request_filter_status import GetCrmTasksRequestFilterStatus from .get_crm_tasks_request_sort import GetCrmTasksRequestSort from .get_crm_tasks_response import GetCrmTasksResponse - from .get_crm_tasktypes_response import GetCrmTasktypesResponse + from .get_crm_tasktypes_response_item import GetCrmTasktypesResponseItem from .post_crm_tasks_response import PostCrmTasksResponse _dynamic_imports: typing.Dict[str, str] = { "GetCrmTasksRequestFilterDate": ".get_crm_tasks_request_filter_date", "GetCrmTasksRequestFilterStatus": ".get_crm_tasks_request_filter_status", "GetCrmTasksRequestSort": ".get_crm_tasks_request_sort", "GetCrmTasksResponse": ".get_crm_tasks_response", - "GetCrmTasktypesResponse": ".get_crm_tasktypes_response", + "GetCrmTasktypesResponseItem": ".get_crm_tasktypes_response_item", "PostCrmTasksResponse": ".post_crm_tasks_response", } @@ -48,6 +48,6 @@ def __dir__(): "GetCrmTasksRequestFilterStatus", "GetCrmTasksRequestSort", "GetCrmTasksResponse", - "GetCrmTasktypesResponse", + "GetCrmTasktypesResponseItem", "PostCrmTasksResponse", ] diff --git a/src/brevo/tasks/types/get_crm_tasktypes_response.py b/src/brevo/tasks/types/get_crm_tasktypes_response_item.py similarity index 88% rename from src/brevo/tasks/types/get_crm_tasktypes_response.py rename to src/brevo/tasks/types/get_crm_tasktypes_response_item.py index 2f483fe..cfb9870 100644 --- a/src/brevo/tasks/types/get_crm_tasktypes_response.py +++ b/src/brevo/tasks/types/get_crm_tasktypes_response_item.py @@ -7,11 +7,7 @@ from ...core.unchecked_base_model import UncheckedBaseModel -class GetCrmTasktypesResponse(UncheckedBaseModel): - """ - Task types details - """ - +class GetCrmTasktypesResponseItem(UncheckedBaseModel): id: typing.Optional[str] = pydantic.Field(default=None) """ Id of task type diff --git a/src/brevo/tier/__init__.py b/src/brevo/tier/__init__.py index d4d84e3..7dc3580 100644 --- a/src/brevo/tier/__init__.py +++ b/src/brevo/tier/__init__.py @@ -10,8 +10,14 @@ AddSubscriptionToTierResponse, CreateTierForTierGroupRequestAccessConditionsItem, CreateTierForTierGroupRequestTierRewardsItem, + CreateTierGroupRequestDowngradeSchedule, + CreateTierGroupRequestDowngradeScheduleDurationModifier, + CreateTierGroupRequestDowngradeScheduleDurationUnit, CreateTierGroupRequestDowngradeStrategy, CreateTierGroupRequestMeta, + CreateTierGroupRequestUpgradeSchedule, + CreateTierGroupRequestUpgradeScheduleDurationModifier, + CreateTierGroupRequestUpgradeScheduleDurationUnit, CreateTierGroupRequestUpgradeStrategy, GetListOfTierGroupsRequestVersion, GetListOfTierGroupsResponse, @@ -28,8 +34,14 @@ "AddSubscriptionToTierResponse": ".types", "CreateTierForTierGroupRequestAccessConditionsItem": ".types", "CreateTierForTierGroupRequestTierRewardsItem": ".types", + "CreateTierGroupRequestDowngradeSchedule": ".types", + "CreateTierGroupRequestDowngradeScheduleDurationModifier": ".types", + "CreateTierGroupRequestDowngradeScheduleDurationUnit": ".types", "CreateTierGroupRequestDowngradeStrategy": ".types", "CreateTierGroupRequestMeta": ".types", + "CreateTierGroupRequestUpgradeSchedule": ".types", + "CreateTierGroupRequestUpgradeScheduleDurationModifier": ".types", + "CreateTierGroupRequestUpgradeScheduleDurationUnit": ".types", "CreateTierGroupRequestUpgradeStrategy": ".types", "GetListOfTierGroupsRequestVersion": ".types", "GetListOfTierGroupsResponse": ".types", @@ -69,8 +81,14 @@ def __dir__(): "AddSubscriptionToTierResponse", "CreateTierForTierGroupRequestAccessConditionsItem", "CreateTierForTierGroupRequestTierRewardsItem", + "CreateTierGroupRequestDowngradeSchedule", + "CreateTierGroupRequestDowngradeScheduleDurationModifier", + "CreateTierGroupRequestDowngradeScheduleDurationUnit", "CreateTierGroupRequestDowngradeStrategy", "CreateTierGroupRequestMeta", + "CreateTierGroupRequestUpgradeSchedule", + "CreateTierGroupRequestUpgradeScheduleDurationModifier", + "CreateTierGroupRequestUpgradeScheduleDurationUnit", "CreateTierGroupRequestUpgradeStrategy", "GetListOfTierGroupsRequestVersion", "GetListOfTierGroupsResponse", diff --git a/src/brevo/tier/client.py b/src/brevo/tier/client.py index 022a513..d9860ef 100644 --- a/src/brevo/tier/client.py +++ b/src/brevo/tier/client.py @@ -12,8 +12,10 @@ CreateTierForTierGroupRequestAccessConditionsItem, ) from .types.create_tier_for_tier_group_request_tier_rewards_item import CreateTierForTierGroupRequestTierRewardsItem +from .types.create_tier_group_request_downgrade_schedule import CreateTierGroupRequestDowngradeSchedule from .types.create_tier_group_request_downgrade_strategy import CreateTierGroupRequestDowngradeStrategy from .types.create_tier_group_request_meta import CreateTierGroupRequestMeta +from .types.create_tier_group_request_upgrade_schedule import CreateTierGroupRequestUpgradeSchedule from .types.create_tier_group_request_upgrade_strategy import CreateTierGroupRequestUpgradeStrategy from .types.get_list_of_tier_groups_request_version import GetListOfTierGroupsRequestVersion from .types.get_list_of_tier_groups_response import GetListOfTierGroupsResponse @@ -135,6 +137,8 @@ def create_tier_group( meta: typing.Optional[CreateTierGroupRequestMeta] = OMIT, tier_order: typing.Optional[typing.Sequence[str]] = OMIT, upgrade_strategy: typing.Optional[CreateTierGroupRequestUpgradeStrategy] = OMIT, + upgrade_schedule: typing.Optional[CreateTierGroupRequestUpgradeSchedule] = OMIT, + downgrade_schedule: typing.Optional[CreateTierGroupRequestDowngradeSchedule] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> TierGroup: """ @@ -160,13 +164,19 @@ def create_tier_group( upgrade_strategy : typing.Optional[CreateTierGroupRequestUpgradeStrategy] Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary. + upgrade_schedule : typing.Optional[CreateTierGroupRequestUpgradeSchedule] + Schedule configuration for tier upgrades. Required when upgradeStrategy is set to a schedule-based strategy. + + downgrade_schedule : typing.Optional[CreateTierGroupRequestDowngradeSchedule] + Schedule configuration for tier downgrades. Required when downgradeStrategy is set to a schedule-based strategy. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- TierGroup - Tier group Successfully created + Tier group successfully created Examples -------- @@ -187,6 +197,8 @@ def create_tier_group( meta=meta, tier_order=tier_order, upgrade_strategy=upgrade_strategy, + upgrade_schedule=upgrade_schedule, + downgrade_schedule=downgrade_schedule, request_options=request_options, ) return _response.data @@ -678,6 +690,8 @@ async def create_tier_group( meta: typing.Optional[CreateTierGroupRequestMeta] = OMIT, tier_order: typing.Optional[typing.Sequence[str]] = OMIT, upgrade_strategy: typing.Optional[CreateTierGroupRequestUpgradeStrategy] = OMIT, + upgrade_schedule: typing.Optional[CreateTierGroupRequestUpgradeSchedule] = OMIT, + downgrade_schedule: typing.Optional[CreateTierGroupRequestDowngradeSchedule] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> TierGroup: """ @@ -703,13 +717,19 @@ async def create_tier_group( upgrade_strategy : typing.Optional[CreateTierGroupRequestUpgradeStrategy] Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary. + upgrade_schedule : typing.Optional[CreateTierGroupRequestUpgradeSchedule] + Schedule configuration for tier upgrades. Required when upgradeStrategy is set to a schedule-based strategy. + + downgrade_schedule : typing.Optional[CreateTierGroupRequestDowngradeSchedule] + Schedule configuration for tier downgrades. Required when downgradeStrategy is set to a schedule-based strategy. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- TierGroup - Tier group Successfully created + Tier group successfully created Examples -------- @@ -738,6 +758,8 @@ async def main() -> None: meta=meta, tier_order=tier_order, upgrade_strategy=upgrade_strategy, + upgrade_schedule=upgrade_schedule, + downgrade_schedule=downgrade_schedule, request_options=request_options, ) return _response.data diff --git a/src/brevo/tier/raw_client.py b/src/brevo/tier/raw_client.py index bc64a1d..b484efa 100644 --- a/src/brevo/tier/raw_client.py +++ b/src/brevo/tier/raw_client.py @@ -27,8 +27,10 @@ CreateTierForTierGroupRequestAccessConditionsItem, ) from .types.create_tier_for_tier_group_request_tier_rewards_item import CreateTierForTierGroupRequestTierRewardsItem +from .types.create_tier_group_request_downgrade_schedule import CreateTierGroupRequestDowngradeSchedule from .types.create_tier_group_request_downgrade_strategy import CreateTierGroupRequestDowngradeStrategy from .types.create_tier_group_request_meta import CreateTierGroupRequestMeta +from .types.create_tier_group_request_upgrade_schedule import CreateTierGroupRequestUpgradeSchedule from .types.create_tier_group_request_upgrade_strategy import CreateTierGroupRequestUpgradeStrategy from .types.get_list_of_tier_groups_request_version import GetListOfTierGroupsRequestVersion from .types.get_list_of_tier_groups_response import GetListOfTierGroupsResponse @@ -293,6 +295,8 @@ def create_tier_group( meta: typing.Optional[CreateTierGroupRequestMeta] = OMIT, tier_order: typing.Optional[typing.Sequence[str]] = OMIT, upgrade_strategy: typing.Optional[CreateTierGroupRequestUpgradeStrategy] = OMIT, + upgrade_schedule: typing.Optional[CreateTierGroupRequestUpgradeSchedule] = OMIT, + downgrade_schedule: typing.Optional[CreateTierGroupRequestDowngradeSchedule] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[TierGroup]: """ @@ -318,13 +322,19 @@ def create_tier_group( upgrade_strategy : typing.Optional[CreateTierGroupRequestUpgradeStrategy] Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary. + upgrade_schedule : typing.Optional[CreateTierGroupRequestUpgradeSchedule] + Schedule configuration for tier upgrades. Required when upgradeStrategy is set to a schedule-based strategy. + + downgrade_schedule : typing.Optional[CreateTierGroupRequestDowngradeSchedule] + Schedule configuration for tier downgrades. Required when downgradeStrategy is set to a schedule-based strategy. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- HttpResponse[TierGroup] - Tier group Successfully created + Tier group successfully created """ _response = self._client_wrapper.httpx_client.request( f"loyalty/tier/programs/{jsonable_encoder(pid)}/tier-groups", @@ -337,6 +347,12 @@ def create_tier_group( ), "tierOrder": tier_order, "upgradeStrategy": upgrade_strategy, + "upgradeSchedule": convert_and_respect_annotation_metadata( + object_=upgrade_schedule, annotation=CreateTierGroupRequestUpgradeSchedule, direction="write" + ), + "downgradeSchedule": convert_and_respect_annotation_metadata( + object_=downgrade_schedule, annotation=CreateTierGroupRequestDowngradeSchedule, direction="write" + ), }, headers={ "content-type": "application/json", @@ -1506,6 +1522,8 @@ async def create_tier_group( meta: typing.Optional[CreateTierGroupRequestMeta] = OMIT, tier_order: typing.Optional[typing.Sequence[str]] = OMIT, upgrade_strategy: typing.Optional[CreateTierGroupRequestUpgradeStrategy] = OMIT, + upgrade_schedule: typing.Optional[CreateTierGroupRequestUpgradeSchedule] = OMIT, + downgrade_schedule: typing.Optional[CreateTierGroupRequestDowngradeSchedule] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[TierGroup]: """ @@ -1531,13 +1549,19 @@ async def create_tier_group( upgrade_strategy : typing.Optional[CreateTierGroupRequestUpgradeStrategy] Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary. + upgrade_schedule : typing.Optional[CreateTierGroupRequestUpgradeSchedule] + Schedule configuration for tier upgrades. Required when upgradeStrategy is set to a schedule-based strategy. + + downgrade_schedule : typing.Optional[CreateTierGroupRequestDowngradeSchedule] + Schedule configuration for tier downgrades. Required when downgradeStrategy is set to a schedule-based strategy. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- AsyncHttpResponse[TierGroup] - Tier group Successfully created + Tier group successfully created """ _response = await self._client_wrapper.httpx_client.request( f"loyalty/tier/programs/{jsonable_encoder(pid)}/tier-groups", @@ -1550,6 +1574,12 @@ async def create_tier_group( ), "tierOrder": tier_order, "upgradeStrategy": upgrade_strategy, + "upgradeSchedule": convert_and_respect_annotation_metadata( + object_=upgrade_schedule, annotation=CreateTierGroupRequestUpgradeSchedule, direction="write" + ), + "downgradeSchedule": convert_and_respect_annotation_metadata( + object_=downgrade_schedule, annotation=CreateTierGroupRequestDowngradeSchedule, direction="write" + ), }, headers={ "content-type": "application/json", diff --git a/src/brevo/tier/types/__init__.py b/src/brevo/tier/types/__init__.py index 4847c4b..8a06acc 100644 --- a/src/brevo/tier/types/__init__.py +++ b/src/brevo/tier/types/__init__.py @@ -11,8 +11,22 @@ CreateTierForTierGroupRequestAccessConditionsItem, ) from .create_tier_for_tier_group_request_tier_rewards_item import CreateTierForTierGroupRequestTierRewardsItem + from .create_tier_group_request_downgrade_schedule import CreateTierGroupRequestDowngradeSchedule + from .create_tier_group_request_downgrade_schedule_duration_modifier import ( + CreateTierGroupRequestDowngradeScheduleDurationModifier, + ) + from .create_tier_group_request_downgrade_schedule_duration_unit import ( + CreateTierGroupRequestDowngradeScheduleDurationUnit, + ) from .create_tier_group_request_downgrade_strategy import CreateTierGroupRequestDowngradeStrategy from .create_tier_group_request_meta import CreateTierGroupRequestMeta + from .create_tier_group_request_upgrade_schedule import CreateTierGroupRequestUpgradeSchedule + from .create_tier_group_request_upgrade_schedule_duration_modifier import ( + CreateTierGroupRequestUpgradeScheduleDurationModifier, + ) + from .create_tier_group_request_upgrade_schedule_duration_unit import ( + CreateTierGroupRequestUpgradeScheduleDurationUnit, + ) from .create_tier_group_request_upgrade_strategy import CreateTierGroupRequestUpgradeStrategy from .get_list_of_tier_groups_request_version import GetListOfTierGroupsRequestVersion from .get_list_of_tier_groups_response import GetListOfTierGroupsResponse @@ -28,8 +42,14 @@ "AddSubscriptionToTierResponse": ".add_subscription_to_tier_response", "CreateTierForTierGroupRequestAccessConditionsItem": ".create_tier_for_tier_group_request_access_conditions_item", "CreateTierForTierGroupRequestTierRewardsItem": ".create_tier_for_tier_group_request_tier_rewards_item", + "CreateTierGroupRequestDowngradeSchedule": ".create_tier_group_request_downgrade_schedule", + "CreateTierGroupRequestDowngradeScheduleDurationModifier": ".create_tier_group_request_downgrade_schedule_duration_modifier", + "CreateTierGroupRequestDowngradeScheduleDurationUnit": ".create_tier_group_request_downgrade_schedule_duration_unit", "CreateTierGroupRequestDowngradeStrategy": ".create_tier_group_request_downgrade_strategy", "CreateTierGroupRequestMeta": ".create_tier_group_request_meta", + "CreateTierGroupRequestUpgradeSchedule": ".create_tier_group_request_upgrade_schedule", + "CreateTierGroupRequestUpgradeScheduleDurationModifier": ".create_tier_group_request_upgrade_schedule_duration_modifier", + "CreateTierGroupRequestUpgradeScheduleDurationUnit": ".create_tier_group_request_upgrade_schedule_duration_unit", "CreateTierGroupRequestUpgradeStrategy": ".create_tier_group_request_upgrade_strategy", "GetListOfTierGroupsRequestVersion": ".get_list_of_tier_groups_request_version", "GetListOfTierGroupsResponse": ".get_list_of_tier_groups_response", @@ -69,8 +89,14 @@ def __dir__(): "AddSubscriptionToTierResponse", "CreateTierForTierGroupRequestAccessConditionsItem", "CreateTierForTierGroupRequestTierRewardsItem", + "CreateTierGroupRequestDowngradeSchedule", + "CreateTierGroupRequestDowngradeScheduleDurationModifier", + "CreateTierGroupRequestDowngradeScheduleDurationUnit", "CreateTierGroupRequestDowngradeStrategy", "CreateTierGroupRequestMeta", + "CreateTierGroupRequestUpgradeSchedule", + "CreateTierGroupRequestUpgradeScheduleDurationModifier", + "CreateTierGroupRequestUpgradeScheduleDurationUnit", "CreateTierGroupRequestUpgradeStrategy", "GetListOfTierGroupsRequestVersion", "GetListOfTierGroupsResponse", diff --git a/src/brevo/tier/types/create_tier_group_request_downgrade_schedule.py b/src/brevo/tier/types/create_tier_group_request_downgrade_schedule.py new file mode 100644 index 0000000..dfa05e5 --- /dev/null +++ b/src/brevo/tier/types/create_tier_group_request_downgrade_schedule.py @@ -0,0 +1,51 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel +from .create_tier_group_request_downgrade_schedule_duration_modifier import ( + CreateTierGroupRequestDowngradeScheduleDurationModifier, +) +from .create_tier_group_request_downgrade_schedule_duration_unit import ( + CreateTierGroupRequestDowngradeScheduleDurationUnit, +) + + +class CreateTierGroupRequestDowngradeSchedule(UncheckedBaseModel): + """ + Schedule configuration for tier downgrades. Required when downgradeStrategy is set to a schedule-based strategy. + """ + + duration_value: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="durationValue"), + pydantic.Field(alias="durationValue", description="Duration value for the schedule."), + ] = None + duration_unit: typing_extensions.Annotated[ + typing.Optional[CreateTierGroupRequestDowngradeScheduleDurationUnit], + FieldMetadata(alias="durationUnit"), + pydantic.Field(alias="durationUnit", description="Duration unit for the schedule."), + ] = None + duration_modifier: typing_extensions.Annotated[ + typing.Optional[CreateTierGroupRequestDowngradeScheduleDurationModifier], + FieldMetadata(alias="durationModifier"), + pydantic.Field(alias="durationModifier", description="Modifier for the duration."), + ] = None + scheduled_date: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="scheduledDate"), + pydantic.Field(alias="scheduledDate", description="Scheduled date in DD/MM format."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/tier/types/create_tier_group_request_downgrade_schedule_duration_modifier.py b/src/brevo/tier/types/create_tier_group_request_downgrade_schedule_duration_modifier.py new file mode 100644 index 0000000..3e6aa49 --- /dev/null +++ b/src/brevo/tier/types/create_tier_group_request_downgrade_schedule_duration_modifier.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateTierGroupRequestDowngradeScheduleDurationModifier = typing.Union[ + typing.Literal["start_of_period", "end_of_period"], typing.Any +] diff --git a/src/brevo/tier/types/create_tier_group_request_downgrade_schedule_duration_unit.py b/src/brevo/tier/types/create_tier_group_request_downgrade_schedule_duration_unit.py new file mode 100644 index 0000000..5058028 --- /dev/null +++ b/src/brevo/tier/types/create_tier_group_request_downgrade_schedule_duration_unit.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateTierGroupRequestDowngradeScheduleDurationUnit = typing.Union[ + typing.Literal["day", "week", "month", "year"], typing.Any +] diff --git a/src/brevo/tier/types/create_tier_group_request_upgrade_schedule.py b/src/brevo/tier/types/create_tier_group_request_upgrade_schedule.py new file mode 100644 index 0000000..9d7d135 --- /dev/null +++ b/src/brevo/tier/types/create_tier_group_request_upgrade_schedule.py @@ -0,0 +1,49 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel +from .create_tier_group_request_upgrade_schedule_duration_modifier import ( + CreateTierGroupRequestUpgradeScheduleDurationModifier, +) +from .create_tier_group_request_upgrade_schedule_duration_unit import CreateTierGroupRequestUpgradeScheduleDurationUnit + + +class CreateTierGroupRequestUpgradeSchedule(UncheckedBaseModel): + """ + Schedule configuration for tier upgrades. Required when upgradeStrategy is set to a schedule-based strategy. + """ + + duration_value: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="durationValue"), + pydantic.Field(alias="durationValue", description="Duration value for the schedule."), + ] = None + duration_unit: typing_extensions.Annotated[ + typing.Optional[CreateTierGroupRequestUpgradeScheduleDurationUnit], + FieldMetadata(alias="durationUnit"), + pydantic.Field(alias="durationUnit", description="Duration unit for the schedule."), + ] = None + duration_modifier: typing_extensions.Annotated[ + typing.Optional[CreateTierGroupRequestUpgradeScheduleDurationModifier], + FieldMetadata(alias="durationModifier"), + pydantic.Field(alias="durationModifier", description="Modifier for the duration."), + ] = None + scheduled_date: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="scheduledDate"), + pydantic.Field(alias="scheduledDate", description="Scheduled date in DD/MM format."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/tier/types/create_tier_group_request_upgrade_schedule_duration_modifier.py b/src/brevo/tier/types/create_tier_group_request_upgrade_schedule_duration_modifier.py new file mode 100644 index 0000000..7ec2659 --- /dev/null +++ b/src/brevo/tier/types/create_tier_group_request_upgrade_schedule_duration_modifier.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateTierGroupRequestUpgradeScheduleDurationModifier = typing.Union[ + typing.Literal["start_of_period", "end_of_period"], typing.Any +] diff --git a/src/brevo/tier/types/create_tier_group_request_upgrade_schedule_duration_unit.py b/src/brevo/tier/types/create_tier_group_request_upgrade_schedule_duration_unit.py new file mode 100644 index 0000000..c2771e7 --- /dev/null +++ b/src/brevo/tier/types/create_tier_group_request_upgrade_schedule_duration_unit.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateTierGroupRequestUpgradeScheduleDurationUnit = typing.Union[ + typing.Literal["day", "week", "month", "year"], typing.Any +] diff --git a/src/brevo/transactional_emails/__init__.py b/src/brevo/transactional_emails/__init__.py index 3876e7d..1ae4ad2 100644 --- a/src/brevo/transactional_emails/__init__.py +++ b/src/brevo/transactional_emails/__init__.py @@ -27,6 +27,7 @@ GetSmtpReportRequestSort, GetSmtpReportResponse, GetSmtpReportResponseReportsItem, + GetSmtpTemplateRequestTemplateId, GetSmtpTemplatesRequestSort, GetSmtpTemplatesResponse, GetTransacBlockedContactsRequestSort, @@ -39,6 +40,8 @@ GetTransacEmailsListRequestSort, GetTransacEmailsListResponse, GetTransacEmailsListResponseTransactionalEmailsItem, + PostPreviewSmtpEmailTemplatesRequest, + PostPreviewSmtpEmailTemplatesRequestParams, PostPreviewSmtpEmailTemplatesResponse, SendTransacEmailRequestAttachmentItem, SendTransacEmailRequestBccItem, @@ -53,6 +56,7 @@ SendTransacEmailRequestToItem, SendTransacEmailResponse, UpdateSmtpTemplateRequestSender, + UpdateSmtpTemplateRequestTemplateId, ) _dynamic_imports: typing.Dict[str, str] = { "CreateSmtpTemplateRequestSender": ".types", @@ -75,6 +79,7 @@ "GetSmtpReportRequestSort": ".types", "GetSmtpReportResponse": ".types", "GetSmtpReportResponseReportsItem": ".types", + "GetSmtpTemplateRequestTemplateId": ".types", "GetSmtpTemplatesRequestSort": ".types", "GetSmtpTemplatesResponse": ".types", "GetTransacBlockedContactsRequestSort": ".types", @@ -87,6 +92,8 @@ "GetTransacEmailsListRequestSort": ".types", "GetTransacEmailsListResponse": ".types", "GetTransacEmailsListResponseTransactionalEmailsItem": ".types", + "PostPreviewSmtpEmailTemplatesRequest": ".types", + "PostPreviewSmtpEmailTemplatesRequestParams": ".types", "PostPreviewSmtpEmailTemplatesResponse": ".types", "SendTransacEmailRequestAttachmentItem": ".types", "SendTransacEmailRequestBccItem": ".types", @@ -101,6 +108,7 @@ "SendTransacEmailRequestToItem": ".types", "SendTransacEmailResponse": ".types", "UpdateSmtpTemplateRequestSender": ".types", + "UpdateSmtpTemplateRequestTemplateId": ".types", } @@ -146,6 +154,7 @@ def __dir__(): "GetSmtpReportRequestSort", "GetSmtpReportResponse", "GetSmtpReportResponseReportsItem", + "GetSmtpTemplateRequestTemplateId", "GetSmtpTemplatesRequestSort", "GetSmtpTemplatesResponse", "GetTransacBlockedContactsRequestSort", @@ -158,6 +167,8 @@ def __dir__(): "GetTransacEmailsListRequestSort", "GetTransacEmailsListResponse", "GetTransacEmailsListResponseTransactionalEmailsItem", + "PostPreviewSmtpEmailTemplatesRequest", + "PostPreviewSmtpEmailTemplatesRequestParams", "PostPreviewSmtpEmailTemplatesResponse", "SendTransacEmailRequestAttachmentItem", "SendTransacEmailRequestBccItem", @@ -172,4 +183,5 @@ def __dir__(): "SendTransacEmailRequestToItem", "SendTransacEmailResponse", "UpdateSmtpTemplateRequestSender", + "UpdateSmtpTemplateRequestTemplateId", ] diff --git a/src/brevo/transactional_emails/client.py b/src/brevo/transactional_emails/client.py index 5876fec..598df7f 100644 --- a/src/brevo/transactional_emails/client.py +++ b/src/brevo/transactional_emails/client.py @@ -19,6 +19,7 @@ from .types.get_scheduled_email_by_id_response import GetScheduledEmailByIdResponse from .types.get_smtp_report_request_sort import GetSmtpReportRequestSort from .types.get_smtp_report_response import GetSmtpReportResponse +from .types.get_smtp_template_request_template_id import GetSmtpTemplateRequestTemplateId from .types.get_smtp_templates_request_sort import GetSmtpTemplatesRequestSort from .types.get_smtp_templates_response import GetSmtpTemplatesResponse from .types.get_transac_blocked_contacts_request_sort import GetTransacBlockedContactsRequestSort @@ -26,6 +27,7 @@ from .types.get_transac_email_content_response import GetTransacEmailContentResponse from .types.get_transac_emails_list_request_sort import GetTransacEmailsListRequestSort from .types.get_transac_emails_list_response import GetTransacEmailsListResponse +from .types.post_preview_smtp_email_templates_request import PostPreviewSmtpEmailTemplatesRequest from .types.post_preview_smtp_email_templates_response import PostPreviewSmtpEmailTemplatesResponse from .types.send_transac_email_request_attachment_item import SendTransacEmailRequestAttachmentItem from .types.send_transac_email_request_bcc_item import SendTransacEmailRequestBccItem @@ -36,6 +38,7 @@ from .types.send_transac_email_request_to_item import SendTransacEmailRequestToItem from .types.send_transac_email_response import SendTransacEmailResponse from .types.update_smtp_template_request_sender import UpdateSmtpTemplateRequestSender +from .types.update_smtp_template_request_template_id import UpdateSmtpTemplateRequestTemplateId # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -68,6 +71,8 @@ def get_transac_blocked_contacts( request_options: typing.Optional[RequestOptions] = None, ) -> GetTransacBlockedContactsResponse: """ + Retrieve a paginated list of transactional contacts that have been blocked or unsubscribed, along with the reason for blocking (e.g. hard bounce, admin blocked, spam complaint, or unsubscription via email/API/Marketing Automation). Both `startDate` and `endDate` must be provided together when filtering by date range, and neither date can be in the future. Results default to 50 per page (max 100) and are sorted in descending order of record creation unless overridden with the `sort` parameter. + Parameters ---------- start_date : typing.Optional[str] @@ -120,6 +125,8 @@ def unblock_or_resubscribe_a_transactional_contact( self, email: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ + Unblock or resubscribe a transactional contact by removing their email address from the blacklist. The email address must be URL-encoded in the path parameter and must be a valid email format. If the contact is not found in the blocklist, a 404 error is returned. + Parameters ---------- email : str @@ -301,6 +308,8 @@ def send_transac_email( request_options: typing.Optional[RequestOptions] = None, ) -> SendTransacEmailResponse: """ + Send a transactional email to one or more recipients, either using inline HTML content or a pre-built template via `templateId`. You can schedule emails for future delivery using `scheduledAt` (UTC, up to 5-minute delay), send multiple personalized versions with `messageVersions` (max 2000 total recipients, 99 per version), and attach files via URL or base64-encoded content. A `sender` and `subject` are required when no `templateId` is provided; when a `templateId` is used, the template''s sender and subject are applied unless overridden. + Parameters ---------- attachment : typing.Optional[typing.Sequence[SendTransacEmailRequestAttachmentItem]] @@ -415,7 +424,7 @@ def delete_scheduled_email_by_id( Parameters ---------- identifier : str - The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + The `batchId` of scheduled emails batch (must be a valid UUIDv4) or the `messageId` of scheduled email (enclosed in angle brackets with @ sign, e.g. `<...@domain>`). request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -456,10 +465,10 @@ def get_scheduled_email_by_id( Parameters ---------- identifier : str - The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + The `batchId` of scheduled emails batch (must be a valid UUIDv4) or the `messageId` of scheduled email (enclosed in angle brackets with @ sign, e.g. `<...@domain>`). When using `messageId`, the `limit`, `offset`, `sort`, and `status` query parameters are ignored. start_date : typing.Optional[dt.date] - Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Cannot be more than 30 days older than the current date. end_date : typing.Optional[dt.date] Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. @@ -623,13 +632,26 @@ def get_transac_email_content( return _response.data def delete_an_smtp_transactional_log( - self, identifier: str, *, request_options: typing.Optional[RequestOptions] = None + self, + identifier: str, + *, + from_date: typing.Optional[str] = None, + to_date: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Delete SMTP transactional log entries identified by a message ID (enclosed in angle brackets with an @ sign) or a valid email address. Optionally narrow the deletion to a specific date range using `from_date` and `to_date` query parameters (YYYY-MM-DD format). The operation also removes any associated stored email preview content. + Parameters ---------- identifier : str - MessageId of the transactional log(s) to delete + MessageId or email address of the transactional log(s) to delete. Must be a valid message ID (enclosed in angle brackets with @ sign) or a valid email address. + + from_date : typing.Optional[str] + Starting date (YYYY-MM-DD) to narrow down logs for deletion + + to_date : typing.Optional[str] + Ending date (YYYY-MM-DD) to narrow down logs for deletion request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -649,7 +671,9 @@ def delete_an_smtp_transactional_log( identifier="identifier", ) """ - _response = self._raw_client.delete_an_smtp_transactional_log(identifier, request_options=request_options) + _response = self._raw_client.delete_an_smtp_transactional_log( + identifier, from_date=from_date, to_date=to_date, request_options=request_options + ) return _response.data def get_aggregated_smtp_report( @@ -673,7 +697,7 @@ def get_aggregated_smtp_report( **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate days : typing.Optional[int] - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + Number of days in the past including today (positive integer, maximum 90). _Not compatible with 'startDate' and 'endDate'_. Defaults to 90 if neither dates nor days are provided. tag : typing.Optional[str] Tag of the emails @@ -734,7 +758,7 @@ def get_email_event_report( **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate days : typing.Optional[int] - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + Number of days in the past including today (positive integer, maximum 90). _Not compatible with 'startDate' and 'endDate'_. Defaults to 30 if neither dates nor days are provided. email : typing.Optional[str] Filter the report for a specific email addresses @@ -800,6 +824,8 @@ def get_smtp_report( request_options: typing.Optional[RequestOptions] = None, ) -> GetSmtpReportResponse: """ + This endpoint will show the aggregated stats per day for the past 10 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 30 days. + Parameters ---------- limit : typing.Optional[int] @@ -815,7 +841,7 @@ def get_smtp_report( **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD) days : typing.Optional[int] - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + Number of days in the past including today (positive integer, maximum 30). _Not compatible with 'startDate' and 'endDate'_ tag : typing.Optional[str] Tag of the emails @@ -853,12 +879,14 @@ def get_smtp_report( return _response.data def post_preview_smtp_email_templates( - self, *, request: typing.Any, request_options: typing.Optional[RequestOptions] = None + self, *, request: PostPreviewSmtpEmailTemplatesRequest, request_options: typing.Optional[RequestOptions] = None ) -> PostPreviewSmtpEmailTemplatesResponse: """ + Generate a fully rendered preview of a transactional email template by resolving dynamic variables. Provide either an `email` address (to populate variables from the contact''s attributes) or a `params` object with key-value pairs for manual substitution; at least one of these is required alongside the mandatory `templateId`. The response includes the rendered HTML, subject, sender details, preview text, and any feed names used in the template. + Parameters ---------- - request : typing.Any + request : PostPreviewSmtpEmailTemplatesRequest request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -889,9 +917,12 @@ def get_smtp_templates( limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, sort: typing.Optional[GetSmtpTemplatesRequestSort] = None, + editor_type: typing.Optional[typing.Literal["richTextEditor"]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetSmtpTemplatesResponse: """ + Retrieve a paginated list of all transactional email templates (including automation templates) with their details such as name, subject, sender, status, HTML content, and timestamps. Results default to 50 per page (max 1000) and are sorted in descending creation order unless overridden. You can filter by active/inactive status using `templateStatus` and by editor type using `editorType` (currently only `richTextEditor` is supported). + Parameters ---------- template_status : typing.Optional[bool] @@ -906,6 +937,9 @@ def get_smtp_templates( sort : typing.Optional[GetSmtpTemplatesRequestSort] Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + editor_type : typing.Optional[typing.Literal["richTextEditor"]] + Filter on the editor type used to create the template. Currently only `richTextEditor` is supported as a filter value. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -924,7 +958,12 @@ def get_smtp_templates( client.transactional_emails.get_smtp_templates() """ _response = self._raw_client.get_smtp_templates( - template_status=template_status, limit=limit, offset=offset, sort=sort, request_options=request_options + template_status=template_status, + limit=limit, + offset=offset, + sort=sort, + editor_type=editor_type, + request_options=request_options, ) return _response.data @@ -944,6 +983,8 @@ def create_smtp_template( request_options: typing.Optional[RequestOptions] = None, ) -> CreateSmtpTemplateResponse: """ + Create a new transactional email template with the specified sender, subject, and content. The `sender`, `subject`, and `templateName` fields are required. Template content can be provided via `htmlContent` (minimum 10 characters) or `htmlUrl`; at least one must be supplied. Templates are created as inactive by default unless `isActive` is explicitly set to `true`. + Parameters ---------- sender : CreateSmtpTemplateRequestSender @@ -1014,13 +1055,15 @@ def create_smtp_template( return _response.data def get_smtp_template( - self, template_id: int, *, request_options: typing.Optional[RequestOptions] = None + self, template_id: GetSmtpTemplateRequestTemplateId, *, request_options: typing.Optional[RequestOptions] = None ) -> GetSmtpTemplateOverview: """ + Retrieve the full details of a specific transactional email template by its numeric ID or custom template identifier string. The response includes the template name, subject, sender information, HTML content, active status, creation and modification timestamps, reply-to address, tag, and a `doiTemplate` flag indicating whether the template is a double opt-in template (detected by the presence of optin-related tags or variables in the content). + Parameters ---------- - template_id : int - id of the template + template_id : GetSmtpTemplateRequestTemplateId + ID of the template. Can be a numeric template ID or a custom template identifier string (alphanumeric, hyphens, and underscores only, max 64 characters, must start with a letter). request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1046,7 +1089,7 @@ def get_smtp_template( def update_smtp_template( self, - template_id: int, + template_id: UpdateSmtpTemplateRequestTemplateId, *, attachment_url: typing.Optional[str] = OMIT, html_content: typing.Optional[str] = OMIT, @@ -1061,10 +1104,12 @@ def update_smtp_template( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing transactional email template by its numeric ID or custom template identifier string. All fields in the request body are optional; only the provided fields will be updated. You can update the template name, subject, sender, reply-to address, HTML content (via `htmlContent` or `htmlUrl`), active status, tag, attachment URL, and the personalized `toField`. Only one of sender email or sender ID should be provided per request. + Parameters ---------- - template_id : int - id of the template + template_id : UpdateSmtpTemplateRequestTemplateId + ID of the template. Can be a numeric template ID or a custom template identifier string. attachment_url : typing.Optional[str] Absolute url of the attachment (**no local file**). Extensions allowed: #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps @@ -1134,6 +1179,8 @@ def delete_smtp_template( self, template_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ + Permanently delete a transactional email template by its numeric ID. Only inactive templates can be deleted; attempting to delete an active template returns a 405 error. To deactivate a template before deletion, use `PUT /smtp/templates/{templateId}` with `isActive` set to `false`. Deletion also removes associated newsletter template data and triggers asynchronous cleanup of shared assets. + Parameters ---------- template_id : int @@ -1168,6 +1215,8 @@ def send_test_template( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Send a test email of the specified transactional template to one or more recipients. Provide an array of email addresses in the `emailTo` field; if left empty, the test mail is sent to your entire test list. You can send a maximum of 50 test emails per day, and all provided email addresses must be valid. + Parameters ---------- template_id : int @@ -1225,6 +1274,8 @@ async def get_transac_blocked_contacts( request_options: typing.Optional[RequestOptions] = None, ) -> GetTransacBlockedContactsResponse: """ + Retrieve a paginated list of transactional contacts that have been blocked or unsubscribed, along with the reason for blocking (e.g. hard bounce, admin blocked, spam complaint, or unsubscription via email/API/Marketing Automation). Both `startDate` and `endDate` must be provided together when filtering by date range, and neither date can be in the future. Results default to 50 per page (max 100) and are sorted in descending order of record creation unless overridden with the `sort` parameter. + Parameters ---------- start_date : typing.Optional[str] @@ -1285,6 +1336,8 @@ async def unblock_or_resubscribe_a_transactional_contact( self, email: str, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ + Unblock or resubscribe a transactional contact by removing their email address from the blacklist. The email address must be URL-encoded in the path parameter and must be a valid email format. If the contact is not found in the blocklist, a 404 error is returned. + Parameters ---------- email : str @@ -1508,6 +1561,8 @@ async def send_transac_email( request_options: typing.Optional[RequestOptions] = None, ) -> SendTransacEmailResponse: """ + Send a transactional email to one or more recipients, either using inline HTML content or a pre-built template via `templateId`. You can schedule emails for future delivery using `scheduledAt` (UTC, up to 5-minute delay), send multiple personalized versions with `messageVersions` (max 2000 total recipients, 99 per version), and attach files via URL or base64-encoded content. A `sender` and `subject` are required when no `templateId` is provided; when a `templateId` is used, the template''s sender and subject are applied unless overridden. + Parameters ---------- attachment : typing.Optional[typing.Sequence[SendTransacEmailRequestAttachmentItem]] @@ -1630,7 +1685,7 @@ async def delete_scheduled_email_by_id( Parameters ---------- identifier : str - The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + The `batchId` of scheduled emails batch (must be a valid UUIDv4) or the `messageId` of scheduled email (enclosed in angle brackets with @ sign, e.g. `<...@domain>`). request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1679,10 +1734,10 @@ async def get_scheduled_email_by_id( Parameters ---------- identifier : str - The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + The `batchId` of scheduled emails batch (must be a valid UUIDv4) or the `messageId` of scheduled email (enclosed in angle brackets with @ sign, e.g. `<...@domain>`). When using `messageId`, the `limit`, `offset`, `sort`, and `status` query parameters are ignored. start_date : typing.Optional[dt.date] - Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Cannot be more than 30 days older than the current date. end_date : typing.Optional[dt.date] Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. @@ -1869,13 +1924,26 @@ async def main() -> None: return _response.data async def delete_an_smtp_transactional_log( - self, identifier: str, *, request_options: typing.Optional[RequestOptions] = None + self, + identifier: str, + *, + from_date: typing.Optional[str] = None, + to_date: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Delete SMTP transactional log entries identified by a message ID (enclosed in angle brackets with an @ sign) or a valid email address. Optionally narrow the deletion to a specific date range using `from_date` and `to_date` query parameters (YYYY-MM-DD format). The operation also removes any associated stored email preview content. + Parameters ---------- identifier : str - MessageId of the transactional log(s) to delete + MessageId or email address of the transactional log(s) to delete. Must be a valid message ID (enclosed in angle brackets with @ sign) or a valid email address. + + from_date : typing.Optional[str] + Starting date (YYYY-MM-DD) to narrow down logs for deletion + + to_date : typing.Optional[str] + Ending date (YYYY-MM-DD) to narrow down logs for deletion request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1903,7 +1971,9 @@ async def main() -> None: asyncio.run(main()) """ - _response = await self._raw_client.delete_an_smtp_transactional_log(identifier, request_options=request_options) + _response = await self._raw_client.delete_an_smtp_transactional_log( + identifier, from_date=from_date, to_date=to_date, request_options=request_options + ) return _response.data async def get_aggregated_smtp_report( @@ -1927,7 +1997,7 @@ async def get_aggregated_smtp_report( **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate days : typing.Optional[int] - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + Number of days in the past including today (positive integer, maximum 90). _Not compatible with 'startDate' and 'endDate'_. Defaults to 90 if neither dates nor days are provided. tag : typing.Optional[str] Tag of the emails @@ -1996,7 +2066,7 @@ async def get_email_event_report( **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate days : typing.Optional[int] - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + Number of days in the past including today (positive integer, maximum 90). _Not compatible with 'startDate' and 'endDate'_. Defaults to 30 if neither dates nor days are provided. email : typing.Optional[str] Filter the report for a specific email addresses @@ -2070,6 +2140,8 @@ async def get_smtp_report( request_options: typing.Optional[RequestOptions] = None, ) -> GetSmtpReportResponse: """ + This endpoint will show the aggregated stats per day for the past 10 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 30 days. + Parameters ---------- limit : typing.Optional[int] @@ -2085,7 +2157,7 @@ async def get_smtp_report( **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD) days : typing.Optional[int] - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + Number of days in the past including today (positive integer, maximum 30). _Not compatible with 'startDate' and 'endDate'_ tag : typing.Optional[str] Tag of the emails @@ -2131,12 +2203,14 @@ async def main() -> None: return _response.data async def post_preview_smtp_email_templates( - self, *, request: typing.Any, request_options: typing.Optional[RequestOptions] = None + self, *, request: PostPreviewSmtpEmailTemplatesRequest, request_options: typing.Optional[RequestOptions] = None ) -> PostPreviewSmtpEmailTemplatesResponse: """ + Generate a fully rendered preview of a transactional email template by resolving dynamic variables. Provide either an `email` address (to populate variables from the contact''s attributes) or a `params` object with key-value pairs for manual substitution; at least one of these is required alongside the mandatory `templateId`. The response includes the rendered HTML, subject, sender details, preview text, and any feed names used in the template. + Parameters ---------- - request : typing.Any + request : PostPreviewSmtpEmailTemplatesRequest request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2177,9 +2251,12 @@ async def get_smtp_templates( limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, sort: typing.Optional[GetSmtpTemplatesRequestSort] = None, + editor_type: typing.Optional[typing.Literal["richTextEditor"]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetSmtpTemplatesResponse: """ + Retrieve a paginated list of all transactional email templates (including automation templates) with their details such as name, subject, sender, status, HTML content, and timestamps. Results default to 50 per page (max 1000) and are sorted in descending creation order unless overridden. You can filter by active/inactive status using `templateStatus` and by editor type using `editorType` (currently only `richTextEditor` is supported). + Parameters ---------- template_status : typing.Optional[bool] @@ -2194,6 +2271,9 @@ async def get_smtp_templates( sort : typing.Optional[GetSmtpTemplatesRequestSort] Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + editor_type : typing.Optional[typing.Literal["richTextEditor"]] + Filter on the editor type used to create the template. Currently only `richTextEditor` is supported as a filter value. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2220,7 +2300,12 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._raw_client.get_smtp_templates( - template_status=template_status, limit=limit, offset=offset, sort=sort, request_options=request_options + template_status=template_status, + limit=limit, + offset=offset, + sort=sort, + editor_type=editor_type, + request_options=request_options, ) return _response.data @@ -2240,6 +2325,8 @@ async def create_smtp_template( request_options: typing.Optional[RequestOptions] = None, ) -> CreateSmtpTemplateResponse: """ + Create a new transactional email template with the specified sender, subject, and content. The `sender`, `subject`, and `templateName` fields are required. Template content can be provided via `htmlContent` (minimum 10 characters) or `htmlUrl`; at least one must be supplied. Templates are created as inactive by default unless `isActive` is explicitly set to `true`. + Parameters ---------- sender : CreateSmtpTemplateRequestSender @@ -2318,13 +2405,15 @@ async def main() -> None: return _response.data async def get_smtp_template( - self, template_id: int, *, request_options: typing.Optional[RequestOptions] = None + self, template_id: GetSmtpTemplateRequestTemplateId, *, request_options: typing.Optional[RequestOptions] = None ) -> GetSmtpTemplateOverview: """ + Retrieve the full details of a specific transactional email template by its numeric ID or custom template identifier string. The response includes the template name, subject, sender information, HTML content, active status, creation and modification timestamps, reply-to address, tag, and a `doiTemplate` flag indicating whether the template is a double opt-in template (detected by the presence of optin-related tags or variables in the content). + Parameters ---------- - template_id : int - id of the template + template_id : GetSmtpTemplateRequestTemplateId + ID of the template. Can be a numeric template ID or a custom template identifier string (alphanumeric, hyphens, and underscores only, max 64 characters, must start with a letter). request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2358,7 +2447,7 @@ async def main() -> None: async def update_smtp_template( self, - template_id: int, + template_id: UpdateSmtpTemplateRequestTemplateId, *, attachment_url: typing.Optional[str] = OMIT, html_content: typing.Optional[str] = OMIT, @@ -2373,10 +2462,12 @@ async def update_smtp_template( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Update an existing transactional email template by its numeric ID or custom template identifier string. All fields in the request body are optional; only the provided fields will be updated. You can update the template name, subject, sender, reply-to address, HTML content (via `htmlContent` or `htmlUrl`), active status, tag, attachment URL, and the personalized `toField`. Only one of sender email or sender ID should be provided per request. + Parameters ---------- - template_id : int - id of the template + template_id : UpdateSmtpTemplateRequestTemplateId + ID of the template. Can be a numeric template ID or a custom template identifier string. attachment_url : typing.Optional[str] Absolute url of the attachment (**no local file**). Extensions allowed: #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps @@ -2454,6 +2545,8 @@ async def delete_smtp_template( self, template_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ + Permanently delete a transactional email template by its numeric ID. Only inactive templates can be deleted; attempting to delete an active template returns a 405 error. To deactivate a template before deletion, use `PUT /smtp/templates/{templateId}` with `isActive` set to `false`. Deletion also removes associated newsletter template data and triggers asynchronous cleanup of shared assets. + Parameters ---------- template_id : int @@ -2496,6 +2589,8 @@ async def send_test_template( request_options: typing.Optional[RequestOptions] = None, ) -> None: """ + Send a test email of the specified transactional template to one or more recipients. Provide an array of email addresses in the `emailTo` field; if left empty, the test mail is sent to your entire test list. You can send a maximum of 50 test emails per day, and all provided email addresses must be valid. + Parameters ---------- template_id : int diff --git a/src/brevo/transactional_emails/raw_client.py b/src/brevo/transactional_emails/raw_client.py index c33ac31..e1295e6 100644 --- a/src/brevo/transactional_emails/raw_client.py +++ b/src/brevo/transactional_emails/raw_client.py @@ -27,6 +27,7 @@ from .types.get_scheduled_email_by_id_response import GetScheduledEmailByIdResponse from .types.get_smtp_report_request_sort import GetSmtpReportRequestSort from .types.get_smtp_report_response import GetSmtpReportResponse +from .types.get_smtp_template_request_template_id import GetSmtpTemplateRequestTemplateId from .types.get_smtp_templates_request_sort import GetSmtpTemplatesRequestSort from .types.get_smtp_templates_response import GetSmtpTemplatesResponse from .types.get_transac_blocked_contacts_request_sort import GetTransacBlockedContactsRequestSort @@ -34,6 +35,7 @@ from .types.get_transac_email_content_response import GetTransacEmailContentResponse from .types.get_transac_emails_list_request_sort import GetTransacEmailsListRequestSort from .types.get_transac_emails_list_response import GetTransacEmailsListResponse +from .types.post_preview_smtp_email_templates_request import PostPreviewSmtpEmailTemplatesRequest from .types.post_preview_smtp_email_templates_response import PostPreviewSmtpEmailTemplatesResponse from .types.send_transac_email_request_attachment_item import SendTransacEmailRequestAttachmentItem from .types.send_transac_email_request_bcc_item import SendTransacEmailRequestBccItem @@ -44,6 +46,7 @@ from .types.send_transac_email_request_to_item import SendTransacEmailRequestToItem from .types.send_transac_email_response import SendTransacEmailResponse from .types.update_smtp_template_request_sender import UpdateSmtpTemplateRequestSender +from .types.update_smtp_template_request_template_id import UpdateSmtpTemplateRequestTemplateId from pydantic import ValidationError # this is used as the default value for optional parameters @@ -66,6 +69,8 @@ def get_transac_blocked_contacts( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetTransacBlockedContactsResponse]: """ + Retrieve a paginated list of transactional contacts that have been blocked or unsubscribed, along with the reason for blocking (e.g. hard bounce, admin blocked, spam complaint, or unsubscription via email/API/Marketing Automation). Both `startDate` and `endDate` must be provided together when filtering by date range, and neither date can be in the future. Results default to 50 per page (max 100) and are sorted in descending order of record creation unless overridden with the `sort` parameter. + Parameters ---------- start_date : typing.Optional[str] @@ -141,6 +146,8 @@ def unblock_or_resubscribe_a_transactional_contact( self, email: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ + Unblock or resubscribe a transactional contact by removing their email address from the blacklist. The email address must be URL-encoded in the path parameter and must be a valid email format. If the contact is not found in the blocklist, a 404 error is returned. + Parameters ---------- email : str @@ -223,6 +230,17 @@ def get_blocked_domains( ), ) return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -430,6 +448,8 @@ def send_transac_email( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[SendTransacEmailResponse]: """ + Send a transactional email to one or more recipients, either using inline HTML content or a pre-built template via `templateId`. You can schedule emails for future delivery using `scheduledAt` (UTC, up to 5-minute delay), send multiple personalized versions with `messageVersions` (max 2000 total recipients, 99 per version), and attach files via URL or base64-encoded content. A `sender` and `subject` are required when no `templateId` is provided; when a `templateId` is used, the template''s sender and subject are applied unless overridden. + Parameters ---------- attachment : typing.Optional[typing.Sequence[SendTransacEmailRequestAttachmentItem]] @@ -572,7 +592,7 @@ def delete_scheduled_email_by_id( Parameters ---------- identifier : str - The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + The `batchId` of scheduled emails batch (must be a valid UUIDv4) or the `messageId` of scheduled email (enclosed in angle brackets with @ sign, e.g. `<...@domain>`). request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -638,10 +658,10 @@ def get_scheduled_email_by_id( Parameters ---------- identifier : str - The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + The `batchId` of scheduled emails batch (must be a valid UUIDv4) or the `messageId` of scheduled email (enclosed in angle brackets with @ sign, e.g. `<...@domain>`). When using `messageId`, the `limit`, `offset`, `sort`, and `status` query parameters are ignored. start_date : typing.Optional[dt.date] - Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Cannot be more than 30 days older than the current date. end_date : typing.Optional[dt.date] Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. @@ -851,6 +871,28 @@ def get_transac_email_content( ), ) return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -861,13 +903,26 @@ def get_transac_email_content( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) def delete_an_smtp_transactional_log( - self, identifier: str, *, request_options: typing.Optional[RequestOptions] = None + self, + identifier: str, + *, + from_date: typing.Optional[str] = None, + to_date: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Delete SMTP transactional log entries identified by a message ID (enclosed in angle brackets with an @ sign) or a valid email address. Optionally narrow the deletion to a specific date range using `from_date` and `to_date` query parameters (YYYY-MM-DD format). The operation also removes any associated stored email preview content. + Parameters ---------- identifier : str - MessageId of the transactional log(s) to delete + MessageId or email address of the transactional log(s) to delete. Must be a valid message ID (enclosed in angle brackets with @ sign) or a valid email address. + + from_date : typing.Optional[str] + Starting date (YYYY-MM-DD) to narrow down logs for deletion + + to_date : typing.Optional[str] + Ending date (YYYY-MM-DD) to narrow down logs for deletion request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -879,6 +934,10 @@ def delete_an_smtp_transactional_log( _response = self._client_wrapper.httpx_client.request( f"smtp/log/{jsonable_encoder(identifier)}", method="DELETE", + params={ + "from_date": from_date, + "to_date": to_date, + }, request_options=request_options, ) try: @@ -936,7 +995,7 @@ def get_aggregated_smtp_report( **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate days : typing.Optional[int] - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + Number of days in the past including today (positive integer, maximum 90). _Not compatible with 'startDate' and 'endDate'_. Defaults to 90 if neither dates nor days are provided. tag : typing.Optional[str] Tag of the emails @@ -1024,7 +1083,7 @@ def get_email_event_report( **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate days : typing.Optional[int] - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + Number of days in the past including today (positive integer, maximum 90). _Not compatible with 'startDate' and 'endDate'_. Defaults to 30 if neither dates nor days are provided. email : typing.Optional[str] Filter the report for a specific email addresses @@ -1113,6 +1172,8 @@ def get_smtp_report( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetSmtpReportResponse]: """ + This endpoint will show the aggregated stats per day for the past 10 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 30 days. + Parameters ---------- limit : typing.Optional[int] @@ -1128,7 +1189,7 @@ def get_smtp_report( **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD) days : typing.Optional[int] - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + Number of days in the past including today (positive integer, maximum 30). _Not compatible with 'startDate' and 'endDate'_ tag : typing.Optional[str] Tag of the emails @@ -1189,12 +1250,14 @@ def get_smtp_report( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) def post_preview_smtp_email_templates( - self, *, request: typing.Any, request_options: typing.Optional[RequestOptions] = None + self, *, request: PostPreviewSmtpEmailTemplatesRequest, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[PostPreviewSmtpEmailTemplatesResponse]: """ + Generate a fully rendered preview of a transactional email template by resolving dynamic variables. Provide either an `email` address (to populate variables from the contact''s attributes) or a `params` object with key-value pairs for manual substitution; at least one of these is required alongside the mandatory `templateId`. The response includes the rendered HTML, subject, sender details, preview text, and any feed names used in the template. + Parameters ---------- - request : typing.Any + request : PostPreviewSmtpEmailTemplatesRequest request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1207,7 +1270,9 @@ def post_preview_smtp_email_templates( _response = self._client_wrapper.httpx_client.request( "smtp/template/preview", method="POST", - json=request, + json=convert_and_respect_annotation_metadata( + object_=request, annotation=PostPreviewSmtpEmailTemplatesRequest, direction="write" + ), headers={ "content-type": "application/json", }, @@ -1251,9 +1316,12 @@ def get_smtp_templates( limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, sort: typing.Optional[GetSmtpTemplatesRequestSort] = None, + editor_type: typing.Optional[typing.Literal["richTextEditor"]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetSmtpTemplatesResponse]: """ + Retrieve a paginated list of all transactional email templates (including automation templates) with their details such as name, subject, sender, status, HTML content, and timestamps. Results default to 50 per page (max 1000) and are sorted in descending creation order unless overridden. You can filter by active/inactive status using `templateStatus` and by editor type using `editorType` (currently only `richTextEditor` is supported). + Parameters ---------- template_status : typing.Optional[bool] @@ -1268,6 +1336,9 @@ def get_smtp_templates( sort : typing.Optional[GetSmtpTemplatesRequestSort] Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + editor_type : typing.Optional[typing.Literal["richTextEditor"]] + Filter on the editor type used to create the template. Currently only `richTextEditor` is supported as a filter value. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1284,6 +1355,7 @@ def get_smtp_templates( "limit": limit, "offset": offset, "sort": sort, + "editorType": editor_type, }, request_options=request_options, ) @@ -1333,6 +1405,8 @@ def create_smtp_template( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreateSmtpTemplateResponse]: """ + Create a new transactional email template with the specified sender, subject, and content. The `sender`, `subject`, and `templateName` fields are required. Template content can be provided via `htmlContent` (minimum 10 characters) or `htmlUrl`; at least one must be supplied. Templates are created as inactive by default unless `isActive` is explicitly set to `true`. + Parameters ---------- sender : CreateSmtpTemplateRequestSender @@ -1427,13 +1501,15 @@ def create_smtp_template( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) def get_smtp_template( - self, template_id: int, *, request_options: typing.Optional[RequestOptions] = None + self, template_id: GetSmtpTemplateRequestTemplateId, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[GetSmtpTemplateOverview]: """ + Retrieve the full details of a specific transactional email template by its numeric ID or custom template identifier string. The response includes the template name, subject, sender information, HTML content, active status, creation and modification timestamps, reply-to address, tag, and a `doiTemplate` flag indicating whether the template is a double opt-in template (detected by the presence of optin-related tags or variables in the content). + Parameters ---------- - template_id : int - id of the template + template_id : GetSmtpTemplateRequestTemplateId + ID of the template. Can be a numeric template ID or a custom template identifier string (alphanumeric, hyphens, and underscores only, max 64 characters, must start with a letter). request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1444,7 +1520,7 @@ def get_smtp_template( Email template informations """ _response = self._client_wrapper.httpx_client.request( - f"smtp/templates/{jsonable_encoder(template_id)}", + f"smtp/templates/{jsonable_encoder(convert_and_respect_annotation_metadata(object_=template_id, annotation=GetSmtpTemplateRequestTemplateId, direction='write'))}", method="GET", request_options=request_options, ) @@ -1491,7 +1567,7 @@ def get_smtp_template( def update_smtp_template( self, - template_id: int, + template_id: UpdateSmtpTemplateRequestTemplateId, *, attachment_url: typing.Optional[str] = OMIT, html_content: typing.Optional[str] = OMIT, @@ -1506,10 +1582,12 @@ def update_smtp_template( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Update an existing transactional email template by its numeric ID or custom template identifier string. All fields in the request body are optional; only the provided fields will be updated. You can update the template name, subject, sender, reply-to address, HTML content (via `htmlContent` or `htmlUrl`), active status, tag, attachment URL, and the personalized `toField`. Only one of sender email or sender ID should be provided per request. + Parameters ---------- - template_id : int - id of the template + template_id : UpdateSmtpTemplateRequestTemplateId + ID of the template. Can be a numeric template ID or a custom template identifier string. attachment_url : typing.Optional[str] Absolute url of the attachment (**no local file**). Extensions allowed: #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps @@ -1549,7 +1627,7 @@ def update_smtp_template( HttpResponse[None] """ _response = self._client_wrapper.httpx_client.request( - f"smtp/templates/{jsonable_encoder(template_id)}", + f"smtp/templates/{jsonable_encoder(convert_and_respect_annotation_metadata(object_=template_id, annotation=UpdateSmtpTemplateRequestTemplateId, direction='write'))}", method="PUT", json={ "attachmentUrl": attachment_url, @@ -1609,6 +1687,8 @@ def delete_smtp_template( self, template_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ + Permanently delete a transactional email template by its numeric ID. Only inactive templates can be deleted; attempting to delete an active template returns a 405 error. To deactivate a template before deletion, use `PUT /smtp/templates/{templateId}` with `isActive` set to `false`. Deletion also removes associated newsletter template data and triggers asynchronous cleanup of shared assets. + Parameters ---------- template_id : int @@ -1668,6 +1748,8 @@ def send_test_template( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[None]: """ + Send a test email of the specified transactional template to one or more recipients. Provide an array of email addresses in the `emailTo` field; if left empty, the test mail is sent to your entire test list. You can send a maximum of 50 test emails per day, and all provided email addresses must be valid. + Parameters ---------- template_id : int @@ -1746,6 +1828,8 @@ async def get_transac_blocked_contacts( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetTransacBlockedContactsResponse]: """ + Retrieve a paginated list of transactional contacts that have been blocked or unsubscribed, along with the reason for blocking (e.g. hard bounce, admin blocked, spam complaint, or unsubscription via email/API/Marketing Automation). Both `startDate` and `endDate` must be provided together when filtering by date range, and neither date can be in the future. Results default to 50 per page (max 100) and are sorted in descending order of record creation unless overridden with the `sort` parameter. + Parameters ---------- start_date : typing.Optional[str] @@ -1821,6 +1905,8 @@ async def unblock_or_resubscribe_a_transactional_contact( self, email: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Unblock or resubscribe a transactional contact by removing their email address from the blacklist. The email address must be URL-encoded in the path parameter and must be a valid email format. If the contact is not found in the blocklist, a 404 error is returned. + Parameters ---------- email : str @@ -1903,6 +1989,17 @@ async def get_blocked_domains( ), ) return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -2110,6 +2207,8 @@ async def send_transac_email( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[SendTransacEmailResponse]: """ + Send a transactional email to one or more recipients, either using inline HTML content or a pre-built template via `templateId`. You can schedule emails for future delivery using `scheduledAt` (UTC, up to 5-minute delay), send multiple personalized versions with `messageVersions` (max 2000 total recipients, 99 per version), and attach files via URL or base64-encoded content. A `sender` and `subject` are required when no `templateId` is provided; when a `templateId` is used, the template''s sender and subject are applied unless overridden. + Parameters ---------- attachment : typing.Optional[typing.Sequence[SendTransacEmailRequestAttachmentItem]] @@ -2252,7 +2351,7 @@ async def delete_scheduled_email_by_id( Parameters ---------- identifier : str - The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + The `batchId` of scheduled emails batch (must be a valid UUIDv4) or the `messageId` of scheduled email (enclosed in angle brackets with @ sign, e.g. `<...@domain>`). request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2318,10 +2417,10 @@ async def get_scheduled_email_by_id( Parameters ---------- identifier : str - The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + The `batchId` of scheduled emails batch (must be a valid UUIDv4) or the `messageId` of scheduled email (enclosed in angle brackets with @ sign, e.g. `<...@domain>`). When using `messageId`, the `limit`, `offset`, `sort`, and `status` query parameters are ignored. start_date : typing.Optional[dt.date] - Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Cannot be more than 30 days older than the current date. end_date : typing.Optional[dt.date] Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. @@ -2531,6 +2630,28 @@ async def get_transac_email_content( ), ) return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -2541,13 +2662,26 @@ async def get_transac_email_content( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) async def delete_an_smtp_transactional_log( - self, identifier: str, *, request_options: typing.Optional[RequestOptions] = None + self, + identifier: str, + *, + from_date: typing.Optional[str] = None, + to_date: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Delete SMTP transactional log entries identified by a message ID (enclosed in angle brackets with an @ sign) or a valid email address. Optionally narrow the deletion to a specific date range using `from_date` and `to_date` query parameters (YYYY-MM-DD format). The operation also removes any associated stored email preview content. + Parameters ---------- identifier : str - MessageId of the transactional log(s) to delete + MessageId or email address of the transactional log(s) to delete. Must be a valid message ID (enclosed in angle brackets with @ sign) or a valid email address. + + from_date : typing.Optional[str] + Starting date (YYYY-MM-DD) to narrow down logs for deletion + + to_date : typing.Optional[str] + Ending date (YYYY-MM-DD) to narrow down logs for deletion request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2559,6 +2693,10 @@ async def delete_an_smtp_transactional_log( _response = await self._client_wrapper.httpx_client.request( f"smtp/log/{jsonable_encoder(identifier)}", method="DELETE", + params={ + "from_date": from_date, + "to_date": to_date, + }, request_options=request_options, ) try: @@ -2616,7 +2754,7 @@ async def get_aggregated_smtp_report( **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate days : typing.Optional[int] - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + Number of days in the past including today (positive integer, maximum 90). _Not compatible with 'startDate' and 'endDate'_. Defaults to 90 if neither dates nor days are provided. tag : typing.Optional[str] Tag of the emails @@ -2704,7 +2842,7 @@ async def get_email_event_report( **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate days : typing.Optional[int] - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + Number of days in the past including today (positive integer, maximum 90). _Not compatible with 'startDate' and 'endDate'_. Defaults to 30 if neither dates nor days are provided. email : typing.Optional[str] Filter the report for a specific email addresses @@ -2793,6 +2931,8 @@ async def get_smtp_report( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetSmtpReportResponse]: """ + This endpoint will show the aggregated stats per day for the past 10 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 30 days. + Parameters ---------- limit : typing.Optional[int] @@ -2808,7 +2948,7 @@ async def get_smtp_report( **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD) days : typing.Optional[int] - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ + Number of days in the past including today (positive integer, maximum 30). _Not compatible with 'startDate' and 'endDate'_ tag : typing.Optional[str] Tag of the emails @@ -2869,12 +3009,14 @@ async def get_smtp_report( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) async def post_preview_smtp_email_templates( - self, *, request: typing.Any, request_options: typing.Optional[RequestOptions] = None + self, *, request: PostPreviewSmtpEmailTemplatesRequest, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[PostPreviewSmtpEmailTemplatesResponse]: """ + Generate a fully rendered preview of a transactional email template by resolving dynamic variables. Provide either an `email` address (to populate variables from the contact''s attributes) or a `params` object with key-value pairs for manual substitution; at least one of these is required alongside the mandatory `templateId`. The response includes the rendered HTML, subject, sender details, preview text, and any feed names used in the template. + Parameters ---------- - request : typing.Any + request : PostPreviewSmtpEmailTemplatesRequest request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2887,7 +3029,9 @@ async def post_preview_smtp_email_templates( _response = await self._client_wrapper.httpx_client.request( "smtp/template/preview", method="POST", - json=request, + json=convert_and_respect_annotation_metadata( + object_=request, annotation=PostPreviewSmtpEmailTemplatesRequest, direction="write" + ), headers={ "content-type": "application/json", }, @@ -2931,9 +3075,12 @@ async def get_smtp_templates( limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, sort: typing.Optional[GetSmtpTemplatesRequestSort] = None, + editor_type: typing.Optional[typing.Literal["richTextEditor"]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetSmtpTemplatesResponse]: """ + Retrieve a paginated list of all transactional email templates (including automation templates) with their details such as name, subject, sender, status, HTML content, and timestamps. Results default to 50 per page (max 1000) and are sorted in descending creation order unless overridden. You can filter by active/inactive status using `templateStatus` and by editor type using `editorType` (currently only `richTextEditor` is supported). + Parameters ---------- template_status : typing.Optional[bool] @@ -2948,6 +3095,9 @@ async def get_smtp_templates( sort : typing.Optional[GetSmtpTemplatesRequestSort] Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + editor_type : typing.Optional[typing.Literal["richTextEditor"]] + Filter on the editor type used to create the template. Currently only `richTextEditor` is supported as a filter value. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -2964,6 +3114,7 @@ async def get_smtp_templates( "limit": limit, "offset": offset, "sort": sort, + "editorType": editor_type, }, request_options=request_options, ) @@ -3013,6 +3164,8 @@ async def create_smtp_template( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreateSmtpTemplateResponse]: """ + Create a new transactional email template with the specified sender, subject, and content. The `sender`, `subject`, and `templateName` fields are required. Template content can be provided via `htmlContent` (minimum 10 characters) or `htmlUrl`; at least one must be supplied. Templates are created as inactive by default unless `isActive` is explicitly set to `true`. + Parameters ---------- sender : CreateSmtpTemplateRequestSender @@ -3107,13 +3260,15 @@ async def create_smtp_template( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) async def get_smtp_template( - self, template_id: int, *, request_options: typing.Optional[RequestOptions] = None + self, template_id: GetSmtpTemplateRequestTemplateId, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[GetSmtpTemplateOverview]: """ + Retrieve the full details of a specific transactional email template by its numeric ID or custom template identifier string. The response includes the template name, subject, sender information, HTML content, active status, creation and modification timestamps, reply-to address, tag, and a `doiTemplate` flag indicating whether the template is a double opt-in template (detected by the presence of optin-related tags or variables in the content). + Parameters ---------- - template_id : int - id of the template + template_id : GetSmtpTemplateRequestTemplateId + ID of the template. Can be a numeric template ID or a custom template identifier string (alphanumeric, hyphens, and underscores only, max 64 characters, must start with a letter). request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -3124,7 +3279,7 @@ async def get_smtp_template( Email template informations """ _response = await self._client_wrapper.httpx_client.request( - f"smtp/templates/{jsonable_encoder(template_id)}", + f"smtp/templates/{jsonable_encoder(convert_and_respect_annotation_metadata(object_=template_id, annotation=GetSmtpTemplateRequestTemplateId, direction='write'))}", method="GET", request_options=request_options, ) @@ -3171,7 +3326,7 @@ async def get_smtp_template( async def update_smtp_template( self, - template_id: int, + template_id: UpdateSmtpTemplateRequestTemplateId, *, attachment_url: typing.Optional[str] = OMIT, html_content: typing.Optional[str] = OMIT, @@ -3186,10 +3341,12 @@ async def update_smtp_template( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Update an existing transactional email template by its numeric ID or custom template identifier string. All fields in the request body are optional; only the provided fields will be updated. You can update the template name, subject, sender, reply-to address, HTML content (via `htmlContent` or `htmlUrl`), active status, tag, attachment URL, and the personalized `toField`. Only one of sender email or sender ID should be provided per request. + Parameters ---------- - template_id : int - id of the template + template_id : UpdateSmtpTemplateRequestTemplateId + ID of the template. Can be a numeric template ID or a custom template identifier string. attachment_url : typing.Optional[str] Absolute url of the attachment (**no local file**). Extensions allowed: #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps @@ -3229,7 +3386,7 @@ async def update_smtp_template( AsyncHttpResponse[None] """ _response = await self._client_wrapper.httpx_client.request( - f"smtp/templates/{jsonable_encoder(template_id)}", + f"smtp/templates/{jsonable_encoder(convert_and_respect_annotation_metadata(object_=template_id, annotation=UpdateSmtpTemplateRequestTemplateId, direction='write'))}", method="PUT", json={ "attachmentUrl": attachment_url, @@ -3289,6 +3446,8 @@ async def delete_smtp_template( self, template_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Permanently delete a transactional email template by its numeric ID. Only inactive templates can be deleted; attempting to delete an active template returns a 405 error. To deactivate a template before deletion, use `PUT /smtp/templates/{templateId}` with `isActive` set to `false`. Deletion also removes associated newsletter template data and triggers asynchronous cleanup of shared assets. + Parameters ---------- template_id : int @@ -3348,6 +3507,8 @@ async def send_test_template( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[None]: """ + Send a test email of the specified transactional template to one or more recipients. Provide an array of email addresses in the `emailTo` field; if left empty, the test mail is sent to your entire test list. You can send a maximum of 50 test emails per day, and all provided email addresses must be valid. + Parameters ---------- template_id : int diff --git a/src/brevo/transactional_emails/types/__init__.py b/src/brevo/transactional_emails/types/__init__.py index 9ac2769..f937d0d 100644 --- a/src/brevo/transactional_emails/types/__init__.py +++ b/src/brevo/transactional_emails/types/__init__.py @@ -28,6 +28,7 @@ from .get_smtp_report_request_sort import GetSmtpReportRequestSort from .get_smtp_report_response import GetSmtpReportResponse from .get_smtp_report_response_reports_item import GetSmtpReportResponseReportsItem + from .get_smtp_template_request_template_id import GetSmtpTemplateRequestTemplateId from .get_smtp_templates_request_sort import GetSmtpTemplatesRequestSort from .get_smtp_templates_response import GetSmtpTemplatesResponse from .get_transac_blocked_contacts_request_sort import GetTransacBlockedContactsRequestSort @@ -46,6 +47,8 @@ from .get_transac_emails_list_response_transactional_emails_item import ( GetTransacEmailsListResponseTransactionalEmailsItem, ) + from .post_preview_smtp_email_templates_request import PostPreviewSmtpEmailTemplatesRequest + from .post_preview_smtp_email_templates_request_params import PostPreviewSmtpEmailTemplatesRequestParams from .post_preview_smtp_email_templates_response import PostPreviewSmtpEmailTemplatesResponse from .send_transac_email_request_attachment_item import SendTransacEmailRequestAttachmentItem from .send_transac_email_request_bcc_item import SendTransacEmailRequestBccItem @@ -68,6 +71,7 @@ from .send_transac_email_request_to_item import SendTransacEmailRequestToItem from .send_transac_email_response import SendTransacEmailResponse from .update_smtp_template_request_sender import UpdateSmtpTemplateRequestSender + from .update_smtp_template_request_template_id import UpdateSmtpTemplateRequestTemplateId _dynamic_imports: typing.Dict[str, str] = { "CreateSmtpTemplateRequestSender": ".create_smtp_template_request_sender", "CreateSmtpTemplateResponse": ".create_smtp_template_response", @@ -89,6 +93,7 @@ "GetSmtpReportRequestSort": ".get_smtp_report_request_sort", "GetSmtpReportResponse": ".get_smtp_report_response", "GetSmtpReportResponseReportsItem": ".get_smtp_report_response_reports_item", + "GetSmtpTemplateRequestTemplateId": ".get_smtp_template_request_template_id", "GetSmtpTemplatesRequestSort": ".get_smtp_templates_request_sort", "GetSmtpTemplatesResponse": ".get_smtp_templates_response", "GetTransacBlockedContactsRequestSort": ".get_transac_blocked_contacts_request_sort", @@ -101,6 +106,8 @@ "GetTransacEmailsListRequestSort": ".get_transac_emails_list_request_sort", "GetTransacEmailsListResponse": ".get_transac_emails_list_response", "GetTransacEmailsListResponseTransactionalEmailsItem": ".get_transac_emails_list_response_transactional_emails_item", + "PostPreviewSmtpEmailTemplatesRequest": ".post_preview_smtp_email_templates_request", + "PostPreviewSmtpEmailTemplatesRequestParams": ".post_preview_smtp_email_templates_request_params", "PostPreviewSmtpEmailTemplatesResponse": ".post_preview_smtp_email_templates_response", "SendTransacEmailRequestAttachmentItem": ".send_transac_email_request_attachment_item", "SendTransacEmailRequestBccItem": ".send_transac_email_request_bcc_item", @@ -115,6 +122,7 @@ "SendTransacEmailRequestToItem": ".send_transac_email_request_to_item", "SendTransacEmailResponse": ".send_transac_email_response", "UpdateSmtpTemplateRequestSender": ".update_smtp_template_request_sender", + "UpdateSmtpTemplateRequestTemplateId": ".update_smtp_template_request_template_id", } @@ -160,6 +168,7 @@ def __dir__(): "GetSmtpReportRequestSort", "GetSmtpReportResponse", "GetSmtpReportResponseReportsItem", + "GetSmtpTemplateRequestTemplateId", "GetSmtpTemplatesRequestSort", "GetSmtpTemplatesResponse", "GetTransacBlockedContactsRequestSort", @@ -172,6 +181,8 @@ def __dir__(): "GetTransacEmailsListRequestSort", "GetTransacEmailsListResponse", "GetTransacEmailsListResponseTransactionalEmailsItem", + "PostPreviewSmtpEmailTemplatesRequest", + "PostPreviewSmtpEmailTemplatesRequestParams", "PostPreviewSmtpEmailTemplatesResponse", "SendTransacEmailRequestAttachmentItem", "SendTransacEmailRequestBccItem", @@ -186,4 +197,5 @@ def __dir__(): "SendTransacEmailRequestToItem", "SendTransacEmailResponse", "UpdateSmtpTemplateRequestSender", + "UpdateSmtpTemplateRequestTemplateId", ] diff --git a/src/brevo/types/send_transac_sms_tag_field.py b/src/brevo/transactional_emails/types/get_smtp_template_request_template_id.py similarity index 56% rename from src/brevo/types/send_transac_sms_tag_field.py rename to src/brevo/transactional_emails/types/get_smtp_template_request_template_id.py index f635621..dd6514a 100644 --- a/src/brevo/types/send_transac_sms_tag_field.py +++ b/src/brevo/transactional_emails/types/get_smtp_template_request_template_id.py @@ -2,4 +2,4 @@ import typing -SendTransacSmsTagField = typing.Union[str, typing.List[str]] +GetSmtpTemplateRequestTemplateId = typing.Union[int, str] diff --git a/src/brevo/transactional_emails/types/get_transac_email_content_response.py b/src/brevo/transactional_emails/types/get_transac_email_content_response.py index 40c09ca..bbbd663 100644 --- a/src/brevo/transactional_emails/types/get_transac_email_content_response.py +++ b/src/brevo/transactional_emails/types/get_transac_email_content_response.py @@ -12,11 +12,11 @@ class GetTransacEmailContentResponse(UncheckedBaseModel): attachment_count: typing_extensions.Annotated[ - int, + typing.Optional[int], FieldMetadata(alias="attachmentCount"), pydantic.Field(alias="attachmentCount", description="Count of the attachments that were sent in the email"), - ] - body: str = pydantic.Field() + ] = None + body: typing.Optional[str] = pydantic.Field(default=None) """ Actual content of the transactional email that has been sent """ diff --git a/src/brevo/types/get_webhook_channel.py b/src/brevo/transactional_emails/types/post_preview_smtp_email_templates_request.py similarity index 50% rename from src/brevo/types/get_webhook_channel.py rename to src/brevo/transactional_emails/types/post_preview_smtp_email_templates_request.py index 1e73cc9..2220732 100644 --- a/src/brevo/types/get_webhook_channel.py +++ b/src/brevo/transactional_emails/types/post_preview_smtp_email_templates_request.py @@ -2,4 +2,4 @@ import typing -GetWebhookChannel = typing.Union[typing.Literal["sms", "email"], typing.Any] +PostPreviewSmtpEmailTemplatesRequest = typing.Union[typing.Any] diff --git a/src/brevo/transactional_emails/types/post_preview_smtp_email_templates_request_params.py b/src/brevo/transactional_emails/types/post_preview_smtp_email_templates_request_params.py new file mode 100644 index 0000000..bb68a00 --- /dev/null +++ b/src/brevo/transactional_emails/types/post_preview_smtp_email_templates_request_params.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel + + +class PostPreviewSmtpEmailTemplatesRequestParams(UncheckedBaseModel): + """ + Key-value pairs of dynamic parameters for template rendering.(Required if email not provided) For example: **{"Firstname":"John", "Lastname":"Doe"}** + """ + + firstname: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="Firstname"), + pydantic.Field(alias="Firstname", description="firstname of the contact. **Dynamic parameter**"), + ] = None + lastname: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="Lastname"), + pydantic.Field(alias="Lastname", description="Lastname of the contact. **Dynamic parameter**"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/transactional_emails/types/update_smtp_template_request_template_id.py b/src/brevo/transactional_emails/types/update_smtp_template_request_template_id.py new file mode 100644 index 0000000..f84107f --- /dev/null +++ b/src/brevo/transactional_emails/types/update_smtp_template_request_template_id.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateSmtpTemplateRequestTemplateId = typing.Union[int, str] diff --git a/src/brevo/transactional_sms/client.py b/src/brevo/transactional_sms/client.py index 2edb5fb..a8a7185 100644 --- a/src/brevo/transactional_sms/client.py +++ b/src/brevo/transactional_sms/client.py @@ -45,6 +45,7 @@ def send_async_transactional_sms( type: typing.Optional[SendTransacSmsType] = OMIT, unicode_enabled: typing.Optional[bool] = OMIT, web_url: typing.Optional[str] = OMIT, + params: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, template_id: typing.Optional[int] = OMIT, content: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -57,16 +58,16 @@ def send_async_transactional_sms( Parameters ---------- recipient : str - Mobile number to send SMS with the country code + Mobile number to send SMS with the country code. Must contain between 6 and 15 digits, optionally prefixed with '+'. sender : str - Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters.** Alphanumeric sender names (up to 11 characters) must contain only letters and digits. Numeric sender names (12-15 characters) must contain only digits. organisation_prefix : typing.Optional[str] A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** tag : typing.Optional[SendTransacSmsTag] - Tag of the message + Tag of the message. Can be a single string or an array of strings (maximum 10 tags). Each tag must be a non-empty string. type : typing.Optional[SendTransacSmsType] Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. @@ -77,6 +78,9 @@ def send_async_transactional_sms( web_url : typing.Optional[str] Webhook to call for each event triggered by the message (delivered etc.) + params : typing.Optional[typing.Dict[str, typing.Any]] + Pass the set of attributes to customize the template. For example, {"FNAME":"Joe", "LNAME":"Doe"}. These are the placeholder variables in the template that will be replaced with the corresponding values passed in the params object. Applicable only if `templateId` is used. + template_id : typing.Optional[int] Template ID to send SMS with the template. When provided, overrides the content parameter. Mandatory if 'content' is not passed. @@ -111,6 +115,7 @@ def send_async_transactional_sms( type=type, unicode_enabled=unicode_enabled, web_url=web_url, + params=params, template_id=template_id, content=content, request_options=request_options, @@ -127,24 +132,27 @@ def send_transac_sms( type: typing.Optional[SendTransacSmsType] = OMIT, unicode_enabled: typing.Optional[bool] = OMIT, web_url: typing.Optional[str] = OMIT, + params: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, template_id: typing.Optional[int] = OMIT, content: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SendTransacSmsResponse: """ + Send a transactional SMS message to a single mobile number. The `sender`, `recipient`, and either `content` or `templateId` fields are required. The sender name is limited to 11 alphanumeric characters or 15 numeric characters, and the recipient must be a valid international phone number (6-15 digits, optional leading +). Tags can be a string or an array of up to 10 strings. The SMS type defaults to `transactional` but can be set to `marketing`; if the content includes a stop code, it is automatically treated as marketing. Returns the message ID, SMS count, credits used, and remaining credits. + Parameters ---------- recipient : str - Mobile number to send SMS with the country code + Mobile number to send SMS with the country code. Must contain between 6 and 15 digits, optionally prefixed with '+'. sender : str - Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters.** Alphanumeric sender names (up to 11 characters) must contain only letters and digits. Numeric sender names (12-15 characters) must contain only digits. organisation_prefix : typing.Optional[str] A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** tag : typing.Optional[SendTransacSmsTag] - Tag of the message + Tag of the message. Can be a single string or an array of strings (maximum 10 tags). Each tag must be a non-empty string. type : typing.Optional[SendTransacSmsType] Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. @@ -155,6 +163,9 @@ def send_transac_sms( web_url : typing.Optional[str] Webhook to call for each event triggered by the message (delivered etc.) + params : typing.Optional[typing.Dict[str, typing.Any]] + Pass the set of attributes to customize the template. For example, {"FNAME":"Joe", "LNAME":"Doe"}. These are the placeholder variables in the template that will be replaced with the corresponding values passed in the params object. Applicable only if `templateId` is used. + template_id : typing.Optional[int] Template ID to send SMS with the template. When provided, overrides the content parameter. Mandatory if 'content' is not passed. @@ -189,6 +200,7 @@ def send_transac_sms( type=type, unicode_enabled=unicode_enabled, web_url=web_url, + params=params, template_id=template_id, content=content, request_options=request_options, @@ -205,6 +217,8 @@ def get_transac_aggregated_sms_report( request_options: typing.Optional[RequestOptions] = None, ) -> GetTransacAggregatedSmsReportResponse: """ + Retrieve an aggregated report of your transactional SMS activity over a specified time period, including counts for requests, delivered, hard bounces, soft bounces, blocked, unsubscribed, replied, accepted, rejected, and skipped messages. Filter by date range using `startDate` and `endDate` (both required together, YYYY-MM-DD format) or by a number of past `days` (not compatible with date range). You can further narrow results by `tag`. If no date filter is provided, the report covers all available data and returns the auto-detected date range. + Parameters ---------- start_date : typing.Optional[str] @@ -256,6 +270,8 @@ def get_sms_events( request_options: typing.Optional[RequestOptions] = None, ) -> GetSmsEventsResponse: """ + Retrieve a paginated list of individual SMS event records (unaggregated), including event type, phone number, message ID, timestamp, tag, and reason or reply content where applicable. Results default to 50 per page (max 100) and are sorted in descending order unless overridden. Filter by date range (`startDate`/`endDate`), past `days` (not compatible with date range), specific `event` type (e.g. delivered, bounces, replies), `phoneNumber`, or `tags`. Bounce events include the failure reason, and reply events include the reply content. + Parameters ---------- limit : typing.Optional[int] @@ -327,6 +343,8 @@ def get_transac_sms_report( request_options: typing.Optional[RequestOptions] = None, ) -> GetTransacSmsReportResponse: """ + Retrieve a day-by-day breakdown of your transactional SMS activity, with each entry containing the date and counts for requests, delivered, hard bounces, soft bounces, blocked, unsubscribed, replied, accepted, rejected, and skipped messages. Filter by date range using `startDate` and `endDate` (both required together, YYYY-MM-DD format), by a number of past `days` (not compatible with date range), or by `tag`. Results are sorted in descending order by default unless overridden with the `sort` parameter. + Parameters ---------- start_date : typing.Optional[str] @@ -392,6 +410,7 @@ async def send_async_transactional_sms( type: typing.Optional[SendTransacSmsType] = OMIT, unicode_enabled: typing.Optional[bool] = OMIT, web_url: typing.Optional[str] = OMIT, + params: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, template_id: typing.Optional[int] = OMIT, content: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -404,16 +423,16 @@ async def send_async_transactional_sms( Parameters ---------- recipient : str - Mobile number to send SMS with the country code + Mobile number to send SMS with the country code. Must contain between 6 and 15 digits, optionally prefixed with '+'. sender : str - Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters.** Alphanumeric sender names (up to 11 characters) must contain only letters and digits. Numeric sender names (12-15 characters) must contain only digits. organisation_prefix : typing.Optional[str] A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** tag : typing.Optional[SendTransacSmsTag] - Tag of the message + Tag of the message. Can be a single string or an array of strings (maximum 10 tags). Each tag must be a non-empty string. type : typing.Optional[SendTransacSmsType] Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. @@ -424,6 +443,9 @@ async def send_async_transactional_sms( web_url : typing.Optional[str] Webhook to call for each event triggered by the message (delivered etc.) + params : typing.Optional[typing.Dict[str, typing.Any]] + Pass the set of attributes to customize the template. For example, {"FNAME":"Joe", "LNAME":"Doe"}. These are the placeholder variables in the template that will be replaced with the corresponding values passed in the params object. Applicable only if `templateId` is used. + template_id : typing.Optional[int] Template ID to send SMS with the template. When provided, overrides the content parameter. Mandatory if 'content' is not passed. @@ -466,6 +488,7 @@ async def main() -> None: type=type, unicode_enabled=unicode_enabled, web_url=web_url, + params=params, template_id=template_id, content=content, request_options=request_options, @@ -482,24 +505,27 @@ async def send_transac_sms( type: typing.Optional[SendTransacSmsType] = OMIT, unicode_enabled: typing.Optional[bool] = OMIT, web_url: typing.Optional[str] = OMIT, + params: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, template_id: typing.Optional[int] = OMIT, content: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SendTransacSmsResponse: """ + Send a transactional SMS message to a single mobile number. The `sender`, `recipient`, and either `content` or `templateId` fields are required. The sender name is limited to 11 alphanumeric characters or 15 numeric characters, and the recipient must be a valid international phone number (6-15 digits, optional leading +). Tags can be a string or an array of up to 10 strings. The SMS type defaults to `transactional` but can be set to `marketing`; if the content includes a stop code, it is automatically treated as marketing. Returns the message ID, SMS count, credits used, and remaining credits. + Parameters ---------- recipient : str - Mobile number to send SMS with the country code + Mobile number to send SMS with the country code. Must contain between 6 and 15 digits, optionally prefixed with '+'. sender : str - Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters.** Alphanumeric sender names (up to 11 characters) must contain only letters and digits. Numeric sender names (12-15 characters) must contain only digits. organisation_prefix : typing.Optional[str] A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** tag : typing.Optional[SendTransacSmsTag] - Tag of the message + Tag of the message. Can be a single string or an array of strings (maximum 10 tags). Each tag must be a non-empty string. type : typing.Optional[SendTransacSmsType] Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. @@ -510,6 +536,9 @@ async def send_transac_sms( web_url : typing.Optional[str] Webhook to call for each event triggered by the message (delivered etc.) + params : typing.Optional[typing.Dict[str, typing.Any]] + Pass the set of attributes to customize the template. For example, {"FNAME":"Joe", "LNAME":"Doe"}. These are the placeholder variables in the template that will be replaced with the corresponding values passed in the params object. Applicable only if `templateId` is used. + template_id : typing.Optional[int] Template ID to send SMS with the template. When provided, overrides the content parameter. Mandatory if 'content' is not passed. @@ -552,6 +581,7 @@ async def main() -> None: type=type, unicode_enabled=unicode_enabled, web_url=web_url, + params=params, template_id=template_id, content=content, request_options=request_options, @@ -568,6 +598,8 @@ async def get_transac_aggregated_sms_report( request_options: typing.Optional[RequestOptions] = None, ) -> GetTransacAggregatedSmsReportResponse: """ + Retrieve an aggregated report of your transactional SMS activity over a specified time period, including counts for requests, delivered, hard bounces, soft bounces, blocked, unsubscribed, replied, accepted, rejected, and skipped messages. Filter by date range using `startDate` and `endDate` (both required together, YYYY-MM-DD format) or by a number of past `days` (not compatible with date range). You can further narrow results by `tag`. If no date filter is provided, the report covers all available data and returns the auto-detected date range. + Parameters ---------- start_date : typing.Optional[str] @@ -627,6 +659,8 @@ async def get_sms_events( request_options: typing.Optional[RequestOptions] = None, ) -> GetSmsEventsResponse: """ + Retrieve a paginated list of individual SMS event records (unaggregated), including event type, phone number, message ID, timestamp, tag, and reason or reply content where applicable. Results default to 50 per page (max 100) and are sorted in descending order unless overridden. Filter by date range (`startDate`/`endDate`), past `days` (not compatible with date range), specific `event` type (e.g. delivered, bounces, replies), `phoneNumber`, or `tags`. Bounce events include the failure reason, and reply events include the reply content. + Parameters ---------- limit : typing.Optional[int] @@ -706,6 +740,8 @@ async def get_transac_sms_report( request_options: typing.Optional[RequestOptions] = None, ) -> GetTransacSmsReportResponse: """ + Retrieve a day-by-day breakdown of your transactional SMS activity, with each entry containing the date and counts for requests, delivered, hard bounces, soft bounces, blocked, unsubscribed, replied, accepted, rejected, and skipped messages. Filter by date range using `startDate` and `endDate` (both required together, YYYY-MM-DD format), by a number of past `days` (not compatible with date range), or by `tag`. Results are sorted in descending order by default unless overridden with the `sort` parameter. + Parameters ---------- start_date : typing.Optional[str] diff --git a/src/brevo/transactional_sms/raw_client.py b/src/brevo/transactional_sms/raw_client.py index 4472ef0..bd87406 100644 --- a/src/brevo/transactional_sms/raw_client.py +++ b/src/brevo/transactional_sms/raw_client.py @@ -12,6 +12,7 @@ from ..core.unchecked_base_model import construct_type from ..errors.bad_request_error import BadRequestError from ..errors.payment_required_error import PaymentRequiredError +from ..errors.too_many_requests_error import TooManyRequestsError from ..types.error_model import ErrorModel from ..types.send_transac_sms_tag import SendTransacSmsTag from ..types.send_transac_sms_type import SendTransacSmsType @@ -43,6 +44,7 @@ def send_async_transactional_sms( type: typing.Optional[SendTransacSmsType] = OMIT, unicode_enabled: typing.Optional[bool] = OMIT, web_url: typing.Optional[str] = OMIT, + params: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, template_id: typing.Optional[int] = OMIT, content: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -55,16 +57,16 @@ def send_async_transactional_sms( Parameters ---------- recipient : str - Mobile number to send SMS with the country code + Mobile number to send SMS with the country code. Must contain between 6 and 15 digits, optionally prefixed with '+'. sender : str - Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters.** Alphanumeric sender names (up to 11 characters) must contain only letters and digits. Numeric sender names (12-15 characters) must contain only digits. organisation_prefix : typing.Optional[str] A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** tag : typing.Optional[SendTransacSmsTag] - Tag of the message + Tag of the message. Can be a single string or an array of strings (maximum 10 tags). Each tag must be a non-empty string. type : typing.Optional[SendTransacSmsType] Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. @@ -75,6 +77,9 @@ def send_async_transactional_sms( web_url : typing.Optional[str] Webhook to call for each event triggered by the message (delivered etc.) + params : typing.Optional[typing.Dict[str, typing.Any]] + Pass the set of attributes to customize the template. For example, {"FNAME":"Joe", "LNAME":"Doe"}. These are the placeholder variables in the template that will be replaced with the corresponding values passed in the params object. Applicable only if `templateId` is used. + template_id : typing.Optional[int] Template ID to send SMS with the template. When provided, overrides the content parameter. Mandatory if 'content' is not passed. @@ -102,6 +107,7 @@ def send_async_transactional_sms( "type": type, "unicodeEnabled": unicode_enabled, "webUrl": web_url, + "params": params, "templateId": template_id, "content": content, }, @@ -151,24 +157,27 @@ def send_transac_sms( type: typing.Optional[SendTransacSmsType] = OMIT, unicode_enabled: typing.Optional[bool] = OMIT, web_url: typing.Optional[str] = OMIT, + params: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, template_id: typing.Optional[int] = OMIT, content: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[SendTransacSmsResponse]: """ + Send a transactional SMS message to a single mobile number. The `sender`, `recipient`, and either `content` or `templateId` fields are required. The sender name is limited to 11 alphanumeric characters or 15 numeric characters, and the recipient must be a valid international phone number (6-15 digits, optional leading +). Tags can be a string or an array of up to 10 strings. The SMS type defaults to `transactional` but can be set to `marketing`; if the content includes a stop code, it is automatically treated as marketing. Returns the message ID, SMS count, credits used, and remaining credits. + Parameters ---------- recipient : str - Mobile number to send SMS with the country code + Mobile number to send SMS with the country code. Must contain between 6 and 15 digits, optionally prefixed with '+'. sender : str - Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters.** Alphanumeric sender names (up to 11 characters) must contain only letters and digits. Numeric sender names (12-15 characters) must contain only digits. organisation_prefix : typing.Optional[str] A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** tag : typing.Optional[SendTransacSmsTag] - Tag of the message + Tag of the message. Can be a single string or an array of strings (maximum 10 tags). Each tag must be a non-empty string. type : typing.Optional[SendTransacSmsType] Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. @@ -179,6 +188,9 @@ def send_transac_sms( web_url : typing.Optional[str] Webhook to call for each event triggered by the message (delivered etc.) + params : typing.Optional[typing.Dict[str, typing.Any]] + Pass the set of attributes to customize the template. For example, {"FNAME":"Joe", "LNAME":"Doe"}. These are the placeholder variables in the template that will be replaced with the corresponding values passed in the params object. Applicable only if `templateId` is used. + template_id : typing.Optional[int] Template ID to send SMS with the template. When provided, overrides the content parameter. Mandatory if 'content' is not passed. @@ -206,6 +218,7 @@ def send_transac_sms( "type": type, "unicodeEnabled": unicode_enabled, "webUrl": web_url, + "params": params, "templateId": template_id, "content": content, }, @@ -247,6 +260,17 @@ def send_transac_sms( ), ), ) + if _response.status_code == 429: + raise TooManyRequestsError( + headers=dict(_response.headers), + body=typing.cast( + ErrorModel, + construct_type( + type_=ErrorModel, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -266,6 +290,8 @@ def get_transac_aggregated_sms_report( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetTransacAggregatedSmsReportResponse]: """ + Retrieve an aggregated report of your transactional SMS activity over a specified time period, including counts for requests, delivered, hard bounces, soft bounces, blocked, unsubscribed, replied, accepted, rejected, and skipped messages. Filter by date range using `startDate` and `endDate` (both required together, YYYY-MM-DD format) or by a number of past `days` (not compatible with date range). You can further narrow results by `tag`. If no date filter is provided, the report covers all available data and returns the auto-detected date range. + Parameters ---------- start_date : typing.Optional[str] @@ -344,6 +370,8 @@ def get_sms_events( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetSmsEventsResponse]: """ + Retrieve a paginated list of individual SMS event records (unaggregated), including event type, phone number, message ID, timestamp, tag, and reason or reply content where applicable. Results default to 50 per page (max 100) and are sorted in descending order unless overridden. Filter by date range (`startDate`/`endDate`), past `days` (not compatible with date range), specific `event` type (e.g. delivered, bounces, replies), `phoneNumber`, or `tags`. Bounce events include the failure reason, and reply events include the reply content. + Parameters ---------- limit : typing.Optional[int] @@ -438,6 +466,8 @@ def get_transac_sms_report( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetTransacSmsReportResponse]: """ + Retrieve a day-by-day breakdown of your transactional SMS activity, with each entry containing the date and counts for requests, delivered, hard bounces, soft bounces, blocked, unsubscribed, replied, accepted, rejected, and skipped messages. Filter by date range using `startDate` and `endDate` (both required together, YYYY-MM-DD format), by a number of past `days` (not compatible with date range), or by `tag`. Results are sorted in descending order by default unless overridden with the `sort` parameter. + Parameters ---------- start_date : typing.Optional[str] @@ -520,6 +550,7 @@ async def send_async_transactional_sms( type: typing.Optional[SendTransacSmsType] = OMIT, unicode_enabled: typing.Optional[bool] = OMIT, web_url: typing.Optional[str] = OMIT, + params: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, template_id: typing.Optional[int] = OMIT, content: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -532,16 +563,16 @@ async def send_async_transactional_sms( Parameters ---------- recipient : str - Mobile number to send SMS with the country code + Mobile number to send SMS with the country code. Must contain between 6 and 15 digits, optionally prefixed with '+'. sender : str - Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters.** Alphanumeric sender names (up to 11 characters) must contain only letters and digits. Numeric sender names (12-15 characters) must contain only digits. organisation_prefix : typing.Optional[str] A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** tag : typing.Optional[SendTransacSmsTag] - Tag of the message + Tag of the message. Can be a single string or an array of strings (maximum 10 tags). Each tag must be a non-empty string. type : typing.Optional[SendTransacSmsType] Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. @@ -552,6 +583,9 @@ async def send_async_transactional_sms( web_url : typing.Optional[str] Webhook to call for each event triggered by the message (delivered etc.) + params : typing.Optional[typing.Dict[str, typing.Any]] + Pass the set of attributes to customize the template. For example, {"FNAME":"Joe", "LNAME":"Doe"}. These are the placeholder variables in the template that will be replaced with the corresponding values passed in the params object. Applicable only if `templateId` is used. + template_id : typing.Optional[int] Template ID to send SMS with the template. When provided, overrides the content parameter. Mandatory if 'content' is not passed. @@ -579,6 +613,7 @@ async def send_async_transactional_sms( "type": type, "unicodeEnabled": unicode_enabled, "webUrl": web_url, + "params": params, "templateId": template_id, "content": content, }, @@ -628,24 +663,27 @@ async def send_transac_sms( type: typing.Optional[SendTransacSmsType] = OMIT, unicode_enabled: typing.Optional[bool] = OMIT, web_url: typing.Optional[str] = OMIT, + params: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, template_id: typing.Optional[int] = OMIT, content: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[SendTransacSmsResponse]: """ + Send a transactional SMS message to a single mobile number. The `sender`, `recipient`, and either `content` or `templateId` fields are required. The sender name is limited to 11 alphanumeric characters or 15 numeric characters, and the recipient must be a valid international phone number (6-15 digits, optional leading +). Tags can be a string or an array of up to 10 strings. The SMS type defaults to `transactional` but can be set to `marketing`; if the content includes a stop code, it is automatically treated as marketing. Returns the message ID, SMS count, credits used, and remaining credits. + Parameters ---------- recipient : str - Mobile number to send SMS with the country code + Mobile number to send SMS with the country code. Must contain between 6 and 15 digits, optionally prefixed with '+'. sender : str - Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters.** Alphanumeric sender names (up to 11 characters) must contain only letters and digits. Numeric sender names (12-15 characters) must contain only digits. organisation_prefix : typing.Optional[str] A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.** tag : typing.Optional[SendTransacSmsTag] - Tag of the message + Tag of the message. Can be a single string or an array of strings (maximum 10 tags). Each tag must be a non-empty string. type : typing.Optional[SendTransacSmsType] Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. @@ -656,6 +694,9 @@ async def send_transac_sms( web_url : typing.Optional[str] Webhook to call for each event triggered by the message (delivered etc.) + params : typing.Optional[typing.Dict[str, typing.Any]] + Pass the set of attributes to customize the template. For example, {"FNAME":"Joe", "LNAME":"Doe"}. These are the placeholder variables in the template that will be replaced with the corresponding values passed in the params object. Applicable only if `templateId` is used. + template_id : typing.Optional[int] Template ID to send SMS with the template. When provided, overrides the content parameter. Mandatory if 'content' is not passed. @@ -683,6 +724,7 @@ async def send_transac_sms( "type": type, "unicodeEnabled": unicode_enabled, "webUrl": web_url, + "params": params, "templateId": template_id, "content": content, }, @@ -724,6 +766,17 @@ async def send_transac_sms( ), ), ) + if _response.status_code == 429: + raise TooManyRequestsError( + headers=dict(_response.headers), + body=typing.cast( + ErrorModel, + construct_type( + type_=ErrorModel, # type: ignore + object_=_response.json(), + ), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -743,6 +796,8 @@ async def get_transac_aggregated_sms_report( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetTransacAggregatedSmsReportResponse]: """ + Retrieve an aggregated report of your transactional SMS activity over a specified time period, including counts for requests, delivered, hard bounces, soft bounces, blocked, unsubscribed, replied, accepted, rejected, and skipped messages. Filter by date range using `startDate` and `endDate` (both required together, YYYY-MM-DD format) or by a number of past `days` (not compatible with date range). You can further narrow results by `tag`. If no date filter is provided, the report covers all available data and returns the auto-detected date range. + Parameters ---------- start_date : typing.Optional[str] @@ -821,6 +876,8 @@ async def get_sms_events( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetSmsEventsResponse]: """ + Retrieve a paginated list of individual SMS event records (unaggregated), including event type, phone number, message ID, timestamp, tag, and reason or reply content where applicable. Results default to 50 per page (max 100) and are sorted in descending order unless overridden. Filter by date range (`startDate`/`endDate`), past `days` (not compatible with date range), specific `event` type (e.g. delivered, bounces, replies), `phoneNumber`, or `tags`. Bounce events include the failure reason, and reply events include the reply content. + Parameters ---------- limit : typing.Optional[int] @@ -915,6 +972,8 @@ async def get_transac_sms_report( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetTransacSmsReportResponse]: """ + Retrieve a day-by-day breakdown of your transactional SMS activity, with each entry containing the date and counts for requests, delivered, hard bounces, soft bounces, blocked, unsubscribed, replied, accepted, rejected, and skipped messages. Filter by date range using `startDate` and `endDate` (both required together, YYYY-MM-DD format), by a number of past `days` (not compatible with date range), or by `tag`. Results are sorted in descending order by default unless overridden with the `sort` parameter. + Parameters ---------- start_date : typing.Optional[str] diff --git a/src/brevo/types/__init__.py b/src/brevo/types/__init__.py index b4a1e03..d43a916 100644 --- a/src/brevo/types/__init__.py +++ b/src/brevo/types/__init__.py @@ -15,7 +15,17 @@ from .balance_definition_balance_availability_duration_modifier import ( BalanceDefinitionBalanceAvailabilityDurationModifier, ) + from .balance_definition_balance_availability_duration_unit import BalanceDefinitionBalanceAvailabilityDurationUnit + from .balance_definition_balance_option_amount_overtaking_strategy import ( + BalanceDefinitionBalanceOptionAmountOvertakingStrategy, + ) + from .balance_definition_balance_option_credit_rounding import BalanceDefinitionBalanceOptionCreditRounding + from .balance_definition_balance_option_debit_rounding import BalanceDefinitionBalanceOptionDebitRounding + from .balance_definition_unit import BalanceDefinitionUnit from .balance_limit import BalanceLimit + from .balance_limit_constraint_type import BalanceLimitConstraintType + from .balance_limit_duration_unit import BalanceLimitDurationUnit + from .balance_limit_transaction_type import BalanceLimitTransactionType from .batch_accepted_response import BatchAcceptedResponse from .batch_events_response import BatchEventsResponse from .batch_events_response_errors_item import BatchEventsResponseErrorsItem @@ -26,6 +36,7 @@ from .contact_error_model_code import ContactErrorModelCode from .conversations_message import ConversationsMessage from .conversations_message_attachments_item import ConversationsMessageAttachmentsItem + from .conversations_message_attachments_item_image_info import ConversationsMessageAttachmentsItemImageInfo from .conversations_message_bcc_item import ConversationsMessageBccItem from .conversations_message_cc_item import ConversationsMessageCcItem from .conversations_message_file import ConversationsMessageFile @@ -54,11 +65,14 @@ from .get_events_list import GetEventsList from .get_events_list_events_item import GetEventsListEventsItem from .get_extended_campaign_overview import GetExtendedCampaignOverview + from .get_extended_campaign_overview_email_expiration_date import GetExtendedCampaignOverviewEmailExpirationDate + from .get_extended_campaign_overview_email_expiration_date_unit import ( + GetExtendedCampaignOverviewEmailExpirationDateUnit, + ) from .get_extended_campaign_overview_sender import GetExtendedCampaignOverviewSender from .get_extended_campaign_overview_status import GetExtendedCampaignOverviewStatus from .get_extended_campaign_overview_type import GetExtendedCampaignOverviewType from .get_extended_campaign_stats import GetExtendedCampaignStats - from .get_extended_campaign_stats_links_stats import GetExtendedCampaignStatsLinksStats from .get_extended_campaign_stats_stats_by_device import GetExtendedCampaignStatsStatsByDevice from .get_folder import GetFolder from .get_list import GetList @@ -70,7 +84,6 @@ from .get_smtp_template_overview_sender import GetSmtpTemplateOverviewSender from .get_sso_token import GetSsoToken from .get_webhook import GetWebhook - from .get_webhook_channel import GetWebhookChannel from .get_webhook_type import GetWebhookType from .internal_server_error_body import InternalServerErrorBody from .internal_server_error_body_code import InternalServerErrorBodyCode @@ -107,7 +120,6 @@ from .send_test_email import SendTestEmail from .send_transac_sms import SendTransacSms from .send_transac_sms_tag import SendTransacSmsTag - from .send_transac_sms_tag_field import SendTransacSmsTagField from .send_transac_sms_type import SendTransacSmsType from .task import Task from .task_reminder import TaskReminder @@ -116,10 +128,18 @@ from .tier import Tier from .tier_access_conditions_item import TierAccessConditionsItem from .tier_group import TierGroup + from .tier_group_downgrade_schedule import TierGroupDowngradeSchedule + from .tier_group_downgrade_schedule_duration_modifier import TierGroupDowngradeScheduleDurationModifier + from .tier_group_downgrade_schedule_duration_unit import TierGroupDowngradeScheduleDurationUnit from .tier_group_downgrade_strategy import TierGroupDowngradeStrategy + from .tier_group_upgrade_schedule import TierGroupUpgradeSchedule + from .tier_group_upgrade_schedule_duration_modifier import TierGroupUpgradeScheduleDurationModifier + from .tier_group_upgrade_schedule_duration_unit import TierGroupUpgradeScheduleDurationUnit from .tier_group_upgrade_strategy import TierGroupUpgradeStrategy from .tier_tier_rewards_item import TierTierRewardsItem from .transaction import Transaction + from .transaction_status import TransactionStatus + from .transaction_transaction_type import TransactionTransactionType from .unauthorized_error_body import UnauthorizedErrorBody from .unauthorized_error_body_code import UnauthorizedErrorBodyCode from .update_campaign_status import UpdateCampaignStatus @@ -135,7 +155,15 @@ "BadRequestErrorBodyCode": ".bad_request_error_body_code", "BalanceDefinition": ".balance_definition", "BalanceDefinitionBalanceAvailabilityDurationModifier": ".balance_definition_balance_availability_duration_modifier", + "BalanceDefinitionBalanceAvailabilityDurationUnit": ".balance_definition_balance_availability_duration_unit", + "BalanceDefinitionBalanceOptionAmountOvertakingStrategy": ".balance_definition_balance_option_amount_overtaking_strategy", + "BalanceDefinitionBalanceOptionCreditRounding": ".balance_definition_balance_option_credit_rounding", + "BalanceDefinitionBalanceOptionDebitRounding": ".balance_definition_balance_option_debit_rounding", + "BalanceDefinitionUnit": ".balance_definition_unit", "BalanceLimit": ".balance_limit", + "BalanceLimitConstraintType": ".balance_limit_constraint_type", + "BalanceLimitDurationUnit": ".balance_limit_duration_unit", + "BalanceLimitTransactionType": ".balance_limit_transaction_type", "BatchAcceptedResponse": ".batch_accepted_response", "BatchEventsResponse": ".batch_events_response", "BatchEventsResponseErrorsItem": ".batch_events_response_errors_item", @@ -146,6 +174,7 @@ "ContactErrorModelCode": ".contact_error_model_code", "ConversationsMessage": ".conversations_message", "ConversationsMessageAttachmentsItem": ".conversations_message_attachments_item", + "ConversationsMessageAttachmentsItemImageInfo": ".conversations_message_attachments_item_image_info", "ConversationsMessageBccItem": ".conversations_message_bcc_item", "ConversationsMessageCcItem": ".conversations_message_cc_item", "ConversationsMessageFile": ".conversations_message_file", @@ -174,11 +203,12 @@ "GetEventsList": ".get_events_list", "GetEventsListEventsItem": ".get_events_list_events_item", "GetExtendedCampaignOverview": ".get_extended_campaign_overview", + "GetExtendedCampaignOverviewEmailExpirationDate": ".get_extended_campaign_overview_email_expiration_date", + "GetExtendedCampaignOverviewEmailExpirationDateUnit": ".get_extended_campaign_overview_email_expiration_date_unit", "GetExtendedCampaignOverviewSender": ".get_extended_campaign_overview_sender", "GetExtendedCampaignOverviewStatus": ".get_extended_campaign_overview_status", "GetExtendedCampaignOverviewType": ".get_extended_campaign_overview_type", "GetExtendedCampaignStats": ".get_extended_campaign_stats", - "GetExtendedCampaignStatsLinksStats": ".get_extended_campaign_stats_links_stats", "GetExtendedCampaignStatsStatsByDevice": ".get_extended_campaign_stats_stats_by_device", "GetFolder": ".get_folder", "GetList": ".get_list", @@ -190,7 +220,6 @@ "GetSmtpTemplateOverviewSender": ".get_smtp_template_overview_sender", "GetSsoToken": ".get_sso_token", "GetWebhook": ".get_webhook", - "GetWebhookChannel": ".get_webhook_channel", "GetWebhookType": ".get_webhook_type", "InternalServerErrorBody": ".internal_server_error_body", "InternalServerErrorBodyCode": ".internal_server_error_body_code", @@ -227,7 +256,6 @@ "SendTestEmail": ".send_test_email", "SendTransacSms": ".send_transac_sms", "SendTransacSmsTag": ".send_transac_sms_tag", - "SendTransacSmsTagField": ".send_transac_sms_tag_field", "SendTransacSmsType": ".send_transac_sms_type", "Task": ".task", "TaskReminder": ".task_reminder", @@ -236,10 +264,18 @@ "Tier": ".tier", "TierAccessConditionsItem": ".tier_access_conditions_item", "TierGroup": ".tier_group", + "TierGroupDowngradeSchedule": ".tier_group_downgrade_schedule", + "TierGroupDowngradeScheduleDurationModifier": ".tier_group_downgrade_schedule_duration_modifier", + "TierGroupDowngradeScheduleDurationUnit": ".tier_group_downgrade_schedule_duration_unit", "TierGroupDowngradeStrategy": ".tier_group_downgrade_strategy", + "TierGroupUpgradeSchedule": ".tier_group_upgrade_schedule", + "TierGroupUpgradeScheduleDurationModifier": ".tier_group_upgrade_schedule_duration_modifier", + "TierGroupUpgradeScheduleDurationUnit": ".tier_group_upgrade_schedule_duration_unit", "TierGroupUpgradeStrategy": ".tier_group_upgrade_strategy", "TierTierRewardsItem": ".tier_tier_rewards_item", "Transaction": ".transaction", + "TransactionStatus": ".transaction_status", + "TransactionTransactionType": ".transaction_transaction_type", "UnauthorizedErrorBody": ".unauthorized_error_body", "UnauthorizedErrorBodyCode": ".unauthorized_error_body_code", "UpdateCampaignStatus": ".update_campaign_status", @@ -279,7 +315,15 @@ def __dir__(): "BadRequestErrorBodyCode", "BalanceDefinition", "BalanceDefinitionBalanceAvailabilityDurationModifier", + "BalanceDefinitionBalanceAvailabilityDurationUnit", + "BalanceDefinitionBalanceOptionAmountOvertakingStrategy", + "BalanceDefinitionBalanceOptionCreditRounding", + "BalanceDefinitionBalanceOptionDebitRounding", + "BalanceDefinitionUnit", "BalanceLimit", + "BalanceLimitConstraintType", + "BalanceLimitDurationUnit", + "BalanceLimitTransactionType", "BatchAcceptedResponse", "BatchEventsResponse", "BatchEventsResponseErrorsItem", @@ -290,6 +334,7 @@ def __dir__(): "ContactErrorModelCode", "ConversationsMessage", "ConversationsMessageAttachmentsItem", + "ConversationsMessageAttachmentsItemImageInfo", "ConversationsMessageBccItem", "ConversationsMessageCcItem", "ConversationsMessageFile", @@ -318,11 +363,12 @@ def __dir__(): "GetEventsList", "GetEventsListEventsItem", "GetExtendedCampaignOverview", + "GetExtendedCampaignOverviewEmailExpirationDate", + "GetExtendedCampaignOverviewEmailExpirationDateUnit", "GetExtendedCampaignOverviewSender", "GetExtendedCampaignOverviewStatus", "GetExtendedCampaignOverviewType", "GetExtendedCampaignStats", - "GetExtendedCampaignStatsLinksStats", "GetExtendedCampaignStatsStatsByDevice", "GetFolder", "GetList", @@ -334,7 +380,6 @@ def __dir__(): "GetSmtpTemplateOverviewSender", "GetSsoToken", "GetWebhook", - "GetWebhookChannel", "GetWebhookType", "InternalServerErrorBody", "InternalServerErrorBodyCode", @@ -371,7 +416,6 @@ def __dir__(): "SendTestEmail", "SendTransacSms", "SendTransacSmsTag", - "SendTransacSmsTagField", "SendTransacSmsType", "Task", "TaskReminder", @@ -380,10 +424,18 @@ def __dir__(): "Tier", "TierAccessConditionsItem", "TierGroup", + "TierGroupDowngradeSchedule", + "TierGroupDowngradeScheduleDurationModifier", + "TierGroupDowngradeScheduleDurationUnit", "TierGroupDowngradeStrategy", + "TierGroupUpgradeSchedule", + "TierGroupUpgradeScheduleDurationModifier", + "TierGroupUpgradeScheduleDurationUnit", "TierGroupUpgradeStrategy", "TierTierRewardsItem", "Transaction", + "TransactionStatus", + "TransactionTransactionType", "UnauthorizedErrorBody", "UnauthorizedErrorBodyCode", "UpdateCampaignStatus", diff --git a/src/brevo/types/balance_definition.py b/src/brevo/types/balance_definition.py index 66ef96f..3172674 100644 --- a/src/brevo/types/balance_definition.py +++ b/src/brevo/types/balance_definition.py @@ -11,76 +11,29 @@ from .balance_definition_balance_availability_duration_modifier import ( BalanceDefinitionBalanceAvailabilityDurationModifier, ) +from .balance_definition_balance_availability_duration_unit import BalanceDefinitionBalanceAvailabilityDurationUnit +from .balance_definition_balance_option_amount_overtaking_strategy import ( + BalanceDefinitionBalanceOptionAmountOvertakingStrategy, +) +from .balance_definition_balance_option_credit_rounding import BalanceDefinitionBalanceOptionCreditRounding +from .balance_definition_balance_option_debit_rounding import BalanceDefinitionBalanceOptionDebitRounding +from .balance_definition_unit import BalanceDefinitionUnit class BalanceDefinition(UncheckedBaseModel): - balance_availability_duration_modifier: typing_extensions.Annotated[ - typing.Optional[BalanceDefinitionBalanceAvailabilityDurationModifier], - FieldMetadata(alias="balanceAvailabilityDurationModifier"), - pydantic.Field( - alias="balanceAvailabilityDurationModifier", - description="startOfPeriod depicts the balancy expiry on start of day/week/month/year. endOfPeriod depicts the balancy expiry on end of day/week/month/year", - ), - ] = None - balance_availability_duration_unit: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="balanceAvailabilityDurationUnit"), - pydantic.Field( - alias="balanceAvailabilityDurationUnit", - description="Unit of time for the balance's availability (e.g., day/week/month/year).", - ), - ] = None - balance_availability_duration_value: typing_extensions.Annotated[ - typing.Optional[int], - FieldMetadata(alias="balanceAvailabilityDurationValue"), - pydantic.Field( - alias="balanceAvailabilityDurationValue", description="Number of days/weeks/month/year for balance expiry" - ), - ] = None - balance_expiration_date: typing_extensions.Annotated[ - typing.Optional[dt.datetime], - FieldMetadata(alias="balanceExpirationDate"), - pydantic.Field( - alias="balanceExpirationDate", - description="Date when the balance expires and can no longer be used, in dd/mm format. The balance will be expired when this date appears next in the calendar and only one of balanceExpirationDate or balance availability fields can be used.", - ), - ] = None - balance_option_amount_overtaking_strategy: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="balanceOptionAmountOvertakingStrategy"), - pydantic.Field( - alias="balanceOptionAmountOvertakingStrategy", - description="Partial enables partial credit of balance if maximum balance limit is reaching. Strict enables rejection of transaction if it will breach the max credit amount limit.", - ), - ] = None - balance_option_credit_rounding: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="balanceOptionCreditRounding"), - pydantic.Field(alias="balanceOptionCreditRounding", description="Rounding strategy for credit transactions."), - ] = None - balance_option_debit_rounding: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="balanceOptionDebitRounding"), - pydantic.Field(alias="balanceOptionDebitRounding", description="Rounding strategy for debit transactions."), - ] = None - created_at: typing_extensions.Annotated[ - typing.Optional[dt.datetime], - FieldMetadata(alias="createdAt"), - pydantic.Field(alias="createdAt", description="Timestamp of balance definition creation."), - ] = None - deleted_at: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="deletedAt"), - pydantic.Field(alias="deletedAt", description="Timestamp of balance definition deletion (nullable)."), - ] = None - description: typing.Optional[str] = pydantic.Field(default=None) + id: typing.Optional[str] = pydantic.Field(default=None) """ - Short description of the balance definition. + Unique identifier for the balance definition. """ - id: typing.Optional[str] = pydantic.Field(default=None) + name: typing.Optional[str] = pydantic.Field(default=None) """ - Unique identifier for the balance definition. + Name of the balance definition. + """ + + description: typing.Optional[str] = pydantic.Field(default=None) + """ + Short description of the balance definition. """ image_ref: typing_extensions.Annotated[ @@ -88,6 +41,21 @@ class BalanceDefinition(UncheckedBaseModel): FieldMetadata(alias="imageRef"), pydantic.Field(alias="imageRef", description="Optional image reference URL."), ] = None + meta: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + Additional metadata for the balance definition. + """ + + unit: typing.Optional[BalanceDefinitionUnit] = pydantic.Field(default=None) + """ + Unit of balance measurement. + """ + + min_amount: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minAmount"), + pydantic.Field(alias="minAmount", description="Minimum allowable balance."), + ] = None max_amount: typing_extensions.Annotated[ typing.Optional[float], FieldMetadata(alias="maxAmount"), @@ -96,38 +64,76 @@ class BalanceDefinition(UncheckedBaseModel): max_credit_amount_limit: typing_extensions.Annotated[ typing.Optional[float], FieldMetadata(alias="maxCreditAmountLimit"), - pydantic.Field(alias="maxCreditAmountLimit", description="Max credit allowed per operation."), + pydantic.Field(alias="maxCreditAmountLimit", description="Maximum credit allowed per operation."), ] = None max_debit_amount_limit: typing_extensions.Annotated[ typing.Optional[float], FieldMetadata(alias="maxDebitAmountLimit"), - pydantic.Field(alias="maxDebitAmountLimit", description="Max debit allowed per operation."), + pydantic.Field(alias="maxDebitAmountLimit", description="Maximum debit allowed per operation."), ] = None - meta: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) - """ - Additional metadata for the balance definition. - """ - - min_amount: typing_extensions.Annotated[ - typing.Optional[float], - FieldMetadata(alias="minAmount"), - pydantic.Field(alias="minAmount", description="Minimum allowable balance."), + balance_option_amount_overtaking_strategy: typing_extensions.Annotated[ + typing.Optional[BalanceDefinitionBalanceOptionAmountOvertakingStrategy], + FieldMetadata(alias="balanceOptionAmountOvertakingStrategy"), + pydantic.Field( + alias="balanceOptionAmountOvertakingStrategy", + description="Partial enables partial credit of balance if maximum balance limit is reached. Strict enables rejection of a transaction if it will breach the max balance limit.", + ), ] = None - name: typing.Optional[str] = pydantic.Field(default=None) - """ - Name of the balance definition. - """ - - unit: typing.Optional[str] = pydantic.Field(default=None) - """ - Unit of balance (e.g., points, currency). - """ - - updated_at: typing_extensions.Annotated[ + balance_option_credit_rounding: typing_extensions.Annotated[ + typing.Optional[BalanceDefinitionBalanceOptionCreditRounding], + FieldMetadata(alias="balanceOptionCreditRounding"), + pydantic.Field(alias="balanceOptionCreditRounding", description="Rounding strategy for credit transactions."), + ] = None + balance_option_debit_rounding: typing_extensions.Annotated[ + typing.Optional[BalanceDefinitionBalanceOptionDebitRounding], + FieldMetadata(alias="balanceOptionDebitRounding"), + pydantic.Field(alias="balanceOptionDebitRounding", description="Rounding strategy for debit transactions."), + ] = None + balance_availability_duration_value: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="balanceAvailabilityDurationValue"), + pydantic.Field( + alias="balanceAvailabilityDurationValue", description="Number of time units before the balance expires." + ), + ] = None + balance_availability_duration_unit: typing_extensions.Annotated[ + typing.Optional[BalanceDefinitionBalanceAvailabilityDurationUnit], + FieldMetadata(alias="balanceAvailabilityDurationUnit"), + pydantic.Field( + alias="balanceAvailabilityDurationUnit", description="Unit of time for the balance availability duration." + ), + ] = None + balance_availability_duration_modifier: typing_extensions.Annotated[ + typing.Optional[BalanceDefinitionBalanceAvailabilityDurationModifier], + FieldMetadata(alias="balanceAvailabilityDurationModifier"), + pydantic.Field( + alias="balanceAvailabilityDurationModifier", + description="Modifier for balance availability duration. startOfPeriod causes expiry at the start of the period, endOfPeriod at the end. noModification uses the exact duration from the credit date.", + ), + ] = None + balance_expiration_date: typing_extensions.Annotated[ typing.Optional[str], + FieldMetadata(alias="balanceExpirationDate"), + pydantic.Field( + alias="balanceExpirationDate", + description="Fixed expiration date in dd/mm format. The balance expires when this date next appears in the calendar. Only one of balanceExpirationDate or balance availability duration fields can be used.", + ), + ] = None + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAt"), + pydantic.Field(alias="createdAt", description="Timestamp of balance definition creation."), + ] = None + updated_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt", description="Timestamp of the last update."), ] = None + deleted_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="deletedAt"), + pydantic.Field(alias="deletedAt", description="Timestamp of balance definition deletion (nullable)."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/types/balance_definition_balance_availability_duration_modifier.py b/src/brevo/types/balance_definition_balance_availability_duration_modifier.py index 651461e..b762387 100644 --- a/src/brevo/types/balance_definition_balance_availability_duration_modifier.py +++ b/src/brevo/types/balance_definition_balance_availability_duration_modifier.py @@ -3,5 +3,5 @@ import typing BalanceDefinitionBalanceAvailabilityDurationModifier = typing.Union[ - typing.Literal["startOfPeriod", "endOfPeriod", "noModification"], typing.Any + typing.Literal["noModification", "startOfPeriod", "endOfPeriod"], typing.Any ] diff --git a/src/brevo/types/balance_definition_balance_availability_duration_unit.py b/src/brevo/types/balance_definition_balance_availability_duration_unit.py new file mode 100644 index 0000000..3194f73 --- /dev/null +++ b/src/brevo/types/balance_definition_balance_availability_duration_unit.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BalanceDefinitionBalanceAvailabilityDurationUnit = typing.Union[ + typing.Literal["day", "week", "month", "year"], typing.Any +] diff --git a/src/brevo/types/balance_definition_balance_option_amount_overtaking_strategy.py b/src/brevo/types/balance_definition_balance_option_amount_overtaking_strategy.py new file mode 100644 index 0000000..1505abe --- /dev/null +++ b/src/brevo/types/balance_definition_balance_option_amount_overtaking_strategy.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BalanceDefinitionBalanceOptionAmountOvertakingStrategy = typing.Union[typing.Literal["strict", "partial"], typing.Any] diff --git a/src/brevo/types/balance_definition_balance_option_credit_rounding.py b/src/brevo/types/balance_definition_balance_option_credit_rounding.py new file mode 100644 index 0000000..af17173 --- /dev/null +++ b/src/brevo/types/balance_definition_balance_option_credit_rounding.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BalanceDefinitionBalanceOptionCreditRounding = typing.Union[typing.Literal["lower", "upper", "natural"], typing.Any] diff --git a/src/brevo/types/balance_definition_balance_option_debit_rounding.py b/src/brevo/types/balance_definition_balance_option_debit_rounding.py new file mode 100644 index 0000000..002f816 --- /dev/null +++ b/src/brevo/types/balance_definition_balance_option_debit_rounding.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BalanceDefinitionBalanceOptionDebitRounding = typing.Union[typing.Literal["lower", "upper", "natural"], typing.Any] diff --git a/src/brevo/types/balance_definition_unit.py b/src/brevo/types/balance_definition_unit.py new file mode 100644 index 0000000..4912027 --- /dev/null +++ b/src/brevo/types/balance_definition_unit.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BalanceDefinitionUnit = typing.Union[ + typing.Literal[ + "POINTS", + "EUR", + "USD", + "MXN", + "GBP", + "INR", + "CAD", + "SGD", + "RON", + "JPY", + "MYR", + "CLP", + "PEN", + "MAD", + "AUD", + "CHF", + "BRL", + ], + typing.Any, +] diff --git a/src/brevo/types/balance_limit.py b/src/brevo/types/balance_limit.py index 9a92370..2cb7d64 100644 --- a/src/brevo/types/balance_limit.py +++ b/src/brevo/types/balance_limit.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing import pydantic @@ -7,40 +8,49 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata from ..core.unchecked_base_model import UncheckedBaseModel +from .balance_limit_constraint_type import BalanceLimitConstraintType +from .balance_limit_duration_unit import BalanceLimitDurationUnit +from .balance_limit_transaction_type import BalanceLimitTransactionType class BalanceLimit(UncheckedBaseModel): + id: typing.Optional[str] = pydantic.Field(default=None) + """ + Unique identifier for the balance limit. + """ + balance_definition_id: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="balanceDefinitionId"), - pydantic.Field(alias="balanceDefinitionId", description="balance definition ID"), + pydantic.Field(alias="balanceDefinitionId", description="Balance definition ID."), + ] = None + transaction_type: typing_extensions.Annotated[ + typing.Optional[BalanceLimitTransactionType], + FieldMetadata(alias="transactionType"), + pydantic.Field( + alias="transactionType", description="Specifies whether the limit applies to credit or debit transactions." + ), ] = None constraint_type: typing_extensions.Annotated[ - typing.Optional[str], + typing.Optional[BalanceLimitConstraintType], FieldMetadata(alias="constraintType"), pydantic.Field( - alias="constraintType", - description="Defines the type of constraint (e.g., transaction-based or amount-based).", + alias="constraintType", description="Defines the type of constraint (transaction count or amount)." ), ] = None - created_at: typing_extensions.Annotated[ - str, - FieldMetadata(alias="createdAt"), - pydantic.Field(alias="createdAt", description="Timestamp of when the balance limit was created."), - ] - duration_unit: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="durationUnit"), - pydantic.Field(alias="durationUnit", description="Time unit for the balance limit (day, week, month, year)."), - ] = None duration_value: typing_extensions.Annotated[ typing.Optional[int], FieldMetadata(alias="durationValue"), pydantic.Field(alias="durationValue", description="Number of time units the balance limit applies to."), ] = None - id: typing.Optional[str] = pydantic.Field(default=None) + duration_unit: typing_extensions.Annotated[ + typing.Optional[BalanceLimitDurationUnit], + FieldMetadata(alias="durationUnit"), + pydantic.Field(alias="durationUnit", description="Time unit for the balance limit."), + ] = None + value: typing.Optional[float] = pydantic.Field(default=None) """ - Unique identifier for the balance limit. + The maximum allowed value for the defined constraint. """ sliding_schedule: typing_extensions.Annotated[ @@ -51,22 +61,16 @@ class BalanceLimit(UncheckedBaseModel): description="Indicates if the limit resets periodically based on a sliding schedule.", ), ] = None - transaction_type: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="transactionType"), - pydantic.Field( - alias="transactionType", description="Specifies whether the limit applies to credit or debit transactions." - ), + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAt"), + pydantic.Field(alias="createdAt", description="Timestamp of when the balance limit was created."), ] = None updated_at: typing_extensions.Annotated[ - str, + typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt", description="Timestamp of the last update to the balance limit."), - ] - value: typing.Optional[int] = pydantic.Field(default=None) - """ - The maximum allowed value for the defined constraint. - """ + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/types/balance_limit_constraint_type.py b/src/brevo/types/balance_limit_constraint_type.py new file mode 100644 index 0000000..2afc996 --- /dev/null +++ b/src/brevo/types/balance_limit_constraint_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BalanceLimitConstraintType = typing.Union[typing.Literal["transaction", "amount"], typing.Any] diff --git a/src/brevo/types/balance_limit_duration_unit.py b/src/brevo/types/balance_limit_duration_unit.py new file mode 100644 index 0000000..7342d67 --- /dev/null +++ b/src/brevo/types/balance_limit_duration_unit.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BalanceLimitDurationUnit = typing.Union[typing.Literal["hour", "day", "week", "month", "year"], typing.Any] diff --git a/src/brevo/types/balance_limit_transaction_type.py b/src/brevo/types/balance_limit_transaction_type.py new file mode 100644 index 0000000..cc7e9f8 --- /dev/null +++ b/src/brevo/types/balance_limit_transaction_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BalanceLimitTransactionType = typing.Union[typing.Literal["credit", "debit"], typing.Any] diff --git a/src/brevo/types/company.py b/src/brevo/types/company.py index b9a0cc7..6498017 100644 --- a/src/brevo/types/company.py +++ b/src/brevo/types/company.py @@ -32,7 +32,7 @@ class Company(UncheckedBaseModel): linked_deals_ids: typing_extensions.Annotated[ typing.Optional[typing.List[str]], FieldMetadata(alias="linkedDealsIds"), - pydantic.Field(alias="linkedDealsIds", description="Deals ids for companies linked to this company"), + pydantic.Field(alias="linkedDealsIds", description="Deal ids for deals linked to this company"), ] = None if IS_PYDANTIC_V2: diff --git a/src/brevo/types/conversations_message.py b/src/brevo/types/conversations_message.py index 0a1bf50..e7b6326 100644 --- a/src/brevo/types/conversations_message.py +++ b/src/brevo/types/conversations_message.py @@ -171,6 +171,29 @@ class ConversationsMessage(UncheckedBaseModel): `"agent"` for agents’ messages, `"visitor"` for visitors’ messages. """ + is_sent_via_js_api: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isSentViaJsApi"), + pydantic.Field(alias="isSentViaJsApi", description="β€˜`true` if the message was sent via JavaScript API.’"), + ] = None + message_type: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="messageType"), + pydantic.Field( + alias="messageType", + description="The type of message content (e.g. for integration-specific message types).", + ), + ] = None + is_forward: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isForward"), + pydantic.Field(alias="isForward", description="β€˜`true` if the message is a forwarded message.’"), + ] = None + source: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + Source information for the message. + """ + visitor_id: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="visitorId"), diff --git a/src/brevo/types/conversations_message_attachments_item.py b/src/brevo/types/conversations_message_attachments_item.py index 1071b01..1f1705c 100644 --- a/src/brevo/types/conversations_message_attachments_item.py +++ b/src/brevo/types/conversations_message_attachments_item.py @@ -7,38 +7,60 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata from ..core.unchecked_base_model import UncheckedBaseModel +from .conversations_message_attachments_item_image_info import ConversationsMessageAttachmentsItemImageInfo class ConversationsMessageAttachmentsItem(UncheckedBaseModel): - file_name: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="fileName"), - pydantic.Field(alias="fileName", description="The name of the file."), - ] = None - inline_id: typing_extensions.Annotated[ + name: typing.Optional[str] = pydantic.Field(default=None) + """ + The name of the file. + """ + + link: typing.Optional[str] = pydantic.Field(default=None) + """ + The URL of the file. + """ + + mime_type: typing_extensions.Annotated[ typing.Optional[str], - FieldMetadata(alias="inlineId"), - pydantic.Field(alias="inlineId", description="The ID of the inline file."), + FieldMetadata(alias="mimeType"), + pydantic.Field(alias="mimeType", description="The MIME type of the file."), ] = None is_image: typing_extensions.Annotated[ typing.Optional[bool], FieldMetadata(alias="isImage"), pydantic.Field(alias="isImage", description="`true` for images."), ] = None + is_sticker: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isSticker"), + pydantic.Field(alias="isSticker", description="`true` for sticker files."), + ] = None is_inline: typing_extensions.Annotated[ - typing.Optional[str], + typing.Optional[bool], FieldMetadata(alias="isInline"), pydantic.Field(alias="isInline", description="`true` for inline files."), ] = None + inline_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="inlineId"), + pydantic.Field(alias="inlineId", description="The ID of the inline file."), + ] = None size: typing.Optional[int] = pydantic.Field(default=None) """ The size of the file in bytes. """ - url: typing.Optional[str] = pydantic.Field(default=None) - """ - The URL of the file. - """ + image_info: typing_extensions.Annotated[ + typing.Optional[ConversationsMessageAttachmentsItemImageInfo], + FieldMetadata(alias="imageInfo"), + pydantic.Field(alias="imageInfo", description="Image information (only present for image files)."), + ] = None + is_allowed_file_type: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isAllowedFileType"), + pydantic.Field(alias="isAllowedFileType", description="Whether the file extension is allowed for download."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/types/conversations_message_attachments_item_image_info.py b/src/brevo/types/conversations_message_attachments_item_image_info.py new file mode 100644 index 0000000..cee443c --- /dev/null +++ b/src/brevo/types/conversations_message_attachments_item_image_info.py @@ -0,0 +1,40 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ConversationsMessageAttachmentsItemImageInfo(UncheckedBaseModel): + """ + Image information (only present for image files). + """ + + width: typing.Optional[int] = pydantic.Field(default=None) + """ + Width of the image in pixels. + """ + + height: typing.Optional[int] = pydantic.Field(default=None) + """ + Height of the image in pixels. + """ + + preview_link: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="previewLink"), + pydantic.Field(alias="previewLink", description="URL of the image preview."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/types/conversations_message_file.py b/src/brevo/types/conversations_message_file.py index c73bb2b..89eb2f6 100644 --- a/src/brevo/types/conversations_message_file.py +++ b/src/brevo/types/conversations_message_file.py @@ -11,30 +11,56 @@ class ConversationsMessageFile(UncheckedBaseModel): - filename: typing.Optional[str] = pydantic.Field(default=None) + name: typing.Optional[str] = pydantic.Field(default=None) """ - Name of the file + Name of the file. """ - image_info: typing_extensions.Annotated[ - typing.Optional[ConversationsMessageFileImageInfo], - FieldMetadata(alias="imageInfo"), - pydantic.Field(alias="imageInfo", description="image info is passed in case the file is an image"), + link: typing.Optional[str] = pydantic.Field(default=None) + """ + URL of the file. + """ + + mime_type: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="mimeType"), + pydantic.Field(alias="mimeType", description="MIME type of the file."), ] = None is_image: typing_extensions.Annotated[ typing.Optional[bool], FieldMetadata(alias="isImage"), - pydantic.Field(alias="isImage", description="Whether the file is an image"), + pydantic.Field(alias="isImage", description="Whether the file is an image."), + ] = None + is_sticker: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isSticker"), + pydantic.Field(alias="isSticker", description="Whether the file is a sticker."), + ] = None + is_inline: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isInline"), + pydantic.Field(alias="isInline", description="Whether the file is inline."), + ] = None + inline_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="inlineId"), + pydantic.Field(alias="inlineId", description="The ID of the inline file."), ] = None size: typing.Optional[int] = pydantic.Field(default=None) """ - Size in bytes + Size in bytes. """ - url: typing.Optional[str] = pydantic.Field(default=None) - """ - URL of the file - """ + image_info: typing_extensions.Annotated[ + typing.Optional[ConversationsMessageFileImageInfo], + FieldMetadata(alias="imageInfo"), + pydantic.Field(alias="imageInfo", description="Image info, present when the file is an image."), + ] = None + is_allowed_file_type: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isAllowedFileType"), + pydantic.Field(alias="isAllowedFileType", description="Whether the file extension is allowed for download."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/types/conversations_message_file_image_info.py b/src/brevo/types/conversations_message_file_image_info.py index 07c9484..8c554bd 100644 --- a/src/brevo/types/conversations_message_file_image_info.py +++ b/src/brevo/types/conversations_message_file_image_info.py @@ -11,23 +11,24 @@ class ConversationsMessageFileImageInfo(UncheckedBaseModel): """ - image info is passed in case the file is an image + Image info, present when the file is an image. + """ + + width: typing.Optional[int] = pydantic.Field(default=None) + """ + Width of the image in pixels. """ height: typing.Optional[int] = pydantic.Field(default=None) """ - height of the image + Height of the image in pixels. """ - preview_url: typing_extensions.Annotated[ + preview_link: typing_extensions.Annotated[ typing.Optional[str], - FieldMetadata(alias="previewUrl"), - pydantic.Field(alias="previewUrl", description="URL of the preview"), + FieldMetadata(alias="previewLink"), + pydantic.Field(alias="previewLink", description="URL of the image preview."), ] = None - width: typing.Optional[int] = pydantic.Field(default=None) - """ - Width of the image - """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/types/deal.py b/src/brevo/types/deal.py index ad01f3e..a2fcd12 100644 --- a/src/brevo/types/deal.py +++ b/src/brevo/types/deal.py @@ -14,26 +14,26 @@ class Deal(UncheckedBaseModel): Deal Details """ - attributes: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + id: typing.Optional[str] = pydantic.Field(default=None) """ - Deal attributes with values + Unique deal id """ - id: typing.Optional[str] = pydantic.Field(default=None) + attributes: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) """ - Unique deal id + Deal attributes with values """ - linked_companies_ids: typing_extensions.Annotated[ - typing.Optional[typing.List[str]], - FieldMetadata(alias="linkedCompaniesIds"), - pydantic.Field(alias="linkedCompaniesIds", description="Companies ids for companies linked to this deal"), - ] = None linked_contacts_ids: typing_extensions.Annotated[ typing.Optional[typing.List[int]], FieldMetadata(alias="linkedContactsIds"), pydantic.Field(alias="linkedContactsIds", description="Contact ids for contacts linked to this deal"), ] = None + linked_companies_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="linkedCompaniesIds"), + pydantic.Field(alias="linkedCompaniesIds", description="Companies ids for companies linked to this deal"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/types/file_data.py b/src/brevo/types/file_data.py index fb84de9..3942da9 100644 --- a/src/brevo/types/file_data.py +++ b/src/brevo/types/file_data.py @@ -15,41 +15,47 @@ class FileData(UncheckedBaseModel): File data that is uploaded """ + id: typing.Optional[str] = pydantic.Field(default=None) + """ + Unique file id + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + Name of uploaded file + """ + author_id: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="authorId"), pydantic.Field(alias="authorId", description="Account id of user which created the file"), ] = None - company_id: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="companyId"), - pydantic.Field(alias="companyId", description="Company id linked to a file"), - ] = None contact_id: typing_extensions.Annotated[ typing.Optional[int], FieldMetadata(alias="contactId"), pydantic.Field(alias="contactId", description="Contact id of contact on which file is uploaded"), ] = None - created_at: typing_extensions.Annotated[ - typing.Optional[dt.datetime], - FieldMetadata(alias="createdAt"), - pydantic.Field(alias="createdAt", description="File created date/time"), - ] = None deal_id: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="dealId"), pydantic.Field(alias="dealId", description="Deal id linked to a file"), ] = None - name: typing.Optional[str] = pydantic.Field(default=None) - """ - Name of uploaded file - """ - + company_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="companyId"), + pydantic.Field(alias="companyId", description="Company id linked to a file"), + ] = None size: typing.Optional[int] = pydantic.Field(default=None) """ Size of file in bytes """ + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAt"), + pydantic.Field(alias="createdAt", description="File created date/time"), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/brevo/types/get_campaign_recipients.py b/src/brevo/types/get_campaign_recipients.py index 9d0bdef..ae3655d 100644 --- a/src/brevo/types/get_campaign_recipients.py +++ b/src/brevo/types/get_campaign_recipients.py @@ -10,10 +10,19 @@ class GetCampaignRecipients(UncheckedBaseModel): + excluded_segments: typing_extensions.Annotated[ + typing.Optional[typing.List[int]], + FieldMetadata(alias="excludedSegments"), + pydantic.Field(alias="excludedSegments", description="Segment IDs excluded from the campaign"), + ] = None exclusion_lists: typing_extensions.Annotated[ typing.List[int], FieldMetadata(alias="exclusionLists"), pydantic.Field(alias="exclusionLists") ] lists: typing.List[int] + segments: typing.Optional[typing.List[int]] = pydantic.Field(default=None) + """ + Segment IDs included in the campaign + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/types/get_campaign_stats.py b/src/brevo/types/get_campaign_stats.py index cf64e23..424450c 100644 --- a/src/brevo/types/get_campaign_stats.py +++ b/src/brevo/types/get_campaign_stats.py @@ -43,13 +43,13 @@ class GetCampaignStats(UncheckedBaseModel): FieldMetadata(alias="estimatedViews"), pydantic.Field( alias="estimatedViews", - description="Rate of recipients without any privacy protection option enabled in their email client_dev, applied to all delivered emails", + description="Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails", ), ] = None hard_bounces: typing_extensions.Annotated[ int, FieldMetadata(alias="hardBounces"), - pydantic.Field(alias="hardBounces", description="Number of harbounce for the campaign"), + pydantic.Field(alias="hardBounces", description="Number of hard bounces for the campaign"), ] list_id: typing_extensions.Annotated[ typing.Optional[int], @@ -89,7 +89,7 @@ class GetCampaignStats(UncheckedBaseModel): FieldMetadata(alias="trackableViews"), pydantic.Field( alias="trackableViews", - description="Recipients without any privacy protection option enabled in their email client_dev", + description="Recipients without any privacy protection option enabled in their email email client", ), ] trackable_views_rate: typing_extensions.Annotated[ @@ -97,7 +97,7 @@ class GetCampaignStats(UncheckedBaseModel): FieldMetadata(alias="trackableViewsRate"), pydantic.Field( alias="trackableViewsRate", - description="Rate of recipients without any privacy protection option enabled in their email client_dev", + description="Rate of recipients without any privacy protection option enabled in their email client", ), ] = None unique_clicks: typing_extensions.Annotated[ diff --git a/src/brevo/types/get_contact_details.py b/src/brevo/types/get_contact_details.py index f89d8c5..6a7efc0 100644 --- a/src/brevo/types/get_contact_details.py +++ b/src/brevo/types/get_contact_details.py @@ -64,6 +64,14 @@ class GetContactDetails(UncheckedBaseModel): description="Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted)", ), ] + whatsapp_blacklisted: typing_extensions.Annotated[ + bool, + FieldMetadata(alias="whatsappBlacklisted"), + pydantic.Field( + alias="whatsappBlacklisted", + description="Blacklist status for WhatsApp campaigns (true=blacklisted, false=not blacklisted)", + ), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/types/get_events_list_events_item.py b/src/brevo/types/get_events_list_events_item.py index 7807926..34f9ce5 100644 --- a/src/brevo/types/get_events_list_events_item.py +++ b/src/brevo/types/get_events_list_events_item.py @@ -29,11 +29,6 @@ class GetEventsListEventsItem(UncheckedBaseModel): Filter ID of the event """ - source: typing.Optional[str] = pydantic.Field(default=None) - """ - Source of the event - """ - object_type: typing.Optional[str] = pydantic.Field(default=None) """ Object type associated with the event diff --git a/src/brevo/types/get_extended_campaign_overview.py b/src/brevo/types/get_extended_campaign_overview.py index 97b2198..f62741b 100644 --- a/src/brevo/types/get_extended_campaign_overview.py +++ b/src/brevo/types/get_extended_campaign_overview.py @@ -7,6 +7,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata from ..core.unchecked_base_model import UncheckedBaseModel +from .get_extended_campaign_overview_email_expiration_date import GetExtendedCampaignOverviewEmailExpirationDate from .get_extended_campaign_overview_sender import GetExtendedCampaignOverviewSender from .get_extended_campaign_overview_status import GetExtendedCampaignOverviewStatus from .get_extended_campaign_overview_type import GetExtendedCampaignOverviewType @@ -114,6 +115,14 @@ class GetExtendedCampaignOverview(UncheckedBaseModel): description="The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true`", ), ] = None + attachment_url: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="attachmentUrl"), + pydantic.Field( + alias="attachmentUrl", + description="URL of the attachment file associated with the campaign. Empty string if no attachment is present.", + ), + ] = None created_at: typing_extensions.Annotated[ str, FieldMetadata(alias="createdAt"), @@ -121,6 +130,14 @@ class GetExtendedCampaignOverview(UncheckedBaseModel): alias="createdAt", description="Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)" ), ] + email_expiration_date: typing_extensions.Annotated[ + typing.Optional[GetExtendedCampaignOverviewEmailExpirationDate], + FieldMetadata(alias="emailExpirationDate"), + pydantic.Field( + alias="emailExpirationDate", + description="Expiration date configuration for the email campaign, if set. Contains the duration and unit of the email expiry.", + ), + ] = None footer: str = pydantic.Field() """ Footer of the campaign @@ -189,7 +206,10 @@ class GetExtendedCampaignOverview(UncheckedBaseModel): share_link: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="shareLink"), - pydantic.Field(alias="shareLink", description="Link to share the campaign on social medias"), + pydantic.Field( + alias="shareLink", + description="Link to share the campaign on social media. For trigger campaigns, this returns a descriptive message instead of a URL. For classic campaigns that have not been sent, this also returns a descriptive message.", + ), ] = None tag: typing.Optional[str] = pydantic.Field(default=None) """ @@ -217,20 +237,32 @@ class GetExtendedCampaignOverview(UncheckedBaseModel): utm_campaign_value: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="utmCampaignValue"), - pydantic.Field(alias="utmCampaignValue", description="utm parameter associated with campaign"), + pydantic.Field( + alias="utmCampaignValue", + description="The utm_campaign value associated with the campaign. Only present if a UTM campaign value was set.", + ), ] = None - utm_id_active: typing_extensions.Annotated[ - typing.Optional[bool], - FieldMetadata(alias="utmIDActive"), - pydantic.Field(alias="utmIDActive", description="utm id active"), + utm_id: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="utmID"), + pydantic.Field( + alias="utmID", + description="The campaign ID used as utm_id parameter. Only present if UTM campaign tracking with ID is enabled.", + ), ] = None utm_medium: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="utmMedium"), pydantic.Field(alias="utmMedium") + typing.Optional[str], + FieldMetadata(alias="utmMedium"), + pydantic.Field( + alias="utmMedium", description='The utm_medium value. Set to "EMAIL" when UTM campaign tracking is enabled.' + ), ] = None utm_source: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="utmSource"), - pydantic.Field(alias="utmSource", description="source of utm"), + pydantic.Field( + alias="utmSource", description='The utm_source value. Set to "Brevo" when UTM campaign tracking is enabled.' + ), ] = None if IS_PYDANTIC_V2: diff --git a/src/brevo/types/get_extended_campaign_overview_email_expiration_date.py b/src/brevo/types/get_extended_campaign_overview_email_expiration_date.py new file mode 100644 index 0000000..a952f59 --- /dev/null +++ b/src/brevo/types/get_extended_campaign_overview_email_expiration_date.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .get_extended_campaign_overview_email_expiration_date_unit import ( + GetExtendedCampaignOverviewEmailExpirationDateUnit, +) + + +class GetExtendedCampaignOverviewEmailExpirationDate(UncheckedBaseModel): + """ + Expiration date configuration for the email campaign, if set. Contains the duration and unit of the email expiry. + """ + + duration: typing.Optional[int] = pydantic.Field(default=None) + """ + Duration of the email expiry + """ + + unit: typing.Optional[GetExtendedCampaignOverviewEmailExpirationDateUnit] = pydantic.Field(default=None) + """ + Unit of the duration + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/types/get_extended_campaign_overview_email_expiration_date_unit.py b/src/brevo/types/get_extended_campaign_overview_email_expiration_date_unit.py new file mode 100644 index 0000000..a3e667d --- /dev/null +++ b/src/brevo/types/get_extended_campaign_overview_email_expiration_date_unit.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GetExtendedCampaignOverviewEmailExpirationDateUnit = typing.Union[typing.Literal["days", "weeks", "months"], typing.Any] diff --git a/src/brevo/types/get_extended_campaign_stats.py b/src/brevo/types/get_extended_campaign_stats.py index 8e147dd..e6c34c9 100644 --- a/src/brevo/types/get_extended_campaign_stats.py +++ b/src/brevo/types/get_extended_campaign_stats.py @@ -9,7 +9,6 @@ from ..core.unchecked_base_model import UncheckedBaseModel from .get_campaign_stats import GetCampaignStats from .get_device_browser_stats import GetDeviceBrowserStats -from .get_extended_campaign_stats_links_stats import GetExtendedCampaignStatsLinksStats from .get_extended_campaign_stats_stats_by_device import GetExtendedCampaignStatsStatsByDevice @@ -25,9 +24,12 @@ class GetExtendedCampaignStats(UncheckedBaseModel): pydantic.Field(alias="globalStats", description="Overall statistics of the campaign"), ] links_stats: typing_extensions.Annotated[ - GetExtendedCampaignStatsLinksStats, + typing.Dict[str, int], FieldMetadata(alias="linksStats"), - pydantic.Field(alias="linksStats", description="Statistics about the number of clicks for the links"), + pydantic.Field( + alias="linksStats", + description="Statistics about the number of clicks for each link in the campaign. Keys are the link URLs, values are click counts. Only populated when the `statistics` query parameter is set to `linksStats`.", + ), ] mirror_click: typing_extensions.Annotated[ int, @@ -36,22 +38,30 @@ class GetExtendedCampaignStats(UncheckedBaseModel): ] remaining: int = pydantic.Field() """ - Number of remaning emails to send + Number of remaining emails to send """ stats_by_browser: typing_extensions.Annotated[ - typing.Dict[str, GetDeviceBrowserStats], + typing.Optional[typing.Dict[str, GetDeviceBrowserStats]], FieldMetadata(alias="statsByBrowser"), - pydantic.Field(alias="statsByBrowser"), - ] + pydantic.Field( + alias="statsByBrowser", + description="Statistics of the campaign grouped by browser. Only available when retrieving a single campaign with the `statistics` query parameter set to `statsByBrowser`.", + ), + ] = None stats_by_device: typing_extensions.Annotated[ - GetExtendedCampaignStatsStatsByDevice, + typing.Optional[GetExtendedCampaignStatsStatsByDevice], FieldMetadata(alias="statsByDevice"), pydantic.Field(alias="statsByDevice"), - ] + ] = None stats_by_domain: typing_extensions.Annotated[ - typing.Dict[str, GetCampaignStats], FieldMetadata(alias="statsByDomain"), pydantic.Field(alias="statsByDomain") - ] + typing.Optional[typing.Dict[str, GetCampaignStats]], + FieldMetadata(alias="statsByDomain"), + pydantic.Field( + alias="statsByDomain", + description="Statistics of the campaign grouped by email domain. Only populated when the `statistics` query parameter is set to `statsByDomain`.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/types/get_extended_campaign_stats_links_stats.py b/src/brevo/types/get_extended_campaign_stats_links_stats.py deleted file mode 100644 index 418a12d..0000000 --- a/src/brevo/types/get_extended_campaign_stats_links_stats.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel - - -class GetExtendedCampaignStatsLinksStats(UncheckedBaseModel): - """ - Statistics about the number of clicks for the links - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/brevo/types/get_product_details.py b/src/brevo/types/get_product_details.py index b4eb03e..9f7fe59 100644 --- a/src/brevo/types/get_product_details.py +++ b/src/brevo/types/get_product_details.py @@ -45,9 +45,7 @@ class GetProductDetails(UncheckedBaseModel): is_deleted: typing_extensions.Annotated[ typing.Optional[bool], FieldMetadata(alias="isDeleted"), - pydantic.Field( - alias="isDeleted", description="Product get deleted from the shop's database but not from Brevo" - ), + pydantic.Field(alias="isDeleted", description="Product deleted from the shop's database but not from Brevo"), ] = None meta_info: typing_extensions.Annotated[ typing.Optional[typing.Dict[str, typing.Any]], @@ -79,6 +77,11 @@ class GetProductDetails(UncheckedBaseModel): Price of the product """ + alternative_price: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="alternativePrice"), + pydantic.Field(alias="alternativePrice", description="Alternative price of the product"), + ] = None s3original: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="s3Original"), diff --git a/src/brevo/types/get_sms_campaign_overview.py b/src/brevo/types/get_sms_campaign_overview.py index e23cf66..0c0e3e3 100644 --- a/src/brevo/types/get_sms_campaign_overview.py +++ b/src/brevo/types/get_sms_campaign_overview.py @@ -41,12 +41,20 @@ class GetSmsCampaignOverview(UncheckedBaseModel): Name of the SMS Campaign """ + organisation_prefix: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="organisationPrefix"), + pydantic.Field( + alias="organisationPrefix", + description="A recognizable prefix added as the Brand Name before the message content. Empty string if not set.", + ), + ] = None scheduled_at: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="scheduledAt"), pydantic.Field( alias="scheduledAt", - description="UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format", + description="UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format. Empty string if not scheduled.", ), ] = None sender: str = pydantic.Field() @@ -54,11 +62,28 @@ class GetSmsCampaignOverview(UncheckedBaseModel): Sender of the SMS Campaign """ + sent_date: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sentDate"), + pydantic.Field( + alias="sentDate", + description="UTC date-time on which the SMS campaign was sent (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if the campaign status is 'sent'.", + ), + ] = None status: GetSmsCampaignOverviewStatus = pydantic.Field() """ Status of the SMS Campaign """ + unsubscribe_instruction: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="unsubscribeInstruction"), + pydantic.Field( + alias="unsubscribeInstruction", + description="Instructions to unsubscribe from future communications. Empty string if not set.", + ), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/brevo/types/get_smtp_template_overview.py b/src/brevo/types/get_smtp_template_overview.py index b09aa4e..1c93e8c 100644 --- a/src/brevo/types/get_smtp_template_overview.py +++ b/src/brevo/types/get_smtp_template_overview.py @@ -82,6 +82,14 @@ class GetSmtpTemplateOverview(UncheckedBaseModel): FieldMetadata(alias="toField"), pydantic.Field(alias="toField", description='Customisation of the "to" field for the template'), ] + custom_template_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="customTemplateId"), + pydantic.Field( + alias="customTemplateId", + description="Custom template identifier, if one was assigned during template creation. Only present when the template has a custom ID.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/types/get_smtp_template_overview_sender.py b/src/brevo/types/get_smtp_template_overview_sender.py index 3fef19c..2e39f60 100644 --- a/src/brevo/types/get_smtp_template_overview_sender.py +++ b/src/brevo/types/get_smtp_template_overview_sender.py @@ -20,7 +20,7 @@ class GetSmtpTemplateOverviewSender(UncheckedBaseModel): name: typing.Optional[str] = pydantic.Field(default=None) """ - From email for the template + Sender name for the template """ if IS_PYDANTIC_V2: diff --git a/src/brevo/types/get_webhook.py b/src/brevo/types/get_webhook.py index 2094f8a..6b15e6c 100644 --- a/src/brevo/types/get_webhook.py +++ b/src/brevo/types/get_webhook.py @@ -7,7 +7,6 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata from ..core.unchecked_base_model import UncheckedBaseModel -from .get_webhook_channel import GetWebhookChannel from .get_webhook_type import GetWebhookType @@ -23,11 +22,6 @@ class GetWebhook(UncheckedBaseModel): true """ - channel: typing.Optional[GetWebhookChannel] = pydantic.Field(default=None) - """ - channel of webhook - """ - created_at: typing_extensions.Annotated[ str, FieldMetadata(alias="createdAt"), @@ -56,7 +50,12 @@ class GetWebhook(UncheckedBaseModel): ] type: GetWebhookType = pydantic.Field() """ - Type of webhook (marketing or transactional) + Type of webhook (marketing, transactional, or inbound) + """ + + domain: typing.Optional[str] = pydantic.Field(default=None) + """ + Inbound domain of the webhook, only returned for inbound type webhooks """ url: str = pydantic.Field() diff --git a/src/brevo/types/get_webhook_type.py b/src/brevo/types/get_webhook_type.py index d5f0a42..f49bb57 100644 --- a/src/brevo/types/get_webhook_type.py +++ b/src/brevo/types/get_webhook_type.py @@ -2,4 +2,4 @@ import typing -GetWebhookType = typing.Union[typing.Literal["marketing", "transactional"], typing.Any] +GetWebhookType = typing.Union[typing.Literal["marketing", "transactional", "inbound"], typing.Any] diff --git a/src/brevo/types/loyalty_program.py b/src/brevo/types/loyalty_program.py index fdd263b..8c37828 100644 --- a/src/brevo/types/loyalty_program.py +++ b/src/brevo/types/loyalty_program.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing import pydantic @@ -11,65 +12,70 @@ class LoyaltyProgram(UncheckedBaseModel): - code_count: typing_extensions.Annotated[ - typing.Optional[int], - FieldMetadata(alias="codeCount"), - pydantic.Field(alias="codeCount", description="Loyalty Program code count"), - ] = None - created_at: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="createdAt"), - pydantic.Field(alias="createdAt", description="Loyalty Program creation date"), - ] = None - description: typing.Optional[str] = pydantic.Field(default=None) - """ - Loyalty Program description - """ - - document_id: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="documentId"), - pydantic.Field(alias="documentId", description="string"), - ] = None id: typing.Optional[str] = pydantic.Field(default=None) """ - Loyalty Program ID + Loyalty Program unique identifier. """ - meta: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + name: typing.Optional[str] = pydantic.Field(default=None) """ - Loyalty Program meta data + Loyalty Program name. """ - name: typing.Optional[str] = pydantic.Field(default=None) + description: typing.Optional[str] = pydantic.Field(default=None) """ - Loyalty Program name + Loyalty Program description. """ - pattern: typing.Optional[str] = pydantic.Field(default=None) + meta: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) """ - string + Loyalty Program metadata. """ state: typing.Optional[LoyaltyProgramState] = pydantic.Field(default=None) """ - Loyalty Program state + Current state of the loyalty program. """ + subscription_pool_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="subscriptionPoolId"), + pydantic.Field(alias="subscriptionPoolId", description="Loyalty Program subscription pool ID."), + ] = None subscription_generator_id: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="subscriptionGeneratorId"), - pydantic.Field(alias="subscriptionGeneratorId", description="Loyalty Program subscription generator ID"), + pydantic.Field(alias="subscriptionGeneratorId", description="Loyalty Program subscription generator ID."), ] = None - subscription_pool_id: typing_extensions.Annotated[ + pattern: typing.Optional[str] = pydantic.Field(default=None) + """ + Subscription code pattern. + """ + + code_count: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="codeCount"), + pydantic.Field(alias="codeCount", description="Number of available subscription codes."), + ] = None + document_id: typing_extensions.Annotated[ typing.Optional[str], - FieldMetadata(alias="subscriptionPoolId"), - pydantic.Field(alias="subscriptionPoolId", description="Loyalty Program subscription pool ID"), + FieldMetadata(alias="documentId"), + pydantic.Field(alias="documentId", description="Associated document identifier."), ] = None - updated_at: typing_extensions.Annotated[ + birthday_attribute: typing_extensions.Annotated[ typing.Optional[str], + FieldMetadata(alias="birthdayAttribute"), + pydantic.Field(alias="birthdayAttribute", description="Contact attribute name used for birthday tracking."), + ] = None + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAt"), + pydantic.Field(alias="createdAt", description="Timestamp when the loyalty program was created."), + ] = None + updated_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt"), - pydantic.Field(alias="updatedAt", description="Loyalty Program last modification date"), + pydantic.Field(alias="updatedAt", description="Timestamp when the loyalty program was last modified."), ] = None if IS_PYDANTIC_V2: diff --git a/src/brevo/types/loyalty_program_state.py b/src/brevo/types/loyalty_program_state.py index d84cf7b..0aa0c84 100644 --- a/src/brevo/types/loyalty_program_state.py +++ b/src/brevo/types/loyalty_program_state.py @@ -2,4 +2,4 @@ import typing -LoyaltyProgramState = typing.Union[typing.Literal["inactive", "active"], typing.Any] +LoyaltyProgramState = typing.Union[typing.Literal["inactive", "active", "draft"], typing.Any] diff --git a/src/brevo/types/note.py b/src/brevo/types/note.py index c98b238..d5013ae 100644 --- a/src/brevo/types/note.py +++ b/src/brevo/types/note.py @@ -15,36 +15,41 @@ class Note(UncheckedBaseModel): Note Details """ - author_id: typing_extensions.Annotated[ - typing.Optional[typing.Dict[str, typing.Any]], - FieldMetadata(alias="authorId"), - pydantic.Field(alias="authorId", description="Account details of user which created the note"), - ] = None + id: typing.Optional[str] = pydantic.Field(default=None) + """ + Unique note Id + """ + + text: str = pydantic.Field() + """ + Content of the note. Supports HTML for rich text formatting. Supported tags include: `

` (paragraph), `` / `` (bold), `` / `` (italic), `` (underline), `
` (line break), `` (labelled hyperlink). Example labelled link: `Link text`. + """ + contact_ids: typing_extensions.Annotated[ typing.Optional[typing.List[int]], FieldMetadata(alias="contactIds"), pydantic.Field(alias="contactIds", description="Contact ids linked to a note"), ] = None - created_at: typing_extensions.Annotated[ - typing.Optional[dt.datetime], - FieldMetadata(alias="createdAt"), - pydantic.Field(alias="createdAt", description="Note created date/time"), + company_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="companyIds"), + pydantic.Field(alias="companyIds", description="Company ids linked to a note"), ] = None deal_ids: typing_extensions.Annotated[ typing.Optional[typing.List[str]], FieldMetadata(alias="dealIds"), pydantic.Field(alias="dealIds", description="Deal ids linked to a note"), ] = None - id: typing.Optional[str] = pydantic.Field(default=None) - """ - Unique note Id - """ - - text: str = pydantic.Field() - """ - Text content of a note - """ - + author_id: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Any]], + FieldMetadata(alias="authorId"), + pydantic.Field(alias="authorId", description="Account details of user which created the note"), + ] = None + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAt"), + pydantic.Field(alias="createdAt", description="Note created date/time"), + ] = None updated_at: typing_extensions.Annotated[ typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt"), diff --git a/src/brevo/types/note_data.py b/src/brevo/types/note_data.py index 19930ce..64283f8 100644 --- a/src/brevo/types/note_data.py +++ b/src/brevo/types/note_data.py @@ -31,7 +31,7 @@ class NoteData(UncheckedBaseModel): ] = None text: str = pydantic.Field() """ - Text content of a note + Content of the note. Supports HTML for rich text formatting. Supported tags include: `

` (paragraph), `` / `` (bold), `` / `` (italic), `` (underline), `
` (line break), `` (labelled hyperlink). Example labelled link: `Link text`. """ if IS_PYDANTIC_V2: diff --git a/src/brevo/types/order.py b/src/brevo/types/order.py index 6a57402..f4aab4f 100644 --- a/src/brevo/types/order.py +++ b/src/brevo/types/order.py @@ -52,7 +52,7 @@ class Order(UncheckedBaseModel): FieldMetadata(alias="metaInfo"), pydantic.Field( alias="metaInfo", - description="Meta data of order to store additional detal such as custom message, customer type, source.", + description="Meta data of order to store additional detail such as custom message, customer type, source.", ), ] = None products: typing.List[OrderProductsItem] diff --git a/src/brevo/types/pipeline.py b/src/brevo/types/pipeline.py index 278d7bb..556479f 100644 --- a/src/brevo/types/pipeline.py +++ b/src/brevo/types/pipeline.py @@ -10,7 +10,7 @@ class Pipeline(UncheckedBaseModel): """ - List of stages + Pipeline details with stages """ pipeline: typing.Optional[str] = pydantic.Field(default=None) @@ -25,7 +25,7 @@ class Pipeline(UncheckedBaseModel): stages: typing.Optional[typing.List[PipelineStagesItem]] = pydantic.Field(default=None) """ - List of stages + List of pipeline stages """ if IS_PYDANTIC_V2: diff --git a/src/brevo/types/pipeline_stages_item.py b/src/brevo/types/pipeline_stages_item.py index 5865a29..88a2fc3 100644 --- a/src/brevo/types/pipeline_stages_item.py +++ b/src/brevo/types/pipeline_stages_item.py @@ -9,7 +9,7 @@ class PipelineStagesItem(UncheckedBaseModel): """ - List of stages + Stage details """ id: typing.Optional[str] = pydantic.Field(default=None) diff --git a/src/brevo/types/send_transac_sms.py b/src/brevo/types/send_transac_sms.py index d5a4b2d..bdbd25c 100644 --- a/src/brevo/types/send_transac_sms.py +++ b/src/brevo/types/send_transac_sms.py @@ -22,17 +22,17 @@ class SendTransacSms(UncheckedBaseModel): ] = None recipient: str = pydantic.Field() """ - Mobile number to send SMS with the country code + Mobile number to send SMS with the country code. Must contain between 6 and 15 digits, optionally prefixed with '+'. """ sender: str = pydantic.Field() """ - Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** + Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters.** Alphanumeric sender names (up to 11 characters) must contain only letters and digits. Numeric sender names (12-15 characters) must contain only digits. """ tag: typing.Optional[SendTransacSmsTag] = pydantic.Field(default=None) """ - Tag of the message + Tag of the message. Can be a single string or an array of strings (maximum 10 tags). Each tag must be a non-empty string. """ type: typing.Optional[SendTransacSmsType] = pydantic.Field(default=None) @@ -55,6 +55,11 @@ class SendTransacSms(UncheckedBaseModel): alias="webUrl", description="Webhook to call for each event triggered by the message (delivered etc.)" ), ] = None + params: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + Pass the set of attributes to customize the template. For example, {"FNAME":"Joe", "LNAME":"Doe"}. These are the placeholder variables in the template that will be replaced with the corresponding values passed in the params object. Applicable only if `templateId` is used. + """ + template_id: typing_extensions.Annotated[ typing.Optional[int], FieldMetadata(alias="templateId"), diff --git a/src/brevo/types/send_transac_sms_tag.py b/src/brevo/types/send_transac_sms_tag.py index a7881b6..7825bf9 100644 --- a/src/brevo/types/send_transac_sms_tag.py +++ b/src/brevo/types/send_transac_sms_tag.py @@ -2,27 +2,4 @@ import typing -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel -from .send_transac_sms_tag_field import SendTransacSmsTagField - - -class SendTransacSmsTag(UncheckedBaseModel): - """ - Tag of the message - """ - - field: typing.Optional[SendTransacSmsTagField] = pydantic.Field(default=None) - """ - A tag can be a string or an array of strings. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow +SendTransacSmsTag = typing.Union[str, typing.List[str]] diff --git a/src/brevo/types/task.py b/src/brevo/types/task.py index f92593c..4fea94c 100644 --- a/src/brevo/types/task.py +++ b/src/brevo/types/task.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing import pydantic @@ -14,36 +15,66 @@ class Task(UncheckedBaseModel): Task Details """ + id: typing.Optional[str] = pydantic.Field(default=None) + """ + Unique task id + """ + + task_type_id: typing_extensions.Annotated[ + str, + FieldMetadata(alias="taskTypeId"), + pydantic.Field(alias="taskTypeId", description="Id for type of task e.g Call / Email / Meeting etc."), + ] + name: str = pydantic.Field() + """ + Name of task + """ + companies_ids: typing_extensions.Annotated[ typing.Optional[typing.List[str]], FieldMetadata(alias="companiesIds"), pydantic.Field(alias="companiesIds", description="Companies ids for companies a task is linked to"), ] = None + deals_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="dealsIds"), + pydantic.Field(alias="dealsIds", description="Deal ids for deals a task is linked to"), + ] = None contacts_ids: typing_extensions.Annotated[ typing.Optional[typing.List[int]], FieldMetadata(alias="contactsIds"), pydantic.Field(alias="contactsIds", description="Contact ids for contacts linked to this task"), ] = None - deals_ids: typing_extensions.Annotated[ - typing.Optional[typing.List[str]], - FieldMetadata(alias="dealsIds"), - pydantic.Field(alias="dealsIds", description="Deal ids for deals a task is linked to"), + assign_to_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="assignToId"), + pydantic.Field(alias="assignToId", description="Account id of the user assigned to this task"), ] = None - id: typing.Optional[str] = pydantic.Field(default=None) + date: dt.datetime = pydantic.Field() """ - Unique task id + Task due date and time """ - name: str = pydantic.Field() + notes: typing.Optional[str] = pydantic.Field(default=None) """ - Name of task + Notes added to a task """ - task_type_id: typing_extensions.Annotated[ - str, - FieldMetadata(alias="taskTypeId"), - pydantic.Field(alias="taskTypeId", description="Id for type of task e.g Call / Email / Meeting etc."), - ] + done: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether the task is marked as done + """ + + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAt"), + pydantic.Field(alias="createdAt", description="Task creation date/time"), + ] = None + updated_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updatedAt"), + pydantic.Field(alias="updatedAt", description="Task last update date/time"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/types/tier_group.py b/src/brevo/types/tier_group.py index fe5e273..5cfae03 100644 --- a/src/brevo/types/tier_group.py +++ b/src/brevo/types/tier_group.py @@ -8,7 +8,9 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata from ..core.unchecked_base_model import UncheckedBaseModel +from .tier_group_downgrade_schedule import TierGroupDowngradeSchedule from .tier_group_downgrade_strategy import TierGroupDowngradeStrategy +from .tier_group_upgrade_schedule import TierGroupUpgradeSchedule from .tier_group_upgrade_strategy import TierGroupUpgradeStrategy @@ -59,6 +61,16 @@ class TierGroup(UncheckedBaseModel): description="Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary.", ), ] = None + upgrade_schedule: typing_extensions.Annotated[ + typing.Optional[TierGroupUpgradeSchedule], + FieldMetadata(alias="upgradeSchedule"), + pydantic.Field(alias="upgradeSchedule", description="Schedule configuration for tier upgrades."), + ] = None + downgrade_schedule: typing_extensions.Annotated[ + typing.Optional[TierGroupDowngradeSchedule], + FieldMetadata(alias="downgradeSchedule"), + pydantic.Field(alias="downgradeSchedule", description="Schedule configuration for tier downgrades."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/brevo/types/tier_group_downgrade_schedule.py b/src/brevo/types/tier_group_downgrade_schedule.py new file mode 100644 index 0000000..7eedf38 --- /dev/null +++ b/src/brevo/types/tier_group_downgrade_schedule.py @@ -0,0 +1,52 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tier_group_downgrade_schedule_duration_modifier import TierGroupDowngradeScheduleDurationModifier +from .tier_group_downgrade_schedule_duration_unit import TierGroupDowngradeScheduleDurationUnit + + +class TierGroupDowngradeSchedule(UncheckedBaseModel): + """ + Schedule configuration for tier downgrades. + """ + + strategy: typing.Optional[str] = pydantic.Field(default=None) + """ + Schedule strategy type. + """ + + duration_value: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="durationValue"), + pydantic.Field(alias="durationValue", description="Duration value for the schedule."), + ] = None + duration_unit: typing_extensions.Annotated[ + typing.Optional[TierGroupDowngradeScheduleDurationUnit], + FieldMetadata(alias="durationUnit"), + pydantic.Field(alias="durationUnit", description="Duration unit for the schedule."), + ] = None + duration_modifier: typing_extensions.Annotated[ + typing.Optional[TierGroupDowngradeScheduleDurationModifier], + FieldMetadata(alias="durationModifier"), + pydantic.Field(alias="durationModifier", description="Modifier for the duration."), + ] = None + scheduled_date: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="scheduledDate"), + pydantic.Field(alias="scheduledDate", description="Scheduled date in DD/MM format."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/types/tier_group_downgrade_schedule_duration_modifier.py b/src/brevo/types/tier_group_downgrade_schedule_duration_modifier.py new file mode 100644 index 0000000..d1979d7 --- /dev/null +++ b/src/brevo/types/tier_group_downgrade_schedule_duration_modifier.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TierGroupDowngradeScheduleDurationModifier = typing.Union[ + typing.Literal["start_of_period", "end_of_period"], typing.Any +] diff --git a/src/brevo/types/tier_group_downgrade_schedule_duration_unit.py b/src/brevo/types/tier_group_downgrade_schedule_duration_unit.py new file mode 100644 index 0000000..7426766 --- /dev/null +++ b/src/brevo/types/tier_group_downgrade_schedule_duration_unit.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TierGroupDowngradeScheduleDurationUnit = typing.Union[typing.Literal["day", "week", "month", "year"], typing.Any] diff --git a/src/brevo/types/tier_group_upgrade_schedule.py b/src/brevo/types/tier_group_upgrade_schedule.py new file mode 100644 index 0000000..83d7704 --- /dev/null +++ b/src/brevo/types/tier_group_upgrade_schedule.py @@ -0,0 +1,52 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .tier_group_upgrade_schedule_duration_modifier import TierGroupUpgradeScheduleDurationModifier +from .tier_group_upgrade_schedule_duration_unit import TierGroupUpgradeScheduleDurationUnit + + +class TierGroupUpgradeSchedule(UncheckedBaseModel): + """ + Schedule configuration for tier upgrades. + """ + + strategy: typing.Optional[str] = pydantic.Field(default=None) + """ + Schedule strategy type. + """ + + duration_value: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="durationValue"), + pydantic.Field(alias="durationValue", description="Duration value for the schedule."), + ] = None + duration_unit: typing_extensions.Annotated[ + typing.Optional[TierGroupUpgradeScheduleDurationUnit], + FieldMetadata(alias="durationUnit"), + pydantic.Field(alias="durationUnit", description="Duration unit for the schedule."), + ] = None + duration_modifier: typing_extensions.Annotated[ + typing.Optional[TierGroupUpgradeScheduleDurationModifier], + FieldMetadata(alias="durationModifier"), + pydantic.Field(alias="durationModifier", description="Modifier for the duration."), + ] = None + scheduled_date: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="scheduledDate"), + pydantic.Field(alias="scheduledDate", description="Scheduled date in DD/MM format."), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/types/tier_group_upgrade_schedule_duration_modifier.py b/src/brevo/types/tier_group_upgrade_schedule_duration_modifier.py new file mode 100644 index 0000000..78417f3 --- /dev/null +++ b/src/brevo/types/tier_group_upgrade_schedule_duration_modifier.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TierGroupUpgradeScheduleDurationModifier = typing.Union[typing.Literal["start_of_period", "end_of_period"], typing.Any] diff --git a/src/brevo/types/tier_group_upgrade_schedule_duration_unit.py b/src/brevo/types/tier_group_upgrade_schedule_duration_unit.py new file mode 100644 index 0000000..4822f45 --- /dev/null +++ b/src/brevo/types/tier_group_upgrade_schedule_duration_unit.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TierGroupUpgradeScheduleDurationUnit = typing.Union[typing.Literal["day", "week", "month", "year"], typing.Any] diff --git a/src/brevo/types/transaction.py b/src/brevo/types/transaction.py index 0b9a92b..60be878 100644 --- a/src/brevo/types/transaction.py +++ b/src/brevo/types/transaction.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing import pydantic @@ -7,6 +8,8 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.serialization import FieldMetadata from ..core.unchecked_base_model import UncheckedBaseModel +from .transaction_status import TransactionStatus +from .transaction_transaction_type import TransactionTransactionType class Transaction(UncheckedBaseModel): @@ -14,11 +17,38 @@ class Transaction(UncheckedBaseModel): Represents a transaction involving a balance, including status and timestamps. """ + id: typing.Optional[str] = pydantic.Field(default=None) + """ + Unique identifier (UUID) of the transaction. + """ + amount: typing.Optional[float] = pydantic.Field(default=None) """ The transaction amount. """ + transaction_type: typing_extensions.Annotated[ + typing.Optional[TransactionTransactionType], + FieldMetadata(alias="transactionType"), + pydantic.Field(alias="transactionType", description="The type of the transaction."), + ] = None + meta: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + """ + Optional metadata associated with the transaction. + """ + + status: typing.Optional[TransactionStatus] = pydantic.Field(default=None) + """ + The current status of the transaction. + """ + + loyalty_program_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="loyaltyProgramId"), + pydantic.Field( + alias="loyaltyProgramId", description="Unique identifier (UUID) of the associated loyalty program." + ), + ] = None balance_definition_id: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="balanceDefinitionId"), @@ -26,16 +56,6 @@ class Transaction(UncheckedBaseModel): alias="balanceDefinitionId", description="Unique identifier (UUID) of the associated balance definition." ), ] = None - cancelled_at: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="cancelledAt"), - pydantic.Field(alias="cancelledAt", description="Timestamp when the transaction was canceled (nullable)."), - ] = None - completed_at: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="completedAt"), - pydantic.Field(alias="completedAt", description="Timestamp when the transaction was completed (nullable)."), - ] = None contact_id: typing_extensions.Annotated[ typing.Optional[int], FieldMetadata(alias="contactId"), @@ -43,40 +63,14 @@ class Transaction(UncheckedBaseModel): alias="contactId", description="Unique identifier of the contact associated with the transaction." ), ] = None - created_at: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="createdAt"), - pydantic.Field(alias="createdAt", description="Timestamp when the transaction was created."), - ] = None event_time: typing_extensions.Annotated[ - typing.Optional[str], + typing.Optional[dt.datetime], FieldMetadata(alias="eventTime"), pydantic.Field( - alias="eventTime", description="Optional timestamp indicating when the transaction event occurred." - ), - ] = None - expiration_date: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="expirationDate"), - pydantic.Field(alias="expirationDate", description="Expiry date of the transaction (nullable)."), - ] = None - id: typing.Optional[str] = pydantic.Field(default=None) - """ - Unique identifier (UUID) of the transaction. - """ - - loyalty_program_id: typing_extensions.Annotated[ - typing.Optional[str], - FieldMetadata(alias="loyaltyProgramId"), - pydantic.Field( - alias="loyaltyProgramId", description="Unique identifier (UUID) of the associated loyalty program." + alias="eventTime", + description="Optional timestamp indicating when the transaction event occurred (ISO 8601 format).", ), ] = None - meta: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) - """ - Optional metadata associated with the transaction. - """ - reject_reason: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="rejectReason"), @@ -85,17 +79,32 @@ class Transaction(UncheckedBaseModel): ), ] = None rejected_at: typing_extensions.Annotated[ - typing.Optional[str], + typing.Optional[dt.datetime], FieldMetadata(alias="rejectedAt"), pydantic.Field(alias="rejectedAt", description="Timestamp when the transaction was rejected (nullable)."), ] = None - status: typing.Optional[str] = pydantic.Field(default=None) - """ - The current status of the transaction (e.g., pending, completed, rejected). - """ - + expiration_date: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="expirationDate"), + pydantic.Field(alias="expirationDate", description="Expiry date of the transaction (nullable)."), + ] = None + completed_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="completedAt"), + pydantic.Field(alias="completedAt", description="Timestamp when the transaction was completed (nullable)."), + ] = None + cancelled_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="cancelledAt"), + pydantic.Field(alias="cancelledAt", description="Timestamp when the transaction was canceled (nullable)."), + ] = None + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdAt"), + pydantic.Field(alias="createdAt", description="Timestamp when the transaction was created."), + ] = None updated_at: typing_extensions.Annotated[ - typing.Optional[str], + typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt", description="Timestamp when the transaction was last updated."), ] = None diff --git a/src/brevo/types/transaction_status.py b/src/brevo/types/transaction_status.py new file mode 100644 index 0000000..acb7893 --- /dev/null +++ b/src/brevo/types/transaction_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TransactionStatus = typing.Union[typing.Literal["pending", "complete", "rejected", "cancelled", "expired"], typing.Any] diff --git a/src/brevo/types/transaction_transaction_type.py b/src/brevo/types/transaction_transaction_type.py new file mode 100644 index 0000000..5f8fb5d --- /dev/null +++ b/src/brevo/types/transaction_transaction_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TransactionTransactionType = typing.Union[typing.Literal["credit", "debit"], typing.Any] diff --git a/src/brevo/user/client.py b/src/brevo/user/client.py index 2e6b487..4baf2f6 100644 --- a/src/brevo/user/client.py +++ b/src/brevo/user/client.py @@ -37,6 +37,8 @@ def get_invited_users_list( self, *, request_options: typing.Optional[RequestOptions] = None ) -> GetInvitedUsersListResponse: """ + Retrieves the list of all users associated with your organization, including both active and pending invited users. Each user entry includes their email address, owner status, current invitation status, and feature access levels for marketing, CRM, and conversations. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -63,6 +65,8 @@ def put_revoke_user_permission( self, email: str, *, request_options: typing.Optional[RequestOptions] = None ) -> PutRevokeUserPermissionResponse: """ + Revokes all permissions for an invited user in the organization, effectively removing their access to the platform. If the user''s plan change generated credit notes, they are returned in the response for billing reconciliation. + Parameters ---------- email : str @@ -212,6 +216,8 @@ def putresendcancelinvitation( request_options: typing.Optional[RequestOptions] = None, ) -> PutresendcancelinvitationResponse: """ + Resends or cancels a pending invitation for a user in the organization, depending on the action path parameter. Use `resend` to send a new invitation email to the user, or `cancel` to revoke the pending invitation entirely and remove the user''s pending access. + Parameters ---------- action : PutresendcancelinvitationRequestAction @@ -360,6 +366,8 @@ def get_user_permission( self, email: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetUserPermissionResponse: """ + Retrieves the granular feature-level permissions assigned to a specific user in the organization, identified by their email address. The response includes the user''s current status (active or pending) and a detailed list of privileges specifying which features and permission levels are granted. + Parameters ---------- email : str @@ -407,6 +415,8 @@ async def get_invited_users_list( self, *, request_options: typing.Optional[RequestOptions] = None ) -> GetInvitedUsersListResponse: """ + Retrieves the list of all users associated with your organization, including both active and pending invited users. Each user entry includes their email address, owner status, current invitation status, and feature access levels for marketing, CRM, and conversations. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -441,6 +451,8 @@ async def put_revoke_user_permission( self, email: str, *, request_options: typing.Optional[RequestOptions] = None ) -> PutRevokeUserPermissionResponse: """ + Revokes all permissions for an invited user in the organization, effectively removing their access to the platform. If the user''s plan change generated credit notes, they are returned in the response for billing reconciliation. + Parameters ---------- email : str @@ -606,6 +618,8 @@ async def putresendcancelinvitation( request_options: typing.Optional[RequestOptions] = None, ) -> PutresendcancelinvitationResponse: """ + Resends or cancels a pending invitation for a user in the organization, depending on the action path parameter. Use `resend` to send a new invitation email to the user, or `cancel` to revoke the pending invitation entirely and remove the user''s pending access. + Parameters ---------- action : PutresendcancelinvitationRequestAction @@ -770,6 +784,8 @@ async def get_user_permission( self, email: str, *, request_options: typing.Optional[RequestOptions] = None ) -> GetUserPermissionResponse: """ + Retrieves the granular feature-level permissions assigned to a specific user in the organization, identified by their email address. The response includes the user''s current status (active or pending) and a detailed list of privileges specifying which features and permission levels are granted. + Parameters ---------- email : str diff --git a/src/brevo/user/raw_client.py b/src/brevo/user/raw_client.py index e28d8b7..7c5ffd2 100644 --- a/src/brevo/user/raw_client.py +++ b/src/brevo/user/raw_client.py @@ -35,6 +35,8 @@ def get_invited_users_list( self, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[GetInvitedUsersListResponse]: """ + Retrieves the list of all users associated with your organization, including both active and pending invited users. Each user entry includes their email address, owner status, current invitation status, and feature access levels for marketing, CRM, and conversations. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -84,6 +86,8 @@ def put_revoke_user_permission( self, email: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[PutRevokeUserPermissionResponse]: """ + Revokes all permissions for an invited user in the organization, effectively removing their access to the platform. If the user''s plan change generated credit notes, they are returned in the response for billing reconciliation. + Parameters ---------- email : str @@ -282,6 +286,8 @@ def putresendcancelinvitation( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PutresendcancelinvitationResponse]: """ + Resends or cancels a pending invitation for a user in the organization, depending on the action path parameter. Use `resend` to send a new invitation email to the user, or `cancel` to revoke the pending invitation entirely and remove the user''s pending access. + Parameters ---------- action : PutresendcancelinvitationRequestAction @@ -478,6 +484,8 @@ def get_user_permission( self, email: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[GetUserPermissionResponse]: """ + Retrieves the granular feature-level permissions assigned to a specific user in the organization, identified by their email address. The response includes the user''s current status (active or pending) and a detailed list of privileges specifying which features and permission levels are granted. + Parameters ---------- email : str @@ -535,6 +543,8 @@ async def get_invited_users_list( self, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[GetInvitedUsersListResponse]: """ + Retrieves the list of all users associated with your organization, including both active and pending invited users. Each user entry includes their email address, owner status, current invitation status, and feature access levels for marketing, CRM, and conversations. + Parameters ---------- request_options : typing.Optional[RequestOptions] @@ -584,6 +594,8 @@ async def put_revoke_user_permission( self, email: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[PutRevokeUserPermissionResponse]: """ + Revokes all permissions for an invited user in the organization, effectively removing their access to the platform. If the user''s plan change generated credit notes, they are returned in the response for billing reconciliation. + Parameters ---------- email : str @@ -782,6 +794,8 @@ async def putresendcancelinvitation( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PutresendcancelinvitationResponse]: """ + Resends or cancels a pending invitation for a user in the organization, depending on the action path parameter. Use `resend` to send a new invitation email to the user, or `cancel` to revoke the pending invitation entirely and remove the user''s pending access. + Parameters ---------- action : PutresendcancelinvitationRequestAction @@ -978,6 +992,8 @@ async def get_user_permission( self, email: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[GetUserPermissionResponse]: """ + Retrieves the granular feature-level permissions assigned to a specific user in the organization, identified by their email address. The response includes the user''s current status (active or pending) and a detailed list of privileges specifying which features and permission levels are granted. + Parameters ---------- email : str diff --git a/src/brevo/webhooks/client.py b/src/brevo/webhooks/client.py index de76f7c..65df9b9 100644 --- a/src/brevo/webhooks/client.py +++ b/src/brevo/webhooks/client.py @@ -96,13 +96,13 @@ def get_webhooks( def create_webhook( self, *, - events: typing.Sequence[CreateWebhookRequestEventsItem], url: str, auth: typing.Optional[CreateWebhookRequestAuth] = OMIT, batched: typing.Optional[bool] = OMIT, channel: typing.Optional[CreateWebhookRequestChannel] = OMIT, description: typing.Optional[str] = OMIT, domain: typing.Optional[str] = OMIT, + events: typing.Optional[typing.Sequence[CreateWebhookRequestEventsItem]] = OMIT, headers: typing.Optional[typing.Sequence[CreateWebhookRequestHeadersItem]] = OMIT, type: typing.Optional[CreateWebhookRequestType] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -123,24 +123,6 @@ def create_webhook( Parameters ---------- - events : typing.Sequence[CreateWebhookRequestEventsItem] - - Events triggering the webhook. Possible values for - **Transactional** type webhook: #### `sent` OR `request`, - `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, - `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and - `unsubscribed` - Possible values for **Marketing** type webhook: - #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, - `unsubscribed`, `listAddition` & `delivered` - Possible values - for **Inbound** type webhook: #### `inboundEmailProcessed` - - Possible values for type **Transactional** and channel **SMS** - #### - `accepted`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`, - `subscribe`,`sent`,`blacklisted`,`skip` - Possible values for - type **Marketing** channel **SMS** #### - `sent`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`, - `subscribe`,`skip` - #### `reply` - url : str URL of the webhook @@ -151,7 +133,7 @@ def create_webhook( To send batched webhooks channel : typing.Optional[CreateWebhookRequestChannel] - channel of webhook + Channel of the webhook description : typing.Optional[str] Description of the webhook @@ -160,6 +142,18 @@ def create_webhook( Inbound domain of webhook, required in case of event type `inbound` + events : typing.Optional[typing.Sequence[CreateWebhookRequestEventsItem]] + Events triggering the webhook. Required for transactional and + marketing types, optional for inbound type (defaults to + `inboundEmailProcessed`). Possible values for **Transactional** + type webhook: `sent` OR `request`, `delivered`, `hardBounce`, + `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, + `opened`, `uniqueOpened` and `unsubscribed`. Possible values for + **Marketing** type webhook: `spam`, `opened`, `click`, + `hardBounce`, `softBounce`, `unsubscribed`, `listAddition`, + `delivered`, `contactUpdated` & `contactDeleted`. Possible values + for **Inbound** type webhook: `inboundEmailProcessed`. + headers : typing.Optional[typing.Sequence[CreateWebhookRequestHeadersItem]] Custom headers to be send with webhooks @@ -182,18 +176,17 @@ def create_webhook( api_key="YOUR_API_KEY", ) client.webhooks.create_webhook( - events=["sent"], url="http://requestb.in/173lyyx1", ) """ _response = self._raw_client.create_webhook( - events=events, url=url, auth=auth, batched=batched, channel=channel, description=description, domain=domain, + events=events, headers=headers, type=type, request_options=request_options, @@ -209,7 +202,7 @@ def export_webhooks_history( days: typing.Optional[int] = OMIT, email: typing.Optional[str] = OMIT, end_date: typing.Optional[str] = OMIT, - message_id: typing.Optional[int] = OMIT, + message_id: typing.Optional[str] = OMIT, sort: typing.Optional[str] = OMIT, start_date: typing.Optional[str] = OMIT, webhook_id: typing.Optional[int] = OMIT, @@ -249,7 +242,7 @@ def export_webhooks_history( Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate - message_id : typing.Optional[int] + message_id : typing.Optional[str] Filter the history for a specific message id. Applicable only for transactional webhooks. @@ -553,13 +546,13 @@ async def main() -> None: async def create_webhook( self, *, - events: typing.Sequence[CreateWebhookRequestEventsItem], url: str, auth: typing.Optional[CreateWebhookRequestAuth] = OMIT, batched: typing.Optional[bool] = OMIT, channel: typing.Optional[CreateWebhookRequestChannel] = OMIT, description: typing.Optional[str] = OMIT, domain: typing.Optional[str] = OMIT, + events: typing.Optional[typing.Sequence[CreateWebhookRequestEventsItem]] = OMIT, headers: typing.Optional[typing.Sequence[CreateWebhookRequestHeadersItem]] = OMIT, type: typing.Optional[CreateWebhookRequestType] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -580,24 +573,6 @@ async def create_webhook( Parameters ---------- - events : typing.Sequence[CreateWebhookRequestEventsItem] - - Events triggering the webhook. Possible values for - **Transactional** type webhook: #### `sent` OR `request`, - `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, - `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and - `unsubscribed` - Possible values for **Marketing** type webhook: - #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, - `unsubscribed`, `listAddition` & `delivered` - Possible values - for **Inbound** type webhook: #### `inboundEmailProcessed` - - Possible values for type **Transactional** and channel **SMS** - #### - `accepted`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`, - `subscribe`,`sent`,`blacklisted`,`skip` - Possible values for - type **Marketing** channel **SMS** #### - `sent`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`, - `subscribe`,`skip` - #### `reply` - url : str URL of the webhook @@ -608,7 +583,7 @@ async def create_webhook( To send batched webhooks channel : typing.Optional[CreateWebhookRequestChannel] - channel of webhook + Channel of the webhook description : typing.Optional[str] Description of the webhook @@ -617,6 +592,18 @@ async def create_webhook( Inbound domain of webhook, required in case of event type `inbound` + events : typing.Optional[typing.Sequence[CreateWebhookRequestEventsItem]] + Events triggering the webhook. Required for transactional and + marketing types, optional for inbound type (defaults to + `inboundEmailProcessed`). Possible values for **Transactional** + type webhook: `sent` OR `request`, `delivered`, `hardBounce`, + `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, + `opened`, `uniqueOpened` and `unsubscribed`. Possible values for + **Marketing** type webhook: `spam`, `opened`, `click`, + `hardBounce`, `softBounce`, `unsubscribed`, `listAddition`, + `delivered`, `contactUpdated` & `contactDeleted`. Possible values + for **Inbound** type webhook: `inboundEmailProcessed`. + headers : typing.Optional[typing.Sequence[CreateWebhookRequestHeadersItem]] Custom headers to be send with webhooks @@ -644,7 +631,6 @@ async def create_webhook( async def main() -> None: await client.webhooks.create_webhook( - events=["sent"], url="http://requestb.in/173lyyx1", ) @@ -652,13 +638,13 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._raw_client.create_webhook( - events=events, url=url, auth=auth, batched=batched, channel=channel, description=description, domain=domain, + events=events, headers=headers, type=type, request_options=request_options, @@ -674,7 +660,7 @@ async def export_webhooks_history( days: typing.Optional[int] = OMIT, email: typing.Optional[str] = OMIT, end_date: typing.Optional[str] = OMIT, - message_id: typing.Optional[int] = OMIT, + message_id: typing.Optional[str] = OMIT, sort: typing.Optional[str] = OMIT, start_date: typing.Optional[str] = OMIT, webhook_id: typing.Optional[int] = OMIT, @@ -714,7 +700,7 @@ async def export_webhooks_history( Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate - message_id : typing.Optional[int] + message_id : typing.Optional[str] Filter the history for a specific message id. Applicable only for transactional webhooks. diff --git a/src/brevo/webhooks/raw_client.py b/src/brevo/webhooks/raw_client.py index 3175548..f6d4551 100644 --- a/src/brevo/webhooks/raw_client.py +++ b/src/brevo/webhooks/raw_client.py @@ -121,13 +121,13 @@ def get_webhooks( def create_webhook( self, *, - events: typing.Sequence[CreateWebhookRequestEventsItem], url: str, auth: typing.Optional[CreateWebhookRequestAuth] = OMIT, batched: typing.Optional[bool] = OMIT, channel: typing.Optional[CreateWebhookRequestChannel] = OMIT, description: typing.Optional[str] = OMIT, domain: typing.Optional[str] = OMIT, + events: typing.Optional[typing.Sequence[CreateWebhookRequestEventsItem]] = OMIT, headers: typing.Optional[typing.Sequence[CreateWebhookRequestHeadersItem]] = OMIT, type: typing.Optional[CreateWebhookRequestType] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -148,24 +148,6 @@ def create_webhook( Parameters ---------- - events : typing.Sequence[CreateWebhookRequestEventsItem] - - Events triggering the webhook. Possible values for - **Transactional** type webhook: #### `sent` OR `request`, - `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, - `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and - `unsubscribed` - Possible values for **Marketing** type webhook: - #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, - `unsubscribed`, `listAddition` & `delivered` - Possible values - for **Inbound** type webhook: #### `inboundEmailProcessed` - - Possible values for type **Transactional** and channel **SMS** - #### - `accepted`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`, - `subscribe`,`sent`,`blacklisted`,`skip` - Possible values for - type **Marketing** channel **SMS** #### - `sent`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`, - `subscribe`,`skip` - #### `reply` - url : str URL of the webhook @@ -176,7 +158,7 @@ def create_webhook( To send batched webhooks channel : typing.Optional[CreateWebhookRequestChannel] - channel of webhook + Channel of the webhook description : typing.Optional[str] Description of the webhook @@ -185,6 +167,18 @@ def create_webhook( Inbound domain of webhook, required in case of event type `inbound` + events : typing.Optional[typing.Sequence[CreateWebhookRequestEventsItem]] + Events triggering the webhook. Required for transactional and + marketing types, optional for inbound type (defaults to + `inboundEmailProcessed`). Possible values for **Transactional** + type webhook: `sent` OR `request`, `delivered`, `hardBounce`, + `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, + `opened`, `uniqueOpened` and `unsubscribed`. Possible values for + **Marketing** type webhook: `spam`, `opened`, `click`, + `hardBounce`, `softBounce`, `unsubscribed`, `listAddition`, + `delivered`, `contactUpdated` & `contactDeleted`. Possible values + for **Inbound** type webhook: `inboundEmailProcessed`. + headers : typing.Optional[typing.Sequence[CreateWebhookRequestHeadersItem]] Custom headers to be send with webhooks @@ -262,7 +256,7 @@ def export_webhooks_history( days: typing.Optional[int] = OMIT, email: typing.Optional[str] = OMIT, end_date: typing.Optional[str] = OMIT, - message_id: typing.Optional[int] = OMIT, + message_id: typing.Optional[str] = OMIT, sort: typing.Optional[str] = OMIT, start_date: typing.Optional[str] = OMIT, webhook_id: typing.Optional[int] = OMIT, @@ -302,7 +296,7 @@ def export_webhooks_history( Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate - message_id : typing.Optional[int] + message_id : typing.Optional[str] Filter the history for a specific message id. Applicable only for transactional webhooks. @@ -730,13 +724,13 @@ async def get_webhooks( async def create_webhook( self, *, - events: typing.Sequence[CreateWebhookRequestEventsItem], url: str, auth: typing.Optional[CreateWebhookRequestAuth] = OMIT, batched: typing.Optional[bool] = OMIT, channel: typing.Optional[CreateWebhookRequestChannel] = OMIT, description: typing.Optional[str] = OMIT, domain: typing.Optional[str] = OMIT, + events: typing.Optional[typing.Sequence[CreateWebhookRequestEventsItem]] = OMIT, headers: typing.Optional[typing.Sequence[CreateWebhookRequestHeadersItem]] = OMIT, type: typing.Optional[CreateWebhookRequestType] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -757,24 +751,6 @@ async def create_webhook( Parameters ---------- - events : typing.Sequence[CreateWebhookRequestEventsItem] - - Events triggering the webhook. Possible values for - **Transactional** type webhook: #### `sent` OR `request`, - `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, - `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and - `unsubscribed` - Possible values for **Marketing** type webhook: - #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, - `unsubscribed`, `listAddition` & `delivered` - Possible values - for **Inbound** type webhook: #### `inboundEmailProcessed` - - Possible values for type **Transactional** and channel **SMS** - #### - `accepted`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`, - `subscribe`,`sent`,`blacklisted`,`skip` - Possible values for - type **Marketing** channel **SMS** #### - `sent`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`, - `subscribe`,`skip` - #### `reply` - url : str URL of the webhook @@ -785,7 +761,7 @@ async def create_webhook( To send batched webhooks channel : typing.Optional[CreateWebhookRequestChannel] - channel of webhook + Channel of the webhook description : typing.Optional[str] Description of the webhook @@ -794,6 +770,18 @@ async def create_webhook( Inbound domain of webhook, required in case of event type `inbound` + events : typing.Optional[typing.Sequence[CreateWebhookRequestEventsItem]] + Events triggering the webhook. Required for transactional and + marketing types, optional for inbound type (defaults to + `inboundEmailProcessed`). Possible values for **Transactional** + type webhook: `sent` OR `request`, `delivered`, `hardBounce`, + `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, + `opened`, `uniqueOpened` and `unsubscribed`. Possible values for + **Marketing** type webhook: `spam`, `opened`, `click`, + `hardBounce`, `softBounce`, `unsubscribed`, `listAddition`, + `delivered`, `contactUpdated` & `contactDeleted`. Possible values + for **Inbound** type webhook: `inboundEmailProcessed`. + headers : typing.Optional[typing.Sequence[CreateWebhookRequestHeadersItem]] Custom headers to be send with webhooks @@ -871,7 +859,7 @@ async def export_webhooks_history( days: typing.Optional[int] = OMIT, email: typing.Optional[str] = OMIT, end_date: typing.Optional[str] = OMIT, - message_id: typing.Optional[int] = OMIT, + message_id: typing.Optional[str] = OMIT, sort: typing.Optional[str] = OMIT, start_date: typing.Optional[str] = OMIT, webhook_id: typing.Optional[int] = OMIT, @@ -911,7 +899,7 @@ async def export_webhooks_history( Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate - message_id : typing.Optional[int] + message_id : typing.Optional[str] Filter the history for a specific message id. Applicable only for transactional webhooks. diff --git a/src/brevo/webhooks/types/create_webhook_request_channel.py b/src/brevo/webhooks/types/create_webhook_request_channel.py index 1b65098..917c688 100644 --- a/src/brevo/webhooks/types/create_webhook_request_channel.py +++ b/src/brevo/webhooks/types/create_webhook_request_channel.py @@ -2,4 +2,4 @@ import typing -CreateWebhookRequestChannel = typing.Union[typing.Literal["sms", "email"], typing.Any] +CreateWebhookRequestChannel = typing.Union[typing.Literal["email", "sms"], typing.Any] diff --git a/src/brevo/whats_app_campaigns/__init__.py b/src/brevo/whats_app_campaigns/__init__.py index 95a992e..3796674 100644 --- a/src/brevo/whats_app_campaigns/__init__.py +++ b/src/brevo/whats_app_campaigns/__init__.py @@ -14,6 +14,7 @@ CreateWhatsAppTemplateResponse, GetWhatsAppCampaignResponse, GetWhatsAppCampaignResponseCampaignStatus, + GetWhatsAppCampaignResponseRecipients, GetWhatsAppCampaignResponseTemplate, GetWhatsAppCampaignResponseTemplateComponentsItem, GetWhatsAppCampaignsRequestSort, @@ -39,6 +40,7 @@ "CreateWhatsAppTemplateResponse": ".types", "GetWhatsAppCampaignResponse": ".types", "GetWhatsAppCampaignResponseCampaignStatus": ".types", + "GetWhatsAppCampaignResponseRecipients": ".types", "GetWhatsAppCampaignResponseTemplate": ".types", "GetWhatsAppCampaignResponseTemplateComponentsItem": ".types", "GetWhatsAppCampaignsRequestSort": ".types", @@ -87,6 +89,7 @@ def __dir__(): "CreateWhatsAppTemplateResponse", "GetWhatsAppCampaignResponse", "GetWhatsAppCampaignResponseCampaignStatus", + "GetWhatsAppCampaignResponseRecipients", "GetWhatsAppCampaignResponseTemplate", "GetWhatsAppCampaignResponseTemplateComponentsItem", "GetWhatsAppCampaignsRequestSort", diff --git a/src/brevo/whats_app_campaigns/client.py b/src/brevo/whats_app_campaigns/client.py index 31cd13d..34c01b7 100644 --- a/src/brevo/whats_app_campaigns/client.py +++ b/src/brevo/whats_app_campaigns/client.py @@ -50,6 +50,8 @@ def get_whats_app_campaigns( request_options: typing.Optional[RequestOptions] = None, ) -> GetWhatsAppCampaignsResponse: """ + Retrieve a paginated list of all your WhatsApp campaigns with their statistics and metadata. Results can be filtered by creation date range using startDate and endDate, with a default limit of 50 and maximum of 100 per page. The sort order defaults to descending by modification date. + Parameters ---------- start_date : typing.Optional[str] @@ -271,6 +273,8 @@ def get_whats_app_templates( request_options: typing.Optional[RequestOptions] = None, ) -> GetWhatsAppTemplatesResponse: """ + Retrieve a paginated list of all your WhatsApp templates with their status, category, language, and metadata. Results can be filtered by creation date range and optionally by source (Automation or Conversations), with a default limit of 50 and maximum of 100 per page. The sort order defaults to descending by modification date. + Parameters ---------- start_date : typing.Optional[str] @@ -455,6 +459,8 @@ def delete_whats_app_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ + Delete a WhatsApp campaign by its campaign ID. The campaign must exist; if the campaign ID is not found, a 404 error is returned. This action is permanent and cannot be undone. + Parameters ---------- campaign_id : int @@ -508,6 +514,8 @@ async def get_whats_app_campaigns( request_options: typing.Optional[RequestOptions] = None, ) -> GetWhatsAppCampaignsResponse: """ + Retrieve a paginated list of all your WhatsApp campaigns with their statistics and metadata. Results can be filtered by creation date range using startDate and endDate, with a default limit of 50 and maximum of 100 per page. The sort order defaults to descending by modification date. + Parameters ---------- start_date : typing.Optional[str] @@ -761,6 +769,8 @@ async def get_whats_app_templates( request_options: typing.Optional[RequestOptions] = None, ) -> GetWhatsAppTemplatesResponse: """ + Retrieve a paginated list of all your WhatsApp templates with their status, category, language, and metadata. Results can be filtered by creation date range and optionally by source (Automation or Conversations), with a default limit of 50 and maximum of 100 per page. The sort order defaults to descending by modification date. + Parameters ---------- start_date : typing.Optional[str] @@ -979,6 +989,8 @@ async def delete_whats_app_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> None: """ + Delete a WhatsApp campaign by its campaign ID. The campaign must exist; if the campaign ID is not found, a 404 error is returned. This action is permanent and cannot be undone. + Parameters ---------- campaign_id : int diff --git a/src/brevo/whats_app_campaigns/raw_client.py b/src/brevo/whats_app_campaigns/raw_client.py index 3e52023..2736425 100644 --- a/src/brevo/whats_app_campaigns/raw_client.py +++ b/src/brevo/whats_app_campaigns/raw_client.py @@ -48,6 +48,8 @@ def get_whats_app_campaigns( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetWhatsAppCampaignsResponse]: """ + Retrieve a paginated list of all your WhatsApp campaigns with their statistics and metadata. Results can be filtered by creation date range using startDate and endDate, with a default limit of 50 and maximum of 100 per page. The sort order defaults to descending by modification date. + Parameters ---------- start_date : typing.Optional[str] @@ -360,6 +362,8 @@ def get_whats_app_templates( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetWhatsAppTemplatesResponse]: """ + Retrieve a paginated list of all your WhatsApp templates with their status, category, language, and metadata. Results can be filtered by creation date range and optionally by source (Automation or Conversations), with a default limit of 50 and maximum of 100 per page. The sort order defaults to descending by modification date. + Parameters ---------- start_date : typing.Optional[str] @@ -632,6 +636,8 @@ def delete_whats_app_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[None]: """ + Delete a WhatsApp campaign by its campaign ID. The campaign must exist; if the campaign ID is not found, a 404 error is returned. This action is permanent and cannot be undone. + Parameters ---------- campaign_id : int @@ -699,6 +705,8 @@ async def get_whats_app_campaigns( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetWhatsAppCampaignsResponse]: """ + Retrieve a paginated list of all your WhatsApp campaigns with their statistics and metadata. Results can be filtered by creation date range using startDate and endDate, with a default limit of 50 and maximum of 100 per page. The sort order defaults to descending by modification date. + Parameters ---------- start_date : typing.Optional[str] @@ -1011,6 +1019,8 @@ async def get_whats_app_templates( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetWhatsAppTemplatesResponse]: """ + Retrieve a paginated list of all your WhatsApp templates with their status, category, language, and metadata. Results can be filtered by creation date range and optionally by source (Automation or Conversations), with a default limit of 50 and maximum of 100 per page. The sort order defaults to descending by modification date. + Parameters ---------- start_date : typing.Optional[str] @@ -1283,6 +1293,8 @@ async def delete_whats_app_campaign( self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[None]: """ + Delete a WhatsApp campaign by its campaign ID. The campaign must exist; if the campaign ID is not found, a 404 error is returned. This action is permanent and cannot be undone. + Parameters ---------- campaign_id : int diff --git a/src/brevo/whats_app_campaigns/types/__init__.py b/src/brevo/whats_app_campaigns/types/__init__.py index 63de237..28fb7a0 100644 --- a/src/brevo/whats_app_campaigns/types/__init__.py +++ b/src/brevo/whats_app_campaigns/types/__init__.py @@ -13,6 +13,7 @@ from .create_whats_app_template_response import CreateWhatsAppTemplateResponse from .get_whats_app_campaign_response import GetWhatsAppCampaignResponse from .get_whats_app_campaign_response_campaign_status import GetWhatsAppCampaignResponseCampaignStatus + from .get_whats_app_campaign_response_recipients import GetWhatsAppCampaignResponseRecipients from .get_whats_app_campaign_response_template import GetWhatsAppCampaignResponseTemplate from .get_whats_app_campaign_response_template_components_item import ( GetWhatsAppCampaignResponseTemplateComponentsItem, @@ -43,6 +44,7 @@ "CreateWhatsAppTemplateResponse": ".create_whats_app_template_response", "GetWhatsAppCampaignResponse": ".get_whats_app_campaign_response", "GetWhatsAppCampaignResponseCampaignStatus": ".get_whats_app_campaign_response_campaign_status", + "GetWhatsAppCampaignResponseRecipients": ".get_whats_app_campaign_response_recipients", "GetWhatsAppCampaignResponseTemplate": ".get_whats_app_campaign_response_template", "GetWhatsAppCampaignResponseTemplateComponentsItem": ".get_whats_app_campaign_response_template_components_item", "GetWhatsAppCampaignsRequestSort": ".get_whats_app_campaigns_request_sort", @@ -91,6 +93,7 @@ def __dir__(): "CreateWhatsAppTemplateResponse", "GetWhatsAppCampaignResponse", "GetWhatsAppCampaignResponseCampaignStatus", + "GetWhatsAppCampaignResponseRecipients", "GetWhatsAppCampaignResponseTemplate", "GetWhatsAppCampaignResponseTemplateComponentsItem", "GetWhatsAppCampaignsRequestSort", diff --git a/src/brevo/whats_app_campaigns/types/get_whats_app_campaign_response.py b/src/brevo/whats_app_campaigns/types/get_whats_app_campaign_response.py index 4c620b3..4030173 100644 --- a/src/brevo/whats_app_campaigns/types/get_whats_app_campaign_response.py +++ b/src/brevo/whats_app_campaigns/types/get_whats_app_campaign_response.py @@ -9,6 +9,7 @@ from ...core.unchecked_base_model import UncheckedBaseModel from ...types.whatsapp_camp_stats import WhatsappCampStats from .get_whats_app_campaign_response_campaign_status import GetWhatsAppCampaignResponseCampaignStatus +from .get_whats_app_campaign_response_recipients import GetWhatsAppCampaignResponseRecipients from .get_whats_app_campaign_response_template import GetWhatsAppCampaignResponseTemplate @@ -51,6 +52,11 @@ class GetWhatsAppCampaignResponse(UncheckedBaseModel): description="UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format", ), ] = None + recipients: GetWhatsAppCampaignResponseRecipients = pydantic.Field() + """ + Recipients of the WhatsApp Campaign + """ + sender_number: typing_extensions.Annotated[ str, FieldMetadata(alias="senderNumber"), diff --git a/src/brevo/whats_app_campaigns/types/get_whats_app_campaign_response_recipients.py b/src/brevo/whats_app_campaigns/types/get_whats_app_campaign_response_recipients.py new file mode 100644 index 0000000..7f8e2e1 --- /dev/null +++ b/src/brevo/whats_app_campaigns/types/get_whats_app_campaign_response_recipients.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.serialization import FieldMetadata +from ...core.unchecked_base_model import UncheckedBaseModel + + +class GetWhatsAppCampaignResponseRecipients(UncheckedBaseModel): + """ + Recipients of the WhatsApp Campaign + """ + + excluded_lists: typing_extensions.Annotated[ + typing.Optional[typing.List[int]], + FieldMetadata(alias="excludedLists"), + pydantic.Field(alias="excludedLists", description="List of excluded list IDs"), + ] = None + included_lists: typing_extensions.Annotated[ + typing.Optional[typing.List[int]], + FieldMetadata(alias="includedLists"), + pydantic.Field(alias="includedLists", description="List of included list IDs"), + ] = None + segments: typing.Optional[typing.List[int]] = pydantic.Field(default=None) + """ + List of segment IDs + """ + + type: typing.Optional[str] = pydantic.Field(default=None) + """ + Type of recipients (list or segment) + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/brevo/whats_app_campaigns/types/get_whats_app_templates_response_templates_item.py b/src/brevo/whats_app_campaigns/types/get_whats_app_templates_response_templates_item.py index 7bedbcc..0fa1341 100644 --- a/src/brevo/whats_app_campaigns/types/get_whats_app_templates_response_templates_item.py +++ b/src/brevo/whats_app_campaigns/types/get_whats_app_templates_response_templates_item.py @@ -55,6 +55,11 @@ class GetWhatsAppTemplatesResponseTemplatesItem(UncheckedBaseModel): Status of the whatsApp template """ + type: str = pydantic.Field() + """ + Type of the whatsApp template + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/tests/wire/test_balance.py b/tests/wire/test_balance.py index 0a006fc..b9c933a 100644 --- a/tests/wire/test_balance.py +++ b/tests/wire/test_balance.py @@ -7,14 +7,14 @@ def test_balance_get_active_balances_api() -> None: client = get_client(test_id) client.balance.get_active_balances_api( pid="pid", - contact_id=1, - balance_definition_id="balance_definition_id", + contact_id=1000000, + balance_definition_id="balanceDefinitionId", ) verify_request_count( test_id, "GET", "/loyalty/balance/programs/pid/active-balance", - {"contact_id": "1", "balance_definition_id": "balance_definition_id"}, + {"contactId": "1000000", "balanceDefinitionId": "balanceDefinitionId"}, 1, ) @@ -141,8 +141,15 @@ def test_balance_get_contact_balances() -> None: client = get_client(test_id) client.balance.get_contact_balances( pid="pid", + balance_definition_id="balanceDefinitionId", + ) + verify_request_count( + test_id, + "GET", + "/loyalty/balance/programs/pid/contact-balances", + {"balanceDefinitionId": "balanceDefinitionId"}, + 1, ) - verify_request_count(test_id, "GET", "/loyalty/balance/programs/pid/contact-balances", None, 1) def test_balance_create_balance_order() -> None: @@ -155,7 +162,7 @@ def test_balance_create_balance_order() -> None: balance_definition_id="balanceDefinitionId", contact_id=1, due_at="dueAt", - source="source", + source="engine", ) verify_request_count(test_id, "POST", "/loyalty/balance/programs/pid/create-order", None, 1) @@ -189,14 +196,14 @@ def test_balance_get_transaction_history_api() -> None: client = get_client(test_id) client.balance.get_transaction_history_api( pid="pid", - contact_id=1, + contact_id=1000000, balance_definition_id="balanceDefinitionId", ) verify_request_count( test_id, "GET", "/loyalty/balance/programs/pid/transaction-history", - {"contactId": "1", "balanceDefinitionId": "balanceDefinitionId"}, + {"contactId": "1000000", "balanceDefinitionId": "balanceDefinitionId"}, 1, ) diff --git a/tests/wire/test_conversations.py b/tests/wire/test_conversations.py index 1db3995..5ae0910 100644 --- a/tests/wire/test_conversations.py +++ b/tests/wire/test_conversations.py @@ -60,7 +60,7 @@ def test_conversations_send_an_automated_message_to_a_visitor() -> None: client = get_client(test_id) client.conversations.send_an_automated_message_to_a_visitor( group_id="PjRBMhWGen6aRHjif", - text="Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88", + text="Your order has shipped! Here's your tracking number: 9114 5847 3325 9667 4328 88", visitor_id="kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", ) verify_request_count(test_id, "POST", "/conversations/pushedMessages", None, 1) @@ -82,7 +82,7 @@ def test_conversations_update_an_automated_message() -> None: client = get_client(test_id) client.conversations.update_an_automated_message( id="id", - text="Your order has shipped! Here’s your tracking number: 9114 5847 4668 7775 9233 54", + text="Your order has shipped! Here's your tracking number: 9114 5847 4668 7775 9233 54", ) verify_request_count(test_id, "PUT", "/conversations/pushedMessages/id", None, 1) diff --git a/tests/wire/test_ecommerce.py b/tests/wire/test_ecommerce.py index be1d947..7566ae7 100644 --- a/tests/wire/test_ecommerce.py +++ b/tests/wire/test_ecommerce.py @@ -63,12 +63,13 @@ def test_ecommerce_get_attribution_metrics_for_one_or_more_brevo_campaigns_or_wo client.ecommerce.get_attribution_metrics_for_one_or_more_brevo_campaigns_or_workflows( period_from=datetime.datetime.fromisoformat("2022-01-02T00:00:00+00:00"), period_to=datetime.datetime.fromisoformat("2022-01-03T00:00:00+00:00"), + email_campaign_id_array=["sale"], ) verify_request_count( test_id, "GET", "/ecommerce/attribution/metrics", - {"periodFrom": "2022-01-02T00:00:00Z", "periodTo": "2022-01-03T00:00:00Z"}, + {"periodFrom": "2022-01-02T00:00:00Z", "periodTo": "2022-01-03T00:00:00Z", "emailCampaignId[]": "sale"}, 1, ) diff --git a/tests/wire/test_event.py b/tests/wire/test_event.py index 7665eab..bb9593c 100644 --- a/tests/wire/test_event.py +++ b/tests/wire/test_event.py @@ -1,8 +1,8 @@ from .conftest import get_client, verify_request_count from brevo.event import ( - CreateBatchEventsRequestItem, - CreateBatchEventsRequestItemIdentifiers, + CreateBatchEventsRequestEventsItem, + CreateBatchEventsRequestEventsItemIdentifiers, CreateEventRequestIdentifiers, ) @@ -31,10 +31,10 @@ def test_event_create_batch_events() -> None: test_id = "event.create_batch_events.0" client = get_client(test_id) client.event.create_batch_events( - request=[ - CreateBatchEventsRequestItem( + events=[ + CreateBatchEventsRequestEventsItem( event_name="order_created", - identifiers=CreateBatchEventsRequestItemIdentifiers(), + identifiers=CreateBatchEventsRequestEventsItemIdentifiers(), ) ], ) diff --git a/tests/wire/test_notes.py b/tests/wire/test_notes.py index 0fa43c5..6eae1c5 100644 --- a/tests/wire/test_notes.py +++ b/tests/wire/test_notes.py @@ -14,7 +14,7 @@ def test_notes_create_a_note() -> None: test_id = "notes.create_a_note.0" client = get_client(test_id) client.notes.create_a_note( - text="In communication with client_dev for resolution of queries.", + text='

Meeting notes: Action item - visit Brevo for details.

', ) verify_request_count(test_id, "POST", "/crm/notes", None, 1) @@ -45,6 +45,6 @@ def test_notes_update_a_note() -> None: client = get_client(test_id) client.notes.update_a_note( id="id", - text="In communication with client_dev for resolution of queries.", + text='

Meeting notes: Action item - visit Brevo for details.

', ) verify_request_count(test_id, "PATCH", "/crm/notes/id", None, 1) diff --git a/tests/wire/test_program.py b/tests/wire/test_program.py index d784fce..057f88e 100644 --- a/tests/wire/test_program.py +++ b/tests/wire/test_program.py @@ -125,6 +125,6 @@ def test_program_subscribe_to_loyalty_program() -> None: client = get_client(test_id) client.program.subscribe_to_loyalty_program( pid="pid", - contact_id=1, + contact_id=1000000, ) verify_request_count(test_id, "POST", "/loyalty/config/programs/pid/subscriptions", None, 1) diff --git a/tests/wire/test_tasks.py b/tests/wire/test_tasks.py index c12502d..70b78b5 100644 --- a/tests/wire/test_tasks.py +++ b/tests/wire/test_tasks.py @@ -19,7 +19,7 @@ def test_tasks_create_a_task() -> None: client = get_client(test_id) client.tasks.create_a_task( date=datetime.datetime.fromisoformat("2021-11-01T17:44:54+00:00"), - name="Task: Connect with client_dev", + name="Task: Connect with client", task_type_id="61a5cd07ca1347c82306ad09", ) verify_request_count(test_id, "POST", "/crm/tasks", None, 1) diff --git a/tests/wire/test_webhooks.py b/tests/wire/test_webhooks.py index e875d03..59665a3 100644 --- a/tests/wire/test_webhooks.py +++ b/tests/wire/test_webhooks.py @@ -14,7 +14,6 @@ def test_webhooks_create_webhook() -> None: test_id = "webhooks.create_webhook.0" client = get_client(test_id) client.webhooks.create_webhook( - events=["sent"], url="http://requestb.in/173lyyx1", ) verify_request_count(test_id, "POST", "/webhooks", None, 1) diff --git a/wiremock/wiremock-mappings.json b/wiremock/wiremock-mappings.json index 7051053..123f67a 100644 --- a/wiremock/wiremock-mappings.json +++ b/wiremock/wiremock-mappings.json @@ -1 +1 @@ -{"mappings":[{"id":"1211c905-93ae-4aa1-a220-5b0994166727","name":"Get account details - default","request":{"urlPathTemplate":"/account","method":"GET"},"response":{"status":200,"body":"{\n \"organization_id\": \"5fa2b8c123456789abcdef01\",\n \"user_id\": 1234567,\n \"enterprise\": false,\n \"companyName\": \"Acme Marketing Corp\",\n \"email\": \"michael.davis@example.com\",\n \"firstName\": \"Michael\",\n \"lastName\": \"Davis\",\n \"address\": {\n \"city\": \"New York\",\n \"country\": \"United States\",\n \"street\": \"456 Business Ave\",\n \"zipCode\": \"10001\"\n },\n \"dateTimePreferences\": {\n \"timezone\": \"America/New_York\",\n \"timeFormat\": \"12\",\n \"dateFormat\": \"mm-dd-yyyy\"\n },\n \"marketingAutomation\": {\n \"enabled\": true,\n \"key\": \"ma8k2x9v4h7p3d6f1c5e8b2a\"\n },\n \"plan\": [\n {\n \"credits\": 250,\n \"creditsType\": \"sendLimit\",\n \"endDate\": \"1753826567\",\n \"startDate\": \"1751234567\",\n \"type\": \"free\"\n },\n {\n \"credits\": 15,\n \"creditsType\": \"sendLimit\",\n \"endDate\": \"1753826567\",\n \"startDate\": \"1751234567\",\n \"type\": \"sms\"\n }\n ],\n \"planVerticals\": [\n {\n \"planCategory\": \"Marketing\",\n \"planType\": \"free\",\n \"name\": \"Free\",\n \"status\": \"active\",\n \"startDate\": \"1751234567\",\n \"endDate\": \"1753826567\",\n \"users\": {\n \"purchasedSeats\": \"1\",\n \"usedSeats\": \"1\"\n },\n \"credits\": \"250\"\n },\n {\n \"planCategory\": \"Chat\",\n \"planType\": \"free\",\n \"name\": \"Free\",\n \"status\": \"active\",\n \"startDate\": \"1735678901\",\n \"endDate\": \"1767214901\",\n \"users\": {\n \"purchasedSeats\": \"1\",\n \"usedSeats\": \"1\"\n },\n \"credits\": \"250\"\n },\n {\n \"planCategory\": \"CRM\",\n \"planType\": \"free\",\n \"name\": \"Free\",\n \"status\": \"active\",\n \"startDate\": \"1735678900\",\n \"endDate\": \"1767214900\",\n \"users\": {\n \"purchasedSeats\": \"1\",\n \"usedSeats\": \"1\"\n },\n \"credits\": \"250\"\n }\n ],\n \"relay\": {\n \"data\": {\n \"port\": 587,\n \"relay\": \"smtp-relay.brevo.com\",\n \"userName\": \"michael.davis@example.com\"\n },\n \"enabled\": true\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"1211c905-93ae-4aa1-a220-5b0994166727","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"8875a0d0-f755-470c-bb61-f8ad06810a28","name":"getAccountActivity - default","request":{"urlPathTemplate":"/organization/activities","method":"GET"},"response":{"status":200,"body":"{\n \"logs\": [\n {\n \"action\": \"login-success\",\n \"date\": \"2023-03-16T16:49:23+05:30\",\n \"user_agent\": \"Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)\",\n \"user_email\": \"test@mycompany.com\",\n \"user_ip\": \"192.158.1.34\"\n },\n {\n \"action\": \"update-profile\",\n \"date\": \"2023-03-15T16:49:23+05:30\",\n \"user_agent\": \"Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)\",\n \"user_email\": \"test@myexample.com\",\n \"user_ip\": \"192.158.1.38\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"8875a0d0-f755-470c-bb61-f8ad06810a28","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"22e8ec1f-e4ba-4f4b-996b-17fb7412b82b","name":"Create a new group of sub-accounts - default","request":{"urlPathTemplate":"/corporate/group","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"659xxxxxxxxxxxxxxxx6ef9c8\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"22e8ec1f-e4ba-4f4b-996b-17fb7412b82b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"553c0be2-9f70-4b5f-867b-1d2543c96f46","name":"Delete sub-account from group - default","request":{"urlPathTemplate":"/corporate/group/unlink/{groupId}/subAccounts","method":"PUT","pathParameters":{"groupId":{"equalTo":"groupId"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"553c0be2-9f70-4b5f-867b-1d2543c96f46","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"569cac67-bd04-4628-af18-b29f58c3426a","name":"GET a group details - default","request":{"urlPathTemplate":"/corporate/group/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"group\": {\n \"createdAt\": \"2024-02-09T06:14:40+00:00\",\n \"groupName\": \"My group\",\n \"id\": \"5f926dba72a405440a4efc97\"\n },\n \"sub-accounts\": [\n {\n \"companyName\": \"My sub organization\",\n \"createdAt\": \"2024-02-09T06:14:40+00:00\",\n \"id\": 7866556\n },\n {\n \"companyName\": \"Your sub organization\",\n \"createdAt\": \"2024-01-05T03:11:40+00:00\",\n \"id\": 6563051\n }\n ],\n \"users\": [\n {\n \"email\": \"my-user@my-org.com\",\n \"firstName\": \"John\",\n \"lastName\": \"Smith\"\n },\n {\n \"email\": \"your-user@your-org.com\",\n \"firstName\": \"firstName\",\n \"lastName\": \"lastName\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"569cac67-bd04-4628-af18-b29f58c3426a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"15046c07-f5ad-4826-99a4-368a6abcc9d5","name":"Update a group of sub-accounts - default","request":{"urlPathTemplate":"/corporate/group/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"15046c07-f5ad-4826-99a4-368a6abcc9d5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"204960c9-0571-4a3d-a030-f9779c6aea08","name":"Delete a group - default","request":{"urlPathTemplate":"/corporate/group/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"204960c9-0571-4a3d-a030-f9779c6aea08","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d15212a9-7d53-42ef-996e-cbae118ba999","name":"Get the list of groups - default","request":{"urlPathTemplate":"/corporate/groups","method":"GET"},"response":{"status":200,"body":"[\n {\n \"groupName\": \"My group 1\",\n \"id\": \"d3b142c709d6ed67ef1cd903\"\n },\n {\n \"groupName\": \"My group 2\",\n \"id\": \"a5b192a709d6ed67ef8fd922\"\n },\n {\n \"groupName\": \"My group 3\",\n \"id\": \"bbb142c709d6ed67ef1cd910\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"d15212a9-7d53-42ef-996e-cbae118ba999","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"431c56cb-581f-459e-a434-b2378dfbb177","name":"Get the list of all admin users - default","request":{"urlPathTemplate":"/corporate/invited/users","method":"GET"},"response":{"status":200,"body":"{\n \"users\": [\n {\n \"email\": \"master-user2@company.com\",\n \"feature_access\": {\n \"analytics\": [\n \"download_data\",\n \"create_alerts\",\n \"my_looks\",\n \"explore_create\"\n ],\n \"api_keys\": [\n \"all\"\n ],\n \"apps_management\": [\n \"none\"\n ],\n \"create_sub_organizations\": [\n \"all\"\n ],\n \"manage_sub_organizations\": [\n \"all\"\n ],\n \"my_plan\": [\n \"all\",\n \"all\"\n ],\n \"sub_organization_groups\": [\n \"create\",\n \"edit_delete\"\n ],\n \"user_management\": [\n \"none\"\n ]\n },\n \"groups\": {\n \"id\": \"a5c4f22c08d9ed37ef1ca342\",\n \"name\": \"My group\"\n },\n \"is_owner\": \"is_owner\",\n \"status\": \"active\"\n },\n {\n \"email\": \"master-user3@company.com\",\n \"feature_access\": {\n \"analytics\": [\n \"create_alerts\",\n \"my_looks\"\n ],\n \"api_keys\": [\n \"none\"\n ],\n \"apps_management\": [\n \"all\"\n ],\n \"create_sub_organizations\": [\n \"all\"\n ],\n \"manage_sub_organizations\": [\n \"all\"\n ],\n \"my_plan\": [\n \"none\",\n \"none\"\n ],\n \"sub_organization_groups\": [\n \"edit_delete\"\n ],\n \"user_management\": [\n \"all\"\n ]\n },\n \"groups\": {\n \"id\": \"a5c4f22c08d9ed37ef1ca342\",\n \"name\": \"My group\"\n },\n \"is_owner\": \"is_owner\",\n \"status\": \"active\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"431c56cb-581f-459e-a434-b2378dfbb177","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"47be7c71-5117-47ca-8146-e166b37fbd89","name":"List of all IPs - default","request":{"urlPathTemplate":"/corporate/ip","method":"GET"},"response":{"status":200,"body":"[\n {\n \"domain\": \"example.com\",\n \"ip\": \"192.168.1.1\",\n \"transactional\": true\n },\n {\n \"domain\": \"example.com\",\n \"ip\": \"192.168.1.2\",\n \"transactional\": false\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"47be7c71-5117-47ca-8146-e166b37fbd89","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"c8f6e272-2e8b-4912-b109-ef644f37c748","name":"Get the details of requested master account - default","request":{"urlPathTemplate":"/corporate/masterAccount","method":"GET"},"response":{"status":200,"body":"{\n \"billingInfo\": {\n \"address\": {\n \"countryCode\": \"IN\",\n \"locality\": \"Pandav Nagar, New Delhi\",\n \"postalCode\": \"560048\",\n \"stateCode\": \"UP\",\n \"streetAddress\": \"C-92\"\n },\n \"companyName\": \"Corp Sample 1-1\",\n \"email\": \"sample@example.com\",\n \"name\": {\n \"familyName\": \"Pandit\",\n \"givenName\": \"Uday\"\n }\n },\n \"companyName\": \"Corp Sample 1-1\",\n \"currencyCode\": \"INR\",\n \"email\": \"sample@example.com\",\n \"id\": 1003286,\n \"planInfo\": {\n \"currencyCode\": \"INR\",\n \"features\": [\n {\n \"name\": \"MULTI_USER\",\n \"quantity\": 10,\n \"remaining\": 0,\n \"unitValue\": \"unitValue\",\n \"used\": 15\n },\n {\n \"name\": \"ADVANCED_REPORTING\",\n \"quantity\": 12,\n \"remaining\": 11,\n \"unitValue\": \"unitValue\",\n \"used\": 1\n },\n {\n \"name\": \"INBOX\",\n \"quantity\": 10,\n \"remaining\": 0,\n \"unitValue\": \"unitValue\",\n \"used\": 10\n },\n {\n \"name\": \"LANDING_PAGE\",\n \"quantity\": 10,\n \"remaining\": 0,\n \"unitValue\": \"unitValue\",\n \"used\": 11\n },\n {\n \"name\": \"RECURRING_CREDITS\",\n \"quantity\": 500,\n \"remaining\": 499,\n \"unitValue\": \"unitValue\",\n \"used\": 1\n }\n ],\n \"nextBillingAt\": 1637739295,\n \"planPeriod\": \"month\",\n \"price\": 2100,\n \"subAccounts\": 15\n },\n \"timezone\": \"Europe/Paris\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c8f6e272-2e8b-4912-b109-ef644f37c748","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"8fea4e4d-838b-4875-b315-9790bd457518","name":"Generate SSO token to access admin account - default","request":{"urlPathTemplate":"/corporate/ssoToken","method":"POST"},"response":{"status":200,"body":"{\n \"token\": \"5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8fea4e4d-838b-4875-b315-9790bd457518","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"45b2935e-aecb-4ad4-8888-9a0e585bcd23","name":"Get the list of all the sub-accounts of the master account. - default","request":{"urlPathTemplate":"/corporate/subAccount","method":"GET","queryParameters":{"offset":{"equalTo":"1"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"count\": 3,\n \"subAccounts\": [\n {\n \"active\": true,\n \"companyName\": \"Company1\",\n \"createdAt\": 1631523176,\n \"groups\": [\n {\n \"id\": \"5f8f8c3b5f56a02d4433b3a8\",\n \"name\": \"Group 1\"\n },\n {\n \"id\": \"4fbf3c3b1f56a02ac465b1a0\",\n \"name\": \"Group 2\"\n }\n ],\n \"id\": 4043629\n },\n {\n \"active\": true,\n \"companyName\": \"Company2\",\n \"createdAt\": 1629439311,\n \"groups\": [\n {}\n ],\n \"id\": 3984002\n },\n {\n \"active\": true,\n \"companyName\": \"Company3\",\n \"createdAt\": 1614713641,\n \"groups\": [\n {}\n ],\n \"id\": 3524191\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"45b2935e-aecb-4ad4-8888-9a0e585bcd23","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"27e8ff22-470d-462b-a9e2-6cd1c428b361","name":"Create a new sub-account under a master account. - default","request":{"urlPathTemplate":"/corporate/subAccount","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 4109344\n}","headers":{"Content-Type":"application/json"}},"uuid":"27e8ff22-470d-462b-a9e2-6cd1c428b361","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0b1c8ee5-ea29-4bb0-a233-53d0ff4d86fa","name":"Associate an IP to sub-accounts - default","request":{"urlPathTemplate":"/corporate/subAccount/ip/associate","method":"POST"},"response":{"status":201,"body":"{\n \"key\": \"value\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"0b1c8ee5-ea29-4bb0-a233-53d0ff4d86fa","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b9524079-a627-4ed4-8f2a-abb0390700aa","name":"Dissociate an IP to sub-accounts - default","request":{"urlPathTemplate":"/corporate/subAccount/ip/dissociate","method":"PUT"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"b9524079-a627-4ed4-8f2a-abb0390700aa","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"69800c09-607d-406d-8817-7c7c51ff5ae1","name":"Create an API key for a sub-account - default","request":{"urlPathTemplate":"/corporate/subAccount/key","method":"POST"},"response":{"status":201,"body":"{\n \"key\": \"xkeysib-21881axxxxxcc92e04-mIrexxxx7z\",\n \"status\": \"success\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"69800c09-607d-406d-8817-7c7c51ff5ae1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6174a85-f3d7-4550-bc89-0e9814e58cfb","name":"Generate SSO token to access sub-account - default","request":{"urlPathTemplate":"/corporate/subAccount/ssoToken","method":"POST"},"response":{"status":200,"body":"{\n \"token\": \"5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c6174a85-f3d7-4550-bc89-0e9814e58cfb","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a2fc395f-9a4c-407e-bcf3-5eb067c54991","name":"Get sub-account details - default","request":{"urlPathTemplate":"/corporate/subAccount/{id}","method":"GET","pathParameters":{"id":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"companyName\": \"API-Sub-26thOct21-4\",\n \"email\": \"uday+1@brevo.com\",\n \"groups\": [\n {\n \"id\": \"5f8f8c3b5f56a02d4433b3a7\",\n \"name\": \"Group 1\"\n },\n {\n \"id\": \"5f8f8c3b5f56a02d4433b3a8\",\n \"name\": \"Group 2\"\n }\n ],\n \"name\": \"Uday Pandit\",\n \"planInfo\": {\n \"credits\": {\n \"emails\": {\n \"quantity\": 2000,\n \"remaining\": 1955\n },\n \"externalFeeds\": {\n \"quantity\": 1,\n \"remaining\": 1\n },\n \"sms\": {\n \"quantity\": 2000,\n \"remaining\": 1955\n },\n \"whatsapp\": {\n \"quantity\": 100,\n \"remaining\": 50\n },\n \"wpSubscribers\": {\n \"quantity\": 2000,\n \"remaining\": 1955\n }\n },\n \"features\": {\n \"inbox\": {\n \"quantity\": 20,\n \"remaining\": 12\n },\n \"landingPage\": {\n \"quantity\": 25,\n \"remaining\": 14\n },\n \"salesUsers\": {\n \"quantity\": 30,\n \"remaining\": 14\n },\n \"users\": {\n \"quantity\": 30,\n \"remaining\": 14\n }\n },\n \"planType\": \"paid\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"a2fc395f-9a4c-407e-bcf3-5eb067c54991","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"574c16a0-400c-46fe-aea7-88b6b1a0b812","name":"Delete a sub-account - default","request":{"urlPathTemplate":"/corporate/subAccount/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"574c16a0-400c-46fe-aea7-88b6b1a0b812","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"769c18cf-d0ef-4284-83e9-bc297f635f71","name":"Enable/disable sub-account application(s) - default","request":{"urlPathTemplate":"/corporate/subAccount/{id}/applications/toggle","method":"PUT","pathParameters":{"id":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"769c18cf-d0ef-4284-83e9-bc297f635f71","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"85c53397-13d2-43ec-986d-7d85858e7c8e","name":"Update sub-account plan - default","request":{"urlPathTemplate":"/corporate/subAccount/{id}/plan","method":"PUT","pathParameters":{"id":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"85c53397-13d2-43ec-986d-7d85858e7c8e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41b0f555-e1b6-4e40-9e6a-17c8bd025f53","name":"Update sub-accounts plan - default","request":{"urlPathTemplate":"/corporate/subAccounts/plan","method":"PUT"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"41b0f555-e1b6-4e40-9e6a-17c8bd025f53","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2d522f1e-c89e-42da-b070-ffb9ff715ec2","name":"Send invitation to an admin user - default","request":{"urlPathTemplate":"/corporate/user/invitation/send","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"659xxxxxxxxxxxxxxxx6ef9c8\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2d522f1e-c89e-42da-b070-ffb9ff715ec2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d9c935a4-0eec-4d97-9162-0ecfcc38abbb","name":"Resend / cancel admin user invitation - default","request":{"urlPathTemplate":"/corporate/user/invitation/{action}/{email}","method":"PUT","pathParameters":{"action":{"equalTo":"resend"},"email":{"equalTo":"email"}}},"response":{"status":200,"body":"{\n \"message\": \"Invitation resent successfully\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"d9c935a4-0eec-4d97-9162-0ecfcc38abbb","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a6f000f1-1ae0-4b47-842f-edac9954cb1d","name":"Revoke an admin user - default","request":{"urlPathTemplate":"/corporate/user/revoke/{email}","method":"DELETE","pathParameters":{"email":{"equalTo":"email"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a6f000f1-1ae0-4b47-842f-edac9954cb1d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f295c79b-1b65-4112-8b0c-b6ce9d87d44f","name":"Check admin user permissions - default","request":{"urlPathTemplate":"/corporate/user/{email}/permissions","method":"GET","pathParameters":{"email":{"equalTo":"email"}}},"response":{"status":200,"body":"{\n \"email\": \"invitedUser@company.com\",\n \"feature_access\": {\n \"analytics\": [\n \"download_data\",\n \"create_alerts\",\n \"my_looks\",\n \"explore_create\"\n ],\n \"api_keys\": [\n \"all\"\n ],\n \"apps_management\": [\n \"all\"\n ],\n \"create_sub_organizations\": [\n \"all\"\n ],\n \"manage_sub_organizations\": [\n \"all\"\n ],\n \"my_plan\": [\n \"all\",\n \"all\"\n ],\n \"sub_organization_groups\": [\n \"create\",\n \"edit_delete\"\n ],\n \"user_management\": [\n \"none\"\n ]\n },\n \"groups\": [\n {\n \"id\": \"6543ab3667ffbb00142e4486\",\n \"name\": \"Support\"\n },\n {\n \"id\": \"174bab366732bbce142e4412\",\n \"name\": \"Technical\"\n }\n ],\n \"status\": \"active\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f295c79b-1b65-4112-8b0c-b6ce9d87d44f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c29d9b3d-5506-4699-8d63-cb5be4b098e1","name":"Change admin user permissions - default","request":{"urlPathTemplate":"/corporate/user/{email}/permissions","method":"PUT","pathParameters":{"email":{"equalTo":"email"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c29d9b3d-5506-4699-8d63-cb5be4b098e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5b756ab9-0c76-4ea0-86e3-2629a91ee517","name":"Get the list of all your users - default","request":{"urlPathTemplate":"/organization/invited/users","method":"GET"},"response":{"status":200,"body":"{\n \"users\": [\n {\n \"email\": \"owner@company.com\",\n \"feature_access\": {\n \"conversations\": \"owner\",\n \"crm\": \"owner\",\n \"marketing\": \"owner\"\n },\n \"is_owner\": \"is_owner\",\n \"status\": \"active\"\n },\n {\n \"email\": \"pendingInvitedUser@company.com\",\n \"feature_access\": {\n \"conversations\": \"none\",\n \"crm\": \"full\",\n \"marketing\": \"custom\"\n },\n \"is_owner\": \"is_owner\",\n \"status\": \"pending\"\n },\n {\n \"email\": \"connectedInvitedUser@company.com\",\n \"feature_access\": {\n \"conversations\": \"full\",\n \"crm\": \"none\",\n \"marketing\": \"none\"\n },\n \"is_owner\": \"is_owner\",\n \"status\": \"active\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"5b756ab9-0c76-4ea0-86e3-2629a91ee517","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"027416a7-5144-402b-8e13-ff098d91ec53","name":"Revoke user permission - default","request":{"urlPathTemplate":"/organization/user/invitation/revoke/{email}","method":"PUT","pathParameters":{"email":{"equalTo":"email"}}},"response":{"status":200,"body":"{\n \"credit_notes\": [\n \"TEST-123\"\n ],\n \"status\": \"OK\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"027416a7-5144-402b-8e13-ff098d91ec53","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3380168e-886f-4ab1-9489-1f453e144d97","name":"Send invitation to user - default","request":{"urlPathTemplate":"/organization/user/invitation/send","method":"POST"},"response":{"status":200,"body":"{\n \"invoice_id\": \"invoice_id\",\n \"status\": \"OK\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"3380168e-886f-4ab1-9489-1f453e144d97","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fda4aa42-d57d-4f82-8b2b-30f5d0abffa2","name":"Resend / Cancel invitation - default","request":{"urlPathTemplate":"/organization/user/invitation/{action}/{email}","method":"PUT","pathParameters":{"action":{"equalTo":"resend"},"email":{"equalTo":"email"}}},"response":{"status":200,"body":"{\n \"credit_notes\": [\n \"TEST-123\"\n ],\n \"status\": \"OK\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"fda4aa42-d57d-4f82-8b2b-30f5d0abffa2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e3763191-26a9-488e-9abf-c8b9ca82c709","name":"Update permission for a user - default","request":{"urlPathTemplate":"/organization/user/update/permissions","method":"POST"},"response":{"status":200,"body":"{\n \"credit_notes\": [\n \"TEST-123\"\n ],\n \"invoice_id\": \"invoice_id\",\n \"status\": \"OK\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e3763191-26a9-488e-9abf-c8b9ca82c709","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8d0fdcb2-801b-46ec-98ff-ef29fa70f35d","name":"Check user permission - default","request":{"urlPathTemplate":"/organization/user/{email}/permissions","method":"GET","pathParameters":{"email":{"equalTo":"email"}}},"response":{"status":200,"body":"{\n \"email\": \"invitedUser@company.com\",\n \"privileges\": [\n {\n \"feature\": \"Email campaign\",\n \"permissions\": [\n \"Create / edit / delete\",\n \"Send / schedule / suspend\"\n ]\n },\n {\n \"feature\": \"Templates\",\n \"permissions\": [\n \"Create / edit / delete\",\n \"Activate / deactivate\"\n ]\n },\n {\n \"feature\": \"SMS campaign\",\n \"permissions\": [\n \"Create / edit / delete\",\n \"Send / schedule / suspend\"\n ]\n },\n {\n \"feature\": \"Facebook Ads\",\n \"permissions\": [\n \"Schedule / pause\"\n ]\n },\n {\n \"feature\": \"Landing pages\",\n \"permissions\": [\n \"All\"\n ]\n },\n {\n \"feature\": \"Workflows\",\n \"permissions\": [\n \"Create / edit / delete\",\n \"Activate / deactivate / Pause\"\n ]\n },\n {\n \"feature\": \"Contacts\",\n \"permissions\": [\n \"View\",\n \"Contact forms\"\n ]\n },\n {\n \"feature\": \"SMTP & API\",\n \"permissions\": [\n \"SMTP\",\n \"API Keys\",\n \"Authorized IPs\"\n ]\n },\n {\n \"feature\": \"User management\",\n \"permissions\": [\n \"None\"\n ]\n },\n {\n \"feature\": \"Sales Platform\",\n \"permissions\": [\n \"Create / edit / delete owned deals and tasks\",\n \"Manage deals and tasks from other users\",\n \"Reports\",\n \"Settings\"\n ]\n },\n {\n \"feature\": \"Conversations\",\n \"permissions\": [\n \"None\"\n ]\n },\n {\n \"feature\": \"Senders, Domains & Dedicated IPs\",\n \"permissions\": [\n \"Senders management\",\n \"Domains management\",\n \"Dedicated IPs management\"\n ]\n },\n {\n \"feature\": \"Push\",\n \"permissions\": [\n \"View\",\n \"Create / edit / delete\",\n \"Send\",\n \"Settings\"\n ]\n },\n {\n \"feature\": \"Companies\",\n \"permissions\": [\n \"Create / edit / delete owned companies\",\n \"Manage companies from other users\",\n \"Settings\"\n ]\n }\n ],\n \"status\": \"active\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8d0fdcb2-801b-46ec-98ff-ef29fa70f35d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ec86c15f-d950-46af-8cc4-d9670d01ec3e","name":"Get background processes - default","request":{"urlPathTemplate":"/processes","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 198,\n \"processes\": [\n {\n \"id\": 217,\n \"name\": \"IMPORTUSER\",\n \"status\": \"completed\",\n \"export_url\": \"https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv\",\n \"error\": \"Processing timeout exceeded\",\n \"created_at\": \"2024-01-15T10:30:00Z\",\n \"completed_at\": \"2024-01-15T10:35:00Z\"\n },\n {\n \"id\": 213,\n \"name\": \"SEARCH_EXPORT_USERS\",\n \"status\": \"completed\",\n \"export_url\": \"https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv\",\n \"error\": \"Processing timeout exceeded\",\n \"created_at\": \"2024-01-15T10:30:00Z\",\n \"completed_at\": \"2024-01-15T10:35:00Z\"\n },\n {\n \"id\": 212,\n \"name\": \"IMPORTUSER\",\n \"status\": \"queued\",\n \"export_url\": \"https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv\",\n \"error\": \"Processing timeout exceeded\",\n \"created_at\": \"2024-01-15T10:30:00Z\",\n \"completed_at\": \"2024-01-15T10:35:00Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"ec86c15f-d950-46af-8cc4-d9670d01ec3e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"5cd8a4a8-5754-4b87-aa94-fc464c24ad7a","name":"Get process details - default","request":{"urlPathTemplate":"/processes/{processId}","method":"GET","pathParameters":{"processId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"id\": 217,\n \"name\": \"IMPORTUSER\",\n \"status\": \"queued\",\n \"info\": {\n \"import\": {\n \"invalid_emails\": 2,\n \"duplicate_contact_id\": 0,\n \"duplicate_ext_id\": 1,\n \"duplicate_email_id\": \"duplicate_email_id\",\n \"duplicate_phone_id\": 1,\n \"duplicate_whatsapp_id\": 1,\n \"duplicate_landline_number_id\": 1\n },\n \"export\": {\n \"total_records\": 1250,\n \"file_size\": 102400\n }\n },\n \"export_url\": \"https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv\",\n \"error\": \"Processing timeout exceeded after 30 minutes\",\n \"created_at\": \"2024-01-15T10:30:00Z\",\n \"completed_at\": \"2024-01-15T10:32:15Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"5cd8a4a8-5754-4b87-aa94-fc464c24ad7a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6ee5e306-247b-485b-9f81-14d36b3a0bda","name":"Get email senders - default","request":{"urlPathTemplate":"/senders","method":"GET"},"response":{"status":200,"body":"{\n \"senders\": [\n {\n \"active\": true,\n \"email\": \"support@example.com\",\n \"id\": 1,\n \"ips\": [\n {\n \"domain\": \"example.com\",\n \"ip\": \"203.0.113.100\",\n \"weight\": 50\n }\n ],\n \"name\": \"Support Team\"\n },\n {\n \"active\": false,\n \"email\": \"hello@example.com\",\n \"id\": 3,\n \"ips\": [\n {\n \"domain\": \"example.com\",\n \"ip\": \"203.0.113.100\",\n \"weight\": 50\n }\n ],\n \"name\": \"Customer Service\"\n },\n {\n \"active\": false,\n \"email\": \"marketing@testcompany.com\",\n \"id\": 5,\n \"ips\": [\n {\n \"domain\": \"example.com\",\n \"ip\": \"203.0.113.100\",\n \"weight\": 50\n }\n ],\n \"name\": \"Marketing Team\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"6ee5e306-247b-485b-9f81-14d36b3a0bda","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"04b1327d-3b58-45aa-a665-8f8430486eca","name":"Create email sender - default","request":{"urlPathTemplate":"/senders","method":"POST"},"response":{"status":201,"body":"{\n \"dkimError\": false,\n \"id\": 15,\n \"spfError\": false\n}","headers":{"Content-Type":"application/json"}},"uuid":"04b1327d-3b58-45aa-a665-8f8430486eca","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"17fe3a57-60da-42b1-a435-e4cf134d171e","name":"getIps - default","request":{"urlPathTemplate":"/senders/ips","method":"GET"},"response":{"status":200,"body":"{\n \"ips\": [\n {\n \"active\": true,\n \"domain\": \"mailing.enterprise.com\",\n \"id\": 3,\n \"ip\": \"192.168.1.100\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"17fe3a57-60da-42b1-a435-e4cf134d171e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"a0fc45b1-4252-4d1d-a02e-f542df6bf33e","name":"updateSender - default","request":{"urlPathTemplate":"/senders/{senderId}","method":"PUT","pathParameters":{"senderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a0fc45b1-4252-4d1d-a02e-f542df6bf33e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f691a271-1b98-49eb-b4a0-124162e8a7d5","name":"deleteSender - default","request":{"urlPathTemplate":"/senders/{senderId}","method":"DELETE","pathParameters":{"senderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"f691a271-1b98-49eb-b4a0-124162e8a7d5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a90c739a-2ce1-4058-a434-60d316495970","name":"getIpsFromSender - default","request":{"urlPathTemplate":"/senders/{senderId}/ips","method":"GET","pathParameters":{"senderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"ips\": [\n {\n \"domain\": \"mailing.enterprise.com\",\n \"id\": 3,\n \"ip\": \"192.168.1.100\",\n \"weight\": 75\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"a90c739a-2ce1-4058-a434-60d316495970","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"868b537b-a700-40e2-bc48-c51dfd0ef8ed","name":"validateSenderByOTP - default","request":{"urlPathTemplate":"/senders/{senderId}/validate","method":"PUT","pathParameters":{"senderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"868b537b-a700-40e2-bc48-c51dfd0ef8ed","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6efe0f37-1aad-44ee-a626-e10a2df32e40","name":"getDomains - default","request":{"urlPathTemplate":"/senders/domains","method":"GET"},"response":{"status":200,"body":"{\n \"domains\": [\n {\n \"id\": \"67e57b40130375f045064c45\",\n \"domain_name\": \"mycompany.com\",\n \"authenticated\": true,\n \"verified\": true,\n \"ip\": \"192.168.1.100\",\n \"provider\": \"Cloudflare\",\n \"creator\": {\n \"id\": \"62e4fce597550d0b0177cb0c\",\n \"email\": \"admin@mycompany.com\",\n \"creationDate\": \"2025-03-27T16:22:24Z\"\n }\n },\n {\n \"id\": \"67f778570dd65f97c70910ed\",\n \"domain_name\": \"newsletter.mycompany.com\",\n \"authenticated\": false,\n \"verified\": true,\n \"provider\": \"GoDaddy\",\n \"creator\": {\n \"id\": \"62e4fce597550d0b0177cb0c\",\n \"email\": \"admin@mycompany.com\",\n \"creationDate\": \"2025-04-10T07:50:47Z\"\n }\n },\n {\n \"id\": \"688cd306d8893504e50ea615\",\n \"domain_name\": \"test.example.com\",\n \"authenticated\": false,\n \"verified\": false,\n \"provider\": \"Other\",\n \"creator\": {\n \"id\": \"62e4fce597550d0b0177cb0c\",\n \"email\": \"admin@mycompany.com\",\n \"creationDate\": \"2025-08-01T14:45:26Z\"\n }\n }\n ],\n \"count\": 3,\n \"current_page\": 1,\n \"total_pages\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"6efe0f37-1aad-44ee-a626-e10a2df32e40","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"d932d31f-c588-47e7-8703-1fc734a1dffd","name":"createDomain - default","request":{"urlPathTemplate":"/senders/domains","method":"POST"},"response":{"status":200,"body":"{\n \"id\": 5,\n \"domain_name\": \"mycompany.com\",\n \"domain_provider\": \"Cloudflare\",\n \"message\": \"Domain added successfully. To authenticate it, add following DNS records\",\n \"dns_records\": {\n \"brevo_code\": {\n \"host_name\": \"@\",\n \"type\": \"TXT\",\n \"value\": \"brevo-code=abc123def456\",\n \"status\": false\n },\n \"dkim_record\": {\n \"host_name\": \"mail._domainkey\",\n \"type\": \"TXT\",\n \"value\": \"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...\",\n \"status\": false\n },\n \"dmarc_record\": {\n \"host_name\": \"_dmarc\",\n \"type\": \"TXT\",\n \"value\": \"v=DMARC1; p=none; rua=mailto:dmarc@mycompany.com\",\n \"status\": false\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"d932d31f-c588-47e7-8703-1fc734a1dffd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"184d536e-335a-4ef0-8445-30b9081f5725","name":"getDomainConfiguration - default","request":{"urlPathTemplate":"/senders/domains/{domainName}","method":"GET","pathParameters":{"domainName":{"equalTo":"domainName"}}},"response":{"status":200,"body":"{\n \"domain\": \"mycompany.com\",\n \"verified\": true,\n \"authenticated\": true,\n \"dns_records\": {\n \"brevo_code\": {\n \"host_name\": \"@\",\n \"type\": \"TXT\",\n \"value\": \"brevo-code=abc123def456\",\n \"status\": true\n },\n \"dkim_record\": {\n \"host_name\": \"mail._domainkey\",\n \"type\": \"TXT\",\n \"value\": \"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...\",\n \"status\": true\n },\n \"dmarc_record\": {\n \"host_name\": \"_dmarc\",\n \"type\": \"TXT\",\n \"value\": \"v=DMARC1; p=quarantine; rua=mailto:dmarc@mycompany.com\",\n \"status\": true\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"184d536e-335a-4ef0-8445-30b9081f5725","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"85cfda0d-d298-48b3-8a8f-fcdc75ac72c2","name":"deleteDomain - default","request":{"urlPathTemplate":"/senders/domains/{domainName}","method":"DELETE","pathParameters":{"domainName":{"equalTo":"domainName"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"85cfda0d-d298-48b3-8a8f-fcdc75ac72c2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9028b6d6-1ed0-4272-bf1a-30fca4d35a1b","name":"authenticateDomain - default","request":{"urlPathTemplate":"/senders/domains/{domainName}/authenticate","method":"PUT","pathParameters":{"domainName":{"equalTo":"domainName"}}},"response":{"status":200,"body":"{\n \"domain_name\": \"mycompany.com\",\n \"message\": \"Domain has been authenticated successfully.\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"9028b6d6-1ed0-4272-bf1a-30fca4d35a1b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"71fd7de8-a010-43ca-bce7-8d0788df718a","name":"getWebhooks - default","request":{"urlPathTemplate":"/webhooks","method":"GET"},"response":{"status":200,"body":"{\n \"webhooks\": [\n {\n \"auth\": {\n \"token\": \"test-auth-token1234\",\n \"type\": \"bearer\"\n },\n \"batched\": true,\n \"channel\": \"email\",\n \"createdAt\": \"2016-07-18T12:30:09Z\",\n \"description\": \"Webhook triggered on campaign openings\",\n \"events\": [\n \"opened\"\n ],\n \"headers\": [\n {\n \"key\": \"cf-secret\",\n \"value\": \"test-header-value\"\n }\n ],\n \"id\": 9864,\n \"modifiedAt\": \"2016-07-18T16:00:50Z\",\n \"type\": \"transactional\",\n \"url\": \"https://example.domain.com/webhook/events/kzfxxxxxxxx0uyo1\"\n },\n {\n \"auth\": {\n \"token\": \"test-auth-token1234\",\n \"type\": \"bearer\"\n },\n \"batched\": true,\n \"channel\": \"sms\",\n \"createdAt\": \"2017-02-20T14:30:00Z\",\n \"description\": \"Webhook triggered on campaign hard bounces\",\n \"events\": [\n \"hardBounces\"\n ],\n \"headers\": [\n {\n \"key\": \"cf-secret\",\n \"value\": \"test-header-value\"\n }\n ],\n \"id\": 22770,\n \"modifiedAt\": \"2017-02-20T19:00:00Z\",\n \"type\": \"marketing\",\n \"url\": \"http://exmaple.domain.com/15kxxxxxn1\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"71fd7de8-a010-43ca-bce7-8d0788df718a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"657ec845-de7a-4389-887a-888df91d2433","name":"createWebhook - default","request":{"urlPathTemplate":"/webhooks","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"657ec845-de7a-4389-887a-888df91d2433","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2ca5ef46-7340-4f7f-bb5f-a3f34383c9c8","name":"Export webhook history - default","request":{"urlPathTemplate":"/webhooks/export","method":"POST"},"response":{"status":202,"body":"{\n \"processId\": 78\n}","headers":{"Content-Type":"application/json"}},"uuid":"2ca5ef46-7340-4f7f-bb5f-a3f34383c9c8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"adc43c28-964b-4170-aee2-5bb24add0d04","name":"getWebhook - default","request":{"urlPathTemplate":"/webhooks/{webhookId}","method":"GET","pathParameters":{"webhookId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"auth\": {\n \"token\": \"test-auth-token1234\",\n \"type\": \"bearer\"\n },\n \"batched\": true,\n \"channel\": \"sms\",\n \"createdAt\": \"2016-06-07T09:10:10Z\",\n \"description\": \"Webhook triggered on campaign openings and addition of lists\",\n \"events\": [\n \"listAdditions\",\n \"opened\"\n ],\n \"headers\": [\n {\n \"key\": \"cf-secret\",\n \"value\": \"test-header-value\"\n }\n ],\n \"id\": 7287,\n \"modifiedAt\": \"2016-06-08T11:30:00Z\",\n \"type\": \"marketing\",\n \"url\": \"http://example.domain.com/1brxxxxxx5p1\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"adc43c28-964b-4170-aee2-5bb24add0d04","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ffcb1664-4c31-4340-a525-2b616cf4334c","name":"updateWebhook - default","request":{"urlPathTemplate":"/webhooks/{webhookId}","method":"PUT","pathParameters":{"webhookId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"ffcb1664-4c31-4340-a525-2b616cf4334c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"be23bfc5-4a58-4cb4-8191-aee4cb8f244f","name":"deleteWebhook - default","request":{"urlPathTemplate":"/webhooks/{webhookId}","method":"DELETE","pathParameters":{"webhookId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"be23bfc5-4a58-4cb4-8191-aee4cb8f244f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2a8a03cd-cea2-4501-94e0-c2dccdd68f00","name":"Get all external feeds - default","request":{"urlPathTemplate":"/feeds","method":"GET","queryParameters":{"search":{"equalTo":"product"},"startDate":{"equalTo":"2024-01-01"},"endDate":{"equalTo":"2024-01-31"}}},"response":{"status":200,"body":"{\n \"count\": 18,\n \"feeds\": [\n {\n \"id\": \"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6\",\n \"name\": \"Product Catalog Feed\",\n \"alias\": \"product_catalog_feed\",\n \"url\": \"https://api.example.com/products\",\n \"authType\": \"noAuth\",\n \"username\": \"apiuser\",\n \"password\": \"apipass\",\n \"token\": \"abc123token456\",\n \"maxRetries\": 3,\n \"cache\": true,\n \"isInternal\": false,\n \"headers\": [\n {\n \"name\": \"Authorization\",\n \"value\": \"Bearer xyz789\"\n }\n ],\n \"createdAt\": \"2025-09-18T13:29:27Z\",\n \"modifiedAt\": \"2025-09-18T13:29:27Z\"\n },\n {\n \"id\": \"c2d3e4f5-a6b7-48c9-90d1-e2f3a4b5c6d7\",\n \"name\": \"Blog News Feed\",\n \"alias\": \"blog_news_feed\",\n \"url\": \"https://blog.example.com/api/posts\",\n \"authType\": \"noAuth\",\n \"username\": \"apiuser\",\n \"password\": \"apipass\",\n \"token\": \"abc123token456\",\n \"maxRetries\": 3,\n \"cache\": true,\n \"isInternal\": true,\n \"headers\": [\n {\n \"name\": \"Authorization\",\n \"value\": \"Bearer xyz789\"\n }\n ],\n \"createdAt\": \"2025-09-17T16:03:25Z\",\n \"modifiedAt\": \"2025-09-17T16:03:25Z\"\n },\n {\n \"id\": \"d3e4f5a6-b7c8-49d0-91e2-f3a4b5c6d7e8\",\n \"name\": \"Public Data Feed\",\n \"alias\": \"public_data_feed\",\n \"url\": \"https://jsonplaceholder.typicode.com/posts\",\n \"authType\": \"noAuth\",\n \"username\": \"apiuser\",\n \"password\": \"apipass\",\n \"token\": \"abc123token456\",\n \"maxRetries\": 3,\n \"cache\": true,\n \"isInternal\": true,\n \"headers\": [\n {\n \"name\": \"Authorization\",\n \"value\": \"Bearer xyz789\"\n }\n ],\n \"createdAt\": \"2025-09-05T09:06:42Z\",\n \"modifiedAt\": \"2025-09-05T09:06:42Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"2a8a03cd-cea2-4501-94e0-c2dccdd68f00","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"6feaee25-9e8b-4798-b9ee-ae7b3aad1442","name":"Create external feed - default","request":{"urlPathTemplate":"/feeds","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"6feaee25-9e8b-4798-b9ee-ae7b3aad1442","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2239ff35-3a80-42f1-b822-81e1d785db03","name":"Get external feed details - default","request":{"urlPathTemplate":"/feeds/{uuid}","method":"GET","pathParameters":{"uuid":{"equalTo":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6"}}},"response":{"status":200,"body":"{\n \"id\": \"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6\",\n \"name\": \"Product Catalog Feed\",\n \"url\": \"https://api.example.com/products\",\n \"authType\": \"noAuth\",\n \"personalization\": false,\n \"defaultAttr\": \"\",\n \"defaultContact\": \"\",\n \"maxRetries\": 0,\n \"cache\": false,\n \"createdAt\": \"2025-09-18T13:29:27Z\",\n \"modifiedAt\": \"2025-09-18T13:29:27Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2239ff35-3a80-42f1-b822-81e1d785db03","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c1cb8e28-7845-4479-a233-737a81218df9","name":"Update external feed - default","request":{"urlPathTemplate":"/feeds/{uuid}","method":"PUT","pathParameters":{"uuid":{"equalTo":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c1cb8e28-7845-4479-a233-737a81218df9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"63a2125b-2244-41b0-8f75-6e2eb3cfb682","name":"Delete external feed - default","request":{"urlPathTemplate":"/feeds/{uuid}","method":"DELETE","pathParameters":{"uuid":{"equalTo":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"63a2125b-2244-41b0-8f75-6e2eb3cfb682","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"03da01c2-0cff-47d2-996c-4317cabb22c4","name":"Create/Update object records in bulk - default","request":{"urlPathTemplate":"/objects/{object_type}/batch/upsert","method":"POST","pathParameters":{"object_type":{"equalTo":"vehicle"}}},"response":{"status":202,"body":"{\n \"message\": \"Batch object records are being processed\",\n \"processId\": 21\n}","headers":{"Content-Type":"application/json"}},"uuid":"03da01c2-0cff-47d2-996c-4317cabb22c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"90e40ddc-ba7b-4979-8f3d-67bcfe9be80d","name":"Get the list of object records and total records count for an object. - default","request":{"urlPathTemplate":"/objects/{object_type}/records","method":"GET","pathParameters":{"object_type":{"equalTo":"vehicle"}},"queryParameters":{"limit":{"equalTo":"1000000"},"page_num":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"count\": 350,\n \"records\": [\n {\n \"associations\": [\n {\n \"object_type\": \"garage\",\n \"records\": [\n {\n \"identifiers\": {\n \"id\": 12345\n }\n }\n ]\n }\n ],\n \"attributes\": {\n \"color\": \"Black\",\n \"engine_type\": \"Hybrid\",\n \"make\": \"Toyoto\",\n \"model\": \"Corolla\",\n \"year\": 2020\n },\n \"createdAt\": \"2025-07-22T10:20:30Z\",\n \"identifiers\": {\n \"ext_id\": \"507f1f77bc\",\n \"id\": 16789\n },\n \"updatedAt\": \"2025-07-22T10:20:30Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"90e40ddc-ba7b-4979-8f3d-67bcfe9be80d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dc28fc32-e60d-4ec0-a256-912ae9ca2cbd","name":"Delete multiple object records (up to 1000) asynchronously - default","request":{"urlPathTemplate":"/objects/{object_type}/batch/delete","method":"POST","pathParameters":{"object_type":{"equalTo":"vehicle"}}},"response":{"status":202,"body":"{\n \"processId\": 21,\n \"message\": \"Batch object records are being processed for deletion.\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"dc28fc32-e60d-4ec0-a256-912ae9ca2cbd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8729f948-4808-4d8f-b027-70b35a734218","name":"Get all the contacts - default","request":{"urlPathTemplate":"/contacts","method":"GET"},"response":{"status":200,"body":"{\n \"contacts\": [\n {\n \"attributes\": {},\n \"createdAt\": \"2017-05-01T17:05:03Z\",\n \"email\": \"contact1@example.com\",\n \"emailBlacklisted\": true,\n \"id\": 247,\n \"listIds\": [\n 43,\n 58\n ],\n \"listUnsubscribed\": [\n 1000000\n ],\n \"modifiedAt\": \"2017-05-01T17:05:03Z\",\n \"smsBlacklisted\": true\n },\n {\n \"attributes\": {},\n \"createdAt\": \"2017-05-01T17:05:03Z\",\n \"email\": \"33058407248@mailin-sms.com\",\n \"emailBlacklisted\": true,\n \"id\": 245,\n \"listIds\": [\n 43,\n 61,\n 58\n ],\n \"listUnsubscribed\": [\n 1000000\n ],\n \"modifiedAt\": \"2017-05-01T17:05:03Z\",\n \"smsBlacklisted\": false\n }\n ],\n \"count\": 3\n}","headers":{"Content-Type":"application/json"}},"uuid":"8729f948-4808-4d8f-b027-70b35a734218","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"fe3c55db-75e2-4d78-85c0-eaed9f642c83","name":"Create a contact - default","request":{"urlPathTemplate":"/contacts","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 21\n}","headers":{"Content-Type":"application/json"}},"uuid":"fe3c55db-75e2-4d78-85c0-eaed9f642c83","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dd0aa44d-f601-4c28-8481-1c0b25bb46aa","name":"List all attributes - default","request":{"urlPathTemplate":"/contacts/attributes","method":"GET"},"response":{"status":200,"body":"{\n \"attributes\": [\n {\n \"calculatedValue\": \"COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]\",\n \"category\": \"normal\",\n \"enumeration\": [\n {\n \"label\": \"Women\",\n \"value\": 1\n }\n ],\n \"multiCategoryOptions\": [\n \"USA\"\n ],\n \"name\": \"LASTNAME\",\n \"type\": \"text\"\n },\n {\n \"calculatedValue\": \"COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]\",\n \"category\": \"normal\",\n \"enumeration\": [\n {\n \"label\": \"Women\",\n \"value\": 1\n }\n ],\n \"multiCategoryOptions\": [\n \"USA\"\n ],\n \"name\": \"FIRSTNAME\",\n \"type\": \"text\"\n },\n {\n \"calculatedValue\": \"COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]\",\n \"category\": \"normal\",\n \"enumeration\": [\n {\n \"label\": \"Women\",\n \"value\": 1\n }\n ],\n \"multiCategoryOptions\": [\n \"USA\"\n ],\n \"name\": \"DOB\",\n \"type\": \"date\"\n },\n {\n \"calculatedValue\": \"COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]\",\n \"category\": \"category\",\n \"enumeration\": [\n {\n \"label\": \"Men\",\n \"value\": 1\n },\n {\n \"label\": \"Women\",\n \"value\": 2\n },\n {\n \"label\": \"Kid\",\n \"value\": 3\n }\n ],\n \"multiCategoryOptions\": [\n \"USA\"\n ],\n \"name\": \"GENDER\",\n \"type\": \"text\"\n },\n {\n \"calculatedValue\": \"COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]\",\n \"category\": \"normal\",\n \"enumeration\": [\n {\n \"label\": \"Women\",\n \"value\": 1\n }\n ],\n \"multiCategoryOptions\": [\n \"USA\"\n ],\n \"name\": \"BDO\",\n \"type\": \"user\"\n },\n {\n \"calculatedValue\": \"COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]\",\n \"category\": \"normal\",\n \"enumeration\": [\n {\n \"label\": \"Women\",\n \"value\": 1\n }\n ],\n \"multiCategoryOptions\": [\n \"USA\",\n \"India\",\n \"France\"\n ],\n \"name\": \"COUNTRY\",\n \"type\": \"multiple-choice\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"dd0aa44d-f601-4c28-8481-1c0b25bb46aa","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"1253fdcb-3d6c-4957-88ab-df297d7154ab","name":"Create contact attribute - default","request":{"urlPathTemplate":"/contacts/attributes/{attributeCategory}/{attributeName}","method":"POST","pathParameters":{"attributeCategory":{"equalTo":"normal"},"attributeName":{"equalTo":"attributeName"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"1253fdcb-3d6c-4957-88ab-df297d7154ab","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f02e59a5-f5b5-400d-8697-22eace5165c5","name":"Update contact attribute - default","request":{"urlPathTemplate":"/contacts/attributes/{attributeCategory}/{attributeName}","method":"PUT","pathParameters":{"attributeCategory":{"equalTo":"category"},"attributeName":{"equalTo":"attributeName"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"f02e59a5-f5b5-400d-8697-22eace5165c5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eed9112c-42ea-4dba-a3c1-5bc5eea04b6a","name":"Delete an attribute - default","request":{"urlPathTemplate":"/contacts/attributes/{attributeCategory}/{attributeName}","method":"DELETE","pathParameters":{"attributeCategory":{"equalTo":"normal"},"attributeName":{"equalTo":"attributeName"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"eed9112c-42ea-4dba-a3c1-5bc5eea04b6a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"827de4b0-dfdc-45c9-a27a-819a6acaece3","name":"Delete a multiple-choice attribute option - default","request":{"urlPathTemplate":"/contacts/attributes/{attributeType}/{multipleChoiceAttribute}/{multipleChoiceAttributeOption}","method":"DELETE","pathParameters":{"attributeType":{"equalTo":"multiple-choice"},"multipleChoiceAttribute":{"equalTo":"multipleChoiceAttribute"},"multipleChoiceAttributeOption":{"equalTo":"multipleChoiceAttributeOption"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"827de4b0-dfdc-45c9-a27a-819a6acaece3","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6ba8cd16-ea25-49a7-8288-e0cf22a8b065","name":"Update multiple contacts - default","request":{"urlPathTemplate":"/contacts/batch","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"6ba8cd16-ea25-49a7-8288-e0cf22a8b065","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2b7fdfe7-8f83-41bd-81d2-b42f70ff4603","name":"Create Contact via DOI (Double-Opt-In) Flow - default","request":{"urlPathTemplate":"/contacts/doubleOptinConfirmation","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"2b7fdfe7-8f83-41bd-81d2-b42f70ff4603","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1a2d075b-a8de-4135-b0c9-58bcfe31c7e4","name":"Export contacts - default","request":{"urlPathTemplate":"/contacts/export","method":"POST"},"response":{"status":202,"body":"{\n \"processId\": 78\n}","headers":{"Content-Type":"application/json"}},"uuid":"1a2d075b-a8de-4135-b0c9-58bcfe31c7e4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c175e62d-23d7-4d5a-bc46-7093ac21de08","name":"Get all folders - default","request":{"urlPathTemplate":"/contacts/folders","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 2,\n \"folders\": [\n {\n \"id\": 42,\n \"name\": \"Ninja_Form\",\n \"totalBlacklisted\": 98,\n \"totalSubscribers\": 4567,\n \"uniqueSubscribers\": 4665\n },\n {\n \"id\": 29,\n \"name\": \"Prestashop\",\n \"totalBlacklisted\": 10,\n \"totalSubscribers\": 6543,\n \"uniqueSubscribers\": 6553\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"c175e62d-23d7-4d5a-bc46-7093ac21de08","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"40d55e83-c362-440b-9ad3-3cbb47ed0eb0","name":"Create a folder - default","request":{"urlPathTemplate":"/contacts/folders","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"40d55e83-c362-440b-9ad3-3cbb47ed0eb0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"64a96da1-15c5-426f-a455-f6ec46ff0434","name":"Returns a folder's details - default","request":{"urlPathTemplate":"/contacts/folders/{folderId}","method":"GET","pathParameters":{"folderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"id\": 1,\n \"name\": \"Client_Folder\",\n \"totalBlacklisted\": 987,\n \"totalSubscribers\": 16778,\n \"uniqueSubscribers\": 17765\n}","headers":{"Content-Type":"application/json"}},"uuid":"64a96da1-15c5-426f-a455-f6ec46ff0434","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"701dc90d-1130-42e1-93d3-8ef73e8f8596","name":"Update a folder - default","request":{"urlPathTemplate":"/contacts/folders/{folderId}","method":"PUT","pathParameters":{"folderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"701dc90d-1130-42e1-93d3-8ef73e8f8596","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a33a22a6-f7ae-41f1-9646-c37d999a9421","name":"Delete a folder (and all its lists) - default","request":{"urlPathTemplate":"/contacts/folders/{folderId}","method":"DELETE","pathParameters":{"folderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a33a22a6-f7ae-41f1-9646-c37d999a9421","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1bbaf637-2edd-4ded-8338-3f42e8e93b45","name":"Get lists in a folder - default","request":{"urlPathTemplate":"/contacts/folders/{folderId}/lists","method":"GET","pathParameters":{"folderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"count\": 3,\n \"lists\": [\n {\n \"id\": 46,\n \"name\": \"Reactiv\",\n \"totalBlacklisted\": 0,\n \"totalSubscribers\": 7655,\n \"uniqueSubscribers\": 7655\n },\n {\n \"id\": 41,\n \"name\": \"NY_Area\",\n \"totalBlacklisted\": 23,\n \"totalSubscribers\": 3654,\n \"uniqueSubscribers\": 3677\n },\n {\n \"id\": 22,\n \"name\": \"VIP_Customer\",\n \"totalBlacklisted\": 72,\n \"totalSubscribers\": 8753,\n \"uniqueSubscribers\": 8826\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"1bbaf637-2edd-4ded-8338-3f42e8e93b45","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c104d034-1156-452e-a1f5-90baae3a120e","name":"Import contacts - default","request":{"urlPathTemplate":"/contacts/import","method":"POST"},"response":{"status":202,"body":"{\n \"processId\": 78\n}","headers":{"Content-Type":"application/json"}},"uuid":"c104d034-1156-452e-a1f5-90baae3a120e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ede870d3-ebf8-4b09-851f-f8abb13c3b81","name":"Get all the lists - default","request":{"urlPathTemplate":"/contacts/lists","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 2,\n \"lists\": [\n {\n \"id\": 53,\n \"name\": \"Spanish_Speakers\",\n \"totalBlacklisted\": 65,\n \"totalSubscribers\": 5432,\n \"uniqueSubscribers\": 5497,\n \"folderId\": 1\n },\n {\n \"id\": 50,\n \"name\": \"Other\",\n \"totalBlacklisted\": 765,\n \"totalSubscribers\": 10976,\n \"uniqueSubscribers\": 11741,\n \"folderId\": 2\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"ede870d3-ebf8-4b09-851f-f8abb13c3b81","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"ecaaf193-0526-47f7-a447-6866f25d6a35","name":"Create a list - default","request":{"urlPathTemplate":"/contacts/lists","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"ecaaf193-0526-47f7-a447-6866f25d6a35","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d2bcf613-ab25-4a1d-acfc-f9189c9abdce","name":"Get a list's details - default","request":{"urlPathTemplate":"/contacts/lists/{listId}","method":"GET","pathParameters":{"listId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"id\": 12,\n \"name\": \"Newsletter_Weekly\",\n \"totalBlacklisted\": 63,\n \"totalSubscribers\": 6533,\n \"uniqueSubscribers\": 6596,\n \"campaignStats\": [\n {\n \"campaignId\": 15,\n \"stats\": {\n \"appleMppOpens\": 10,\n \"clickers\": 789,\n \"complaints\": 0,\n \"deferred\": 0,\n \"delivered\": 6632,\n \"estimatedViews\": 560,\n \"hardBounces\": 4,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 6645,\n \"softBounces\": 34,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 701,\n \"uniqueViews\": 3442,\n \"unsubscriptions\": 4,\n \"viewed\": 4322\n }\n },\n {\n \"campaignId\": 45,\n \"stats\": {\n \"appleMppOpens\": 10,\n \"clickers\": 788,\n \"complaints\": 1,\n \"deferred\": 0,\n \"delivered\": 4078,\n \"estimatedViews\": 560,\n \"hardBounces\": 2,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 4334,\n \"softBounces\": 18,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 654,\n \"uniqueViews\": 987,\n \"unsubscriptions\": 4,\n \"viewed\": 1555\n }\n }\n ],\n \"createdAt\": \"2016-02-26T11:56:08Z\",\n \"dynamicList\": false,\n \"folderId\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"d2bcf613-ab25-4a1d-acfc-f9189c9abdce","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fd940864-d48a-47f4-8db8-5960a7657dcc","name":"Update a list - default","request":{"urlPathTemplate":"/contacts/lists/{listId}","method":"PUT","pathParameters":{"listId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"fd940864-d48a-47f4-8db8-5960a7657dcc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f9aace2d-f1ee-48cf-9a00-2ce8a8e876de","name":"Delete a list - default","request":{"urlPathTemplate":"/contacts/lists/{listId}","method":"DELETE","pathParameters":{"listId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"f9aace2d-f1ee-48cf-9a00-2ce8a8e876de","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1e736496-14de-4379-b319-5857e47950dc","name":"Get contacts in a list - default","request":{"urlPathTemplate":"/contacts/lists/{listId}/contacts","method":"GET","pathParameters":{"listId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"contacts\": [\n {\n \"attributes\": {},\n \"createdAt\": \"2017-05-12T12:30:00Z\",\n \"email\": \"alex.pain@example.com\",\n \"emailBlacklisted\": false,\n \"id\": 45,\n \"listIds\": [\n 12,\n 9,\n 20\n ],\n \"listUnsubscribed\": [\n 1,\n 2\n ],\n \"modifiedAt\": \"2017-05-12T12:30:00Z\",\n \"smsBlacklisted\": true\n },\n {\n \"attributes\": {},\n \"createdAt\": \"2017-05-12T12:30:00Z\",\n \"email\": \"john.smith@example.com\",\n \"emailBlacklisted\": true,\n \"id\": 32,\n \"listIds\": [\n 12\n ],\n \"listUnsubscribed\": [\n 1\n ],\n \"modifiedAt\": \"2017-05-12T12:30:00Z\",\n \"smsBlacklisted\": false\n },\n {\n \"attributes\": {},\n \"createdAt\": \"2017-05-12T12:30:00Z\",\n \"email\": \"helen.rose@example.com\",\n \"emailBlacklisted\": true,\n \"id\": 65,\n \"listIds\": [\n 12,\n 9,\n 20\n ],\n \"listUnsubscribed\": [\n 1\n ],\n \"modifiedAt\": \"2017-05-12T12:30:00Z\",\n \"smsBlacklisted\": false\n }\n ],\n \"count\": 17655\n}","headers":{"Content-Type":"application/json"}},"uuid":"1e736496-14de-4379-b319-5857e47950dc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f1dbcb2f-9c0d-4ccd-a750-28e2c2f9e6f9","name":"Add existing contacts to a list - default","request":{"urlPathTemplate":"/contacts/lists/{listId}/contacts/add","method":"POST","pathParameters":{"listId":{"equalTo":"1000000"}}},"response":{"status":201,"body":"{\n \"contacts\": {\n \"failure\": [\n \"jeff32@example.com, jim56@example.com\"\n ],\n \"processId\": 78,\n \"success\": [\n \"success\"\n ],\n \"total\": 27\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"f1dbcb2f-9c0d-4ccd-a750-28e2c2f9e6f9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"36e0a4db-6281-4b17-bcbe-d10a330348a5","name":"Delete a contact from a list - default","request":{"urlPathTemplate":"/contacts/lists/{listId}/contacts/remove","method":"POST","pathParameters":{"listId":{"equalTo":"1000000"}}},"response":{"status":201,"body":"{\n \"contacts\": {\n \"failure\": [\n \"jeff32@example.com, jim56@example.com\"\n ],\n \"processId\": 78,\n \"success\": [\n \"success\"\n ],\n \"total\": 27\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"36e0a4db-6281-4b17-bcbe-d10a330348a5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dd30aa5c-59ad-4ff0-a95f-bf685d7b279e","name":"Get all the segments - default","request":{"urlPathTemplate":"/contacts/segments","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 2,\n \"segments\": [\n {\n \"categoryName\": \"Name1\",\n \"id\": 53,\n \"segmentName\": \"Segment1\",\n \"updatedAt\": \"2017-03-12T12:30:00Z\"\n },\n {\n \"categoryName\": \"Name2\",\n \"id\": 50,\n \"segmentName\": \"Segment2\",\n \"updatedAt\": \"2017-03-12T12:30:00Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"dd30aa5c-59ad-4ff0-a95f-bf685d7b279e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"5a0e7075-a413-4c22-a2bf-aa2f8e383d6d","name":"Get a contact's details - default","request":{"urlPathTemplate":"/contacts/{identifier}","method":"GET","pathParameters":{"identifier":{"equalTo":"identifier"}}},"response":{"status":200,"body":"{\n \"attributes\": {},\n \"createdAt\": \"2017-05-02T16:40:31Z\",\n \"email\": \"peggy.rain@example.com\",\n \"emailBlacklisted\": false,\n \"id\": 42,\n \"listIds\": [\n 40\n ],\n \"listUnsubscribed\": [\n 1000000\n ],\n \"modifiedAt\": \"2017-05-02T16:40:31Z\",\n \"smsBlacklisted\": false,\n \"statistics\": {\n \"clicked\": [\n {\n \"campaignId\": 21,\n \"links\": [\n {\n \"count\": 2,\n \"eventTime\": \"2016-05-03T21:25:01Z\",\n \"ip\": \"66.249.93.118\",\n \"url\": \"https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email\"\n }\n ]\n }\n ],\n \"complaints\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\"\n }\n ],\n \"delivered\": [\n {\n \"campaignId\": 21,\n \"eventTime\": \"2016-05-03T21:24:56Z\"\n }\n ],\n \"hardBounces\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\"\n }\n ],\n \"messagesSent\": [\n {\n \"campaignId\": 21,\n \"eventTime\": \"2016-05-03T20:15:13Z\"\n },\n {\n \"campaignId\": 42,\n \"eventTime\": \"2016-10-17T10:30:01Z\"\n }\n ],\n \"opened\": [\n {\n \"campaignId\": 21,\n \"count\": 2,\n \"eventTime\": \"2016-05-03T21:24:56Z\",\n \"ip\": \"66.249.93.118\"\n },\n {\n \"campaignId\": 68,\n \"count\": 1,\n \"eventTime\": \"2017-01-30T13:56:40Z\",\n \"ip\": \"66.249.93.217\"\n }\n ],\n \"softBounces\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\"\n }\n ],\n \"transacAttributes\": [\n {}\n ],\n \"unsubscriptions\": {\n \"adminUnsubscription\": [\n {\n \"eventTime\": \"2017-03-12T20:15:13Z\",\n \"ip\": \"165.87.3.15\"\n }\n ],\n \"userUnsubscription\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\",\n \"ip\": \"165.87.3.15\"\n }\n ]\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"5a0e7075-a413-4c22-a2bf-aa2f8e383d6d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"75a6a0e6-ae00-42cb-82ae-0bbe1f8bd2d1","name":"Update a contact - default","request":{"urlPathTemplate":"/contacts/{identifier}","method":"PUT","pathParameters":{"identifier":{"equalTo":"identifier"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"75a6a0e6-ae00-42cb-82ae-0bbe1f8bd2d1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fb8d40ed-00fd-4acc-88a7-32580773691f","name":"Delete a contact - default","request":{"urlPathTemplate":"/contacts/{identifier}","method":"DELETE","pathParameters":{"identifier":{"equalTo":"identifier"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"fb8d40ed-00fd-4acc-88a7-32580773691f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9797e88c-e80c-4130-9605-8986d5de0403","name":"Get email campaigns' statistics for a contact - default","request":{"urlPathTemplate":"/contacts/{identifier}/campaignStats","method":"GET","pathParameters":{"identifier":{"equalTo":"identifier"}}},"response":{"status":200,"body":"{\n \"clicked\": [\n {\n \"campaignId\": 21,\n \"links\": [\n {\n \"count\": 2,\n \"eventTime\": \"2016-05-03T21:25:01Z\",\n \"ip\": \"66.249.93.118\",\n \"url\": \"https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email\"\n }\n ]\n }\n ],\n \"complaints\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\"\n }\n ],\n \"delivered\": [\n {\n \"campaignId\": 21,\n \"eventTime\": \"2016-05-03T21:24:56Z\"\n }\n ],\n \"hardBounces\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\"\n }\n ],\n \"messagesSent\": [\n {\n \"campaignId\": 21,\n \"eventTime\": \"2016-05-03T20:15:13Z\"\n },\n {\n \"campaignId\": 42,\n \"eventTime\": \"2016-10-17T10:30:01Z\"\n },\n {\n \"campaignId\": 45,\n \"eventTime\": \"2016-11-09T11:45:02Z\"\n }\n ],\n \"opened\": [\n {\n \"campaignId\": 21,\n \"count\": 2,\n \"eventTime\": \"2016-05-03T21:24:56Z\",\n \"ip\": \"66.249.93.118\"\n },\n {\n \"campaignId\": 45,\n \"count\": 1,\n \"eventTime\": \"2017-01-30T13:56:40Z\",\n \"ip\": \"66.249.93.217\"\n }\n ],\n \"softBounces\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\"\n }\n ],\n \"transacAttributes\": [\n {\n \"orderDate\": \"2017-03-12\",\n \"orderId\": 248,\n \"orderPrice\": 24.99\n }\n ],\n \"unsubscriptions\": {\n \"adminUnsubscription\": [\n {\n \"eventTime\": \"2017-03-12T20:15:13Z\",\n \"ip\": \"165.87.3.15\"\n }\n ],\n \"userUnsubscription\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\",\n \"ip\": \"165.87.3.15\"\n }\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"9797e88c-e80c-4130-9605-8986d5de0403","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"989a2ce4-8788-48cc-963d-3d86cc2b2dd2","name":"Sets agent’s status to online for 2-3 minutes - default","request":{"urlPathTemplate":"/conversations/agentOnlinePing","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"989a2ce4-8788-48cc-963d-3d86cc2b2dd2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0b2458f6-3c0f-4f03-9f63-8051466d793b","name":"Send a message as an agent - default","request":{"urlPathTemplate":"/conversations/messages","method":"POST"},"response":{"status":200,"body":"{\n \"agentId\": \"d9nKoegKSjmCtyK78\",\n \"agentName\": \"Liz\",\n \"agentUserpic\": \"https://www.brevo.com/\",\n \"attachments\": [\n {\n \"fileName\": \"fileName\",\n \"inlineId\": \"inlineId\",\n \"isImage\": true,\n \"isInline\": \"isInline\",\n \"size\": 1000000,\n \"url\": \"url\"\n }\n ],\n \"bcc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"cc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"createdAt\": 1482512803740,\n \"file\": {\n \"filename\": \"conversations.png\",\n \"imageInfo\": {\n \"height\": 525,\n \"previewUrl\": \"https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/\",\n \"width\": 1129\n },\n \"isImage\": true,\n \"size\": 15538,\n \"url\": \"https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/\"\n },\n \"forwardedToSourceStatus\": {\n \"error\": \"error\",\n \"isSuccess\": true\n },\n \"from\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"html\": \"Hello! How can I help you?\",\n \"id\": \"eYBEm3gq3zc5ayE2g\",\n \"integrations\": {\n \"key\": \"value\"\n },\n \"isBot\": true,\n \"isMissed\": false,\n \"isMissedByVisitor\": false,\n \"isPushed\": false,\n \"isTrigger\": false,\n \"rawUnsafeHtml\": \"Good morning!
How can I help you?\",\n \"receivedFrom\": \"SuperAwesomeHelpdesk\",\n \"replyTo\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"sourceMessageId\": \"sourceMessageId\",\n \"subject\": \"Invitation to a meeting\",\n \"text\": \"Hello! How can I help you?\",\n \"to\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"type\": \"agent\",\n \"visitorId\": \"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"0b2458f6-3c0f-4f03-9f63-8051466d793b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"73c7e27f-534f-4bff-ae89-6508af694971","name":"Get a message - default","request":{"urlPathTemplate":"/conversations/messages/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"agentId\": \"d9nKoegKSjmCtyK78\",\n \"agentName\": \"Liz\",\n \"agentUserpic\": \"https://www.brevo.com/\",\n \"attachments\": [\n {\n \"fileName\": \"fileName\",\n \"inlineId\": \"inlineId\",\n \"isImage\": true,\n \"isInline\": \"isInline\",\n \"size\": 1000000,\n \"url\": \"url\"\n }\n ],\n \"bcc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"cc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"createdAt\": 1482512803740,\n \"file\": {\n \"filename\": \"conversations.png\",\n \"imageInfo\": {\n \"height\": 525,\n \"previewUrl\": \"https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/\",\n \"width\": 1129\n },\n \"isImage\": true,\n \"size\": 15538,\n \"url\": \"https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/\"\n },\n \"forwardedToSourceStatus\": {\n \"error\": \"error\",\n \"isSuccess\": true\n },\n \"from\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"html\": \"Hello! How can I help you?\",\n \"id\": \"eYBEm3gq3zc5ayE2g\",\n \"integrations\": {\n \"key\": \"value\"\n },\n \"isBot\": true,\n \"isMissed\": false,\n \"isMissedByVisitor\": false,\n \"isPushed\": false,\n \"isTrigger\": false,\n \"rawUnsafeHtml\": \"Good morning!
How can I help you?\",\n \"receivedFrom\": \"SuperAwesomeHelpdesk\",\n \"replyTo\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"sourceMessageId\": \"sourceMessageId\",\n \"subject\": \"Invitation to a meeting\",\n \"text\": \"Hello! How can I help you?\",\n \"to\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"type\": \"agent\",\n \"visitorId\": \"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"73c7e27f-534f-4bff-ae89-6508af694971","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"92155bd1-c19b-4aad-99c9-8a69133fc185","name":"Update a message sent by an agent - default","request":{"urlPathTemplate":"/conversations/messages/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"agentId\": \"d9nKoegKSjmCtyK78\",\n \"agentName\": \"Liz\",\n \"agentUserpic\": \"https://www.brevo.com/\",\n \"attachments\": [\n {\n \"fileName\": \"fileName\",\n \"inlineId\": \"inlineId\",\n \"isImage\": true,\n \"isInline\": \"isInline\",\n \"size\": 1000000,\n \"url\": \"url\"\n }\n ],\n \"bcc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"cc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"createdAt\": 1482512803740,\n \"file\": {\n \"filename\": \"conversations.png\",\n \"imageInfo\": {\n \"height\": 525,\n \"previewUrl\": \"https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/\",\n \"width\": 1129\n },\n \"isImage\": true,\n \"size\": 15538,\n \"url\": \"https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/\"\n },\n \"forwardedToSourceStatus\": {\n \"error\": \"error\",\n \"isSuccess\": true\n },\n \"from\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"html\": \"Hello! How can I help you?\",\n \"id\": \"eYBEm3gq3zc5ayE2g\",\n \"integrations\": {\n \"key\": \"value\"\n },\n \"isBot\": true,\n \"isMissed\": false,\n \"isMissedByVisitor\": false,\n \"isPushed\": false,\n \"isTrigger\": false,\n \"rawUnsafeHtml\": \"Good morning!
How can I help you?\",\n \"receivedFrom\": \"SuperAwesomeHelpdesk\",\n \"replyTo\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"sourceMessageId\": \"sourceMessageId\",\n \"subject\": \"Invitation to a meeting\",\n \"text\": \"Hello! How can I help you?\",\n \"to\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"type\": \"agent\",\n \"visitorId\": \"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"92155bd1-c19b-4aad-99c9-8a69133fc185","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"55448424-484f-42a8-b091-f8c24234f898","name":"Delete a message sent by an agent - default","request":{"urlPathTemplate":"/conversations/messages/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"55448424-484f-42a8-b091-f8c24234f898","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"7da39f40-5660-4486-b572-835f3f204973","name":"Send an automated message to a visitor - default","request":{"urlPathTemplate":"/conversations/pushedMessages","method":"POST"},"response":{"status":200,"body":"{\n \"agentId\": \"d9nKoegKSjmCtyK78\",\n \"agentName\": \"Liz\",\n \"agentUserpic\": \"https://www.brevo.com/\",\n \"attachments\": [\n {\n \"fileName\": \"fileName\",\n \"inlineId\": \"inlineId\",\n \"isImage\": true,\n \"isInline\": \"isInline\",\n \"size\": 1000000,\n \"url\": \"url\"\n }\n ],\n \"bcc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"cc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"createdAt\": 1470222622433,\n \"file\": {\n \"filename\": \"conversations.png\",\n \"imageInfo\": {\n \"height\": 525,\n \"previewUrl\": \"https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/\",\n \"width\": 1129\n },\n \"isImage\": true,\n \"size\": 15538,\n \"url\": \"https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/\"\n },\n \"forwardedToSourceStatus\": {\n \"error\": \"error\",\n \"isSuccess\": true\n },\n \"from\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"html\": \"Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88\",\n \"id\": \"AXCR3k9bpSY7bpuh7\",\n \"integrations\": {\n \"key\": \"value\"\n },\n \"isBot\": true,\n \"isMissed\": false,\n \"isMissedByVisitor\": false,\n \"isPushed\": true,\n \"isTrigger\": false,\n \"rawUnsafeHtml\": \"Good morning!
How can I help you?\",\n \"receivedFrom\": \"SuperAwesomeHelpdesk\",\n \"replyTo\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"sourceMessageId\": \"sourceMessageId\",\n \"subject\": \"Invitation to a meeting\",\n \"text\": \"Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88\",\n \"to\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"type\": \"agent\",\n \"visitorId\": \"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"7da39f40-5660-4486-b572-835f3f204973","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"12a96082-f3dc-4674-b4a6-a2fc4b6aea92","name":"Get an automated message - default","request":{"urlPathTemplate":"/conversations/pushedMessages/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"agentId\": \"d9nKoegKSjmCtyK78\",\n \"agentName\": \"Liz\",\n \"agentUserpic\": \"https://www.brevo.com/\",\n \"attachments\": [\n {\n \"fileName\": \"fileName\",\n \"inlineId\": \"inlineId\",\n \"isImage\": true,\n \"isInline\": \"isInline\",\n \"size\": 1000000,\n \"url\": \"url\"\n }\n ],\n \"bcc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"cc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"createdAt\": 1470222622433,\n \"file\": {\n \"filename\": \"conversations.png\",\n \"imageInfo\": {\n \"height\": 525,\n \"previewUrl\": \"https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/\",\n \"width\": 1129\n },\n \"isImage\": true,\n \"size\": 15538,\n \"url\": \"https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/\"\n },\n \"forwardedToSourceStatus\": {\n \"error\": \"error\",\n \"isSuccess\": true\n },\n \"from\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"html\": \"Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88\",\n \"id\": \"AXCR3k9bpSY7bpuh7\",\n \"integrations\": {\n \"key\": \"value\"\n },\n \"isBot\": true,\n \"isMissed\": false,\n \"isMissedByVisitor\": false,\n \"isPushed\": true,\n \"isTrigger\": false,\n \"rawUnsafeHtml\": \"Good morning!
How can I help you?\",\n \"receivedFrom\": \"SuperAwesomeHelpdesk\",\n \"replyTo\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"sourceMessageId\": \"sourceMessageId\",\n \"subject\": \"Invitation to a meeting\",\n \"text\": \"Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88\",\n \"to\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"type\": \"agent\",\n \"visitorId\": \"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"12a96082-f3dc-4674-b4a6-a2fc4b6aea92","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"88f6c974-0fa5-4c85-bd4a-2c306144fb5a","name":"Update an automated message - default","request":{"urlPathTemplate":"/conversations/pushedMessages/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"agentId\": \"d9nKoegKSjmCtyK78\",\n \"agentName\": \"Liz\",\n \"agentUserpic\": \"https://www.brevo.com/\",\n \"attachments\": [\n {\n \"fileName\": \"fileName\",\n \"inlineId\": \"inlineId\",\n \"isImage\": true,\n \"isInline\": \"isInline\",\n \"size\": 1000000,\n \"url\": \"url\"\n }\n ],\n \"bcc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"cc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"createdAt\": 1470222622433,\n \"file\": {\n \"filename\": \"conversations.png\",\n \"imageInfo\": {\n \"height\": 525,\n \"previewUrl\": \"https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/\",\n \"width\": 1129\n },\n \"isImage\": true,\n \"size\": 15538,\n \"url\": \"https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/\"\n },\n \"forwardedToSourceStatus\": {\n \"error\": \"error\",\n \"isSuccess\": true\n },\n \"from\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"html\": \"Your order has shipped! Here’s your tracking number: 9114 5847 4668 7775 9233 54\",\n \"id\": \"AXCR3k9bpSY7bpuh7\",\n \"integrations\": {\n \"key\": \"value\"\n },\n \"isBot\": true,\n \"isMissed\": false,\n \"isMissedByVisitor\": false,\n \"isPushed\": true,\n \"isTrigger\": false,\n \"rawUnsafeHtml\": \"Good morning!
How can I help you?\",\n \"receivedFrom\": \"SuperAwesomeHelpdesk\",\n \"replyTo\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"sourceMessageId\": \"sourceMessageId\",\n \"subject\": \"Invitation to a meeting\",\n \"text\": \"Your order has shipped! Here’s your tracking number: 9114 5847 4668 7775 9233 54\",\n \"to\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"type\": \"agent\",\n \"visitorId\": \"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"88f6c974-0fa5-4c85-bd4a-2c306144fb5a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a43cca1b-0cb5-4197-ad31-8ce0e455a7fe","name":"Delete an automated message - default","request":{"urlPathTemplate":"/conversations/pushedMessages/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a43cca1b-0cb5-4197-ad31-8ce0e455a7fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"27ddcd9f-5f2e-408f-a518-a4e395c047ee","name":"Set visitor group assignment - default","request":{"urlPathTemplate":"/conversations/visitorGroup","method":"PUT"},"response":{"status":200,"body":"{\n \"groupId\": \"PjRBMhWGen6aRHjif\",\n \"visitorId\": \"AXCR3k9bpSY7bpuh7\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"27ddcd9f-5f2e-408f-a518-a4e395c047ee","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6e38c169-881b-465d-ae5b-201dfe4364a5","name":"Return all your categories - default","request":{"urlPathTemplate":"/categories","method":"GET"},"response":{"status":200,"body":"{\n \"categories\": [\n {\n \"createdAt\": \"2021-12-31T11:42:35.638Z\",\n \"id\": \"C19\",\n \"isDeleted\": true,\n \"modifiedAt\": \"2022-03-03T14:48:31.867Z\",\n \"name\": \"Food\",\n \"url\": \"http://mydomain.com/category/food\"\n },\n {\n \"createdAt\": \"2021-12-31T11:42:35.638Z\",\n \"id\": \"C20\",\n \"isDeleted\": true,\n \"modifiedAt\": \"2022-03-03T14:48:31.867Z\",\n \"name\": \"clothing\",\n \"url\": \"http://mydomain.com/category/clothing\"\n }\n ],\n \"count\": 2\n}","headers":{"Content-Type":"application/json"}},"uuid":"6e38c169-881b-465d-ae5b-201dfe4364a5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"c1c0c1db-676d-40e5-954f-ce7abd8fa780","name":"Create/Update a category - default","request":{"urlPathTemplate":"/categories","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 21\n}","headers":{"Content-Type":"application/json"}},"uuid":"c1c0c1db-676d-40e5-954f-ce7abd8fa780","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3355346d-e446-4635-9316-d9de9c0c8459","name":"Create categories in batch - default","request":{"urlPathTemplate":"/categories/batch","method":"POST"},"response":{"status":201,"body":"{\n \"createdCount\": 2,\n \"updatedCount\": 7\n}","headers":{"Content-Type":"application/json"}},"uuid":"3355346d-e446-4635-9316-d9de9c0c8459","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e9a3bc64-c4fb-42bc-a44c-51ff0565f57d","name":"Get a category details - default","request":{"urlPathTemplate":"/categories/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"createdAt\": \"2017-05-12T12:30:00Z\",\n \"id\": \"C11\",\n \"isDeleted\": true,\n \"modifiedAt\": \"2017-05-12T12:30:00Z\",\n \"name\": \"Electronics\",\n \"url\": \"http://mydomain.com/category/clothing\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e9a3bc64-c4fb-42bc-a44c-51ff0565f57d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4aa9f4f1-3b05-446e-a5c8-175ce020f7dd","name":"Activate the eCommerce app - default","request":{"urlPathTemplate":"/ecommerce/activate","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4aa9f4f1-3b05-446e-a5c8-175ce020f7dd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ef76fef3-dd84-4cf8-9fa5-ff136eea6618","name":"Get attribution metrics for one or more Brevo campaigns or workflows - default","request":{"urlPathTemplate":"/ecommerce/attribution/metrics","method":"GET","queryParameters":{"periodFrom":{"equalTo":"2022-01-02T00:00:00Z"},"periodTo":{"equalTo":"2022-01-03T00:00:00Z"}}},"response":{"status":200,"body":"{\n \"results\": [\n {\n \"averageBasket\": 3,\n \"conversionSource\": \"email_campaign\",\n \"id\": 1.1,\n \"ordersCount\": 300,\n \"revenue\": 900\n },\n {\n \"averageBasket\": 4,\n \"conversionSource\": \"email_campaign\",\n \"id\": 1.1,\n \"ordersCount\": 200,\n \"revenue\": 800\n }\n ],\n \"totals\": {\n \"averageBasket\": 3.4,\n \"ordersCount\": 500,\n \"revenue\": 1700\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"ef76fef3-dd84-4cf8-9fa5-ff136eea6618","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"a673ac7e-f9a7-4c21-bd80-b49ff3c73efc","name":"Get detailed attribution metrics for a single Brevo campaign or workflow - default","request":{"urlPathTemplate":"/ecommerce/attribution/metrics/{conversionSource}/{conversionSourceId}","method":"GET","pathParameters":{"conversionSource":{"equalTo":"email_campaign"},"conversionSourceId":{"equalTo":"sale"}}},"response":{"status":200,"body":"{\n \"averageBasket\": 1.1,\n \"conversionSource\": \"email_campaign\",\n \"id\": 1.1,\n \"ordersCount\": 1.1,\n \"revenue\": 1.1,\n \"newCustomersCount\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"a673ac7e-f9a7-4c21-bd80-b49ff3c73efc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d80e42ab-4376-47f6-9971-baead08cd9ec","name":"Get attributed product sales for a single Brevo campaign or workflow - default","request":{"urlPathTemplate":"/ecommerce/attribution/products/{conversionSource}/{conversionSourceId}","method":"GET","pathParameters":{"conversionSource":{"equalTo":"email_campaign"},"conversionSourceId":{"equalTo":"sale"}}},"response":{"status":200,"body":"{\n \"products\": [\n {\n \"id\": \"1\",\n \"imageUrl\": \"http://mydomain.com/product-absoulte-url/img.jpeg\",\n \"name\": \"Milky Way Galaxy\",\n \"ordersCount\": 200,\n \"price\": 1000,\n \"revenue\": 999.99,\n \"sku\": \"sku-1\",\n \"url\": \"https://mydomain.com/products/alpina-panoma-classic\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d80e42ab-4376-47f6-9971-baead08cd9ec","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ab816e77-ae78-42da-b0ac-c9e2a426dd38","name":"Get the ISO 4217 compliant display currency code for your Brevo account - default","request":{"urlPathTemplate":"/ecommerce/config/displayCurrency","method":"GET"},"response":{"status":200,"body":"{\n \"code\": \"EUR\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"ab816e77-ae78-42da-b0ac-c9e2a426dd38","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"c8c71b7b-bc9d-4d4f-83d0-1d4a57463596","name":"Set the ISO 4217 compliant display currency code for your Brevo account - default","request":{"urlPathTemplate":"/ecommerce/config/displayCurrency","method":"POST"},"response":{"status":200,"body":"{\n \"code\": \"EUR\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c8c71b7b-bc9d-4d4f-83d0-1d4a57463596","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a36a1140-3b78-405a-bb99-4be25b0e6f61","name":"Get order details - default","request":{"urlPathTemplate":"/orders","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 1,\n \"orders\": [\n {\n \"amount\": 2000,\n \"billing\": {\n \"address\": \"Sec 62, Noida\",\n \"city\": \"Noida\",\n \"country\": \"India\",\n \"countryCode\": \"IN\",\n \"paymentMethod\": \"Net banking\",\n \"phone\": 9238283982,\n \"postCode\": 110001,\n \"region\": \"North India\"\n },\n \"contact_id\": 2,\n \"coupons\": [\n \"flat50\",\n \"flat40\"\n ],\n \"createdAt\": \"2021-12-31T11:42:35.638Z\",\n \"email\": \"testvisitor@sendinblue.com\",\n \"id\": \"order1803\",\n \"identifiers\": {\n \"ext_id\": \"ab12\",\n \"loyalty_subscription_id\": \"1234\"\n },\n \"products\": [\n {\n \"price\": 100,\n \"productId\": 21,\n \"quantity\": 2,\n \"quantityFloat\": 0,\n \"variantId\": \"P100\"\n },\n {\n \"price\": 100,\n \"productId\": 21,\n \"quantity\": 0,\n \"quantityFloat\": 2.52,\n \"variantId\": \"P15756\"\n }\n ],\n \"status\": \"complete\",\n \"storeId\": \"123\",\n \"updatedAt\": \"2022-03-03T14:48:31.867Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"a36a1140-3b78-405a-bb99-4be25b0e6f61","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7063107e-0ad5-4bbd-97ec-def7bdb05465","name":"Managing the status of the order - default","request":{"urlPathTemplate":"/orders/status","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"7063107e-0ad5-4bbd-97ec-def7bdb05465","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1d3a52e5-1eb4-4b21-9a58-9136f4d6cdda","name":"Create orders in batch - default","request":{"urlPathTemplate":"/orders/status/batch","method":"POST"},"response":{"status":202,"body":"{\n \"batchId\": 1.1,\n \"count\": 17655\n}","headers":{"Content-Type":"application/json"}},"uuid":"1d3a52e5-1eb4-4b21-9a58-9136f4d6cdda","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fd7eae8c-354e-4a43-8cea-0aa947291dea","name":"Return all your products - default","request":{"urlPathTemplate":"/products","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 2,\n \"products\": [\n {\n \"brand\": \"Adidas\",\n \"categories\": [\n \"279638835374\",\n \"279502848174\"\n ],\n \"createdAt\": \"2022-06-30T10:29:16.078Z\",\n \"description\": \"Shoes for sports\",\n \"id\": \"P11\",\n \"imageUrl\": \"http://mydomain.com/product-absoulte-url/img.jpeg\",\n \"isDeleted\": true,\n \"metaInfo\": {\n \"brand\": \"addidas\",\n \"description\": \"Shoes for sports\"\n },\n \"modifiedAt\": \"2022-06-30T10:29:16.078Z\",\n \"name\": \"Alpina Panoma Classic\",\n \"parentId\": \"parentId\",\n \"price\": 49.95,\n \"s3Original\": \"https://img-ecom.mailinblue.com/path-to-original/img.jpg\",\n \"s3ThumbAnalytics\": \"https://img-ecom.mailinblue.com/path-to-analytics/img.jpg\",\n \"s3ThumbEditor\": \"https://img-ecom.mailinblue.com/path-to-editor/img.jpg\",\n \"sku\": \"186622-9\",\n \"stock\": 100,\n \"url\": \"https://mydomain.com/products/alpina-panoma-classic\"\n },\n {\n \"brand\": \"Adidas\",\n \"categories\": [\n \"2d79638835374\",\n \"27d9502848174\"\n ],\n \"createdAt\": \"2022-06-30T10:29:16.078Z\",\n \"description\": \"Shoes for sports\",\n \"id\": \"P11\",\n \"imageUrl\": \"http://mydomain.com/product-absoulte-url/img.jpeg\",\n \"isDeleted\": true,\n \"metaInfo\": {\n \"brand\": \"addidas\",\n \"description\": \"Shoes for sports\"\n },\n \"modifiedAt\": \"2022-06-30T10:29:16.078Z\",\n \"name\": \"Alpina Panoma Classic2\",\n \"parentId\": \"parentId\",\n \"price\": 49.95,\n \"s3Original\": \"https://img-ecom.mailinblue.com/path-to-original/img.jpg\",\n \"s3ThumbAnalytics\": \"https://img-ecom.mailinblue.com/path-to-analytics/img.jpg\",\n \"s3ThumbEditor\": \"https://img-ecom.mailinblue.com/path-to-editor/img.jpg\",\n \"sku\": \"186622-9\",\n \"stock\": 350,\n \"url\": \"https://mydomain.com/products/alpina-panoma-classic2\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fd7eae8c-354e-4a43-8cea-0aa947291dea","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"8a42981c-cdd8-404e-bdb0-edaac19b7e0c","name":"Create/Update a product - default","request":{"urlPathTemplate":"/products","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 21\n}","headers":{"Content-Type":"application/json"}},"uuid":"8a42981c-cdd8-404e-bdb0-edaac19b7e0c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5f2f0859-18a7-463c-bee7-4afb4ba092b0","name":"Create products in batch - default","request":{"urlPathTemplate":"/products/batch","method":"POST"},"response":{"status":201,"body":"{\n \"createdCount\": 2,\n \"updatedCount\": 7\n}","headers":{"Content-Type":"application/json"}},"uuid":"5f2f0859-18a7-463c-bee7-4afb4ba092b0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dcc8be20-9ebc-41b7-a9e0-2e9b9004756a","name":"Get a product's details - default","request":{"urlPathTemplate":"/products/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"brand\": \"Adidas\",\n \"categories\": [\n \"categories\"\n ],\n \"createdAt\": \"2017-05-12T12:30:00Z\",\n \"description\": \"Shoes for sports\",\n \"id\": \"P11\",\n \"imageUrl\": \"http://mydomain.com/product-absoulte-url/img.jpeg\",\n \"isDeleted\": true,\n \"metaInfo\": {\n \"brand\": \"addidas\",\n \"description\": \"Shoes for sports\"\n },\n \"modifiedAt\": \"2017-05-12T12:30:00Z\",\n \"name\": \"Iphone 11\",\n \"parentId\": \"parentId\",\n \"price\": 1.1,\n \"s3Original\": \"s3Original\",\n \"s3ThumbAnalytics\": \"s3ThumbAnalytics\",\n \"s3ThumbEditor\": \"s3ThumbEditor\",\n \"sku\": \"sku\",\n \"stock\": 100,\n \"url\": \"http://mydomain.com/product/electronics/product1\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"dcc8be20-9ebc-41b7-a9e0-2e9b9004756a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e82388ef-e4d4-4ac5-874c-2f802a602bed","name":"Create a product alert for a contact - default","request":{"urlPathTemplate":"/products/{id}/alerts/{type}","method":"POST","pathParameters":{"id":{"equalTo":"id"},"type":{"equalTo":"back_in_stock"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"e82388ef-e4d4-4ac5-874c-2f802a602bed","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1afa5f6e-118c-4482-b744-5ef2a9799cf5","name":"Get all your coupon collections - default","request":{"urlPathTemplate":"/couponCollections","method":"GET"},"response":{"status":200,"body":"{\n \"createdAt\": \"2023-01-06T05:03:47Z\",\n \"defaultCoupon\": \"10 OFF\",\n \"expirationDate\": \"2024-01-01T00:00:00Z\",\n \"id\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"name\": \"SummerPromotions\",\n \"remainingCoupons\": 5000,\n \"remainingCouponsAlert\": 5,\n \"remainingDaysAlert\": 5,\n \"totalCoupons\": 10000\n}","headers":{"Content-Type":"application/json"}},"uuid":"1afa5f6e-118c-4482-b744-5ef2a9799cf5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"e6cacd7a-7ba8-4b0a-822c-0d6971f40073","name":"Create Π° coupon collection - default","request":{"urlPathTemplate":"/couponCollections","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"23befbae-1505-47a8-bd27-e30ef739f32c\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e6cacd7a-7ba8-4b0a-822c-0d6971f40073","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dff4a2fb-73ac-479f-ab4c-2c9110fd1537","name":"Get a coupon collection by id - default","request":{"urlPathTemplate":"/couponCollections/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"createdAt\": \"2023-01-06T05:03:47Z\",\n \"defaultCoupon\": \"10 OFF\",\n \"expirationDate\": \"2024-01-01T00:00:00Z\",\n \"id\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"name\": \"SummerPromotions\",\n \"remainingCoupons\": 5000,\n \"remainingCouponsAlert\": 5,\n \"remainingDaysAlert\": 5,\n \"totalCoupons\": 10000\n}","headers":{"Content-Type":"application/json"}},"uuid":"dff4a2fb-73ac-479f-ab4c-2c9110fd1537","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e28907c7-b011-4634-bb47-d32e210b128b","name":"Update a coupon collection by id - default","request":{"urlPathTemplate":"/couponCollections/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"defaultCoupon\": \"10 OFF\",\n \"id\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"name\": \"SummerPromotions\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e28907c7-b011-4634-bb47-d32e210b128b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eef10e8c-75d8-4adc-9fb0-8c2daeb31145","name":"Create coupons for a coupon collection - default","request":{"urlPathTemplate":"/coupons","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"eef10e8c-75d8-4adc-9fb0-8c2daeb31145","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"35f2e6da-c185-4829-b6ce-3bd466f76681","name":"Create a payment request - default","request":{"urlPathTemplate":"/payments/requests","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 122,\n \"url\": \"https://pay.brevo.com/payment/6d4ec0b2b48ef803df4103ve\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"35f2e6da-c185-4829-b6ce-3bd466f76681","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"173baf22-0f60-411a-b5e3-f68c427c3a5d","name":"Get payment request details - default","request":{"urlPathTemplate":"/payments/requests/{id}","method":"GET","pathParameters":{"id":{"equalTo":"050db7b0-9bb7-4c1e-9c68-5a8dace8c1dc"}}},"response":{"status":200,"body":"{\n \"cart\": {\n \"currency\": \"EUR\",\n \"specificAmount\": 1200\n },\n \"configuration\": {\n \"customSuccessUrl\": \"https://my-company.com/payment-success\"\n },\n \"contactId\": 43,\n \"notification\": {\n \"channel\": \"email\",\n \"text\": \"Please pay for your yoga class.\"\n },\n \"numberOfRemindersSent\": 5,\n \"reference\": \"Invoice #INV0001\\n\",\n \"status\": \"paid\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"173baf22-0f60-411a-b5e3-f68c427c3a5d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"87ef813d-0336-4656-a5b5-e0899662397f","name":"Delete a payment request. - default","request":{"urlPathTemplate":"/payments/requests/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"9ae7d68a-565c-4695-9381-d8fb3e3a14cc"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"87ef813d-0336-4656-a5b5-e0899662397f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ba454d34-a70b-484d-a728-ffc42856a7b5","name":"Get events - default","request":{"urlPathTemplate":"/events","method":"GET"},"response":{"status":200,"body":"{\n \"events\": [\n {\n \"contact_id\": 211,\n \"event_date\": \"2024-02-06T20:59:23Z\",\n \"event_name\": \"order_created\",\n \"event_filter_id\": \"abc123\",\n \"source\": \"api\",\n \"object_type\": \"subscription\",\n \"event_properties\": {\n \"duration\": 142,\n \"video_title\": \"Brevo β€” The most approachable CRM suite\"\n },\n \"contact_properties\": {\n \"AGE\": 32,\n \"GENDER\": \"FEMALE\"\n }\n }\n ],\n \"count\": 2\n}","headers":{"Content-Type":"application/json"}},"uuid":"ba454d34-a70b-484d-a728-ffc42856a7b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"aed029ff-9be1-4acb-9dcf-a4c3e218a560","name":"Create an event - default","request":{"urlPathTemplate":"/events","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"aed029ff-9be1-4acb-9dcf-a4c3e218a560","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"89ae63a4-2b31-419a-87b1-c44e0fa54de2","name":"Create events in batch - default","request":{"urlPathTemplate":"/events/batch","method":"POST"},"response":{"status":202,"body":"{\n \"message\": \"Batch accepted. Valid events have been added to the processing queue.\",\n \"count\": 7\n}","headers":{"Content-Type":"application/json"}},"uuid":"89ae63a4-2b31-419a-87b1-c44e0fa54de2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"09aa7143-15a9-433c-a1e0-3444863bbf64","name":"Get the list of all the events for the received emails. - default","request":{"urlPathTemplate":"/inbound/events","method":"GET"},"response":{"status":200,"body":"{\n \"events\": [\n {\n \"date\": \"2017-03-11T12:30:00Z\",\n \"recipient\": \"alexa@example.com\",\n \"sender\": \"john@example.com\",\n \"uuid\": \"1a825d56-029b-4a41-b8e4-1a825d56\"\n },\n {\n \"date\": \"2017-03-12T12:30:00Z\",\n \"recipient\": \"bob@example.com\",\n \"sender\": \"alice@example.com\",\n \"uuid\": \"1a825d56-029b-4a41-b8e4-61670463431b\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"09aa7143-15a9-433c-a1e0-3444863bbf64","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"ee4248db-9736-4af1-a32a-5a7de6f5328a","name":"Fetch all events history for one particular received email. - default","request":{"urlPathTemplate":"/inbound/events/{uuid}","method":"GET","pathParameters":{"uuid":{"equalTo":"uuid"}}},"response":{"status":200,"body":"{\n \"attachments\": [\n {\n \"contentLength\": 12345,\n \"contentType\": \"application/pdf\",\n \"name\": \"invoice.pdf\"\n }\n ],\n \"deliveredAt\": \"2017-03-12T12:31:00Z\",\n \"logs\": [\n {\n \"date\": \"2017-03-12T12:30:00Z\",\n \"type\": \"received\"\n },\n {\n \"date\": \"2017-03-12T12:30:04Z\",\n \"type\": \"webhookFailed\"\n },\n {\n \"date\": \"2017-03-12T12:31:04Z\",\n \"type\": \"webhookDelivered\"\n }\n ],\n \"messageId\": \"\",\n \"receivedAt\": \"2017-03-12T12:30:00Z\",\n \"recipient\": \"bob@example.com\",\n \"sender\": \"alice@example.com\",\n \"subject\": \"Re: Question about your API\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"ee4248db-9736-4af1-a32a-5a7de6f5328a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3426b7cd-c7c6-4cd0-8359-916c1482c4a3","name":"Retrieve inbound attachment with download token. - default","request":{"urlPathTemplate":"/inbound/attachments/{downloadToken}","method":"GET","pathParameters":{"downloadToken":{"equalTo":"downloadToken"}}},"response":{"status":200,"body":"{\n \"key\": \"value\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"3426b7cd-c7c6-4cd0-8359-916c1482c4a3","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b8273ac4-3d1a-4b9a-b003-bb49ef16337f","name":"Get Active Balances API - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/active-balance","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}},"queryParameters":{"contact_id":{"equalTo":"1"},"balance_definition_id":{"equalTo":"balance_definition_id"}}},"response":{"status":200,"body":"{\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"constraintType\": \"constraintType\",\n \"createdAt\": \"createdAt\",\n \"durationUnit\": \"durationUnit\",\n \"durationValue\": 1,\n \"id\": \"id\",\n \"slidingSchedule\": true,\n \"transactionType\": \"transactionType\",\n \"updatedAt\": \"updatedAt\",\n \"value\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"b8273ac4-3d1a-4b9a-b003-bb49ef16337f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"7ed4ff5a-868f-45ef-a95a-550b62f69d5a","name":"Get balance definition list - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"balanceAvailabilityDurationModifier\": \"startOfPeriod\",\n \"balanceAvailabilityDurationUnit\": \"balanceAvailabilityDurationUnit\",\n \"balanceAvailabilityDurationValue\": 1,\n \"balanceExpirationDate\": \"2024-01-15T09:30:00Z\",\n \"balanceOptionAmountOvertakingStrategy\": \"balanceOptionAmountOvertakingStrategy\",\n \"balanceOptionCreditRounding\": \"balanceOptionCreditRounding\",\n \"balanceOptionDebitRounding\": \"balanceOptionDebitRounding\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"deletedAt\": \"deletedAt\",\n \"description\": \"description\",\n \"id\": \"id\",\n \"imageRef\": \"imageRef\",\n \"maxAmount\": 1.1,\n \"maxCreditAmountLimit\": 1.1,\n \"maxDebitAmountLimit\": 1.1,\n \"meta\": {\n \"key\": \"value\"\n },\n \"minAmount\": 1.1,\n \"name\": \"name\",\n \"unit\": \"unit\",\n \"updatedAt\": \"updatedAt\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"7ed4ff5a-868f-45ef-a95a-550b62f69d5a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9db15f6f-dd09-4033-bff7-9d94ef6ae471","name":"Create balance definition - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"balanceAvailabilityDurationModifier\": \"startOfPeriod\",\n \"balanceAvailabilityDurationUnit\": \"balanceAvailabilityDurationUnit\",\n \"balanceAvailabilityDurationValue\": 1,\n \"balanceExpirationDate\": \"2024-01-15T09:30:00Z\",\n \"balanceOptionAmountOvertakingStrategy\": \"balanceOptionAmountOvertakingStrategy\",\n \"balanceOptionCreditRounding\": \"balanceOptionCreditRounding\",\n \"balanceOptionDebitRounding\": \"balanceOptionDebitRounding\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"deletedAt\": \"deletedAt\",\n \"description\": \"description\",\n \"id\": \"id\",\n \"imageRef\": \"imageRef\",\n \"maxAmount\": 1.1,\n \"maxCreditAmountLimit\": 1.1,\n \"maxDebitAmountLimit\": 1.1,\n \"meta\": {\n \"key\": \"value\"\n },\n \"minAmount\": 1.1,\n \"name\": \"name\",\n \"unit\": \"unit\",\n \"updatedAt\": \"updatedAt\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"9db15f6f-dd09-4033-bff7-9d94ef6ae471","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5171ff4c-8ab1-4886-96b9-72845239dcb2","name":"Get balance definition - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}","method":"GET","pathParameters":{"pid":{"equalTo":"pid"},"bdid":{"equalTo":"bdid"}}},"response":{"status":200,"body":"{\n \"balanceAvailabilityDurationModifier\": \"startOfPeriod\",\n \"balanceAvailabilityDurationUnit\": \"balanceAvailabilityDurationUnit\",\n \"balanceAvailabilityDurationValue\": 1,\n \"balanceExpirationDate\": \"2024-01-15T09:30:00Z\",\n \"balanceOptionAmountOvertakingStrategy\": \"balanceOptionAmountOvertakingStrategy\",\n \"balanceOptionCreditRounding\": \"balanceOptionCreditRounding\",\n \"balanceOptionDebitRounding\": \"balanceOptionDebitRounding\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"deletedAt\": \"deletedAt\",\n \"description\": \"description\",\n \"id\": \"id\",\n \"imageRef\": \"imageRef\",\n \"maxAmount\": 1.1,\n \"maxCreditAmountLimit\": 1.1,\n \"maxDebitAmountLimit\": 1.1,\n \"meta\": {\n \"key\": \"value\"\n },\n \"minAmount\": 1.1,\n \"name\": \"name\",\n \"unit\": \"unit\",\n \"updatedAt\": \"updatedAt\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"5171ff4c-8ab1-4886-96b9-72845239dcb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1da76c71-d209-4641-9094-43a7214838ef","name":"Update balance definition - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}","method":"PUT","pathParameters":{"pid":{"equalTo":"pid"},"bdid":{"equalTo":"bdid"}}},"response":{"status":200,"body":"{\n \"balanceAvailabilityDurationModifier\": \"startOfPeriod\",\n \"balanceAvailabilityDurationUnit\": \"balanceAvailabilityDurationUnit\",\n \"balanceAvailabilityDurationValue\": 1,\n \"balanceExpirationDate\": \"2024-01-15T09:30:00Z\",\n \"balanceOptionAmountOvertakingStrategy\": \"balanceOptionAmountOvertakingStrategy\",\n \"balanceOptionCreditRounding\": \"balanceOptionCreditRounding\",\n \"balanceOptionDebitRounding\": \"balanceOptionDebitRounding\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"deletedAt\": \"deletedAt\",\n \"description\": \"description\",\n \"id\": \"id\",\n \"imageRef\": \"imageRef\",\n \"maxAmount\": 1.1,\n \"maxCreditAmountLimit\": 1.1,\n \"maxDebitAmountLimit\": 1.1,\n \"meta\": {\n \"key\": \"value\"\n },\n \"minAmount\": 1.1,\n \"name\": \"name\",\n \"unit\": \"unit\",\n \"updatedAt\": \"updatedAt\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"1da76c71-d209-4641-9094-43a7214838ef","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a3817b26-f6c9-4900-86c4-6d4869b41b38","name":"Delete balance definition - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"},"bdid":{"equalTo":"bdid"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a3817b26-f6c9-4900-86c4-6d4869b41b38","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d2118a4-5218-46f1-8513-ef75d832d7d5","name":"Create balance limits - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits","method":"POST","pathParameters":{"pid":{"equalTo":"pid"},"bdid":{"equalTo":"bdid"}}},"response":{"status":200,"body":"{\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"constraintType\": \"constraintType\",\n \"createdAt\": \"createdAt\",\n \"durationUnit\": \"durationUnit\",\n \"durationValue\": 1,\n \"id\": \"id\",\n \"slidingSchedule\": true,\n \"transactionType\": \"transactionType\",\n \"updatedAt\": \"updatedAt\",\n \"value\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"3d2118a4-5218-46f1-8513-ef75d832d7d5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5def443d-7ef0-4c5c-99d3-9e38a21ed142","name":"Get balance limits - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}","method":"GET","pathParameters":{"pid":{"equalTo":"pid"},"bdid":{"equalTo":"bdid"},"blid":{"equalTo":"blid"}}},"response":{"status":200,"body":"{\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"constraintType\": \"constraintType\",\n \"createdAt\": \"createdAt\",\n \"durationUnit\": \"durationUnit\",\n \"durationValue\": 1,\n \"id\": \"id\",\n \"slidingSchedule\": true,\n \"transactionType\": \"transactionType\",\n \"updatedAt\": \"updatedAt\",\n \"value\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"5def443d-7ef0-4c5c-99d3-9e38a21ed142","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3c24feb3-061c-4954-a12f-81100122b866","name":"Updates balance limit - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}","method":"PUT","pathParameters":{"pid":{"equalTo":"pid"},"bdid":{"equalTo":"bdid"},"blid":{"equalTo":"blid"}}},"response":{"status":200,"body":"{\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"constraintType\": \"constraintType\",\n \"createdAt\": \"createdAt\",\n \"durationUnit\": \"durationUnit\",\n \"durationValue\": 1,\n \"id\": \"id\",\n \"slidingSchedule\": true,\n \"transactionType\": \"transactionType\",\n \"updatedAt\": \"updatedAt\",\n \"value\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"3c24feb3-061c-4954-a12f-81100122b866","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"60e7789f-ecdc-4330-96f5-426c8865aa02","name":"Delete balance limit - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"},"bdid":{"equalTo":"bdid"},"blid":{"equalTo":"blid"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"60e7789f-ecdc-4330-96f5-426c8865aa02","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a00ea68f-14e1-4bbc-a3ad-1f4c555dbd92","name":"Get balance list - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/contact-balances","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"balances\": [\n {\n \"contactId\": 1,\n \"loyaltySubscriptionId\": \"loyaltySubscriptionId\",\n \"updatedAt\": \"updatedAt\",\n \"value\": 1.1\n }\n ],\n \"count\": 1,\n \"loyaltyProgramId\": \"loyaltyProgramId\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"a00ea68f-14e1-4bbc-a3ad-1f4c555dbd92","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"24af1e00-9fca-4515-89c5-bce7048b3f2e","name":"Create balance order - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/create-order","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"amount\": 1.1,\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"contactId\": 1,\n \"createdAt\": \"createdAt\",\n \"dueAt\": \"dueAt\",\n \"expiresAt\": \"expiresAt\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"processedAt\": \"processedAt\",\n \"transactionid\": \"transactionid\",\n \"updatedAt\": \"updatedAt\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"24af1e00-9fca-4515-89c5-bce7048b3f2e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"bd77b0ff-3379-4930-aa93-f8cc25163bee","name":"Get subscription balances - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/subscriptions/{cid}/balances","method":"GET","pathParameters":{"pid":{"equalTo":"pid"},"cid":{"equalTo":"cid"}}},"response":{"status":200,"body":"{\n \"balance\": [\n {\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"value\": 1.1\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"bd77b0ff-3379-4930-aa93-f8cc25163bee","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"06abbd3e-aec8-48f0-9c90-49887599e5ac","name":"Create subscription balances - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/subscriptions/{cid}/balances","method":"POST","pathParameters":{"pid":{"equalTo":"pid"},"cid":{"equalTo":"cid"}}},"response":{"status":200,"body":"{\n \"amount\": 1.1,\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"consumedAt\": \"consumedAt\",\n \"contactId\": 1,\n \"createdAt\": \"createdAt\",\n \"expiresAt\": \"expiresAt\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"organizationId\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"06abbd3e-aec8-48f0-9c90-49887599e5ac","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d806b377-c3f2-46e1-af10-826fc8cb7a77","name":"Get Transaction History API - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/transaction-history","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}},"queryParameters":{"contactId":{"equalTo":"1"},"balanceDefinitionId":{"equalTo":"balanceDefinitionId"}}},"response":{"status":200,"body":"{\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"contactId\": 1,\n \"count\": 1,\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"transactionHistory\": [\n {\n \"amount\": 1.1,\n \"balanceExpirationDate\": \"balanceExpirationDate\",\n \"cancelledAt\": \"cancelledAt\",\n \"completedAt\": \"completedAt\",\n \"createdAt\": \"createdAt\",\n \"id\": \"id\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rejectReason\": \"rejectReason\",\n \"rejectedAt\": \"rejectedAt\",\n \"status\": \"status\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d806b377-c3f2-46e1-af10-826fc8cb7a77","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"01dd65f2-fc30-4f9a-94e7-cf908b0c0b6a","name":"Create new transaction - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/transactions","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"amount\": 1.1,\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"cancelledAt\": \"cancelledAt\",\n \"completedAt\": \"completedAt\",\n \"contactId\": 1,\n \"createdAt\": \"createdAt\",\n \"eventTime\": \"eventTime\",\n \"expirationDate\": \"expirationDate\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rejectReason\": \"rejectReason\",\n \"rejectedAt\": \"rejectedAt\",\n \"status\": \"status\",\n \"updatedAt\": \"updatedAt\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"01dd65f2-fc30-4f9a-94e7-cf908b0c0b6a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"bd42f484-63b7-431c-9d4b-a149ff9cd0b8","name":"Cancel transaction - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/transactions/{tid}/cancel","method":"POST","pathParameters":{"pid":{"equalTo":"pid"},"tid":{"equalTo":"tid"}}},"response":{"status":200,"body":"{\n \"amount\": 1.1,\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"cancelledAt\": \"cancelledAt\",\n \"completedAt\": \"completedAt\",\n \"contactId\": 1,\n \"createdAt\": \"createdAt\",\n \"eventTime\": \"eventTime\",\n \"expirationDate\": \"expirationDate\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rejectReason\": \"rejectReason\",\n \"rejectedAt\": \"rejectedAt\",\n \"status\": \"status\",\n \"updatedAt\": \"updatedAt\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"bd42f484-63b7-431c-9d4b-a149ff9cd0b8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fbed8bbf-cc97-48fb-a7f6-e56e37f2cf2e","name":"Complete transaction - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/transactions/{tid}/complete","method":"POST","pathParameters":{"pid":{"equalTo":"pid"},"tid":{"equalTo":"tid"}}},"response":{"status":200,"body":"{\n \"amount\": 1.1,\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"cancelledAt\": \"cancelledAt\",\n \"completedAt\": \"completedAt\",\n \"contactId\": 1,\n \"createdAt\": \"createdAt\",\n \"eventTime\": \"eventTime\",\n \"expirationDate\": \"expirationDate\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rejectReason\": \"rejectReason\",\n \"rejectedAt\": \"rejectedAt\",\n \"status\": \"status\",\n \"updatedAt\": \"updatedAt\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"fbed8bbf-cc97-48fb-a7f6-e56e37f2cf2e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"26205d6c-548c-4928-8845-8eb6528a066d","name":"Get loyalty program list - default","request":{"urlPathTemplate":"/loyalty/config/programs","method":"GET"},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"codeCount\": 1,\n \"createdAt\": \"createdAt\",\n \"description\": \"description\",\n \"documentId\": \"documentId\",\n \"id\": \"id\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"pattern\": \"pattern\",\n \"state\": \"inactive\",\n \"subscriptionGeneratorId\": \"subscriptionGeneratorId\",\n \"subscriptionPoolId\": \"subscriptionPoolId\",\n \"updatedAt\": \"updatedAt\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"26205d6c-548c-4928-8845-8eb6528a066d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"58d70d75-ea78-49d2-a9d6-beab3075e797","name":"Create loyalty program - default","request":{"urlPathTemplate":"/loyalty/config/programs","method":"POST"},"response":{"status":200,"body":"{\n \"codeCount\": 1,\n \"createdAt\": \"createdAt\",\n \"description\": \"description\",\n \"documentId\": \"documentId\",\n \"id\": \"id\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"pattern\": \"pattern\",\n \"state\": \"inactive\",\n \"subscriptionGeneratorId\": \"subscriptionGeneratorId\",\n \"subscriptionPoolId\": \"subscriptionPoolId\",\n \"updatedAt\": \"updatedAt\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"58d70d75-ea78-49d2-a9d6-beab3075e797","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c0fa09f4-d2b6-46f5-9560-abd8eb19c934","name":"Get loyalty program Info - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"codeCount\": 1,\n \"createdAt\": \"createdAt\",\n \"description\": \"description\",\n \"documentId\": \"documentId\",\n \"id\": \"id\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"pattern\": \"pattern\",\n \"state\": \"inactive\",\n \"subscriptionGeneratorId\": \"subscriptionGeneratorId\",\n \"subscriptionPoolId\": \"subscriptionPoolId\",\n \"updatedAt\": \"updatedAt\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c0fa09f4-d2b6-46f5-9560-abd8eb19c934","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"861e512a-8f3c-4e67-9519-b050d07984c6","name":"Update loyalty program - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}","method":"PUT","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"codeCount\": 1,\n \"createdAt\": \"createdAt\",\n \"description\": \"description\",\n \"documentId\": \"documentId\",\n \"id\": \"id\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"pattern\": \"pattern\",\n \"state\": \"inactive\",\n \"subscriptionGeneratorId\": \"subscriptionGeneratorId\",\n \"subscriptionPoolId\": \"subscriptionPoolId\",\n \"updatedAt\": \"updatedAt\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"861e512a-8f3c-4e67-9519-b050d07984c6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a87fbb4c-71e6-4806-9622-174c92be89d1","name":"Delete Loyalty Program - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a87fbb4c-71e6-4806-9622-174c92be89d1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8a2689f4-70a0-4e02-8ce4-3c55e07bc708","name":"Partially update loyalty program - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}","method":"PATCH","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"codeCount\": 1,\n \"createdAt\": \"createdAt\",\n \"description\": \"description\",\n \"documentId\": \"documentId\",\n \"id\": \"id\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"pattern\": \"pattern\",\n \"state\": \"inactive\",\n \"subscriptionGeneratorId\": \"subscriptionGeneratorId\",\n \"subscriptionPoolId\": \"subscriptionPoolId\",\n \"updatedAt\": \"updatedAt\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8a2689f4-70a0-4e02-8ce4-3c55e07bc708","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d32199cf-9ffa-4318-a330-2e9fda3da2d2","name":"Get Subscription Data - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}/account-info","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"balance\": {\n \"balances\": [\n {}\n ],\n \"contactId\": 1,\n \"loyaltyProgramId\": \"loyaltyProgramId\"\n },\n \"members\": [\n {\n \"createdAt\": \"createdAt\",\n \"memberContactId\": 1,\n \"updatedAt\": \"updatedAt\"\n }\n ],\n \"reward\": [\n {\n \"code\": \"code\",\n \"contactId\": 1,\n \"createdAt\": \"createdAt\",\n \"expirationDate\": \"expirationDate\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rewardId\": \"rewardId\",\n \"updatedAt\": \"updatedAt\"\n }\n ],\n \"tier\": [\n {\n \"contactId\": 1,\n \"createdAt\": \"createdAt\",\n \"groupId\": \"groupId\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"tierId\": \"tierId\",\n \"updatedAt\": \"updatedAt\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d32199cf-9ffa-4318-a330-2e9fda3da2d2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0878ece4-9fe9-491a-9a7c-daaf7cf9c341","name":"Delete subscription - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}/contact/{cid}","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"},"cid":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"0878ece4-9fe9-491a-9a7c-daaf7cf9c341","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e628ecea-6ac2-4237-bf4e-d3e911f50954","name":"Publish loyalty program - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}/publish","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"e628ecea-6ac2-4237-bf4e-d3e911f50954","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c63d1aae-db4f-4b4c-b82f-19e95683e037","name":"Create subscription member - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}/subscription-members","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"createdAt\": \"createdAt\",\n \"memberContactIds\": [\n 1\n ],\n \"organizationId\": 1,\n \"ownerContactId\": 1,\n \"updatedAt\": \"updatedAt\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c63d1aae-db4f-4b4c-b82f-19e95683e037","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"efc3a783-b09a-41eb-8c6f-6f3f03271ef4","name":"Delete subscription member - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}/subscription-members","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"}},"queryParameters":{"memberContactIds":{"equalTo":"memberContactIds"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"efc3a783-b09a-41eb-8c6f-6f3f03271ef4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c73cc6cc-b51b-4e8a-ae72-3446029b9ec5","name":"Create subscription - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}/subscriptions","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"contactId\": 1,\n \"createdAt\": \"createdAt\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"loyaltySubscriptionId\": \"loyaltySubscriptionId\",\n \"organizationId\": 1,\n \"updatedAt\": \"updatedAt\",\n \"versionId\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"c73cc6cc-b51b-4e8a-ae72-3446029b9ec5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"da280697-1454-4e11-996a-89c499cf8d7f","name":"Get code count - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/code-pools/{cpid}/codes-count","method":"GET","pathParameters":{"pid":{"equalTo":"pid"},"cpid":{"equalTo":"cpid"}}},"response":{"status":200,"body":"{\n \"count\": 1000000\n}","headers":{"Content-Type":"application/json"}},"uuid":"da280697-1454-4e11-996a-89c499cf8d7f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d324fa9-3782-4213-ab50-8574dc117f03","name":"Get Reward Page API - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/offers","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"endDate\": \"2024-01-15T09:30:00Z\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"publicImage\": \"publicImage\",\n \"startDate\": \"2024-01-15T09:30:00Z\",\n \"state\": \"state\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"totalCount\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"3d324fa9-3782-4213-ab50-8574dc117f03","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e24ddc18-7dbb-4302-828c-d6e53ebb4a34","name":"Create a reward - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/offers","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"publicDescription\": \"publicDescription\",\n \"publicImage\": \"publicImage\",\n \"publicName\": \"publicName\",\n \"updatedAt\": \"updatedAt\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e24ddc18-7dbb-4302-828c-d6e53ebb4a34","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"661c8611-a50c-4e77-aad2-b152b4a15e63","name":"Create a voucher - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/rewards/attribute","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"code\": \"code\",\n \"consumedAt\": \"consumedAt\",\n \"contactId\": 1000000,\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"expirationDate\": \"2024-01-15T09:30:00Z\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rewardId\": \"rewardId\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"value\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"661c8611-a50c-4e77-aad2-b152b4a15e63","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"aa8692b0-126d-488d-b643-8fe0de2f8405","name":"Create redeem voucher request - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/rewards/redeem","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"cancelledAt\": \"2024-01-15T09:30:00Z\",\n \"completedAt\": \"2024-01-15T09:30:00Z\",\n \"contactId\": 1000000,\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"debitTransactionId\": \"debitTransactionId\",\n \"expiresAt\": \"2024-01-15T09:30:00Z\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rejectReason\": \"rejectReason\",\n \"rejectedAt\": \"2024-01-15T09:30:00Z\",\n \"rewardAttributionId\": \"rewardAttributionId\",\n \"status\": \"status\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"aa8692b0-126d-488d-b643-8fe0de2f8405","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"99e6b97f-e193-4c85-b833-07efab4f9b5b","name":"Complete redeem voucher request - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/rewards/redeem/{tid}/complete","method":"POST","pathParameters":{"pid":{"equalTo":"pid"},"tid":{"equalTo":"tid"}}},"response":{"status":200,"body":"{\n \"cancelledAt\": \"2024-01-15T09:30:00Z\",\n \"completedAt\": \"2024-01-15T09:30:00Z\",\n \"contactId\": 1000000,\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"debitTransactionId\": \"debitTransactionId\",\n \"expiresAt\": \"2024-01-15T09:30:00Z\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rejectReason\": \"rejectReason\",\n \"rejectedAt\": \"2024-01-15T09:30:00Z\",\n \"rewardAttributionId\": \"rewardAttributionId\",\n \"status\": \"status\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"99e6b97f-e193-4c85-b833-07efab4f9b5b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"919890cf-9d52-46fe-87bc-03565bdc4697","name":"Revoke vouchers - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/rewards/revoke","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"919890cf-9d52-46fe-87bc-03565bdc4697","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"53d2fcd5-6b39-4fa3-a257-21f60d24efc5","name":"Validate a reward - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/rewards/validate","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"authorize\": true\n}","headers":{"Content-Type":"application/json"}},"uuid":"53d2fcd5-6b39-4fa3-a257-21f60d24efc5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"66e13a60-2e6c-4f3b-9ff7-fc1cdcc147b8","name":"Get reward information - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/rewards/{rid}","method":"GET","pathParameters":{"pid":{"equalTo":"pid"},"rid":{"equalTo":"rid"}}},"response":{"status":200,"body":"{\n \"attributionPerConsumer\": 1,\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"code\": \"code\",\n \"codeCount\": 1000000,\n \"codeGeneratorId\": \"codeGeneratorId\",\n \"codePoolId\": \"codePoolId\",\n \"config\": \"config\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"disabledAt\": \"2024-01-15T09:30:00Z\",\n \"endDate\": \"2024-01-15T09:30:00Z\",\n \"expirationDate\": \"2024-01-15T09:30:00Z\",\n \"expirationModifier\": \"startOfPeriod\",\n \"expirationUnit\": \"expirationUnit\",\n \"expirationValue\": 1,\n \"generator\": {\n \"createdAt\": \"createdAt\",\n \"description\": \"description\",\n \"id\": \"id\",\n \"name\": \"name\",\n \"pattern\": \"pattern\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n },\n \"id\": \"id\",\n \"limits\": [\n {\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"durationUnit\": \"durationUnit\",\n \"durationValue\": 1,\n \"limitValue\": 1,\n \"rewardLimitId\": \"rewardLimitId\",\n \"slidingSchedule\": true,\n \"type\": \"type\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"products\": [\n {\n \"createdAt\": \"createdAt\",\n \"imageRef\": \"imageRef\",\n \"productId\": \"productId\",\n \"value\": \"value\"\n }\n ],\n \"publicDescription\": \"publicDescription\",\n \"publicImage\": \"publicImage\",\n \"publicName\": \"publicName\",\n \"redeemPerConsumer\": 1,\n \"redeemRules\": [\n \"redeemRules\"\n ],\n \"rewardConfigs\": {\n \"attribution\": \"attribution\",\n \"code\": \"code\",\n \"value\": \"value\"\n },\n \"rule\": {\n \"condition\": {\n \"op\": \"op\"\n },\n \"createdAt\": \"createdAt\",\n \"description\": \"description\",\n \"event\": {\n \"name\": \"name\",\n \"source\": \"source\"\n },\n \"isInternal\": true,\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"loyaltyVersionId\": 1,\n \"meta\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"results\": [\n {}\n ],\n \"ruleId\": \"ruleId\",\n \"ruleType\": \"ruleType\",\n \"updatedAt\": \"updatedAt\"\n },\n \"startDate\": \"2024-01-15T09:30:00Z\",\n \"subtractBalanceDefinitionId\": \"subtractBalanceDefinitionId\",\n \"subtractBalanceStrategy\": \"subtractBalanceStrategy\",\n \"subtractBalanceValue\": 1,\n \"subtractTotalBalance\": true,\n \"totalAttribution\": 1,\n \"totalRedeem\": 1,\n \"triggerId\": \"triggerId\",\n \"unit\": \"unit\",\n \"updatedAt\": \"updatedAt\",\n \"value\": 1.1,\n \"valueType\": \"valueType\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"66e13a60-2e6c-4f3b-9ff7-fc1cdcc147b8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"950e340e-ab9c-42c4-8c85-9ea1bd43113d","name":"Get voucher for a contact - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/vouchers","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}},"queryParameters":{"contactId":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"contactId\": 1000000,\n \"contactRewards\": [\n {\n \"code\": \"code\",\n \"consumedAt\": \"consumedAt\",\n \"createdAt\": \"createdAt\",\n \"expirationDate\": \"expirationDate\",\n \"id\": \"id\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rewardId\": \"rewardId\",\n \"unit\": \"unit\",\n \"updatedAt\": \"updatedAt\",\n \"value\": 1.1\n }\n ],\n \"count\": 1,\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"loyaltySubscriptionId\": \"loyaltySubscriptionId\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"950e340e-ab9c-42c4-8c85-9ea1bd43113d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f3e1d26e-fbde-4b7e-afe4-fabb4960ff71","name":"Assign a tier - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/contacts/{cid}/tiers/{tid}","method":"POST","pathParameters":{"pid":{"equalTo":"pid"},"cid":{"equalTo":"cid"},"tid":{"equalTo":"tid"}}},"response":{"status":200,"body":"{\n \"contactId\": 1,\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"groupId\": \"groupId\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f3e1d26e-fbde-4b7e-afe4-fabb4960ff71","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e6fc762d-7440-4454-beb1-ff71f4a9080e","name":"List tier groups - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tier-groups","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"downgradeStrategy\": \"real_time\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"tierOrder\": [\n \"tierOrder\"\n ],\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"upgradeStrategy\": \"real_time\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e6fc762d-7440-4454-beb1-ff71f4a9080e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d33f2b3b-2dd3-4911-8200-e4b4ef965933","name":"Create a tier group - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tier-groups","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"downgradeStrategy\": \"real_time\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"tierOrder\": [\n \"tierOrder\"\n ],\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"upgradeStrategy\": \"real_time\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"d33f2b3b-2dd3-4911-8200-e4b4ef965933","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"562fecbb-8cc8-46ae-b519-3fd2825bb107","name":"Get tier group - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tier-groups/{gid}","method":"GET","pathParameters":{"pid":{"equalTo":"pid"},"gid":{"equalTo":"gid"}}},"response":{"status":200,"body":"{\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"downgradeStrategy\": \"real_time\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"tierOrder\": [\n \"tierOrder\"\n ],\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"upgradeStrategy\": \"real_time\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"562fecbb-8cc8-46ae-b519-3fd2825bb107","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67f29817-d31a-4186-b787-9277e465e139","name":"Update tier group - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tier-groups/{gid}","method":"PUT","pathParameters":{"pid":{"equalTo":"pid"},"gid":{"equalTo":"gid"}}},"response":{"status":200,"body":"{\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"downgradeStrategy\": \"real_time\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"tierOrder\": [\n \"tierOrder\"\n ],\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"upgradeStrategy\": \"real_time\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"67f29817-d31a-4186-b787-9277e465e139","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a9e14ece-a957-40e8-b723-4b89904599dd","name":"Delete tier group - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tier-groups/{gid}","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"},"gid":{"equalTo":"gid"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a9e14ece-a957-40e8-b723-4b89904599dd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d2b435bf-764a-46a6-a860-04672e2611c0","name":"Create a tier - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tier-groups/{gid}/tiers","method":"POST","pathParameters":{"pid":{"equalTo":"pid"},"gid":{"equalTo":"gid"}}},"response":{"status":200,"body":"{\n \"accessConditions\": [\n {\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"minimumValue\": 1,\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"groupId\": \"groupId\",\n \"imageRef\": \"imageRef\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"tierId\": \"tierId\",\n \"tierRewards\": [\n {\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"rewardId\": \"rewardId\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"d2b435bf-764a-46a6-a860-04672e2611c0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e335b644-b3a8-4e92-9222-a80f9a8dd3ab","name":"List tiers - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tiers","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"accessConditions\": [\n {}\n ],\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"groupId\": \"groupId\",\n \"imageRef\": \"imageRef\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"tierId\": \"tierId\",\n \"tierRewards\": [\n {}\n ],\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e335b644-b3a8-4e92-9222-a80f9a8dd3ab","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c299567a-50ff-4db3-a919-280c95c9de65","name":"Update tier - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tiers/{tid}","method":"PUT","pathParameters":{"pid":{"equalTo":"pid"},"tid":{"equalTo":"tid"}}},"response":{"status":200,"body":"{\n \"accessConditions\": [\n {\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"minimumValue\": 1,\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"groupId\": \"groupId\",\n \"imageRef\": \"imageRef\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"tierId\": \"tierId\",\n \"tierRewards\": [\n {\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"rewardId\": \"rewardId\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c299567a-50ff-4db3-a919-280c95c9de65","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"05e6afcc-fb74-4457-a108-1dc6a10a5be7","name":"Delete tier - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tiers/{tid}","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"},"tid":{"equalTo":"tid"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"05e6afcc-fb74-4457-a108-1dc6a10a5be7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"cec8c14d-adf6-497f-95ee-c48ab1d6503d","name":"Return all your created email campaigns - default","request":{"urlPathTemplate":"/emailCampaigns","method":"GET"},"response":{"status":200,"body":"{\n \"campaigns\": [\n {\n \"attachmentFile\": \"http://mydomain.com/campaign/attachment/file.pdf\",\n \"abTesting\": true,\n \"id\": 12,\n \"name\": \"EN - Sales Summer 2017\",\n \"previewText\": \"Don't miss the sale!\",\n \"scheduledAt\": \"2017-06-01T12:30:00Z\",\n \"sendAtBestTime\": true,\n \"splitRule\": 25,\n \"status\": \"sent\",\n \"subject\": \"20% OFF for 2017 Summer Sales\",\n \"subjectA\": \"Discover the New Collection!\",\n \"subjectB\": \"Want to discover the New Collection?\",\n \"type\": \"classic\",\n \"winnerCriteria\": \"open\",\n \"winnerDelay\": 50,\n \"createdAt\": \"2017-05-01T12:30:00Z\",\n \"footer\": \"[DEFAULT_FOOTER]\",\n \"header\": \"[DEFAULT_HEADER]\",\n \"htmlContent\": \"This is my HTML Content\",\n \"inlineImageActivation\": true,\n \"mirrorActive\": true,\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"recurring\": false,\n \"replyTo\": \"replyto@domain.com\",\n \"returnBounce\": 5,\n \"sender\": {\n \"email\": \"marketing@mycompany.com\",\n \"id\": 26,\n \"name\": \"Marketing\"\n },\n \"sentDate\": \"2018-12-01T16:30:00Z\",\n \"shareLink\": \"http://example.com/fhsgccc.html?t=9865448900\",\n \"tag\": \"Newsletter\",\n \"tags\": [\n \"tag1\",\n \"tag2\"\n ],\n \"testSent\": true,\n \"toField\": \"{FNAME} {LNAME}\",\n \"utmCampaignValue\": \"myutm\",\n \"utmIDActive\": true,\n \"utmMedium\": \"EMAIL\",\n \"utmSource\": \"Brevo\",\n \"recipients\": {\n \"exclusionLists\": [\n 13\n ],\n \"lists\": [\n 5\n ]\n },\n \"statistics\": {\n \"campaignStats\": [\n {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 5,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n }\n ],\n \"globalStats\": {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n },\n \"linksStats\": {},\n \"mirrorClick\": 120,\n \"remaining\": 1000,\n \"statsByBrowser\": {\n \"key\": {\n \"clickers\": 2665,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"viewed\": 8999\n }\n },\n \"statsByDevice\": {},\n \"statsByDomain\": {\n \"hotmail.co.uk\": {\n \"appleMppOpens\": 10,\n \"clickers\": 2720,\n \"complaints\": 5,\n \"deferred\": 30,\n \"delivered\": 117056,\n \"estimatedViews\": 560,\n \"hardBounces\": 0,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 117055,\n \"softBounces\": 111,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 1970,\n \"uniqueViews\": 21111,\n \"unsubscriptions\": 105,\n \"viewed\": 35251\n },\n \"yahoo.com\": {\n \"appleMppOpens\": 10,\n \"clickers\": 533,\n \"complaints\": 0,\n \"deferred\": 30,\n \"delivered\": 25596,\n \"estimatedViews\": 560,\n \"hardBounces\": 0,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 25601,\n \"softBounces\": 5,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 298,\n \"uniqueViews\": 3527,\n \"unsubscriptions\": 17,\n \"viewed\": 5255\n }\n }\n }\n },\n {\n \"attachmentFile\": \"http://img.mailinblue.com/{clientID-campaignID}/attachments/{fileName}\",\n \"abTesting\": true,\n \"id\": 22,\n \"name\": \"Weekly - 1\",\n \"previewText\": \"your weekly newsletter!\",\n \"scheduledAt\": \"\",\n \"sendAtBestTime\": true,\n \"splitRule\": 25,\n \"status\": \"draft\",\n \"subject\": \"Week 1 - Newsletter\",\n \"subjectA\": \"Discover the New Collection!\",\n \"subjectB\": \"Want to discover the New Collection?\",\n \"type\": \"classic\",\n \"winnerCriteria\": \"open\",\n \"winnerDelay\": 50,\n \"createdAt\": \"2017-05-01T12:30:00Z\",\n \"footer\": \"[DEFAULT_FOOTER]\",\n \"header\": \"[DEFAULT_HEADER]\",\n \"htmlContent\": \"This is my HTML Content\",\n \"inlineImageActivation\": true,\n \"mirrorActive\": true,\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"recurring\": false,\n \"replyTo\": \"replyto@domain.com\",\n \"returnBounce\": 5,\n \"sender\": {\n \"email\": \"newsletter@mycompany.com\",\n \"id\": 26,\n \"name\": \"Newsletter\"\n },\n \"sentDate\": \"2018-12-01T16:30:00Z\",\n \"shareLink\": \"http://example.com/fhsgccc.html?t=9865448900\",\n \"tag\": \"Newsletter\",\n \"tags\": [\n \"Newsletter\",\n \"Weekly\"\n ],\n \"testSent\": false,\n \"toField\": \"{FNAME} {LNAME}\",\n \"utmCampaignValue\": \"myutm\",\n \"utmIDActive\": true,\n \"utmMedium\": \"EMAIL\",\n \"utmSource\": \"Brevo\",\n \"recipients\": {\n \"exclusionLists\": [\n 45\n ],\n \"lists\": [\n 10\n ]\n },\n \"statistics\": {\n \"campaignStats\": [\n {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 10,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n }\n ],\n \"globalStats\": {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 2,\n \"opensRate\": 29.42,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n },\n \"linksStats\": {},\n \"mirrorClick\": 120,\n \"remaining\": 1000,\n \"statsByBrowser\": {\n \"key\": {\n \"clickers\": 2665,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"viewed\": 8999\n }\n },\n \"statsByDevice\": {},\n \"statsByDomain\": {\n \"aol\": {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n },\n \"gmail\": {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n }\n }\n }\n }\n ],\n \"count\": 2\n}","headers":{"Content-Type":"application/json"}},"uuid":"cec8c14d-adf6-497f-95ee-c48ab1d6503d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"3d7c577e-d169-438f-b91c-d1f90d441dee","name":"Create an email campaign - default","request":{"urlPathTemplate":"/emailCampaigns","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"3d7c577e-d169-438f-b91c-d1f90d441dee","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b6e00948-fca2-4a11-addd-d16045c94c90","name":"Upload an image to your account's image gallery - default","request":{"urlPathTemplate":"/emailCampaigns/images","method":"POST"},"response":{"status":201,"body":"{\n \"url\": \"https://img.mailinblue.com/100000/images/rnb/original/62casdase8wewq9df1c2f27c.jpeg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"b6e00948-fca2-4a11-addd-d16045c94c90","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"da8f0483-4951-4e2d-a495-15906071e018","name":"Get an email campaign report - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}","method":"GET","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"attachmentFile\": \"http://img.mailinblue.com/{clientID-campaignID}/attachments/{fileName}\",\n \"abTesting\": true,\n \"id\": 22,\n \"name\": \"Weekly - 1\",\n \"previewText\": \"your weekly newsletter\",\n \"scheduledAt\": \"2017-09-22T12:30:00Z\",\n \"sendAtBestTime\": true,\n \"splitRule\": 25,\n \"status\": \"draft\",\n \"subject\": \"Week 1 - Newsletter\",\n \"subjectA\": \"Discover the New Collection!\",\n \"subjectB\": \"Want to discover the New Collection?\",\n \"type\": \"classic\",\n \"winnerCriteria\": \"open\",\n \"winnerDelay\": 50,\n \"createdAt\": \"2017-05-01T12:30:00Z\",\n \"footer\": \"[DEFAULT_FOOTER]\",\n \"header\": \"[DEFAULT_HEADER]\",\n \"htmlContent\": \"This is my HTML Content\",\n \"inlineImageActivation\": true,\n \"mirrorActive\": true,\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"recurring\": false,\n \"replyTo\": \"replyto@domain.com\",\n \"returnBounce\": 5,\n \"sender\": {\n \"email\": \"newsletter@mycompany.com\",\n \"id\": 26,\n \"name\": \"Newsletter\"\n },\n \"sentDate\": \"2018-12-01T16:30:00Z\",\n \"shareLink\": \"http://dhh.brevo.com/fhsgccc.html?t=9865448900\",\n \"tag\": \"Newsletter\",\n \"tags\": [\n \"Newsletter\",\n \"Weekly\"\n ],\n \"testSent\": false,\n \"toField\": \"{FNAME} {LNAME}\",\n \"utmCampaignValue\": \"myutm\",\n \"utmIDActive\": true,\n \"utmMedium\": \"EMAIL\",\n \"utmSource\": \"Brevo\",\n \"recipients\": {\n \"exclusionLists\": [\n 45\n ],\n \"lists\": [\n 22\n ]\n },\n \"statistics\": {\n \"campaignStats\": [\n {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 22,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n }\n ],\n \"globalStats\": {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 2,\n \"opensRate\": 24.59,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n },\n \"linksStats\": {},\n \"mirrorClick\": 120,\n \"remaining\": 1000,\n \"statsByBrowser\": {\n \"internetExplorer\": {\n \"clickers\": 0,\n \"uniqueClicks\": 0,\n \"uniqueViews\": 0,\n \"viewed\": 1\n },\n \"safari\": {\n \"clickers\": 1,\n \"uniqueClicks\": 0,\n \"uniqueViews\": 0,\n \"viewed\": 1\n },\n \"thunderbird\": {\n \"clickers\": 1,\n \"uniqueClicks\": 0,\n \"uniqueViews\": 0,\n \"viewed\": 1\n }\n },\n \"statsByDevice\": {\n \"desktop\": {\n \"mac\": {\n \"clickers\": 1,\n \"uniqueClicks\": 0,\n \"uniqueViews\": 1,\n \"viewed\": 2\n }\n },\n \"mobile\": {\n \"androidMobile\": {\n \"clickers\": 1,\n \"uniqueClicks\": 0,\n \"uniqueViews\": 0,\n \"viewed\": 1\n },\n \"iPhone\": {\n \"clickers\": 1,\n \"uniqueClicks\": 0,\n \"uniqueViews\": 0,\n \"viewed\": 2\n }\n },\n \"tablet\": {\n \"key\": {\n \"clickers\": 2665,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"viewed\": 8999\n }\n },\n \"unknown\": {\n \"key\": {\n \"clickers\": 2665,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"viewed\": 8999\n }\n }\n },\n \"statsByDomain\": {\n \"gmail\": {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n }\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"da8f0483-4951-4e2d-a495-15906071e018","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"27d7a953-713c-4dcc-a03d-a5fcd5fbc134","name":"Update an email campaign - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}","method":"PUT","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"27d7a953-713c-4dcc-a03d-a5fcd5fbc134","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"28dbcc0e-eed7-4b02-a7d8-2aab0a25c731","name":"Delete an email campaign - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}","method":"DELETE","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"28dbcc0e-eed7-4b02-a7d8-2aab0a25c731","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"969348eb-29d3-48ab-82d1-c46a8412178e","name":"Get an A/B test email campaign results - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}/abTestCampaignResult","method":"GET","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"clickRate\": \"50%\",\n \"clickedLinks\": {\n \"Version A\": [\n {\n \"clickRate\": \"0%\",\n \"clicksCount\": 0,\n \"link\": \"https://google.com\"\n },\n {\n \"clickRate\": \"0%\",\n \"clicksCount\": 0,\n \"link\": \"https://youtube.com\"\n }\n ],\n \"Version B\": [\n {\n \"clickRate\": \"40%\",\n \"clicksCount\": 2,\n \"link\": \"http://www.github.com\"\n },\n {\n \"clickRate\": \"60%\",\n \"clicksCount\": 3,\n \"link\": \"http://www.stackoverflow.com\"\n }\n ]\n },\n \"openRate\": \"100%\",\n \"statistics\": {\n \"clicks\": {\n \"Version A\": \"0%\",\n \"Version B\": \"50%\"\n },\n \"complaints\": {\n \"Version A\": \"0%\",\n \"Version B\": \"0%\"\n },\n \"hardBounces\": {\n \"Version A\": \"0%\",\n \"Version B\": \"0%\"\n },\n \"openers\": {\n \"Version A\": \"20%\",\n \"Version B\": \"100%\"\n },\n \"softBounces\": {\n \"Version A\": \"0%\",\n \"Version B\": \"0%\"\n },\n \"unsubscribed\": {\n \"Version A\": \"20%\",\n \"Version B\": \"0%\"\n }\n },\n \"winningCriteria\": \"Click\",\n \"winningSubjectLine\": \"Subject Line A\",\n \"winningVersion\": \"B\",\n \"winningVersionRate\": \"0%\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"969348eb-29d3-48ab-82d1-c46a8412178e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"93e3be61-a737-4896-a697-7417b837b571","name":"Export the recipients of an email campaign - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}/exportRecipients","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":202,"body":"{\n \"processId\": 78\n}","headers":{"Content-Type":"application/json"}},"uuid":"93e3be61-a737-4896-a697-7417b837b571","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b0b17959-d743-449c-8bdd-ab28a42870cc","name":"Send an email campaign immediately, based on campaignId - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}/sendNow","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"b0b17959-d743-449c-8bdd-ab28a42870cc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"57eba48c-9a52-4e90-a12c-fa89a469f035","name":"Send the report of a campaign - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}/sendReport","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"57eba48c-9a52-4e90-a12c-fa89a469f035","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fc668b8b-10da-4f83-ae38-5004f0a64ae7","name":"Send an email campaign to your test list - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}/sendTest","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"fc668b8b-10da-4f83-ae38-5004f0a64ae7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6bc6114e-fc20-4aa2-ba22-7e7fe7f95244","name":"Get a shared template url - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}/sharedUrl","method":"GET","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"sharedUrl\": \"https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx-\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"6bc6114e-fc20-4aa2-ba22-7e7fe7f95244","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8d661344-163b-4798-a243-ba10bd08cbe9","name":"Update an email campaign status - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}/status","method":"PUT","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"8d661344-163b-4798-a243-ba10bd08cbe9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ffedd57d-0198-49a4-9112-ce7ae8751ebc","name":"Returns the information for all your created SMS campaigns - default","request":{"urlPathTemplate":"/smsCampaigns","method":"GET"},"response":{"status":200,"body":"{\n \"campaigns\": [\n {\n \"content\": \"Visit our Store and get some discount !\",\n \"createdAt\": \"2017-06-01T12:30:00Z\",\n \"id\": 2,\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"name\": \"PROMO CODE\",\n \"scheduledAt\": \"2017-06-01T12:30:00Z\",\n \"sender\": \"MyCompany\",\n \"status\": \"sent\",\n \"recipients\": {\n \"exclusionLists\": [\n 13\n ],\n \"lists\": [\n 21\n ]\n },\n \"statistics\": {\n \"answered\": 2,\n \"delivered\": 2987,\n \"hardBounces\": 1,\n \"processing\": 0,\n \"sent\": 3000,\n \"softBounces\": 3,\n \"unsubscriptions\": 3\n }\n },\n {\n \"content\": \"Summer Sale is starting tomorrow. Get extra 10% with this code:SUM17\",\n \"createdAt\": \"2017-06-01T12:30:00Z\",\n \"id\": 10,\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"name\": \"SUMMER SALE\",\n \"scheduledAt\": \"2017-08-04T12:30:00Z\",\n \"sender\": \"MyCompany\",\n \"status\": \"draft\",\n \"recipients\": {\n \"exclusionLists\": [\n 13\n ],\n \"lists\": [\n 21\n ]\n },\n \"statistics\": {\n \"answered\": 2,\n \"delivered\": 2987,\n \"hardBounces\": 1,\n \"processing\": 0,\n \"sent\": 3000,\n \"softBounces\": 3,\n \"unsubscriptions\": 3\n }\n }\n ],\n \"count\": 12\n}","headers":{"Content-Type":"application/json"}},"uuid":"ffedd57d-0198-49a4-9112-ce7ae8751ebc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"ff5b73cc-83d1-4d1c-9038-f01bc11a604e","name":"Creates an SMS campaign - default","request":{"urlPathTemplate":"/smsCampaigns","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"ff5b73cc-83d1-4d1c-9038-f01bc11a604e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9ff5c02a-8b74-486b-aca9-7ac003b1838c","name":"Get an SMS campaign - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}","method":"GET","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"content\": \"Visit our Store and get some discount !\",\n \"createdAt\": \"2017-06-01T12:30:00Z\",\n \"id\": 2,\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"name\": \"PROMO CODE\",\n \"scheduledAt\": \"2017-06-01T12:30:00Z\",\n \"sender\": \"MyCompany\",\n \"status\": \"sent\",\n \"recipients\": {\n \"exclusionLists\": [\n 13\n ],\n \"lists\": [\n 21\n ]\n },\n \"statistics\": {\n \"answered\": 2,\n \"delivered\": 2987,\n \"hardBounces\": 1,\n \"processing\": 0,\n \"sent\": 3000,\n \"softBounces\": 3,\n \"unsubscriptions\": 3\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"9ff5c02a-8b74-486b-aca9-7ac003b1838c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"828e0b76-55ec-4b20-83fd-ff0d9c6a807f","name":"Update an SMS campaign - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}","method":"PUT","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"828e0b76-55ec-4b20-83fd-ff0d9c6a807f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0938f276-c211-4150-91ac-9ea5e3ddf7fe","name":"Delete an SMS campaign - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}","method":"DELETE","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"0938f276-c211-4150-91ac-9ea5e3ddf7fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"daaeea82-c583-43fb-b4c7-a6bbc940fc47","name":"Export an SMS campaign's recipients - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}/exportRecipients","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":202,"body":"{\n \"processId\": 78\n}","headers":{"Content-Type":"application/json"}},"uuid":"daaeea82-c583-43fb-b4c7-a6bbc940fc47","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b7dd5175-f7a0-4b5e-9224-203d4fae1c4d","name":"Send your SMS campaign immediately - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}/sendNow","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"b7dd5175-f7a0-4b5e-9224-203d4fae1c4d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"64e8bd39-5b33-477a-ae7f-0501cb5a6140","name":"Send an SMS campaign's report - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}/sendReport","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"64e8bd39-5b33-477a-ae7f-0501cb5a6140","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"734d1bda-9010-4188-9a00-57d5b302eee4","name":"Send a test SMS campaign - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}/sendTest","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"734d1bda-9010-4188-9a00-57d5b302eee4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"694adffd-8af9-45be-8225-5e44e17d7454","name":"Update a campaign's status - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}/status","method":"PUT","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"694adffd-8af9-45be-8225-5e44e17d7454","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"03183785-7a99-4733-896c-eb489047065c","name":"Return all your created WhatsApp campaigns - default","request":{"urlPathTemplate":"/whatsappCampaigns","method":"GET"},"response":{"status":200,"body":"{\n \"campaigns\": [\n {\n \"campaignName\": \"campaign_22\",\n \"campaignStatus\": \"sent\",\n \"createdAt\": \"2017-05-01T12:30:00Z\",\n \"errorReason\": \"NONE\",\n \"id\": 1672035851100690,\n \"invalidatedContacts\": 0,\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"readPercentage\": 28.57,\n \"scheduledAt\": \"2022-12-27T09:50:00Z\",\n \"stats\": {\n \"delivered\": 3,\n \"notSent\": 4,\n \"read\": 2,\n \"sent\": 3,\n \"unsubscribe\": 0\n },\n \"templateId\": \"templateId\"\n }\n ],\n \"count\": 23\n}","headers":{"Content-Type":"application/json"}},"uuid":"03183785-7a99-4733-896c-eb489047065c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"5fc3f144-a51f-454f-a5d0-019b38ba3c15","name":"Create and Send a WhatsApp campaign - default","request":{"urlPathTemplate":"/whatsappCampaigns","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"5fc3f144-a51f-454f-a5d0-019b38ba3c15","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"cc80c9bc-ff82-4140-9b7a-dfb84c8e99a7","name":"Get your WhatsApp API account information - default","request":{"urlPathTemplate":"/whatsappCampaigns/config","method":"GET"},"response":{"status":200,"body":"{\n \"businessStatus\": \"verified\",\n \"phoneNumberNameStatus\": \"APPROVED\",\n \"phoneNumberQuality\": \"GREEN\",\n \"sendingLimit\": \"TIER_1K\",\n \"whatsappBusinessAccountId\": \"whatsappBusinessAccountId\",\n \"whatsappBusinessAccountStatus\": \"APPROVED\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"cc80c9bc-ff82-4140-9b7a-dfb84c8e99a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"5217f5cb-e270-45d2-bf41-0aa3651c5839","name":"Create a WhatsApp template - default","request":{"urlPathTemplate":"/whatsappCampaigns/template","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"5217f5cb-e270-45d2-bf41-0aa3651c5839","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e541402c-10e0-447d-ab89-e9102a312296","name":"Return all your created WhatsApp templates - default","request":{"urlPathTemplate":"/whatsappCampaigns/template-list","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 2,\n \"templates\": [\n {\n \"category\": \"MARKETING\",\n \"createdAt\": \"2017-05-01T12:30:00Z\",\n \"errorReason\": \"NONE\",\n \"id\": 235,\n \"language\": \"en\",\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"name\": \"campaign_22\",\n \"status\": \"approved\"\n },\n {\n \"category\": \"MARKETING\",\n \"createdAt\": \"2017-0\",\n \"errorReason\": \"NONE\",\n \"id\": 124,\n \"language\": \"\",\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"name\": \"test-template\",\n \"status\": \"draft\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e541402c-10e0-447d-ab89-e9102a312296","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"c47467e5-3355-486f-b83b-ecf963b249b4","name":"Send your WhatsApp template for approval - default","request":{"urlPathTemplate":"/whatsappCampaigns/template/approval/{templateId}","method":"POST","pathParameters":{"templateId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c47467e5-3355-486f-b83b-ecf963b249b4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6d437255-9beb-48aa-9616-0b438eb437f6","name":"Get a WhatsApp campaign - default","request":{"urlPathTemplate":"/whatsappCampaigns/{campaignId}","method":"GET","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"campaignName\": \"Test WhatsApp Campaign\",\n \"campaignStatus\": \"sent\",\n \"createdAt\": \"2022-12-26T06:50:00Z\",\n \"id\": 1672035851100690,\n \"modifiedAt\": \"2022-12-26T08:50:00Z\",\n \"scheduledAt\": \"2022-12-27T09:50:00Z\",\n \"senderNumber\": \"senderNumber\",\n \"stats\": {\n \"delivered\": 3,\n \"notSent\": 4,\n \"read\": 2,\n \"sent\": 3,\n \"unsubscribe\": 0\n },\n \"template\": {\n \"body_variables\": [\n {\n \"datatype\": \"text\",\n \"default\": \"INVALID_HEADER\",\n \"name\": \"FIRSTNAME\"\n }\n ],\n \"button_type\": \"CALL_TO_ACTION\",\n \"category\": \"MARKETING\",\n \"components\": [\n {\n \"text\": \"making it look like readable English.\",\n \"type\": \"BODY\"\n },\n {\n \"text\": \"Life is a long lesson in humility\",\n \"type\": \"BUTTONS\"\n }\n ],\n \"contains_button\": true,\n \"display_header\": false,\n \"header_type\": \"text\",\n \"header_variables\": [\n {\n \"datatype\": \"text\",\n \"default\": \"INVALID HEADER\",\n \"name\": \"FIRSTNAME\"\n }\n ],\n \"hide_footer\": true,\n \"language\": \"en\",\n \"name\": \"official_campaign8\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6d437255-9beb-48aa-9616-0b438eb437f6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eb75a9a4-36c5-4126-9a14-85044f19f2c1","name":"Update a WhatsApp campaign - default","request":{"urlPathTemplate":"/whatsappCampaigns/{campaignId}","method":"PUT","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"eb75a9a4-36c5-4126-9a14-85044f19f2c1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b4ef121d-89fa-4fb6-984d-39467bf9fd6b","name":"Delete a WhatsApp campaign - default","request":{"urlPathTemplate":"/whatsappCampaigns/{campaignId}","method":"DELETE","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"b4ef121d-89fa-4fb6-984d-39467bf9fd6b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eb31fc6b-22fd-431f-ba7e-59e0d7773487","name":"Get all Companies - default","request":{"urlPathTemplate":"/companies","method":"GET"},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"attributes\": {\n \"created_at\": \"2022-01-13T19:04:24.376+05:30\",\n \"domain\": \"xyz\",\n \"last_updated_at\": \"2022-04-01T18:47:48.283+05:30\",\n \"name\": \"text\",\n \"number_of_contacts\": 0,\n \"owner\": \"62260474111b1101704a9d85\",\n \"owner_assign_date\": \"2022-04-01T18:21:13.379+05:30\",\n \"phone_number\": 8171844192,\n \"revenue\": 10\n },\n \"id\": \"629475917295261d9b1f4403\",\n \"linkedContactsIds\": [\n 1,\n 2,\n 3\n ],\n \"linkedDealsIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ]\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"eb31fc6b-22fd-431f-ba7e-59e0d7773487","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"e17f5536-5a6b-4a26-8102-3170dd47ae3d","name":"Create a company - default","request":{"urlPathTemplate":"/companies","method":"POST"},"response":{"status":200,"body":"{\n \"id\": \"61a5cd07ca1347c82306ad06\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e17f5536-5a6b-4a26-8102-3170dd47ae3d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f390d3a7-6a70-4b45-ad33-f4f3d3000538","name":"Import companies(creation and updation) - default","request":{"urlPathTemplate":"/companies/import","method":"POST"},"response":{"status":200,"body":"{\n \"processId\": 50\n}","headers":{"Content-Type":"application/json"}},"uuid":"f390d3a7-6a70-4b45-ad33-f4f3d3000538","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"708feaed-27c0-429f-8086-5e7c5e4ecd8d","name":"Link and Unlink company with contact and deal - default","request":{"urlPathTemplate":"/companies/link-unlink/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"708feaed-27c0-429f-8086-5e7c5e4ecd8d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"00aba53e-3870-4157-ace9-c2d252198e11","name":"Get a company - default","request":{"urlPathTemplate":"/companies/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"attributes\": {\n \"created_at\": \"2022-01-13T19:04:24.376+05:30\",\n \"domain\": \"xyz\",\n \"last_updated_at\": \"2022-04-01T18:47:48.283+05:30\",\n \"name\": \"text\",\n \"number_of_contacts\": 0,\n \"owner\": \"62260474111b1101704a9d85\",\n \"owner_assign_date\": \"2022-04-01T18:21:13.379+05:30\",\n \"phone_number\": 8171844192,\n \"revenue\": 10\n },\n \"id\": \"629475917295261d9b1f4403\",\n \"linkedContactsIds\": [\n 1,\n 2,\n 3\n ],\n \"linkedDealsIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"00aba53e-3870-4157-ace9-c2d252198e11","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ed72bcbe-33c2-48e2-93e4-756a46e8fd90","name":"Delete a company - default","request":{"urlPathTemplate":"/companies/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"ed72bcbe-33c2-48e2-93e4-756a46e8fd90","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d37f940-80db-41f6-9f83-1f3a2c69804b","name":"Update a company - default","request":{"urlPathTemplate":"/companies/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"attributes\": {\n \"created_at\": \"2022-01-13T19:04:24.376+05:30\",\n \"domain\": \"xyz\",\n \"last_updated_at\": \"2022-04-01T18:47:48.283+05:30\",\n \"name\": \"text\",\n \"number_of_contacts\": 0,\n \"owner\": \"62260474111b1101704a9d85\",\n \"owner_assign_date\": \"2022-04-01T18:21:13.379+05:30\",\n \"phone_number\": 8171844192,\n \"revenue\": 10\n },\n \"id\": \"629475917295261d9b1f4403\",\n \"linkedContactsIds\": [\n 1,\n 2,\n 3\n ],\n \"linkedDealsIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"3d37f940-80db-41f6-9f83-1f3a2c69804b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1a24ce32-7c2c-41a5-80a9-1681d05767ad","name":"Create a company/deal attribute - default","request":{"urlPathTemplate":"/crm/attributes","method":"POST"},"response":{"status":200,"body":"{\n \"id\": \"61a5cd07ca1347c82306ad07\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"1a24ce32-7c2c-41a5-80a9-1681d05767ad","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"360c88d6-c7bb-4c00-b1ab-146f803e9eff","name":"Delete an attribute - default","request":{"urlPathTemplate":"/crm/attributes/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"360c88d6-c7bb-4c00-b1ab-146f803e9eff","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a9790cec-51da-4b91-ae52-a3b58fa8c717","name":"Update an attribute - default","request":{"urlPathTemplate":"/crm/attributes/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a9790cec-51da-4b91-ae52-a3b58fa8c717","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"696b098d-c426-490d-993d-82b72a9a6eec","name":"Get company attributes - default","request":{"urlPathTemplate":"/crm/attributes/companies","method":"GET"},"response":{"status":200,"body":"[\n {\n \"attributeOptions\": [\n {\n \"key\": \"custom key\",\n \"value\": \"custom label\"\n }\n ],\n \"attributeTypeName\": \"text\",\n \"internalName\": \"name\",\n \"isRequired\": true,\n \"label\": \"Company Name\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"696b098d-c426-490d-993d-82b72a9a6eec","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"3db982e0-00b7-41af-bc9d-fe3f54d90a12","name":"Get deal attributes - default","request":{"urlPathTemplate":"/crm/attributes/deals","method":"GET"},"response":{"status":200,"body":"[\n {\n \"attributeOptions\": [\n {\n \"key\": \"custom key\",\n \"value\": \"custom label\"\n }\n ],\n \"attributeTypeName\": \"text\",\n \"internalName\": \"deal_name\",\n \"isRequired\": true,\n \"label\": \"Deal Name\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"3db982e0-00b7-41af-bc9d-fe3f54d90a12","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4ee2c155-e8d9-4aee-b095-699a2c9a6263","name":"Get all deals - default","request":{"urlPathTemplate":"/crm/deals","method":"GET"},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"attributes\": {\n \"amount\": 12,\n \"created_at\": \"2022-05-30T07:42:05.671Z\",\n \"deal_name\": \"testname\",\n \"deal_owner\": \"6093d2425a9b436e9519d034\",\n \"deal_stage\": \"9e577ff7-8e42-4ab3-be26-2b5e01b42518\",\n \"last_activity_date\": \"2022-06-06T08:38:36.000Z\",\n \"last_updated_date\": \"2022-06-06T08:38:36.761Z\",\n \"number_of_activities\": 0,\n \"number_of_contacts\": 1,\n \"pipeline\": \"6093d296ad1e9c5cf2140a58\",\n \"stage_updated_at\": \"2022-05-30T07:42:05.671Z\"\n },\n \"id\": \"629475917295261d9b1f4403\",\n \"linkedCompaniesIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ],\n \"linkedContactsIds\": [\n 1,\n 2,\n 3\n ]\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"4ee2c155-e8d9-4aee-b095-699a2c9a6263","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"21216821-874f-4e2a-a690-4b805b03c721","name":"Create a deal - default","request":{"urlPathTemplate":"/crm/deals","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"61a5cd07ca1347c82306ad06\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"21216821-874f-4e2a-a690-4b805b03c721","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ce9e7723-550c-4f51-af88-6cde553f45b7","name":"Import deals(creation and updation) - default","request":{"urlPathTemplate":"/crm/deals/import","method":"POST"},"response":{"status":200,"body":"{\n \"processId\": 50\n}","headers":{"Content-Type":"application/json"}},"uuid":"ce9e7723-550c-4f51-af88-6cde553f45b7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f89fa5e6-0434-46e0-8c77-535bea98fc1a","name":"Link and Unlink a deal with contacts and companies - default","request":{"urlPathTemplate":"/crm/deals/link-unlink/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"f89fa5e6-0434-46e0-8c77-535bea98fc1a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a3513f5b-5df8-443d-aa67-5efd91e58f3d","name":"Get a deal - default","request":{"urlPathTemplate":"/crm/deals/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"attributes\": {\n \"amount\": 12,\n \"created_at\": \"2022-05-30T07:42:05.671Z\",\n \"deal_name\": \"testname\",\n \"deal_owner\": \"6093d2425a9b436e9519d034\",\n \"deal_stage\": \"9e577ff7-8e42-4ab3-be26-2b5e01b42518\",\n \"last_activity_date\": \"2022-06-06T08:38:36.000Z\",\n \"last_updated_date\": \"2022-06-06T08:38:36.761Z\",\n \"next_activity_date\": {\n \"key\": \"value\"\n },\n \"number_of_activities\": 0,\n \"number_of_contacts\": 1,\n \"pipeline\": \"6093d296ad1e9c5cf2140a58\",\n \"stage_updated_at\": \"2022-05-30T07:42:05.671Z\"\n },\n \"id\": \"629475917295261d9b1f4403\",\n \"linkedCompaniesIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ],\n \"linkedContactsIds\": [\n 1,\n 2,\n 3\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"a3513f5b-5df8-443d-aa67-5efd91e58f3d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"54ba1660-4170-41b9-86d2-963468e28812","name":"Delete a deal - default","request":{"urlPathTemplate":"/crm/deals/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"54ba1660-4170-41b9-86d2-963468e28812","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e555066b-bfb4-4582-9f37-6eec50af9fe4","name":"Update a deal - default","request":{"urlPathTemplate":"/crm/deals/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"e555066b-bfb4-4582-9f37-6eec50af9fe4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"00d065e6-8a4f-4ac9-a849-298a81551e9c","name":"Get pipeline stages - default","request":{"urlPathTemplate":"/crm/pipeline/details","method":"GET"},"response":{"status":200,"body":"{\n \"pipeline\": \"5ea675e3da0dd085acaea610\",\n \"pipeline_name\": \"Sales Pipeline\",\n \"stages\": [\n {\n \"id\": \"9e577ff7-8e42-4ab3-be26-2b5e01b42518\",\n \"name\": \"New\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"00d065e6-8a4f-4ac9-a849-298a81551e9c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"e75093b9-5f73-46e0-a2af-1f7c47922829","name":"Get all pipelines - default","request":{"urlPathTemplate":"/crm/pipeline/details/all","method":"GET"},"response":{"status":200,"body":"[\n {\n \"pipeline\": \"5ea675e3da0dd085acaea610\",\n \"pipeline_name\": \"Sales Pipeline\",\n \"stages\": [\n {\n \"id\": \"9e577ff7-8e42-4ab3-be26-2b5e01b42518\",\n \"name\": \"New\"\n }\n ]\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e75093b9-5f73-46e0-a2af-1f7c47922829","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"2882799f-edf8-4d3b-826d-3692f300d025","name":"Get a pipeline - default","request":{"urlPathTemplate":"/crm/pipeline/details/{pipelineID}","method":"GET","pathParameters":{"pipelineID":{"equalTo":"pipelineID"}}},"response":{"status":200,"body":"[\n {\n \"pipeline\": \"5ea675e3da0dd085acaea610\",\n \"pipeline_name\": \"Sales Pipeline\",\n \"stages\": [\n {\n \"id\": \"9e577ff7-8e42-4ab3-be26-2b5e01b42518\",\n \"name\": \"New\"\n }\n ]\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"2882799f-edf8-4d3b-826d-3692f300d025","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2e96e9dc-f52d-4354-a185-de3257903a02","name":"Get all files - default","request":{"urlPathTemplate":"/crm/files","method":"GET"},"response":{"status":200,"body":"[\n {\n \"authorId\": \"61a5ce58y5d4795761045991\",\n \"companyId\": \"61a5ce58c5d4795761045991\",\n \"contactId\": 1,\n \"createdAt\": \"2017-05-01T17:05:03Z\",\n \"dealId\": \"61a5ce58c5d4795761045991\",\n \"name\": \"example.png\",\n \"size\": 10\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"2e96e9dc-f52d-4354-a185-de3257903a02","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"54153a26-e96d-4b54-acab-08a1b6bb6027","name":"Upload a file - default","request":{"urlPathTemplate":"/crm/files","method":"POST"},"response":{"status":201,"body":"{\n \"authorId\": \"61a5ce58y5d4795761045991\",\n \"companyId\": \"61a5ce58c5d4795761045991\",\n \"contactId\": 1,\n \"createdAt\": \"2017-05-01T17:05:03Z\",\n \"dealId\": \"61a5ce58c5d4795761045991\",\n \"name\": \"example.png\",\n \"size\": 10\n}","headers":{"Content-Type":"application/json"}},"uuid":"54153a26-e96d-4b54-acab-08a1b6bb6027","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fea850a9-ab2c-4fee-89b8-e564df22e53a","name":"Download a file - default","request":{"urlPathTemplate":"/crm/files/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"fileUrl\": \"https://storage.googleapis.com/brevo-app-crm.......-sample.pdf\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"fea850a9-ab2c-4fee-89b8-e564df22e53a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"38b72322-9ea0-47f2-b639-7d466c243b82","name":"Delete a file - default","request":{"urlPathTemplate":"/crm/files/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"38b72322-9ea0-47f2-b639-7d466c243b82","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1ee1505b-b76c-47f3-addc-8d237075f2a3","name":"Get file details - default","request":{"urlPathTemplate":"/crm/files/{id}/data","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"authorId\": \"61a5ce58y5d4795761045991\",\n \"companyId\": \"61a5ce58c5d4795761045991\",\n \"contactId\": 1,\n \"createdAt\": \"2017-05-01T17:05:03Z\",\n \"dealId\": \"61a5ce58c5d4795761045991\",\n \"name\": \"example.png\",\n \"size\": 10\n}","headers":{"Content-Type":"application/json"}},"uuid":"1ee1505b-b76c-47f3-addc-8d237075f2a3","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"608a87de-9e4a-45e5-bb3a-e0683eb220b8","name":"Get all notes - default","request":{"urlPathTemplate":"/crm/notes","method":"GET"},"response":{"status":200,"body":"[\n {\n \"authorId\": {\n \"email\": \"johndoe@example.com\",\n \"id\": \"61a5ce58y5d4795761045991\",\n \"locale\": \"en_GB\",\n \"name\": {\n \"fullName\": \"John Doe\"\n },\n \"timezone\": \"Asia/Kolkata\"\n },\n \"contactIds\": [\n 247,\n 1,\n 2\n ],\n \"createdAt\": \"2017-05-01T17:05:03Z\",\n \"dealIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\"\n ],\n \"id\": \"61a5cd07ca1347c82306ad09\",\n \"text\": \"In communication with client_dev for resolution of queries.\",\n \"updatedAt\": \"2017-05-01T17:05:03Z\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"608a87de-9e4a-45e5-bb3a-e0683eb220b8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"0ceb328a-0b27-4d1d-8ba3-3abc8979d485","name":"Create a note - default","request":{"urlPathTemplate":"/crm/notes","method":"POST"},"response":{"status":200,"body":"{\n \"id\": \"61a5cd07ca1347c82306ad09\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"0ceb328a-0b27-4d1d-8ba3-3abc8979d485","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f9cf8ca7-3372-4b74-854e-93a3d45c5d56","name":"Get a note - default","request":{"urlPathTemplate":"/crm/notes/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"authorId\": {\n \"email\": \"johndoe@example.com\",\n \"id\": \"61a5ce58y5d4795761045991\",\n \"locale\": \"en_GB\",\n \"name\": {\n \"fullName\": \"John Doe\"\n },\n \"timezone\": \"Asia/Kolkata\"\n },\n \"contactIds\": [\n 247,\n 1,\n 2\n ],\n \"createdAt\": \"2017-05-01T17:05:03Z\",\n \"dealIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\"\n ],\n \"id\": \"61a5cd07ca1347c82306ad09\",\n \"text\": \"In communication with client_dev for resolution of queries.\",\n \"updatedAt\": \"2017-05-01T17:05:03Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f9cf8ca7-3372-4b74-854e-93a3d45c5d56","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b382d16e-0455-423c-9dd1-42efa255a495","name":"Delete a note - default","request":{"urlPathTemplate":"/crm/notes/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"b382d16e-0455-423c-9dd1-42efa255a495","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"458a7a9b-298d-44e2-a117-63db0c9047f0","name":"Update a note - default","request":{"urlPathTemplate":"/crm/notes/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"458a7a9b-298d-44e2-a117-63db0c9047f0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ce9a81b3-1605-4c76-bf79-fc52ff6a2653","name":"Get all tasks - default","request":{"urlPathTemplate":"/crm/tasks","method":"GET","queryParameters":{"sortBy":{"equalTo":"name"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"companiesIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ],\n \"contactsIds\": [\n 1,\n 2,\n 3\n ],\n \"dealsIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ],\n \"id\": \"61a5cd07ca1347c82306ad06\",\n \"name\": \"Task: Connect with client_dev\",\n \"taskTypeId\": \"61a5cd07ca1347c82306ad09\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"ce9a81b3-1605-4c76-bf79-fc52ff6a2653","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"60ee1139-00c5-4746-b240-523605d43bb4","name":"Create a task - default","request":{"urlPathTemplate":"/crm/tasks","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"61a5cd07ca1347c82306ad06\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"60ee1139-00c5-4746-b240-523605d43bb4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"909b9f4c-1f5b-4271-82fe-a4e4847db6c7","name":"Get a task - default","request":{"urlPathTemplate":"/crm/tasks/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"companiesIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ],\n \"contactsIds\": [\n 1,\n 2,\n 3\n ],\n \"dealsIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ],\n \"id\": \"61a5cd07ca1347c82306ad06\",\n \"name\": \"Task: Connect with client_dev\",\n \"taskTypeId\": \"61a5cd07ca1347c82306ad09\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"909b9f4c-1f5b-4271-82fe-a4e4847db6c7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"040ca6a6-b7b7-4cfd-95b2-a493ccc1691e","name":"Delete a task - default","request":{"urlPathTemplate":"/crm/tasks/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"040ca6a6-b7b7-4cfd-95b2-a493ccc1691e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"90199d04-c868-46bf-8e40-5e330c257e75","name":"Update a task - default","request":{"urlPathTemplate":"/crm/tasks/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"90199d04-c868-46bf-8e40-5e330c257e75","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"667b0721-7004-49d8-9017-b6d086394c2f","name":"Get all task types - default","request":{"urlPathTemplate":"/crm/tasktypes","method":"GET"},"response":{"status":200,"body":"{\n \"id\": \"61a88a2eb7a574180261234\",\n \"title\": \"Email\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"667b0721-7004-49d8-9017-b6d086394c2f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"22a7a09a-6fad-41dd-aed4-b8806c57a34a","name":"Send a WhatsApp message - default","request":{"urlPathTemplate":"/whatsapp/sendMessage","method":"POST"},"response":{"status":201,"body":"{\n \"messageId\": \"23befbae-1505-47a8-bd27-e30ef739f32c\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"22a7a09a-6fad-41dd-aed4-b8806c57a34a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fab3ac15-a813-4c2f-9673-e64845544c00","name":"Get all your WhatsApp activity (unaggregated events) - default","request":{"urlPathTemplate":"/whatsapp/statistics/events","method":"GET"},"response":{"status":200,"body":"{\n \"events\": [\n {\n \"body\": \"Hi! I am a reply\",\n \"contactNumber\": \"contactNumber\",\n \"date\": \"2017-03-12T12:30:00Z\",\n \"event\": \"sent\",\n \"mediaUrl\": \"https://example.com/media.png\",\n \"messageId\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"reason\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"senderNumber\": \"senderNumber\"\n },\n {\n \"body\": \"Hi! I am a reply\",\n \"contactNumber\": \"contactNumber\",\n \"date\": \"2017-03-12T12:30:00Z\",\n \"event\": \"error\",\n \"mediaUrl\": \"https://example.com/media.png\",\n \"messageId\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"reason\": \"error reason\",\n \"senderNumber\": \"senderNumber\"\n },\n {\n \"body\": \"Hi! I am a reply\",\n \"contactNumber\": \"contactNumber\",\n \"date\": \"2017-03-12T12:30:00Z\",\n \"event\": \"soft-bounce\",\n \"mediaUrl\": \"https://example.com/media.png\",\n \"messageId\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"reason\": \"invalid whatsapp contact\",\n \"senderNumber\": \"senderNumber\"\n },\n {\n \"body\": \"body only in case of text reply & url will be empty\",\n \"contactNumber\": \"contactNumber\",\n \"date\": \"2017-03-12T12:30:00Z\",\n \"event\": \"reply\",\n \"mediaUrl\": \"media url only in case media reply & body will be empty\",\n \"messageId\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"reason\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"senderNumber\": \"senderNumber\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fab3ac15-a813-4c2f-9673-e64845544c00","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"28f43c06-69ca-463d-ad60-4a71c61a0440","name":"Get the list of blocked or unsubscribed transactional contacts - default","request":{"urlPathTemplate":"/smtp/blockedContacts","method":"GET"},"response":{"status":200,"body":"{\n \"contacts\": [\n {\n \"blockedAt\": \"2017-05-01T12:30:00Z\",\n \"email\": \"abc@xyz.com\",\n \"reason\": {\n \"code\": \"adminBlocked\",\n \"message\": \"Admin blocked\"\n },\n \"senderEmail\": \"ez312@gmal.com\"\n }\n ],\n \"count\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"28f43c06-69ca-463d-ad60-4a71c61a0440","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"e81c8495-0ef3-44b1-a9ce-45cc2bef7798","name":"Unblock or resubscribe a transactional contact - default","request":{"urlPathTemplate":"/smtp/blockedContacts/{email}","method":"DELETE","pathParameters":{"email":{"equalTo":"email"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"e81c8495-0ef3-44b1-a9ce-45cc2bef7798","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0aab435d-618c-452b-8545-7c35e9088c78","name":"Get the list of blocked domains - default","request":{"urlPathTemplate":"/smtp/blockedDomains","method":"GET"},"response":{"status":200,"body":"{\n \"domains\": [\n \"example.com\",\n \"testdomain.com\"\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"0aab435d-618c-452b-8545-7c35e9088c78","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"350fd1cc-de1c-4197-ae49-46ce6a1d6c03","name":"Add a new domain to the list of blocked domains - default","request":{"urlPathTemplate":"/smtp/blockedDomains","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"350fd1cc-de1c-4197-ae49-46ce6a1d6c03","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f5e28407-a9c3-4231-b722-a6b8bbd8af4a","name":"Unblock an existing domain from the list of blocked domains - default","request":{"urlPathTemplate":"/smtp/blockedDomains/{domain}","method":"DELETE","pathParameters":{"domain":{"equalTo":"domain"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"f5e28407-a9c3-4231-b722-a6b8bbd8af4a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d0e027cd-c123-40e7-9aad-30cdce7cf01d","name":"Delete hardbounces - default","request":{"urlPathTemplate":"/smtp/deleteHardbounces","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d0e027cd-c123-40e7-9aad-30cdce7cf01d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4682dc2f-8d22-401b-bb70-9d7939f0b7f7","name":"Send a transactional email - default","request":{"urlPathTemplate":"/smtp/email","method":"POST"},"response":{"status":201,"body":"{\n \"messageId\": \"<201798300811.5787683@relay.domain.com>\",\n \"messageIds\": [\n \"messageIds\"\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"4682dc2f-8d22-401b-bb70-9d7939f0b7f7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5b6bfccd-a5f9-44e8-ab53-d5429f8f9e49","name":"Delete scheduled emails by batchId or messageId - default","request":{"urlPathTemplate":"/smtp/email/{identifier}","method":"DELETE","pathParameters":{"identifier":{"equalTo":"4320f270-a4e3-4a2e-b591-edfe30a5e627"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"5b6bfccd-a5f9-44e8-ab53-d5429f8f9e49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"7b3f5d29-5b44-4d25-ba1b-9b35d7e1bb44","name":"Fetch scheduled emails by batchId or messageId - default","request":{"urlPathTemplate":"/smtp/emailStatus/{identifier}","method":"GET","pathParameters":{"identifier":{"equalTo":"4320f270-a4e3-4a2e-b591-edfe30a5e627"}},"queryParameters":{"startDate":{"equalTo":"2022-02-02"},"endDate":{"equalTo":"2022-03-02"}}},"response":{"status":200,"body":"{\n \"batches\": [\n {\n \"createdAt\": \"2022-02-26T11:36:43Z\",\n \"scheduledAt\": \"2022-02-28T11:36:43Z\",\n \"status\": \"queued\"\n },\n {\n \"createdAt\": \"2022-02-24T11:36:43Z\",\n \"scheduledAt\": \"2022-02-25T11:36:43Z\",\n \"status\": \"processed\"\n },\n {\n \"createdAt\": \"2022-02-25T11:36:43Z\",\n \"scheduledAt\": \"2022-02-26T11:36:43Z\",\n \"status\": \"inProgress\"\n }\n ],\n \"count\": 3\n}","headers":{"Content-Type":"application/json"}},"uuid":"7b3f5d29-5b44-4d25-ba1b-9b35d7e1bb44","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"59d3278a-2ea0-47c9-9d55-a4046d1b1377","name":"Get the list of transactional emails on the basis of allowed filters - default","request":{"urlPathTemplate":"/smtp/emails","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 120,\n \"transactionalEmails\": [\n {\n \"date\": \"2019-05-25T11:53:26Z\",\n \"email\": \"abc@xyz.com\",\n \"from\": \"diana.doe@example.com\",\n \"messageId\": \"<201798300811.5787683@relay.domain.com>\",\n \"subject\": \"summer camp\",\n \"tags\": [\n \"tag1\"\n ],\n \"templateId\": 15,\n \"uuid\": \"5a78c-209ok98262910-std2341\"\n },\n {\n \"date\": \"2019-05-25T07:28:11Z\",\n \"email\": \"test@test.com\",\n \"from\": \"diana.doe@example.com\",\n \"messageId\": \"<201798300811.5700093@relay.domain.com>\",\n \"subject\": \"details verification\",\n \"tags\": [\n \"tag1\"\n ],\n \"templateId\": 15,\n \"uuid\": \"5a78c-209ok98262910-s99a341\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"59d3278a-2ea0-47c9-9d55-a4046d1b1377","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"242bc913-9644-453e-a76b-b6898985c451","name":"Get the personalized content of a sent transactional email - default","request":{"urlPathTemplate":"/smtp/emails/{uuid}","method":"GET","pathParameters":{"uuid":{"equalTo":"uuid"}}},"response":{"status":200,"body":"{\n \"attachmentCount\": 2,\n \"body\": \"

Greetings from the team

This is the actual html content sent

\",\n \"date\": \"2016-02-25T11:53:26Z\",\n \"email\": \"abc@example.com\",\n \"events\": [\n {\n \"name\": \"sent\",\n \"time\": \"2016-02-25T11:53:26Z\"\n },\n {\n \"name\": \"delivered\",\n \"time\": \"2016-02-25T11:55:26Z\"\n },\n {\n \"name\": \"opened\",\n \"time\": \"2016-02-26T09:53:26Z\"\n }\n ],\n \"subject\": \"Summer Camps\",\n \"templateId\": 12\n}","headers":{"Content-Type":"application/json"}},"uuid":"242bc913-9644-453e-a76b-b6898985c451","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1060a95a-b193-4fcb-a2c0-82a02a746067","name":"Delete an SMTP transactional log - default","request":{"urlPathTemplate":"/smtp/log/{identifier}","method":"DELETE","pathParameters":{"identifier":{"equalTo":"identifier"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"1060a95a-b193-4fcb-a2c0-82a02a746067","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4506e73c-7b47-483f-9ffc-09cb13f3d99a","name":"Get your transactional email activity aggregated over a period of time - default","request":{"urlPathTemplate":"/smtp/statistics/aggregatedReport","method":"GET"},"response":{"status":200,"body":"{\n \"blocked\": 2,\n \"clicks\": 9987,\n \"delivered\": 18996,\n \"hardBounces\": 234,\n \"invalid\": 0,\n \"opens\": 17654,\n \"range\": \"2016-09-08|2017-04-28\",\n \"requests\": 19887,\n \"softBounces\": 1533,\n \"spamReports\": 1,\n \"uniqueClicks\": 8766,\n \"uniqueOpens\": 13688,\n \"unsubscribed\": 2\n}","headers":{"Content-Type":"application/json"}},"uuid":"4506e73c-7b47-483f-9ffc-09cb13f3d99a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"a81e1c33-f793-49d1-adb6-8083ca10de20","name":"Get all your transactional email activity (unaggregated events) - default","request":{"urlPathTemplate":"/smtp/statistics/events","method":"GET"},"response":{"status":200,"body":"{\n \"events\": [\n {\n \"date\": \"2017-03-12T12:30:00Z\",\n \"email\": \"john.smith@example.com\",\n \"event\": \"deferred\",\n \"from\": \"john@example.com\",\n \"ip\": \"165.87.3.15\",\n \"link\": \"https://www.someexamplelink.com\",\n \"messageId\": \"<201798300811.5787683@example.domain.com>\",\n \"reason\": \"Error connection timeout\",\n \"subject\": \"Sib client_dev test\",\n \"tag\": \"OrderConfirmation\",\n \"templateId\": 4\n },\n {\n \"date\": \"2017-03-13T16:30:00Z\",\n \"email\": \"john.smith@example.com\",\n \"event\": \"delivered\",\n \"from\": \"john@example.com\",\n \"ip\": \"165.87.3.15\",\n \"link\": \"https://www.someexamplelink.com\",\n \"messageId\": \"<201798300811.5787683@example.domain.com>\",\n \"reason\": \"Error connection timeout\",\n \"subject\": \"Sib client_dev test\",\n \"tag\": \"OrderConfirmation\",\n \"templateId\": 5\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"a81e1c33-f793-49d1-adb6-8083ca10de20","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"0d36a3c1-9ba5-4da3-9f9a-5d81dcb8cbc6","name":"Get your transactional email activity aggregated per day - default","request":{"urlPathTemplate":"/smtp/statistics/reports","method":"GET"},"response":{"status":200,"body":"{\n \"reports\": [\n {\n \"blocked\": 519,\n \"clicks\": 1026,\n \"date\": \"2017-04-30\",\n \"delivered\": 10103,\n \"hardBounces\": 21,\n \"invalid\": 1,\n \"opens\": 5091,\n \"requests\": 10756,\n \"softBounces\": 137,\n \"spamReports\": 0,\n \"uniqueClicks\": 720,\n \"uniqueOpens\": 2318,\n \"unsubscribed\": 0\n },\n {\n \"blocked\": 920,\n \"clicks\": 1514,\n \"date\": \"2017-05-01\",\n \"delivered\": 17499,\n \"hardBounces\": 34,\n \"invalid\": 2,\n \"opens\": 10089,\n \"requests\": 18812,\n \"softBounces\": 254,\n \"spamReports\": 0,\n \"uniqueClicks\": 1090,\n \"uniqueOpens\": 4393,\n \"unsubscribed\": 3\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"0d36a3c1-9ba5-4da3-9f9a-5d81dcb8cbc6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"81e1ac28-8b42-4ff7-a4f4-ad4a4fe0d149","name":"Generate the rendered preview of transactional template - default","request":{"urlPathTemplate":"/smtp/template/preview","method":"POST"},"response":{"status":200,"body":"{\n \"fromEmail\": \"fromEmail\",\n \"fromName\": \"fromName\",\n \"html\": \"html\",\n \"previewText\": \"previewText\",\n \"subject\": \"subject\",\n \"usedFeedNames\": [\n \"usedFeedNames\",\n \"usedFeedNames\"\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"81e1ac28-8b42-4ff7-a4f4-ad4a4fe0d149","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0e4d0a9a-9763-4d0b-92ab-7b1483ddd81b","name":"Get the list of email templates - default","request":{"urlPathTemplate":"/smtp/templates","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 2,\n \"templates\": [\n {\n \"createdAt\": \"2016-02-24T14:44:24Z\",\n \"doiTemplate\": false,\n \"htmlContent\": \"HTML CONTENT 1\",\n \"id\": 5,\n \"isActive\": false,\n \"modifiedAt\": \"2016-02-24T15:37:11Z\",\n \"name\": \"ChristomasTimeTemplate\",\n \"replyTo\": \"replyto@domain.com\",\n \"sender\": {\n \"email\": \"john.smith@example.com\",\n \"id\": \"43\",\n \"name\": \"John\"\n },\n \"subject\": \"Merry Christmas\",\n \"tag\": \"Festival\",\n \"testSent\": false,\n \"toField\": \"\"\n },\n {\n \"createdAt\": \"2016-02-25T11:53:26Z\",\n \"doiTemplate\": false,\n \"htmlContent\": \"HTML CONTENT 2\",\n \"id\": 12,\n \"isActive\": true,\n \"modifiedAt\": \"2016-02-25T11:53:26Z\",\n \"name\": \"SummerSales2017Template\",\n \"replyTo\": \"replyto@domain.com\",\n \"sender\": {\n \"email\": \"john.smith@example.com\",\n \"id\": \"43\",\n \"name\": \"John\"\n },\n \"subject\": \"Enjoy our summer Sales !\",\n \"tag\": \"Summer\",\n \"testSent\": false,\n \"toField\": \"\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"0e4d0a9a-9763-4d0b-92ab-7b1483ddd81b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"a7314e1c-958e-4335-9dd3-e65802b21168","name":"Create an email template - default","request":{"urlPathTemplate":"/smtp/templates","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"a7314e1c-958e-4335-9dd3-e65802b21168","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"845ecf0d-a02f-461d-908b-25fe3eab4ec9","name":"Returns the template information - default","request":{"urlPathTemplate":"/smtp/templates/{templateId}","method":"GET","pathParameters":{"templateId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"createdAt\": \"2016-02-25T11:53:26Z\",\n \"doiTemplate\": false,\n \"htmlContent\": \"HTML CONTENT 4\",\n \"id\": 33,\n \"isActive\": true,\n \"modifiedAt\": \"2016-02-25T11:53:26Z\",\n \"name\": \"OrderConfirmation\",\n \"replyTo\": \"replyto@domain.com\",\n \"sender\": {\n \"email\": \"john.smith@example.com\",\n \"id\": \"43\",\n \"name\": \"John\"\n },\n \"subject\": \"Order Confirmation : Thanks for your Purchase !\",\n \"tag\": \"\",\n \"testSent\": false,\n \"toField\": \"\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"845ecf0d-a02f-461d-908b-25fe3eab4ec9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"65a53a30-7428-4b1a-b0a4-88869d5b8d78","name":"Update an email template - default","request":{"urlPathTemplate":"/smtp/templates/{templateId}","method":"PUT","pathParameters":{"templateId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"65a53a30-7428-4b1a-b0a4-88869d5b8d78","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ee12d2af-6eea-4dd3-b43d-ca1463b36b14","name":"Delete an inactive email template - default","request":{"urlPathTemplate":"/smtp/templates/{templateId}","method":"DELETE","pathParameters":{"templateId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"ee12d2af-6eea-4dd3-b43d-ca1463b36b14","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"10979c60-afa4-4a94-a43e-5fc9613e22da","name":"Send a template to your test list - default","request":{"urlPathTemplate":"/smtp/templates/{templateId}/sendTest","method":"POST","pathParameters":{"templateId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"10979c60-afa4-4a94-a43e-5fc9613e22da","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"df5bc4e6-ca5e-4cd7-809c-269c0845b24d","name":"Send SMS message asynchronously to a mobile number - default","request":{"urlPathTemplate":"/transactionalSMS/send","method":"POST"},"response":{"status":201,"body":"{\n \"messageId\": 1511882900176220\n}","headers":{"Content-Type":"application/json"}},"uuid":"df5bc4e6-ca5e-4cd7-809c-269c0845b24d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"70d5f369-4f59-482d-a10b-be3e50b4a40a","name":"Send SMS message to a mobile number - default","request":{"urlPathTemplate":"/transactionalSMS/sms","method":"POST"},"response":{"status":201,"body":"{\n \"messageId\": 1511882900176220,\n \"reference\": \"ab1cde2fgh3i4jklmno\",\n \"remainingCredits\": 82.85,\n \"smsCount\": 2,\n \"usedCredits\": 0.7\n}","headers":{"Content-Type":"application/json"}},"uuid":"70d5f369-4f59-482d-a10b-be3e50b4a40a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"31feec95-40fc-4b7e-9c08-86c997f2dfb0","name":"Get your SMS activity aggregated over a period of time - default","request":{"urlPathTemplate":"/transactionalSMS/statistics/aggregatedReport","method":"GET"},"response":{"status":200,"body":"{\n \"accepted\": 6,\n \"blocked\": 4,\n \"delivered\": 16,\n \"hardBounces\": 5,\n \"range\": \"2015-05-22|2017-11-29\",\n \"rejected\": 14,\n \"replied\": 8,\n \"requests\": 54,\n \"skipped\": 1,\n \"softBounces\": 26,\n \"unsubscribed\": 10\n}","headers":{"Content-Type":"application/json"}},"uuid":"31feec95-40fc-4b7e-9c08-86c997f2dfb0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"8bec6502-a4a6-4405-88f8-c7b97f2bc0e4","name":"Get all your SMS activity (unaggregated events) - default","request":{"urlPathTemplate":"/transactionalSMS/statistics/events","method":"GET"},"response":{"status":200,"body":"{\n \"events\": [\n {\n \"date\": \"2015-05-20T12:30:00Z\",\n \"event\": \"sent\",\n \"messageId\": \"1473139351170140\",\n \"phoneNumber\": \"phoneNumber\",\n \"reason\": \"Recipient is currently unreachable\",\n \"reply\": \"reply\",\n \"tag\": \"cabWaiting\"\n },\n {\n \"date\": \"2015-05-20T16:30:00Z\",\n \"event\": \"delivered\",\n \"messageId\": \"1473139351170140\",\n \"phoneNumber\": \"phoneNumber\",\n \"reason\": \"Recipient is currently unreachable\",\n \"reply\": \"reply\",\n \"tag\": \"cabRequest\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"8bec6502-a4a6-4405-88f8-c7b97f2bc0e4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"34ebfec8-ca13-4071-9f58-e116c00c6446","name":"Get your SMS activity aggregated per day - default","request":{"urlPathTemplate":"/transactionalSMS/statistics/reports","method":"GET"},"response":{"status":200,"body":"{\n \"reports\": [\n {\n \"accepted\": 2318,\n \"blocked\": 1026,\n \"date\": \"2017-04-30\",\n \"delivered\": 10103,\n \"hardBounces\": 21,\n \"rejected\": 0,\n \"replied\": 5091,\n \"requests\": 10756,\n \"skipped\": 1,\n \"softBounces\": 137,\n \"unsubscribed\": 720\n },\n {\n \"accepted\": 4393,\n \"blocked\": 1514,\n \"date\": \"2017-05-01\",\n \"delivered\": 17499,\n \"hardBounces\": 34,\n \"rejected\": 0,\n \"replied\": 10089,\n \"requests\": 18812,\n \"skipped\": 0,\n \"softBounces\": 254,\n \"unsubscribed\": 1090\n },\n {\n \"accepted\": 4689,\n \"blocked\": 1646,\n \"date\": \"2017-05-02\",\n \"delivered\": 13427,\n \"hardBounces\": 16,\n \"rejected\": 0,\n \"replied\": 11563,\n \"requests\": 14321,\n \"skipped\": 1,\n \"softBounces\": 176,\n \"unsubscribed\": 1170\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"34ebfec8-ca13-4071-9f58-e116c00c6446","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"b2c77971-5a16-41bb-99c4-62a5707d47bb","name":"Return all your created SMS templates - default","request":{"urlPathTemplate":"/transactionalSMS/templates","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 1,\n \"templates\": [\n {\n \"id\": 4,\n \"name\": \"Order Confirmation - EN\",\n \"short_url_enabled\": false,\n \"message\": \"Thanks for your order !\",\n \"compliance\": {\n \"compliance_toggle\": true,\n \"organisation_prefix\": \"BREVO\",\n \"stop_keyword\": \"STOP\"\n },\n \"encryption\": true,\n \"unicode_sms\": true,\n \"media_file\": \"brv-logo.png\",\n \"media_file_size\": \"media_file_size\",\n \"media_url\": \"https://img-st2.mailinblue.com/1232/images/content_library/original/69282fe28f55fd22de6e0cf9.png\",\n \"createdAt\": \"2025-05-01T12:30:00Z\",\n \"updatedAt\": \"2025-05-01T12:30:00Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"b2c77971-5a16-41bb-99c4-62a5707d47bb","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]}],"meta":{"total":284}} \ No newline at end of file +{"mappings":[{"id":"1211c905-93ae-4aa1-a220-5b0994166727","name":"Get account details - default","request":{"urlPathTemplate":"/account","method":"GET"},"response":{"status":200,"body":"{\n \"organization_id\": \"5fa2b8c123456789abcdef01\",\n \"user_id\": 1234567,\n \"enterprise\": false,\n \"companyName\": \"Acme Marketing Corp\",\n \"email\": \"michael.davis@example.com\",\n \"firstName\": \"Michael\",\n \"lastName\": \"Davis\",\n \"address\": {\n \"city\": \"New York\",\n \"country\": \"United States\",\n \"street\": \"456 Business Ave\",\n \"zipCode\": \"10001\"\n },\n \"marketingAutomation\": {\n \"enabled\": true,\n \"key\": \"ma8k2x9v4h7p3d6f1c5e8b2a\"\n },\n \"plan\": [\n {\n \"credits\": 250,\n \"creditsType\": \"sendLimit\",\n \"endDate\": \"1753826567\",\n \"startDate\": \"1751234567\",\n \"type\": \"free\"\n },\n {\n \"credits\": 15,\n \"creditsType\": \"sendLimit\",\n \"endDate\": \"1753826567\",\n \"startDate\": \"1751234567\",\n \"type\": \"sms\"\n }\n ],\n \"planVerticals\": [\n {\n \"planCategory\": \"Marketing\",\n \"planType\": \"free\",\n \"name\": \"Free\",\n \"status\": \"active\",\n \"startDate\": \"1751234567\",\n \"endDate\": \"1753826567\",\n \"users\": {\n \"purchasedSeats\": \"1\",\n \"usedSeats\": \"1\"\n },\n \"credits\": \"250\"\n },\n {\n \"planCategory\": \"Chat\",\n \"planType\": \"free\",\n \"name\": \"Free\",\n \"status\": \"active\",\n \"startDate\": \"1735678901\",\n \"endDate\": \"1767214901\",\n \"users\": {\n \"purchasedSeats\": \"1\",\n \"usedSeats\": \"1\"\n },\n \"credits\": \"250\"\n },\n {\n \"planCategory\": \"CRM\",\n \"planType\": \"free\",\n \"name\": \"Free\",\n \"status\": \"active\",\n \"startDate\": \"1735678900\",\n \"endDate\": \"1767214900\",\n \"users\": {\n \"purchasedSeats\": \"1\",\n \"usedSeats\": \"1\"\n },\n \"credits\": \"250\"\n }\n ],\n \"relay\": {\n \"data\": {\n \"port\": 587,\n \"relay\": \"smtp-relay.brevo.com\",\n \"userName\": \"michael.davis@example.com\"\n },\n \"enabled\": true\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"1211c905-93ae-4aa1-a220-5b0994166727","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"05b4b845-e51b-43f3-941d-006d3d448a07","name":"Get user activity logs - default","request":{"urlPathTemplate":"/organization/activities","method":"GET"},"response":{"status":200,"body":"{\n \"logs\": [\n {\n \"action\": \"login-success\",\n \"date\": \"2023-03-16T16:49:23+05:30\",\n \"user_agent\": \"Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)\",\n \"user_email\": \"test@mycompany.com\",\n \"user_ip\": \"192.158.1.34\"\n },\n {\n \"action\": \"update-profile\",\n \"date\": \"2023-03-15T16:49:23+05:30\",\n \"user_agent\": \"Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)\",\n \"user_email\": \"test@myexample.com\",\n \"user_ip\": \"192.158.1.38\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"05b4b845-e51b-43f3-941d-006d3d448a07","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"22e8ec1f-e4ba-4f4b-996b-17fb7412b82b","name":"Create a new group of sub-accounts - default","request":{"urlPathTemplate":"/corporate/group","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"659xxxxxxxxxxxxxxxx6ef9c8\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"22e8ec1f-e4ba-4f4b-996b-17fb7412b82b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"553c0be2-9f70-4b5f-867b-1d2543c96f46","name":"Delete sub-account from group - default","request":{"urlPathTemplate":"/corporate/group/unlink/{groupId}/subAccounts","method":"PUT","pathParameters":{"groupId":{"equalTo":"groupId"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"553c0be2-9f70-4b5f-867b-1d2543c96f46","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"569cac67-bd04-4628-af18-b29f58c3426a","name":"GET a group details - default","request":{"urlPathTemplate":"/corporate/group/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"group\": {\n \"createdAt\": \"2024-02-09T06:14:40+00:00\",\n \"groupName\": \"My group\",\n \"id\": \"5f926dba72a405440a4efc97\"\n },\n \"sub-accounts\": [\n {\n \"companyName\": \"My sub organization\",\n \"createdAt\": \"2024-02-09T06:14:40+00:00\",\n \"id\": 7866556\n },\n {\n \"companyName\": \"Your sub organization\",\n \"createdAt\": \"2024-01-05T03:11:40+00:00\",\n \"id\": 6563051\n }\n ],\n \"users\": [\n {\n \"email\": \"my-user@my-org.com\",\n \"firstName\": \"John\",\n \"lastName\": \"Smith\"\n },\n {\n \"email\": \"your-user@your-org.com\",\n \"firstName\": \"firstName\",\n \"lastName\": \"lastName\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"569cac67-bd04-4628-af18-b29f58c3426a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"15046c07-f5ad-4826-99a4-368a6abcc9d5","name":"Update a group of sub-accounts - default","request":{"urlPathTemplate":"/corporate/group/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"15046c07-f5ad-4826-99a4-368a6abcc9d5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"204960c9-0571-4a3d-a030-f9779c6aea08","name":"Delete a group - default","request":{"urlPathTemplate":"/corporate/group/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"204960c9-0571-4a3d-a030-f9779c6aea08","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d15212a9-7d53-42ef-996e-cbae118ba999","name":"Get the list of groups - default","request":{"urlPathTemplate":"/corporate/groups","method":"GET"},"response":{"status":200,"body":"[\n {\n \"groupName\": \"My group 1\",\n \"id\": \"d3b142c709d6ed67ef1cd903\"\n },\n {\n \"groupName\": \"My group 2\",\n \"id\": \"a5b192a709d6ed67ef8fd922\"\n },\n {\n \"groupName\": \"My group 3\",\n \"id\": \"bbb142c709d6ed67ef1cd910\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"d15212a9-7d53-42ef-996e-cbae118ba999","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"431c56cb-581f-459e-a434-b2378dfbb177","name":"Get the list of all admin users - default","request":{"urlPathTemplate":"/corporate/invited/users","method":"GET"},"response":{"status":200,"body":"{\n \"users\": [\n {\n \"email\": \"master-user2@company.com\",\n \"feature_access\": {\n \"analytics\": [\n \"download_data\",\n \"create_alerts\",\n \"my_looks\",\n \"explore_create\"\n ],\n \"api_keys\": [\n \"all\"\n ],\n \"apps_management\": [\n \"none\"\n ],\n \"create_sub_organizations\": [\n \"all\"\n ],\n \"manage_sub_organizations\": [\n \"all\"\n ],\n \"my_plan\": [\n \"all\",\n \"all\"\n ],\n \"sub_organization_groups\": [\n \"create\",\n \"edit_delete\"\n ],\n \"user_management\": [\n \"none\"\n ]\n },\n \"groups\": {\n \"id\": \"a5c4f22c08d9ed37ef1ca342\",\n \"name\": \"My group\"\n },\n \"is_owner\": \"is_owner\",\n \"status\": \"active\"\n },\n {\n \"email\": \"master-user3@company.com\",\n \"feature_access\": {\n \"analytics\": [\n \"create_alerts\",\n \"my_looks\"\n ],\n \"api_keys\": [\n \"none\"\n ],\n \"apps_management\": [\n \"all\"\n ],\n \"create_sub_organizations\": [\n \"all\"\n ],\n \"manage_sub_organizations\": [\n \"all\"\n ],\n \"my_plan\": [\n \"none\",\n \"none\"\n ],\n \"sub_organization_groups\": [\n \"edit_delete\"\n ],\n \"user_management\": [\n \"all\"\n ]\n },\n \"groups\": {\n \"id\": \"a5c4f22c08d9ed37ef1ca342\",\n \"name\": \"My group\"\n },\n \"is_owner\": \"is_owner\",\n \"status\": \"active\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"431c56cb-581f-459e-a434-b2378dfbb177","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"47be7c71-5117-47ca-8146-e166b37fbd89","name":"List of all IPs - default","request":{"urlPathTemplate":"/corporate/ip","method":"GET"},"response":{"status":200,"body":"[\n {\n \"domain\": \"example.com\",\n \"ip\": \"192.168.1.1\",\n \"transactional\": true\n },\n {\n \"domain\": \"example.com\",\n \"ip\": \"192.168.1.2\",\n \"transactional\": false\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"47be7c71-5117-47ca-8146-e166b37fbd89","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"c8f6e272-2e8b-4912-b109-ef644f37c748","name":"Get the details of requested master account - default","request":{"urlPathTemplate":"/corporate/masterAccount","method":"GET"},"response":{"status":200,"body":"{\n \"billingInfo\": {\n \"address\": {\n \"countryCode\": \"IN\",\n \"locality\": \"Pandav Nagar, New Delhi\",\n \"postalCode\": \"560048\",\n \"stateCode\": \"UP\",\n \"streetAddress\": \"C-92\"\n },\n \"companyName\": \"Corp Sample 1-1\",\n \"email\": \"sample@example.com\",\n \"name\": {\n \"familyName\": \"Pandit\",\n \"givenName\": \"Uday\"\n }\n },\n \"companyName\": \"Corp Sample 1-1\",\n \"currencyCode\": \"INR\",\n \"email\": \"sample@example.com\",\n \"id\": 1003286,\n \"planInfo\": {\n \"currencyCode\": \"INR\",\n \"features\": [\n {\n \"name\": \"MULTI_USER\",\n \"quantity\": 10,\n \"remaining\": 0,\n \"unitValue\": \"unitValue\",\n \"used\": 15\n },\n {\n \"name\": \"ADVANCED_REPORTING\",\n \"quantity\": 12,\n \"remaining\": 11,\n \"unitValue\": \"unitValue\",\n \"used\": 1\n },\n {\n \"name\": \"INBOX\",\n \"quantity\": 10,\n \"remaining\": 0,\n \"unitValue\": \"unitValue\",\n \"used\": 10\n },\n {\n \"name\": \"LANDING_PAGE\",\n \"quantity\": 10,\n \"remaining\": 0,\n \"unitValue\": \"unitValue\",\n \"used\": 11\n },\n {\n \"name\": \"RECURRING_CREDITS\",\n \"quantity\": 500,\n \"remaining\": 499,\n \"unitValue\": \"unitValue\",\n \"used\": 1\n }\n ],\n \"nextBillingAt\": 1637739295,\n \"planPeriod\": \"month\",\n \"price\": 2100,\n \"subAccounts\": 15\n },\n \"timezone\": \"Europe/Paris\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c8f6e272-2e8b-4912-b109-ef644f37c748","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"8fea4e4d-838b-4875-b315-9790bd457518","name":"Generate SSO token to access admin account - default","request":{"urlPathTemplate":"/corporate/ssoToken","method":"POST"},"response":{"status":200,"body":"{\n \"token\": \"5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8fea4e4d-838b-4875-b315-9790bd457518","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"45b2935e-aecb-4ad4-8888-9a0e585bcd23","name":"Get the list of all the sub-accounts of the master account. - default","request":{"urlPathTemplate":"/corporate/subAccount","method":"GET","queryParameters":{"offset":{"equalTo":"1"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"count\": 3,\n \"subAccounts\": [\n {\n \"active\": true,\n \"companyName\": \"Company1\",\n \"createdAt\": 1631523176,\n \"groups\": [\n {\n \"id\": \"5f8f8c3b5f56a02d4433b3a8\",\n \"name\": \"Group 1\"\n },\n {\n \"id\": \"4fbf3c3b1f56a02ac465b1a0\",\n \"name\": \"Group 2\"\n }\n ],\n \"id\": 4043629\n },\n {\n \"active\": true,\n \"companyName\": \"Company2\",\n \"createdAt\": 1629439311,\n \"groups\": [\n {}\n ],\n \"id\": 3984002\n },\n {\n \"active\": true,\n \"companyName\": \"Company3\",\n \"createdAt\": 1614713641,\n \"groups\": [\n {}\n ],\n \"id\": 3524191\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"45b2935e-aecb-4ad4-8888-9a0e585bcd23","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"27e8ff22-470d-462b-a9e2-6cd1c428b361","name":"Create a new sub-account under a master account. - default","request":{"urlPathTemplate":"/corporate/subAccount","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 4109344\n}","headers":{"Content-Type":"application/json"}},"uuid":"27e8ff22-470d-462b-a9e2-6cd1c428b361","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0b1c8ee5-ea29-4bb0-a233-53d0ff4d86fa","name":"Associate an IP to sub-accounts - default","request":{"urlPathTemplate":"/corporate/subAccount/ip/associate","method":"POST"},"response":{"status":201,"body":"{\n \"key\": \"value\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"0b1c8ee5-ea29-4bb0-a233-53d0ff4d86fa","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b9524079-a627-4ed4-8f2a-abb0390700aa","name":"Dissociate an IP to sub-accounts - default","request":{"urlPathTemplate":"/corporate/subAccount/ip/dissociate","method":"PUT"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"b9524079-a627-4ed4-8f2a-abb0390700aa","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"69800c09-607d-406d-8817-7c7c51ff5ae1","name":"Create an API key for a sub-account - default","request":{"urlPathTemplate":"/corporate/subAccount/key","method":"POST"},"response":{"status":201,"body":"{\n \"key\": \"xkeysib-21881axxxxxcc92e04-mIrexxxx7z\",\n \"status\": \"success\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"69800c09-607d-406d-8817-7c7c51ff5ae1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6174a85-f3d7-4550-bc89-0e9814e58cfb","name":"Generate SSO token to access sub-account - default","request":{"urlPathTemplate":"/corporate/subAccount/ssoToken","method":"POST"},"response":{"status":200,"body":"{\n \"token\": \"5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c6174a85-f3d7-4550-bc89-0e9814e58cfb","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a2fc395f-9a4c-407e-bcf3-5eb067c54991","name":"Get sub-account details - default","request":{"urlPathTemplate":"/corporate/subAccount/{id}","method":"GET","pathParameters":{"id":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"companyName\": \"API-Sub-26thOct21-4\",\n \"email\": \"uday+1@brevo.com\",\n \"groups\": [\n {\n \"id\": \"5f8f8c3b5f56a02d4433b3a7\",\n \"name\": \"Group 1\"\n },\n {\n \"id\": \"5f8f8c3b5f56a02d4433b3a8\",\n \"name\": \"Group 2\"\n }\n ],\n \"name\": \"Uday Pandit\",\n \"planInfo\": {\n \"credits\": {\n \"emails\": {\n \"quantity\": 2000,\n \"remaining\": 1955\n },\n \"externalFeeds\": {\n \"quantity\": 1,\n \"remaining\": 1\n },\n \"sms\": {\n \"quantity\": 2000,\n \"remaining\": 1955\n },\n \"whatsapp\": {\n \"quantity\": 100,\n \"remaining\": 50\n },\n \"wpSubscribers\": {\n \"quantity\": 2000,\n \"remaining\": 1955\n }\n },\n \"features\": {\n \"inbox\": {\n \"quantity\": 20,\n \"remaining\": 12\n },\n \"landingPage\": {\n \"quantity\": 25,\n \"remaining\": 14\n },\n \"salesUsers\": {\n \"quantity\": 30,\n \"remaining\": 14\n },\n \"users\": {\n \"quantity\": 30,\n \"remaining\": 14\n }\n },\n \"planType\": \"paid\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"a2fc395f-9a4c-407e-bcf3-5eb067c54991","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"574c16a0-400c-46fe-aea7-88b6b1a0b812","name":"Delete a sub-account - default","request":{"urlPathTemplate":"/corporate/subAccount/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"574c16a0-400c-46fe-aea7-88b6b1a0b812","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"769c18cf-d0ef-4284-83e9-bc297f635f71","name":"Enable/disable sub-account application(s) - default","request":{"urlPathTemplate":"/corporate/subAccount/{id}/applications/toggle","method":"PUT","pathParameters":{"id":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"769c18cf-d0ef-4284-83e9-bc297f635f71","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"85c53397-13d2-43ec-986d-7d85858e7c8e","name":"Update sub-account plan - default","request":{"urlPathTemplate":"/corporate/subAccount/{id}/plan","method":"PUT","pathParameters":{"id":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"85c53397-13d2-43ec-986d-7d85858e7c8e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41b0f555-e1b6-4e40-9e6a-17c8bd025f53","name":"Update sub-accounts plan - default","request":{"urlPathTemplate":"/corporate/subAccounts/plan","method":"PUT"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"41b0f555-e1b6-4e40-9e6a-17c8bd025f53","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2d522f1e-c89e-42da-b070-ffb9ff715ec2","name":"Send invitation to an admin user - default","request":{"urlPathTemplate":"/corporate/user/invitation/send","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"659xxxxxxxxxxxxxxxx6ef9c8\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2d522f1e-c89e-42da-b070-ffb9ff715ec2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d9c935a4-0eec-4d97-9162-0ecfcc38abbb","name":"Resend / cancel admin user invitation - default","request":{"urlPathTemplate":"/corporate/user/invitation/{action}/{email}","method":"PUT","pathParameters":{"action":{"equalTo":"resend"},"email":{"equalTo":"email"}}},"response":{"status":200,"body":"{\n \"message\": \"Invitation resent successfully\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"d9c935a4-0eec-4d97-9162-0ecfcc38abbb","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a6f000f1-1ae0-4b47-842f-edac9954cb1d","name":"Revoke an admin user - default","request":{"urlPathTemplate":"/corporate/user/revoke/{email}","method":"DELETE","pathParameters":{"email":{"equalTo":"email"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a6f000f1-1ae0-4b47-842f-edac9954cb1d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f295c79b-1b65-4112-8b0c-b6ce9d87d44f","name":"Check admin user permissions - default","request":{"urlPathTemplate":"/corporate/user/{email}/permissions","method":"GET","pathParameters":{"email":{"equalTo":"email"}}},"response":{"status":200,"body":"{\n \"email\": \"invitedUser@company.com\",\n \"feature_access\": {\n \"analytics\": [\n \"download_data\",\n \"create_alerts\",\n \"my_looks\",\n \"explore_create\"\n ],\n \"api_keys\": [\n \"all\"\n ],\n \"apps_management\": [\n \"all\"\n ],\n \"create_sub_organizations\": [\n \"all\"\n ],\n \"manage_sub_organizations\": [\n \"all\"\n ],\n \"my_plan\": [\n \"all\",\n \"all\"\n ],\n \"sub_organization_groups\": [\n \"create\",\n \"edit_delete\"\n ],\n \"user_management\": [\n \"none\"\n ]\n },\n \"groups\": [\n {\n \"id\": \"6543ab3667ffbb00142e4486\",\n \"name\": \"Support\"\n },\n {\n \"id\": \"174bab366732bbce142e4412\",\n \"name\": \"Technical\"\n }\n ],\n \"status\": \"active\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f295c79b-1b65-4112-8b0c-b6ce9d87d44f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c29d9b3d-5506-4699-8d63-cb5be4b098e1","name":"Change admin user permissions - default","request":{"urlPathTemplate":"/corporate/user/{email}/permissions","method":"PUT","pathParameters":{"email":{"equalTo":"email"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c29d9b3d-5506-4699-8d63-cb5be4b098e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5b756ab9-0c76-4ea0-86e3-2629a91ee517","name":"Get the list of all your users - default","request":{"urlPathTemplate":"/organization/invited/users","method":"GET"},"response":{"status":200,"body":"{\n \"users\": [\n {\n \"email\": \"owner@company.com\",\n \"feature_access\": {\n \"conversations\": \"owner\",\n \"crm\": \"owner\",\n \"marketing\": \"owner\"\n },\n \"is_owner\": \"is_owner\",\n \"status\": \"active\"\n },\n {\n \"email\": \"pendingInvitedUser@company.com\",\n \"feature_access\": {\n \"conversations\": \"none\",\n \"crm\": \"full\",\n \"marketing\": \"custom\"\n },\n \"is_owner\": \"is_owner\",\n \"status\": \"pending\"\n },\n {\n \"email\": \"connectedInvitedUser@company.com\",\n \"feature_access\": {\n \"conversations\": \"full\",\n \"crm\": \"none\",\n \"marketing\": \"none\"\n },\n \"is_owner\": \"is_owner\",\n \"status\": \"active\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"5b756ab9-0c76-4ea0-86e3-2629a91ee517","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"027416a7-5144-402b-8e13-ff098d91ec53","name":"Revoke user permission - default","request":{"urlPathTemplate":"/organization/user/invitation/revoke/{email}","method":"PUT","pathParameters":{"email":{"equalTo":"email"}}},"response":{"status":200,"body":"{\n \"credit_notes\": [\n \"TEST-123\"\n ],\n \"status\": \"OK\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"027416a7-5144-402b-8e13-ff098d91ec53","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3380168e-886f-4ab1-9489-1f453e144d97","name":"Send invitation to user - default","request":{"urlPathTemplate":"/organization/user/invitation/send","method":"POST"},"response":{"status":200,"body":"{\n \"invoice_id\": \"invoice_id\",\n \"status\": \"OK\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"3380168e-886f-4ab1-9489-1f453e144d97","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fda4aa42-d57d-4f82-8b2b-30f5d0abffa2","name":"Resend / Cancel invitation - default","request":{"urlPathTemplate":"/organization/user/invitation/{action}/{email}","method":"PUT","pathParameters":{"action":{"equalTo":"resend"},"email":{"equalTo":"email"}}},"response":{"status":200,"body":"{\n \"credit_notes\": [\n \"TEST-123\"\n ],\n \"status\": \"OK\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"fda4aa42-d57d-4f82-8b2b-30f5d0abffa2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e3763191-26a9-488e-9abf-c8b9ca82c709","name":"Update permission for a user - default","request":{"urlPathTemplate":"/organization/user/update/permissions","method":"POST"},"response":{"status":200,"body":"{\n \"credit_notes\": [\n \"TEST-123\"\n ],\n \"invoice_id\": \"invoice_id\",\n \"status\": \"OK\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e3763191-26a9-488e-9abf-c8b9ca82c709","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8d0fdcb2-801b-46ec-98ff-ef29fa70f35d","name":"Check user permission - default","request":{"urlPathTemplate":"/organization/user/{email}/permissions","method":"GET","pathParameters":{"email":{"equalTo":"email"}}},"response":{"status":200,"body":"{\n \"email\": \"invitedUser@company.com\",\n \"privileges\": [\n {\n \"feature\": \"Email campaign\",\n \"permissions\": [\n \"Create / edit / delete\",\n \"Send / schedule / suspend\"\n ]\n },\n {\n \"feature\": \"Templates\",\n \"permissions\": [\n \"Create / edit / delete\",\n \"Activate / deactivate\"\n ]\n },\n {\n \"feature\": \"SMS campaign\",\n \"permissions\": [\n \"Create / edit / delete\",\n \"Send / schedule / suspend\"\n ]\n },\n {\n \"feature\": \"Facebook Ads\",\n \"permissions\": [\n \"Schedule / pause\"\n ]\n },\n {\n \"feature\": \"Landing pages\",\n \"permissions\": [\n \"All\"\n ]\n },\n {\n \"feature\": \"Workflows\",\n \"permissions\": [\n \"Create / edit / delete\",\n \"Activate / deactivate / Pause\"\n ]\n },\n {\n \"feature\": \"Contacts\",\n \"permissions\": [\n \"View\",\n \"Contact forms\"\n ]\n },\n {\n \"feature\": \"SMTP & API\",\n \"permissions\": [\n \"SMTP\",\n \"API Keys\",\n \"Authorized IPs\"\n ]\n },\n {\n \"feature\": \"User management\",\n \"permissions\": [\n \"None\"\n ]\n },\n {\n \"feature\": \"Sales Platform\",\n \"permissions\": [\n \"Create / edit / delete owned deals and tasks\",\n \"Manage deals and tasks from other users\",\n \"Reports\",\n \"Settings\"\n ]\n },\n {\n \"feature\": \"Conversations\",\n \"permissions\": [\n \"None\"\n ]\n },\n {\n \"feature\": \"Senders, Domains & Dedicated IPs\",\n \"permissions\": [\n \"Senders management\",\n \"Domains management\",\n \"Dedicated IPs management\"\n ]\n },\n {\n \"feature\": \"Push\",\n \"permissions\": [\n \"View\",\n \"Create / edit / delete\",\n \"Send\",\n \"Settings\"\n ]\n },\n {\n \"feature\": \"Companies\",\n \"permissions\": [\n \"Create / edit / delete owned companies\",\n \"Manage companies from other users\",\n \"Settings\"\n ]\n }\n ],\n \"status\": \"active\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8d0fdcb2-801b-46ec-98ff-ef29fa70f35d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ec86c15f-d950-46af-8cc4-d9670d01ec3e","name":"Get background processes - default","request":{"urlPathTemplate":"/processes","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 198,\n \"processes\": [\n {\n \"id\": 217,\n \"name\": \"IMPORTUSER\",\n \"status\": \"completed\",\n \"export_url\": \"https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv\"\n },\n {\n \"id\": 213,\n \"name\": \"SEARCH_EXPORT_USERS\",\n \"status\": \"completed\",\n \"export_url\": \"https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv\"\n },\n {\n \"id\": 212,\n \"name\": \"IMPORTUSER\",\n \"status\": \"queued\",\n \"export_url\": \"https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"ec86c15f-d950-46af-8cc4-d9670d01ec3e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"5cd8a4a8-5754-4b87-aa94-fc464c24ad7a","name":"Get process details - default","request":{"urlPathTemplate":"/processes/{processId}","method":"GET","pathParameters":{"processId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"id\": 217,\n \"name\": \"IMPORTUSER\",\n \"status\": \"queued\",\n \"info\": {\n \"import\": {\n \"invalid_emails\": \"invalid_emails\",\n \"duplicate_contact_id\": \"duplicate_contact_id\",\n \"duplicate_ext_id\": \"duplicate_ext_id\",\n \"duplicate_email_id\": \"duplicate_email_id\",\n \"duplicate_phone_id\": \"duplicate_phone_id\",\n \"duplicate_whatsapp_id\": \"duplicate_whatsapp_id\",\n \"duplicate_landline_number_id\": \"duplicate_landline_number_id\"\n }\n },\n \"export_url\": \"https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"5cd8a4a8-5754-4b87-aa94-fc464c24ad7a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6ee5e306-247b-485b-9f81-14d36b3a0bda","name":"Get email senders - default","request":{"urlPathTemplate":"/senders","method":"GET"},"response":{"status":200,"body":"{\n \"senders\": [\n {\n \"active\": true,\n \"email\": \"support@example.com\",\n \"id\": 1,\n \"ips\": [\n {\n \"domain\": \"example.com\",\n \"ip\": \"203.0.113.100\",\n \"weight\": 50\n }\n ],\n \"name\": \"Support Team\"\n },\n {\n \"active\": false,\n \"email\": \"hello@example.com\",\n \"id\": 3,\n \"ips\": [\n {\n \"domain\": \"example.com\",\n \"ip\": \"203.0.113.100\",\n \"weight\": 50\n }\n ],\n \"name\": \"Customer Service\"\n },\n {\n \"active\": false,\n \"email\": \"marketing@testcompany.com\",\n \"id\": 5,\n \"ips\": [\n {\n \"domain\": \"example.com\",\n \"ip\": \"203.0.113.100\",\n \"weight\": 50\n }\n ],\n \"name\": \"Marketing Team\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"6ee5e306-247b-485b-9f81-14d36b3a0bda","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"04b1327d-3b58-45aa-a665-8f8430486eca","name":"Create email sender - default","request":{"urlPathTemplate":"/senders","method":"POST"},"response":{"status":201,"body":"{\n \"dkimError\": false,\n \"id\": 15,\n \"spfError\": false\n}","headers":{"Content-Type":"application/json"}},"uuid":"04b1327d-3b58-45aa-a665-8f8430486eca","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"42107fb8-bf0f-4066-9d65-a0127f24fe27","name":"Get all the dedicated IPs for your account - default","request":{"urlPathTemplate":"/senders/ips","method":"GET"},"response":{"status":200,"body":"{\n \"ips\": [\n {\n \"id\": 1,\n \"active\": true,\n \"domain\": \"mailing.enterprise.com\",\n \"ip\": \"192.168.1.100\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"42107fb8-bf0f-4066-9d65-a0127f24fe27","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"64d2403b-5b4c-4cf2-a326-9be7cb7182f2","name":"Update a sender - default","request":{"urlPathTemplate":"/senders/{senderId}","method":"PUT","pathParameters":{"senderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"64d2403b-5b4c-4cf2-a326-9be7cb7182f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b62e8709-f76b-450a-a8af-c2694927210f","name":"Delete a sender - default","request":{"urlPathTemplate":"/senders/{senderId}","method":"DELETE","pathParameters":{"senderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"b62e8709-f76b-450a-a8af-c2694927210f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9f49a642-6deb-4ab2-a40a-7027f9a001b5","name":"Get all the dedicated IPs for a specific sender - default","request":{"urlPathTemplate":"/senders/{senderId}/ips","method":"GET","pathParameters":{"senderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"ips\": [\n {\n \"domain\": \"mailing.enterprise.com\",\n \"id\": 3,\n \"ip\": \"192.168.1.100\",\n \"weight\": 75\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"9f49a642-6deb-4ab2-a40a-7027f9a001b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"84fdcc64-d82a-4050-a96c-26e27bcf7f45","name":"Validate a sender using OTP - default","request":{"urlPathTemplate":"/senders/{senderId}/validate","method":"PUT","pathParameters":{"senderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"84fdcc64-d82a-4050-a96c-26e27bcf7f45","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b8793728-4a87-4bf4-a3db-522326815800","name":"Get the list of all sender domains - default","request":{"urlPathTemplate":"/senders/domains","method":"GET"},"response":{"status":200,"body":"{\n \"domains\": [\n {\n \"id\": \"67e57b40130375f045064c45\",\n \"domain_name\": \"mycompany.com\",\n \"authenticated\": true,\n \"verified\": true,\n \"ip\": \"192.168.1.100\",\n \"provider\": \"Cloudflare\",\n \"creator\": {\n \"id\": \"62e4fce597550d0b0177cb0c\",\n \"email\": \"admin@mycompany.com\",\n \"creationDate\": \"2025-03-27T16:22:24Z\"\n }\n },\n {\n \"id\": \"67f778570dd65f97c70910ed\",\n \"domain_name\": \"newsletter.mycompany.com\",\n \"authenticated\": false,\n \"verified\": true,\n \"provider\": \"GoDaddy\",\n \"creator\": {\n \"id\": \"62e4fce597550d0b0177cb0c\",\n \"email\": \"admin@mycompany.com\",\n \"creationDate\": \"2025-04-10T07:50:47Z\"\n }\n },\n {\n \"id\": \"688cd306d8893504e50ea615\",\n \"domain_name\": \"test.example.com\",\n \"authenticated\": false,\n \"verified\": false,\n \"provider\": \"Other\",\n \"creator\": {\n \"id\": \"62e4fce597550d0b0177cb0c\",\n \"email\": \"admin@mycompany.com\",\n \"creationDate\": \"2025-08-01T14:45:26Z\"\n }\n }\n ],\n \"count\": 3,\n \"current_page\": 1,\n \"total_pages\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"b8793728-4a87-4bf4-a3db-522326815800","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"e76931d8-41f1-44a9-8fc0-96c65f7d9488","name":"Create a new sender domain - default","request":{"urlPathTemplate":"/senders/domains","method":"POST"},"response":{"status":200,"body":"{\n \"id\": 5,\n \"domain_name\": \"mycompany.com\",\n \"domain_provider\": \"Cloudflare\",\n \"message\": \"Domain added successfully. To authenticate it, add following DNS records\",\n \"dns_records\": {\n \"brevo_code\": {\n \"host_name\": \"@\",\n \"type\": \"TXT\",\n \"value\": \"brevo-code=abc123def456\",\n \"status\": false\n },\n \"dkim_record\": {\n \"host_name\": \"mail._domainkey\",\n \"type\": \"TXT\",\n \"value\": \"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...\",\n \"status\": false\n },\n \"dmarc_record\": {\n \"host_name\": \"_dmarc\",\n \"type\": \"TXT\",\n \"value\": \"v=DMARC1; p=none; rua=mailto:dmarc@mycompany.com\",\n \"status\": false\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"e76931d8-41f1-44a9-8fc0-96c65f7d9488","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5a7549d9-70eb-47b1-ac17-336014db1486","name":"Get a sender domain configuration - default","request":{"urlPathTemplate":"/senders/domains/{domainName}","method":"GET","pathParameters":{"domainName":{"equalTo":"domainName"}}},"response":{"status":200,"body":"{\n \"domain\": \"mycompany.com\",\n \"verified\": true,\n \"authenticated\": true,\n \"dns_records\": {\n \"brevo_code\": {\n \"host_name\": \"@\",\n \"type\": \"TXT\",\n \"value\": \"brevo-code=abc123def456\",\n \"status\": true\n },\n \"dkim_record\": {\n \"host_name\": \"mail._domainkey\",\n \"type\": \"TXT\",\n \"value\": \"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...\",\n \"status\": true\n },\n \"dmarc_record\": {\n \"host_name\": \"_dmarc\",\n \"type\": \"TXT\",\n \"value\": \"v=DMARC1; p=quarantine; rua=mailto:dmarc@mycompany.com\",\n \"status\": true\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"5a7549d9-70eb-47b1-ac17-336014db1486","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9f2cdd56-d0d6-4c69-9fdb-4636d6af882a","name":"Delete a sender domain - default","request":{"urlPathTemplate":"/senders/domains/{domainName}","method":"DELETE","pathParameters":{"domainName":{"equalTo":"domainName"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"9f2cdd56-d0d6-4c69-9fdb-4636d6af882a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6e2d7e8-5f84-41b8-b586-7937f28f68e1","name":"Authenticate a sender domain - default","request":{"urlPathTemplate":"/senders/domains/{domainName}/authenticate","method":"PUT","pathParameters":{"domainName":{"equalTo":"domainName"}}},"response":{"status":200,"body":"{\n \"domain_name\": \"mycompany.com\",\n \"message\": \"Domain has been authenticated successfully.\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c6e2d7e8-5f84-41b8-b586-7937f28f68e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0328395c-53eb-4af0-8854-b1745d42fc0d","name":"Get all webhooks - default","request":{"urlPathTemplate":"/webhooks","method":"GET"},"response":{"status":200,"body":"{\n \"webhooks\": [\n {\n \"auth\": {\n \"token\": \"test-auth-token1234\",\n \"type\": \"bearer\"\n },\n \"batched\": true,\n \"createdAt\": \"2016-07-18T12:30:09Z\",\n \"description\": \"Webhook triggered on campaign openings\",\n \"events\": [\n \"opened\"\n ],\n \"headers\": [\n {\n \"key\": \"cf-secret\",\n \"value\": \"test-header-value\"\n }\n ],\n \"id\": 9864,\n \"modifiedAt\": \"2016-07-18T16:00:50Z\",\n \"type\": \"transactional\",\n \"domain\": \"example.com\",\n \"url\": \"https://example.domain.com/webhook/events/kzfxxxxxxxx0uyo1\"\n },\n {\n \"auth\": {\n \"token\": \"test-auth-token1234\",\n \"type\": \"bearer\"\n },\n \"batched\": true,\n \"createdAt\": \"2017-02-20T14:30:00Z\",\n \"description\": \"Webhook triggered on campaign hard bounces\",\n \"events\": [\n \"hardBounce\"\n ],\n \"headers\": [\n {\n \"key\": \"cf-secret\",\n \"value\": \"test-header-value\"\n }\n ],\n \"id\": 22770,\n \"modifiedAt\": \"2017-02-20T19:00:00Z\",\n \"type\": \"marketing\",\n \"domain\": \"example.com\",\n \"url\": \"http://exmaple.domain.com/15kxxxxxn1\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"0328395c-53eb-4af0-8854-b1745d42fc0d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"d82bd4fc-54b8-4197-a686-bbf5389e40a9","name":"Create a webhook - default","request":{"urlPathTemplate":"/webhooks","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"d82bd4fc-54b8-4197-a686-bbf5389e40a9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2ca5ef46-7340-4f7f-bb5f-a3f34383c9c8","name":"Export webhook history - default","request":{"urlPathTemplate":"/webhooks/export","method":"POST"},"response":{"status":202,"body":"{\n \"processId\": 78\n}","headers":{"Content-Type":"application/json"}},"uuid":"2ca5ef46-7340-4f7f-bb5f-a3f34383c9c8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2361015f-4a4b-4a9e-b0e4-1c6d6a7c00b2","name":"Get a webhook details - default","request":{"urlPathTemplate":"/webhooks/{webhookId}","method":"GET","pathParameters":{"webhookId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"auth\": {\n \"token\": \"test-auth-token1234\",\n \"type\": \"bearer\"\n },\n \"batched\": true,\n \"createdAt\": \"2016-06-07T09:10:10Z\",\n \"description\": \"Webhook triggered on campaign openings and addition of lists\",\n \"events\": [\n \"listAddition\",\n \"opened\"\n ],\n \"headers\": [\n {\n \"key\": \"cf-secret\",\n \"value\": \"test-header-value\"\n }\n ],\n \"id\": 7287,\n \"modifiedAt\": \"2016-06-08T11:30:00Z\",\n \"type\": \"marketing\",\n \"domain\": \"example.com\",\n \"url\": \"http://example.domain.com/1brxxxxxx5p1\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2361015f-4a4b-4a9e-b0e4-1c6d6a7c00b2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"cc1789b2-6f74-4130-92f1-fdb216ce8cb0","name":"Update a webhook - default","request":{"urlPathTemplate":"/webhooks/{webhookId}","method":"PUT","pathParameters":{"webhookId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"cc1789b2-6f74-4130-92f1-fdb216ce8cb0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f14c0b05-3180-4b9d-9d8d-2b2107ba126b","name":"Delete a webhook - default","request":{"urlPathTemplate":"/webhooks/{webhookId}","method":"DELETE","pathParameters":{"webhookId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"f14c0b05-3180-4b9d-9d8d-2b2107ba126b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2a8a03cd-cea2-4501-94e0-c2dccdd68f00","name":"Get all external feeds - default","request":{"urlPathTemplate":"/feeds","method":"GET","queryParameters":{"search":{"equalTo":"product"},"startDate":{"equalTo":"2024-01-01"},"endDate":{"equalTo":"2024-01-31"}}},"response":{"status":200,"body":"{\n \"count\": 18,\n \"feeds\": [\n {\n \"id\": \"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6\",\n \"name\": \"Product Catalog Feed\",\n \"url\": \"https://api.example.com/products\",\n \"authType\": \"noAuth\",\n \"username\": \"apiuser\",\n \"password\": \"apipass\",\n \"token\": \"abc123token456\",\n \"maxRetries\": 3,\n \"cache\": true,\n \"headers\": [\n {\n \"name\": \"Authorization\",\n \"value\": \"Bearer xyz789\"\n }\n ],\n \"createdAt\": \"2025-09-18T13:29:27Z\",\n \"modifiedAt\": \"2025-09-18T13:29:27Z\"\n },\n {\n \"id\": \"c2d3e4f5-a6b7-48c9-90d1-e2f3a4b5c6d7\",\n \"name\": \"Blog News Feed\",\n \"url\": \"https://blog.example.com/api/posts\",\n \"authType\": \"token\",\n \"username\": \"apiuser\",\n \"password\": \"apipass\",\n \"token\": \"abc123token456\",\n \"maxRetries\": 3,\n \"cache\": true,\n \"headers\": [\n {\n \"name\": \"Authorization\",\n \"value\": \"Bearer xyz789\"\n }\n ],\n \"createdAt\": \"2025-09-17T16:03:25Z\",\n \"modifiedAt\": \"2025-09-17T16:03:25Z\"\n },\n {\n \"id\": \"d3e4f5a6-b7c8-49d0-91e2-f3a4b5c6d7e8\",\n \"name\": \"Public Data Feed\",\n \"url\": \"https://jsonplaceholder.typicode.com/posts\",\n \"authType\": \"basic\",\n \"username\": \"apiuser\",\n \"password\": \"apipass\",\n \"token\": \"abc123token456\",\n \"maxRetries\": 3,\n \"cache\": true,\n \"headers\": [\n {\n \"name\": \"Authorization\",\n \"value\": \"Bearer xyz789\"\n }\n ],\n \"createdAt\": \"2025-09-05T09:06:42Z\",\n \"modifiedAt\": \"2025-09-05T09:06:42Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"2a8a03cd-cea2-4501-94e0-c2dccdd68f00","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"6feaee25-9e8b-4798-b9ee-ae7b3aad1442","name":"Create external feed - default","request":{"urlPathTemplate":"/feeds","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"6feaee25-9e8b-4798-b9ee-ae7b3aad1442","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2239ff35-3a80-42f1-b822-81e1d785db03","name":"Get external feed details - default","request":{"urlPathTemplate":"/feeds/{uuid}","method":"GET","pathParameters":{"uuid":{"equalTo":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6"}}},"response":{"status":200,"body":"{\n \"id\": \"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6\",\n \"name\": \"Product Catalog Feed\",\n \"url\": \"https://api.example.com/products\",\n \"authType\": \"token\",\n \"username\": \"api_user\",\n \"password\": \"secure_pass123\",\n \"token\": \"abc123token456\",\n \"maxRetries\": 3,\n \"cache\": true,\n \"createdAt\": \"2025-09-18T13:29:27Z\",\n \"modifiedAt\": \"2025-09-18T13:29:27Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2239ff35-3a80-42f1-b822-81e1d785db03","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c1cb8e28-7845-4479-a233-737a81218df9","name":"Update external feed - default","request":{"urlPathTemplate":"/feeds/{uuid}","method":"PUT","pathParameters":{"uuid":{"equalTo":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c1cb8e28-7845-4479-a233-737a81218df9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"63a2125b-2244-41b0-8f75-6e2eb3cfb682","name":"Delete external feed - default","request":{"urlPathTemplate":"/feeds/{uuid}","method":"DELETE","pathParameters":{"uuid":{"equalTo":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"63a2125b-2244-41b0-8f75-6e2eb3cfb682","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"03da01c2-0cff-47d2-996c-4317cabb22c4","name":"Create/Update object records in bulk - default","request":{"urlPathTemplate":"/objects/{object_type}/batch/upsert","method":"POST","pathParameters":{"object_type":{"equalTo":"vehicle"}}},"response":{"status":202,"body":"{\n \"message\": \"Batch object records are being processed\",\n \"processId\": 21\n}","headers":{"Content-Type":"application/json"}},"uuid":"03da01c2-0cff-47d2-996c-4317cabb22c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"90e40ddc-ba7b-4979-8f3d-67bcfe9be80d","name":"Get the list of object records and total records count for an object. - default","request":{"urlPathTemplate":"/objects/{object_type}/records","method":"GET","pathParameters":{"object_type":{"equalTo":"vehicle"}},"queryParameters":{"limit":{"equalTo":"1000000"},"page_num":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"count\": 350,\n \"records\": [\n {\n \"associations\": [\n {\n \"object_type\": \"garage\",\n \"records\": [\n {\n \"identifiers\": {\n \"id\": 12345\n }\n }\n ]\n }\n ],\n \"attributes\": {\n \"make\": \"Toyota\",\n \"model\": \"Corolla\",\n \"color\": \"Black\",\n \"year\": 2020,\n \"engine_type\": \"hybrid\"\n },\n \"createdAt\": \"2025-07-22T10:20:30Z\",\n \"identifiers\": {\n \"ext_id\": \"507f1f77bc\",\n \"id\": 16789\n },\n \"updatedAt\": \"2025-07-22T10:20:30Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"90e40ddc-ba7b-4979-8f3d-67bcfe9be80d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dc28fc32-e60d-4ec0-a256-912ae9ca2cbd","name":"Delete multiple object records (up to 1000) asynchronously - default","request":{"urlPathTemplate":"/objects/{object_type}/batch/delete","method":"POST","pathParameters":{"object_type":{"equalTo":"vehicle"}}},"response":{"status":202,"body":"{\n \"processId\": 21,\n \"message\": \"Batch object records are being processed for deletion\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"dc28fc32-e60d-4ec0-a256-912ae9ca2cbd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8729f948-4808-4d8f-b027-70b35a734218","name":"Get all the contacts - default","request":{"urlPathTemplate":"/contacts","method":"GET"},"response":{"status":200,"body":"{\n \"contacts\": [\n {\n \"attributes\": {},\n \"createdAt\": \"2017-05-01T17:05:03Z\",\n \"email\": \"contact1@example.com\",\n \"emailBlacklisted\": true,\n \"id\": 247,\n \"listIds\": [\n 43,\n 58\n ],\n \"listUnsubscribed\": [\n 1000000\n ],\n \"modifiedAt\": \"2017-05-01T17:05:03Z\",\n \"smsBlacklisted\": true,\n \"whatsappBlacklisted\": false\n },\n {\n \"attributes\": {},\n \"createdAt\": \"2017-05-01T17:05:03Z\",\n \"email\": \"33058407248@mailin-sms.com\",\n \"emailBlacklisted\": true,\n \"id\": 245,\n \"listIds\": [\n 43,\n 61,\n 58\n ],\n \"listUnsubscribed\": [\n 1000000\n ],\n \"modifiedAt\": \"2017-05-01T17:05:03Z\",\n \"smsBlacklisted\": false,\n \"whatsappBlacklisted\": false\n }\n ],\n \"count\": 3\n}","headers":{"Content-Type":"application/json"}},"uuid":"8729f948-4808-4d8f-b027-70b35a734218","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"fe3c55db-75e2-4d78-85c0-eaed9f642c83","name":"Create a contact - default","request":{"urlPathTemplate":"/contacts","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 21\n}","headers":{"Content-Type":"application/json"}},"uuid":"fe3c55db-75e2-4d78-85c0-eaed9f642c83","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dd0aa44d-f601-4c28-8481-1c0b25bb46aa","name":"List all attributes - default","request":{"urlPathTemplate":"/contacts/attributes","method":"GET"},"response":{"status":200,"body":"{\n \"attributes\": [\n {\n \"calculatedValue\": \"COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]\",\n \"category\": \"normal\",\n \"enumeration\": [\n {\n \"label\": \"Women\",\n \"value\": 1,\n \"valueStr\": \"1\"\n }\n ],\n \"multiCategoryOptions\": [\n \"USA\"\n ],\n \"name\": \"LASTNAME\",\n \"type\": \"text\"\n },\n {\n \"calculatedValue\": \"COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]\",\n \"category\": \"normal\",\n \"enumeration\": [\n {\n \"label\": \"Women\",\n \"value\": 1,\n \"valueStr\": \"1\"\n }\n ],\n \"multiCategoryOptions\": [\n \"USA\"\n ],\n \"name\": \"FIRSTNAME\",\n \"type\": \"text\"\n },\n {\n \"calculatedValue\": \"COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]\",\n \"category\": \"normal\",\n \"enumeration\": [\n {\n \"label\": \"Women\",\n \"value\": 1,\n \"valueStr\": \"1\"\n }\n ],\n \"multiCategoryOptions\": [\n \"USA\"\n ],\n \"name\": \"DOB\",\n \"type\": \"date\"\n },\n {\n \"calculatedValue\": \"COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]\",\n \"category\": \"category\",\n \"enumeration\": [\n {\n \"label\": \"Men\",\n \"value\": 1,\n \"valueStr\": \"1\"\n },\n {\n \"label\": \"Women\",\n \"value\": 2,\n \"valueStr\": \"2\"\n },\n {\n \"label\": \"Kid\",\n \"value\": 3,\n \"valueStr\": \"3\"\n }\n ],\n \"multiCategoryOptions\": [\n \"USA\"\n ],\n \"name\": \"GENDER\",\n \"type\": \"text\"\n },\n {\n \"calculatedValue\": \"COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]\",\n \"category\": \"category\",\n \"enumeration\": [\n {\n \"label\": \"English\",\n \"value\": 0,\n \"valueStr\": \"en\"\n },\n {\n \"label\": \"French\",\n \"value\": 0,\n \"valueStr\": \"fr\"\n }\n ],\n \"multiCategoryOptions\": [\n \"USA\"\n ],\n \"name\": \"LANGUAGE\",\n \"type\": \"text\"\n },\n {\n \"calculatedValue\": \"COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]\",\n \"category\": \"normal\",\n \"enumeration\": [\n {\n \"label\": \"Women\",\n \"value\": 1,\n \"valueStr\": \"1\"\n }\n ],\n \"multiCategoryOptions\": [\n \"USA\"\n ],\n \"name\": \"BDO\",\n \"type\": \"user\"\n },\n {\n \"calculatedValue\": \"COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]\",\n \"category\": \"normal\",\n \"enumeration\": [\n {\n \"label\": \"Women\",\n \"value\": 1,\n \"valueStr\": \"1\"\n }\n ],\n \"multiCategoryOptions\": [\n \"USA\",\n \"India\",\n \"France\"\n ],\n \"name\": \"COUNTRY\",\n \"type\": \"multiple-choice\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"dd0aa44d-f601-4c28-8481-1c0b25bb46aa","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"1253fdcb-3d6c-4957-88ab-df297d7154ab","name":"Create contact attribute - default","request":{"urlPathTemplate":"/contacts/attributes/{attributeCategory}/{attributeName}","method":"POST","pathParameters":{"attributeCategory":{"equalTo":"normal"},"attributeName":{"equalTo":"attributeName"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"1253fdcb-3d6c-4957-88ab-df297d7154ab","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f02e59a5-f5b5-400d-8697-22eace5165c5","name":"Update contact attribute - default","request":{"urlPathTemplate":"/contacts/attributes/{attributeCategory}/{attributeName}","method":"PUT","pathParameters":{"attributeCategory":{"equalTo":"category"},"attributeName":{"equalTo":"attributeName"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"f02e59a5-f5b5-400d-8697-22eace5165c5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eed9112c-42ea-4dba-a3c1-5bc5eea04b6a","name":"Delete an attribute - default","request":{"urlPathTemplate":"/contacts/attributes/{attributeCategory}/{attributeName}","method":"DELETE","pathParameters":{"attributeCategory":{"equalTo":"normal"},"attributeName":{"equalTo":"attributeName"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"eed9112c-42ea-4dba-a3c1-5bc5eea04b6a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"827de4b0-dfdc-45c9-a27a-819a6acaece3","name":"Delete a multiple-choice attribute option - default","request":{"urlPathTemplate":"/contacts/attributes/{attributeType}/{multipleChoiceAttribute}/{multipleChoiceAttributeOption}","method":"DELETE","pathParameters":{"attributeType":{"equalTo":"multiple-choice"},"multipleChoiceAttribute":{"equalTo":"multipleChoiceAttribute"},"multipleChoiceAttributeOption":{"equalTo":"multipleChoiceAttributeOption"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"827de4b0-dfdc-45c9-a27a-819a6acaece3","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6ba8cd16-ea25-49a7-8288-e0cf22a8b065","name":"Update multiple contacts - default","request":{"urlPathTemplate":"/contacts/batch","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"6ba8cd16-ea25-49a7-8288-e0cf22a8b065","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2b7fdfe7-8f83-41bd-81d2-b42f70ff4603","name":"Create Contact via DOI (Double-Opt-In) Flow - default","request":{"urlPathTemplate":"/contacts/doubleOptinConfirmation","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"2b7fdfe7-8f83-41bd-81d2-b42f70ff4603","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1a2d075b-a8de-4135-b0c9-58bcfe31c7e4","name":"Export contacts - default","request":{"urlPathTemplate":"/contacts/export","method":"POST"},"response":{"status":202,"body":"{\n \"processId\": 78\n}","headers":{"Content-Type":"application/json"}},"uuid":"1a2d075b-a8de-4135-b0c9-58bcfe31c7e4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c175e62d-23d7-4d5a-bc46-7093ac21de08","name":"Get all folders - default","request":{"urlPathTemplate":"/contacts/folders","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 2,\n \"folders\": [\n {\n \"id\": 42,\n \"name\": \"Ninja_Form\",\n \"totalBlacklisted\": 98,\n \"totalSubscribers\": 4567,\n \"uniqueSubscribers\": 4665\n },\n {\n \"id\": 29,\n \"name\": \"Prestashop\",\n \"totalBlacklisted\": 10,\n \"totalSubscribers\": 6543,\n \"uniqueSubscribers\": 6553\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"c175e62d-23d7-4d5a-bc46-7093ac21de08","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"40d55e83-c362-440b-9ad3-3cbb47ed0eb0","name":"Create a folder - default","request":{"urlPathTemplate":"/contacts/folders","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"40d55e83-c362-440b-9ad3-3cbb47ed0eb0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"64a96da1-15c5-426f-a455-f6ec46ff0434","name":"Returns a folder's details - default","request":{"urlPathTemplate":"/contacts/folders/{folderId}","method":"GET","pathParameters":{"folderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"id\": 1,\n \"name\": \"Client_Folder\",\n \"totalBlacklisted\": 987,\n \"totalSubscribers\": 16778,\n \"uniqueSubscribers\": 17765\n}","headers":{"Content-Type":"application/json"}},"uuid":"64a96da1-15c5-426f-a455-f6ec46ff0434","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"701dc90d-1130-42e1-93d3-8ef73e8f8596","name":"Update a folder - default","request":{"urlPathTemplate":"/contacts/folders/{folderId}","method":"PUT","pathParameters":{"folderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"701dc90d-1130-42e1-93d3-8ef73e8f8596","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a33a22a6-f7ae-41f1-9646-c37d999a9421","name":"Delete a folder (and all its lists) - default","request":{"urlPathTemplate":"/contacts/folders/{folderId}","method":"DELETE","pathParameters":{"folderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a33a22a6-f7ae-41f1-9646-c37d999a9421","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1bbaf637-2edd-4ded-8338-3f42e8e93b45","name":"Get lists in a folder - default","request":{"urlPathTemplate":"/contacts/folders/{folderId}/lists","method":"GET","pathParameters":{"folderId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"count\": 3,\n \"lists\": [\n {\n \"id\": 46,\n \"name\": \"Reactiv\",\n \"totalBlacklisted\": 0,\n \"totalSubscribers\": 7655,\n \"uniqueSubscribers\": 7655\n },\n {\n \"id\": 41,\n \"name\": \"NY_Area\",\n \"totalBlacklisted\": 23,\n \"totalSubscribers\": 3654,\n \"uniqueSubscribers\": 3677\n },\n {\n \"id\": 22,\n \"name\": \"VIP_Customer\",\n \"totalBlacklisted\": 72,\n \"totalSubscribers\": 8753,\n \"uniqueSubscribers\": 8826\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"1bbaf637-2edd-4ded-8338-3f42e8e93b45","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c104d034-1156-452e-a1f5-90baae3a120e","name":"Import contacts - default","request":{"urlPathTemplate":"/contacts/import","method":"POST"},"response":{"status":202,"body":"{\n \"processId\": 78\n}","headers":{"Content-Type":"application/json"}},"uuid":"c104d034-1156-452e-a1f5-90baae3a120e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ede870d3-ebf8-4b09-851f-f8abb13c3b81","name":"Get all the lists - default","request":{"urlPathTemplate":"/contacts/lists","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 2,\n \"lists\": [\n {\n \"id\": 53,\n \"name\": \"Spanish_Speakers\",\n \"totalBlacklisted\": 65,\n \"totalSubscribers\": 5432,\n \"uniqueSubscribers\": 5497,\n \"folderId\": 1\n },\n {\n \"id\": 50,\n \"name\": \"Other\",\n \"totalBlacklisted\": 765,\n \"totalSubscribers\": 10976,\n \"uniqueSubscribers\": 11741,\n \"folderId\": 2\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"ede870d3-ebf8-4b09-851f-f8abb13c3b81","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"ecaaf193-0526-47f7-a447-6866f25d6a35","name":"Create a list - default","request":{"urlPathTemplate":"/contacts/lists","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"ecaaf193-0526-47f7-a447-6866f25d6a35","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d2bcf613-ab25-4a1d-acfc-f9189c9abdce","name":"Get a list's details - default","request":{"urlPathTemplate":"/contacts/lists/{listId}","method":"GET","pathParameters":{"listId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"id\": 12,\n \"name\": \"Newsletter_Weekly\",\n \"totalBlacklisted\": 63,\n \"totalSubscribers\": 6533,\n \"uniqueSubscribers\": 6596,\n \"campaignStats\": [\n {\n \"campaignId\": 15,\n \"stats\": {\n \"appleMppOpens\": 10,\n \"clickers\": 789,\n \"complaints\": 0,\n \"deferred\": 0,\n \"delivered\": 6632,\n \"estimatedViews\": 560,\n \"hardBounces\": 4,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 6645,\n \"softBounces\": 34,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 701,\n \"uniqueViews\": 3442,\n \"unsubscriptions\": 4,\n \"viewed\": 4322\n }\n },\n {\n \"campaignId\": 45,\n \"stats\": {\n \"appleMppOpens\": 10,\n \"clickers\": 788,\n \"complaints\": 1,\n \"deferred\": 0,\n \"delivered\": 4078,\n \"estimatedViews\": 560,\n \"hardBounces\": 2,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 4334,\n \"softBounces\": 18,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 654,\n \"uniqueViews\": 987,\n \"unsubscriptions\": 4,\n \"viewed\": 1555\n }\n }\n ],\n \"createdAt\": \"2016-02-26T11:56:08Z\",\n \"dynamicList\": false,\n \"folderId\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"d2bcf613-ab25-4a1d-acfc-f9189c9abdce","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fd940864-d48a-47f4-8db8-5960a7657dcc","name":"Update a list - default","request":{"urlPathTemplate":"/contacts/lists/{listId}","method":"PUT","pathParameters":{"listId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"fd940864-d48a-47f4-8db8-5960a7657dcc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f9aace2d-f1ee-48cf-9a00-2ce8a8e876de","name":"Delete a list - default","request":{"urlPathTemplate":"/contacts/lists/{listId}","method":"DELETE","pathParameters":{"listId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"f9aace2d-f1ee-48cf-9a00-2ce8a8e876de","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1e736496-14de-4379-b319-5857e47950dc","name":"Get contacts in a list - default","request":{"urlPathTemplate":"/contacts/lists/{listId}/contacts","method":"GET","pathParameters":{"listId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"contacts\": [\n {\n \"attributes\": {},\n \"createdAt\": \"2017-05-12T12:30:00Z\",\n \"email\": \"alex.pain@example.com\",\n \"emailBlacklisted\": false,\n \"id\": 45,\n \"listIds\": [\n 12,\n 9,\n 20\n ],\n \"listUnsubscribed\": [\n 1,\n 2\n ],\n \"modifiedAt\": \"2017-05-12T12:30:00Z\",\n \"smsBlacklisted\": true,\n \"whatsappBlacklisted\": false\n },\n {\n \"attributes\": {},\n \"createdAt\": \"2017-05-12T12:30:00Z\",\n \"email\": \"john.smith@example.com\",\n \"emailBlacklisted\": true,\n \"id\": 32,\n \"listIds\": [\n 12\n ],\n \"listUnsubscribed\": [\n 1\n ],\n \"modifiedAt\": \"2017-05-12T12:30:00Z\",\n \"smsBlacklisted\": false,\n \"whatsappBlacklisted\": false\n },\n {\n \"attributes\": {},\n \"createdAt\": \"2017-05-12T12:30:00Z\",\n \"email\": \"helen.rose@example.com\",\n \"emailBlacklisted\": true,\n \"id\": 65,\n \"listIds\": [\n 12,\n 9,\n 20\n ],\n \"listUnsubscribed\": [\n 1\n ],\n \"modifiedAt\": \"2017-05-12T12:30:00Z\",\n \"smsBlacklisted\": false,\n \"whatsappBlacklisted\": false\n }\n ],\n \"count\": 17655\n}","headers":{"Content-Type":"application/json"}},"uuid":"1e736496-14de-4379-b319-5857e47950dc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f1dbcb2f-9c0d-4ccd-a750-28e2c2f9e6f9","name":"Add existing contacts to a list - default","request":{"urlPathTemplate":"/contacts/lists/{listId}/contacts/add","method":"POST","pathParameters":{"listId":{"equalTo":"1000000"}}},"response":{"status":201,"body":"{\n \"contacts\": {\n \"failure\": [\n \"jeff32@example.com, jim56@example.com\"\n ],\n \"processId\": 78,\n \"success\": [\n \"success\"\n ],\n \"total\": 27\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"f1dbcb2f-9c0d-4ccd-a750-28e2c2f9e6f9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"36e0a4db-6281-4b17-bcbe-d10a330348a5","name":"Delete a contact from a list - default","request":{"urlPathTemplate":"/contacts/lists/{listId}/contacts/remove","method":"POST","pathParameters":{"listId":{"equalTo":"1000000"}}},"response":{"status":201,"body":"{\n \"contacts\": {\n \"failure\": [\n \"jeff32@example.com, jim56@example.com\"\n ],\n \"processId\": 78,\n \"success\": [\n \"success\"\n ],\n \"total\": 27\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"36e0a4db-6281-4b17-bcbe-d10a330348a5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dd30aa5c-59ad-4ff0-a95f-bf685d7b279e","name":"Get all the segments - default","request":{"urlPathTemplate":"/contacts/segments","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 2,\n \"segments\": [\n {\n \"categoryName\": \"Name1\",\n \"id\": 53,\n \"segmentName\": \"Segment1\",\n \"updatedAt\": \"2017-03-12T12:30:00Z\"\n },\n {\n \"categoryName\": \"Name2\",\n \"id\": 50,\n \"segmentName\": \"Segment2\",\n \"updatedAt\": \"2017-03-12T12:30:00Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"dd30aa5c-59ad-4ff0-a95f-bf685d7b279e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"5a0e7075-a413-4c22-a2bf-aa2f8e383d6d","name":"Get a contact's details - default","request":{"urlPathTemplate":"/contacts/{identifier}","method":"GET","pathParameters":{"identifier":{"equalTo":"identifier"}}},"response":{"status":200,"body":"{\n \"attributes\": {},\n \"createdAt\": \"2017-05-02T16:40:31Z\",\n \"email\": \"peggy.rain@example.com\",\n \"emailBlacklisted\": false,\n \"id\": 42,\n \"listIds\": [\n 40\n ],\n \"listUnsubscribed\": [\n 1000000\n ],\n \"modifiedAt\": \"2017-05-02T16:40:31Z\",\n \"smsBlacklisted\": false,\n \"whatsappBlacklisted\": false,\n \"statistics\": {\n \"clicked\": [\n {\n \"campaignId\": 21,\n \"links\": [\n {\n \"count\": 2,\n \"eventTime\": \"2016-05-03T21:25:01Z\",\n \"ip\": \"66.249.93.118\",\n \"url\": \"https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email\"\n }\n ]\n }\n ],\n \"complaints\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\"\n }\n ],\n \"delivered\": [\n {\n \"campaignId\": 21,\n \"eventTime\": \"2016-05-03T21:24:56Z\"\n }\n ],\n \"hardBounces\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\"\n }\n ],\n \"messagesSent\": [\n {\n \"campaignId\": 21,\n \"eventTime\": \"2016-05-03T20:15:13Z\"\n },\n {\n \"campaignId\": 42,\n \"eventTime\": \"2016-10-17T10:30:01Z\"\n }\n ],\n \"opened\": [\n {\n \"campaignId\": 21,\n \"count\": 2,\n \"eventTime\": \"2016-05-03T21:24:56Z\",\n \"ip\": \"66.249.93.118\"\n },\n {\n \"campaignId\": 68,\n \"count\": 1,\n \"eventTime\": \"2017-01-30T13:56:40Z\",\n \"ip\": \"66.249.93.217\"\n }\n ],\n \"softBounces\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\"\n }\n ],\n \"transacAttributes\": [\n {}\n ],\n \"unsubscriptions\": {\n \"adminUnsubscription\": [\n {\n \"eventTime\": \"2017-03-12T20:15:13Z\",\n \"ip\": \"165.87.3.15\"\n }\n ],\n \"userUnsubscription\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\",\n \"ip\": \"165.87.3.15\"\n }\n ]\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"5a0e7075-a413-4c22-a2bf-aa2f8e383d6d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"75a6a0e6-ae00-42cb-82ae-0bbe1f8bd2d1","name":"Update a contact - default","request":{"urlPathTemplate":"/contacts/{identifier}","method":"PUT","pathParameters":{"identifier":{"equalTo":"identifier"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"75a6a0e6-ae00-42cb-82ae-0bbe1f8bd2d1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fb8d40ed-00fd-4acc-88a7-32580773691f","name":"Delete a contact - default","request":{"urlPathTemplate":"/contacts/{identifier}","method":"DELETE","pathParameters":{"identifier":{"equalTo":"identifier"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"fb8d40ed-00fd-4acc-88a7-32580773691f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9797e88c-e80c-4130-9605-8986d5de0403","name":"Get email campaigns' statistics for a contact - default","request":{"urlPathTemplate":"/contacts/{identifier}/campaignStats","method":"GET","pathParameters":{"identifier":{"equalTo":"identifier"}}},"response":{"status":200,"body":"{\n \"clicked\": [\n {\n \"campaignId\": 21,\n \"links\": [\n {\n \"count\": 2,\n \"eventTime\": \"2016-05-03T21:25:01Z\",\n \"ip\": \"66.249.93.118\",\n \"url\": \"https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email\"\n }\n ]\n }\n ],\n \"complaints\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\"\n }\n ],\n \"delivered\": [\n {\n \"campaignId\": 21,\n \"eventTime\": \"2016-05-03T21:24:56Z\"\n }\n ],\n \"hardBounces\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\"\n }\n ],\n \"messagesSent\": [\n {\n \"campaignId\": 21,\n \"eventTime\": \"2016-05-03T20:15:13Z\"\n },\n {\n \"campaignId\": 42,\n \"eventTime\": \"2016-10-17T10:30:01Z\"\n },\n {\n \"campaignId\": 45,\n \"eventTime\": \"2016-11-09T11:45:02Z\"\n }\n ],\n \"opened\": [\n {\n \"campaignId\": 21,\n \"count\": 2,\n \"eventTime\": \"2016-05-03T21:24:56Z\",\n \"ip\": \"66.249.93.118\"\n },\n {\n \"campaignId\": 45,\n \"count\": 1,\n \"eventTime\": \"2017-01-30T13:56:40Z\",\n \"ip\": \"66.249.93.217\"\n }\n ],\n \"softBounces\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\"\n }\n ],\n \"transacAttributes\": [\n {\n \"orderDate\": \"2017-03-12\",\n \"orderId\": 248,\n \"orderPrice\": 24.99\n }\n ],\n \"unsubscriptions\": {\n \"adminUnsubscription\": [\n {\n \"eventTime\": \"2017-03-12T20:15:13Z\",\n \"ip\": \"165.87.3.15\"\n }\n ],\n \"userUnsubscription\": [\n {\n \"campaignId\": 3,\n \"eventTime\": \"2017-03-12T20:15:13Z\",\n \"ip\": \"165.87.3.15\"\n }\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"9797e88c-e80c-4130-9605-8986d5de0403","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"66f42c42-cb9e-4764-908f-98a27774a2c1","name":"Sets agent's status to online for 2-3 minutes - default","request":{"urlPathTemplate":"/conversations/agentOnlinePing","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"66f42c42-cb9e-4764-908f-98a27774a2c1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0b2458f6-3c0f-4f03-9f63-8051466d793b","name":"Send a message as an agent - default","request":{"urlPathTemplate":"/conversations/messages","method":"POST"},"response":{"status":200,"body":"{\n \"agentId\": \"d9nKoegKSjmCtyK78\",\n \"agentName\": \"Liz\",\n \"agentUserpic\": \"https://www.brevo.com/\",\n \"attachments\": [\n {\n \"name\": \"name\",\n \"link\": \"link\",\n \"mimeType\": \"mimeType\",\n \"isImage\": true,\n \"isSticker\": true,\n \"isInline\": true,\n \"inlineId\": \"inlineId\",\n \"size\": 1000000,\n \"isAllowedFileType\": true\n }\n ],\n \"bcc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"cc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"createdAt\": 1482512803740,\n \"file\": {\n \"name\": \"conversations.png\",\n \"link\": \"https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/\",\n \"mimeType\": \"mimeType\",\n \"isImage\": true,\n \"isSticker\": true,\n \"isInline\": true,\n \"inlineId\": \"inlineId\",\n \"size\": 15538,\n \"imageInfo\": {\n \"width\": 1129,\n \"height\": 525,\n \"previewLink\": \"https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/better/\"\n },\n \"isAllowedFileType\": true\n },\n \"forwardedToSourceStatus\": {\n \"error\": \"error\",\n \"isSuccess\": true\n },\n \"from\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"html\": \"Hello! How can I help you?\",\n \"id\": \"eYBEm3gq3zc5ayE2g\",\n \"integrations\": {\n \"key\": \"value\"\n },\n \"isBot\": true,\n \"isMissed\": false,\n \"isMissedByVisitor\": false,\n \"isPushed\": false,\n \"isTrigger\": false,\n \"rawUnsafeHtml\": \"Good morning!
How can I help you?\",\n \"receivedFrom\": \"SuperAwesomeHelpdesk\",\n \"replyTo\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"sourceMessageId\": \"sourceMessageId\",\n \"subject\": \"Invitation to a meeting\",\n \"text\": \"Hello! How can I help you?\",\n \"to\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"type\": \"agent\",\n \"isSentViaJsApi\": true,\n \"messageType\": \"messageType\",\n \"isForward\": true,\n \"source\": {\n \"key\": \"value\"\n },\n \"visitorId\": \"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"0b2458f6-3c0f-4f03-9f63-8051466d793b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"73c7e27f-534f-4bff-ae89-6508af694971","name":"Get a message - default","request":{"urlPathTemplate":"/conversations/messages/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"agentId\": \"d9nKoegKSjmCtyK78\",\n \"agentName\": \"Liz\",\n \"agentUserpic\": \"https://www.brevo.com/\",\n \"attachments\": [\n {\n \"name\": \"name\",\n \"link\": \"link\",\n \"mimeType\": \"mimeType\",\n \"isImage\": true,\n \"isSticker\": true,\n \"isInline\": true,\n \"inlineId\": \"inlineId\",\n \"size\": 1000000,\n \"isAllowedFileType\": true\n }\n ],\n \"bcc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"cc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"createdAt\": 1482512803740,\n \"file\": {\n \"name\": \"conversations.png\",\n \"link\": \"https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/\",\n \"mimeType\": \"mimeType\",\n \"isImage\": true,\n \"isSticker\": true,\n \"isInline\": true,\n \"inlineId\": \"inlineId\",\n \"size\": 15538,\n \"imageInfo\": {\n \"width\": 1129,\n \"height\": 525,\n \"previewLink\": \"https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/better/\"\n },\n \"isAllowedFileType\": true\n },\n \"forwardedToSourceStatus\": {\n \"error\": \"error\",\n \"isSuccess\": true\n },\n \"from\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"html\": \"Hello! How can I help you?\",\n \"id\": \"eYBEm3gq3zc5ayE2g\",\n \"integrations\": {\n \"key\": \"value\"\n },\n \"isBot\": true,\n \"isMissed\": false,\n \"isMissedByVisitor\": false,\n \"isPushed\": false,\n \"isTrigger\": false,\n \"rawUnsafeHtml\": \"Good morning!
How can I help you?\",\n \"receivedFrom\": \"SuperAwesomeHelpdesk\",\n \"replyTo\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"sourceMessageId\": \"sourceMessageId\",\n \"subject\": \"Invitation to a meeting\",\n \"text\": \"Hello! How can I help you?\",\n \"to\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"type\": \"agent\",\n \"isSentViaJsApi\": true,\n \"messageType\": \"messageType\",\n \"isForward\": true,\n \"source\": {\n \"key\": \"value\"\n },\n \"visitorId\": \"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"73c7e27f-534f-4bff-ae89-6508af694971","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"92155bd1-c19b-4aad-99c9-8a69133fc185","name":"Update a message sent by an agent - default","request":{"urlPathTemplate":"/conversations/messages/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"agentId\": \"d9nKoegKSjmCtyK78\",\n \"agentName\": \"Liz\",\n \"agentUserpic\": \"https://www.brevo.com/\",\n \"attachments\": [\n {\n \"name\": \"name\",\n \"link\": \"link\",\n \"mimeType\": \"mimeType\",\n \"isImage\": true,\n \"isSticker\": true,\n \"isInline\": true,\n \"inlineId\": \"inlineId\",\n \"size\": 1000000,\n \"isAllowedFileType\": true\n }\n ],\n \"bcc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"cc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"createdAt\": 1482512803740,\n \"file\": {\n \"name\": \"conversations.png\",\n \"link\": \"https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/\",\n \"mimeType\": \"mimeType\",\n \"isImage\": true,\n \"isSticker\": true,\n \"isInline\": true,\n \"inlineId\": \"inlineId\",\n \"size\": 15538,\n \"imageInfo\": {\n \"width\": 1129,\n \"height\": 525,\n \"previewLink\": \"https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/better/\"\n },\n \"isAllowedFileType\": true\n },\n \"forwardedToSourceStatus\": {\n \"error\": \"error\",\n \"isSuccess\": true\n },\n \"from\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"html\": \"Good morning! How can I help you?\",\n \"id\": \"eYBEm3gq3zc5ayE2g\",\n \"integrations\": {\n \"key\": \"value\"\n },\n \"isBot\": true,\n \"isMissed\": false,\n \"isMissedByVisitor\": false,\n \"isPushed\": false,\n \"isTrigger\": false,\n \"rawUnsafeHtml\": \"Good morning!
How can I help you?\",\n \"receivedFrom\": \"SuperAwesomeHelpdesk\",\n \"replyTo\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"sourceMessageId\": \"sourceMessageId\",\n \"subject\": \"Invitation to a meeting\",\n \"text\": \"Good morning! How can I help you?\",\n \"to\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"type\": \"agent\",\n \"isSentViaJsApi\": true,\n \"messageType\": \"messageType\",\n \"isForward\": true,\n \"source\": {\n \"key\": \"value\"\n },\n \"visitorId\": \"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"92155bd1-c19b-4aad-99c9-8a69133fc185","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"55448424-484f-42a8-b091-f8c24234f898","name":"Delete a message sent by an agent - default","request":{"urlPathTemplate":"/conversations/messages/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"55448424-484f-42a8-b091-f8c24234f898","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"7da39f40-5660-4486-b572-835f3f204973","name":"Send an automated message to a visitor - default","request":{"urlPathTemplate":"/conversations/pushedMessages","method":"POST"},"response":{"status":200,"body":"{\n \"agentId\": \"d9nKoegKSjmCtyK78\",\n \"agentName\": \"Liz\",\n \"agentUserpic\": \"https://www.brevo.com/\",\n \"attachments\": [\n {\n \"name\": \"name\",\n \"link\": \"link\",\n \"mimeType\": \"mimeType\",\n \"isImage\": true,\n \"isSticker\": true,\n \"isInline\": true,\n \"inlineId\": \"inlineId\",\n \"size\": 1000000,\n \"isAllowedFileType\": true\n }\n ],\n \"bcc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"cc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"createdAt\": 1470222622433,\n \"file\": {\n \"name\": \"conversations.png\",\n \"link\": \"https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/\",\n \"mimeType\": \"mimeType\",\n \"isImage\": true,\n \"isSticker\": true,\n \"isInline\": true,\n \"inlineId\": \"inlineId\",\n \"size\": 15538,\n \"imageInfo\": {\n \"width\": 1129,\n \"height\": 525,\n \"previewLink\": \"https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/better/\"\n },\n \"isAllowedFileType\": true\n },\n \"forwardedToSourceStatus\": {\n \"error\": \"error\",\n \"isSuccess\": true\n },\n \"from\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"html\": \"Your order has shipped! Here's your tracking number: 9114 5847 3325 9667 4328 88\",\n \"id\": \"AXCR3k9bpSY7bpuh7\",\n \"integrations\": {\n \"key\": \"value\"\n },\n \"isBot\": true,\n \"isMissed\": false,\n \"isMissedByVisitor\": false,\n \"isPushed\": true,\n \"isTrigger\": false,\n \"rawUnsafeHtml\": \"Good morning!
How can I help you?\",\n \"receivedFrom\": \"SuperAwesomeHelpdesk\",\n \"replyTo\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"sourceMessageId\": \"sourceMessageId\",\n \"subject\": \"Invitation to a meeting\",\n \"text\": \"Your order has shipped! Here's your tracking number: 9114 5847 3325 9667 4328 88\",\n \"to\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"type\": \"agent\",\n \"isSentViaJsApi\": true,\n \"messageType\": \"messageType\",\n \"isForward\": true,\n \"source\": {\n \"key\": \"value\"\n },\n \"visitorId\": \"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"7da39f40-5660-4486-b572-835f3f204973","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"12a96082-f3dc-4674-b4a6-a2fc4b6aea92","name":"Get an automated message - default","request":{"urlPathTemplate":"/conversations/pushedMessages/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"agentId\": \"d9nKoegKSjmCtyK78\",\n \"agentName\": \"Liz\",\n \"agentUserpic\": \"https://www.brevo.com/\",\n \"attachments\": [\n {\n \"name\": \"name\",\n \"link\": \"link\",\n \"mimeType\": \"mimeType\",\n \"isImage\": true,\n \"isSticker\": true,\n \"isInline\": true,\n \"inlineId\": \"inlineId\",\n \"size\": 1000000,\n \"isAllowedFileType\": true\n }\n ],\n \"bcc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"cc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"createdAt\": 1470222622433,\n \"file\": {\n \"name\": \"conversations.png\",\n \"link\": \"https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/\",\n \"mimeType\": \"mimeType\",\n \"isImage\": true,\n \"isSticker\": true,\n \"isInline\": true,\n \"inlineId\": \"inlineId\",\n \"size\": 15538,\n \"imageInfo\": {\n \"width\": 1129,\n \"height\": 525,\n \"previewLink\": \"https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/better/\"\n },\n \"isAllowedFileType\": true\n },\n \"forwardedToSourceStatus\": {\n \"error\": \"error\",\n \"isSuccess\": true\n },\n \"from\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"html\": \"Your order has shipped! Here's your tracking number: 9114 5847 3325 9667 4328 88\",\n \"id\": \"AXCR3k9bpSY7bpuh7\",\n \"integrations\": {\n \"key\": \"value\"\n },\n \"isBot\": true,\n \"isMissed\": false,\n \"isMissedByVisitor\": false,\n \"isPushed\": true,\n \"isTrigger\": false,\n \"rawUnsafeHtml\": \"Good morning!
How can I help you?\",\n \"receivedFrom\": \"SuperAwesomeHelpdesk\",\n \"replyTo\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"sourceMessageId\": \"sourceMessageId\",\n \"subject\": \"Invitation to a meeting\",\n \"text\": \"Your order has shipped! Here's your tracking number: 9114 5847 3325 9667 4328 88\",\n \"to\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"type\": \"agent\",\n \"isSentViaJsApi\": true,\n \"messageType\": \"messageType\",\n \"isForward\": true,\n \"source\": {\n \"key\": \"value\"\n },\n \"visitorId\": \"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"12a96082-f3dc-4674-b4a6-a2fc4b6aea92","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"88f6c974-0fa5-4c85-bd4a-2c306144fb5a","name":"Update an automated message - default","request":{"urlPathTemplate":"/conversations/pushedMessages/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"agentId\": \"d9nKoegKSjmCtyK78\",\n \"agentName\": \"Liz\",\n \"agentUserpic\": \"https://www.brevo.com/\",\n \"attachments\": [\n {\n \"name\": \"name\",\n \"link\": \"link\",\n \"mimeType\": \"mimeType\",\n \"isImage\": true,\n \"isSticker\": true,\n \"isInline\": true,\n \"inlineId\": \"inlineId\",\n \"size\": 1000000,\n \"isAllowedFileType\": true\n }\n ],\n \"bcc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"cc\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"createdAt\": 1470222622433,\n \"file\": {\n \"name\": \"conversations.png\",\n \"link\": \"https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/\",\n \"mimeType\": \"mimeType\",\n \"isImage\": true,\n \"isSticker\": true,\n \"isInline\": true,\n \"inlineId\": \"inlineId\",\n \"size\": 15538,\n \"imageInfo\": {\n \"width\": 1129,\n \"height\": 525,\n \"previewLink\": \"https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/better/\"\n },\n \"isAllowedFileType\": true\n },\n \"forwardedToSourceStatus\": {\n \"error\": \"error\",\n \"isSuccess\": true\n },\n \"from\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"html\": \"Your order has shipped! Here's your tracking number: 9114 5847 4668 7775 9233 54\",\n \"id\": \"AXCR3k9bpSY7bpuh7\",\n \"integrations\": {\n \"key\": \"value\"\n },\n \"isBot\": true,\n \"isMissed\": false,\n \"isMissedByVisitor\": false,\n \"isPushed\": true,\n \"isTrigger\": false,\n \"rawUnsafeHtml\": \"Good morning!
How can I help you?\",\n \"receivedFrom\": \"SuperAwesomeHelpdesk\",\n \"replyTo\": {\n \"email\": \"email\",\n \"name\": \"name\"\n },\n \"sourceMessageId\": \"sourceMessageId\",\n \"subject\": \"Invitation to a meeting\",\n \"text\": \"Your order has shipped! Here's your tracking number: 9114 5847 4668 7775 9233 54\",\n \"to\": [\n {\n \"email\": \"email\",\n \"name\": \"name\"\n }\n ],\n \"type\": \"agent\",\n \"isSentViaJsApi\": true,\n \"messageType\": \"messageType\",\n \"isForward\": true,\n \"source\": {\n \"key\": \"value\"\n },\n \"visitorId\": \"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"88f6c974-0fa5-4c85-bd4a-2c306144fb5a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a43cca1b-0cb5-4197-ad31-8ce0e455a7fe","name":"Delete an automated message - default","request":{"urlPathTemplate":"/conversations/pushedMessages/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a43cca1b-0cb5-4197-ad31-8ce0e455a7fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"27ddcd9f-5f2e-408f-a518-a4e395c047ee","name":"Set visitor group assignment - default","request":{"urlPathTemplate":"/conversations/visitorGroup","method":"PUT"},"response":{"status":200,"body":"{\n \"groupId\": \"PjRBMhWGen6aRHjif\",\n \"visitorId\": \"AXCR3k9bpSY7bpuh7\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"27ddcd9f-5f2e-408f-a518-a4e395c047ee","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6e38c169-881b-465d-ae5b-201dfe4364a5","name":"Return all your categories - default","request":{"urlPathTemplate":"/categories","method":"GET"},"response":{"status":200,"body":"{\n \"categories\": [\n {\n \"createdAt\": \"2021-12-31T11:42:35.638Z\",\n \"id\": \"C19\",\n \"isDeleted\": true,\n \"modifiedAt\": \"2022-03-03T14:48:31.867Z\",\n \"name\": \"Food\",\n \"url\": \"http://mydomain.com/category/food\"\n },\n {\n \"createdAt\": \"2021-12-31T11:42:35.638Z\",\n \"id\": \"C20\",\n \"isDeleted\": true,\n \"modifiedAt\": \"2022-03-03T14:48:31.867Z\",\n \"name\": \"clothing\",\n \"url\": \"http://mydomain.com/category/clothing\"\n }\n ],\n \"count\": 2\n}","headers":{"Content-Type":"application/json"}},"uuid":"6e38c169-881b-465d-ae5b-201dfe4364a5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"c1c0c1db-676d-40e5-954f-ce7abd8fa780","name":"Create/Update a category - default","request":{"urlPathTemplate":"/categories","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"CAT123\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c1c0c1db-676d-40e5-954f-ce7abd8fa780","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3355346d-e446-4635-9316-d9de9c0c8459","name":"Create categories in batch - default","request":{"urlPathTemplate":"/categories/batch","method":"POST"},"response":{"status":201,"body":"{\n \"createdCount\": 2,\n \"updatedCount\": 7\n}","headers":{"Content-Type":"application/json"}},"uuid":"3355346d-e446-4635-9316-d9de9c0c8459","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e9a3bc64-c4fb-42bc-a44c-51ff0565f57d","name":"Get a category details - default","request":{"urlPathTemplate":"/categories/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"createdAt\": \"2017-05-12T12:30:00Z\",\n \"id\": \"C11\",\n \"isDeleted\": true,\n \"modifiedAt\": \"2017-05-12T12:30:00Z\",\n \"name\": \"Electronics\",\n \"url\": \"http://mydomain.com/category/clothing\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e9a3bc64-c4fb-42bc-a44c-51ff0565f57d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4aa9f4f1-3b05-446e-a5c8-175ce020f7dd","name":"Activate the eCommerce app - default","request":{"urlPathTemplate":"/ecommerce/activate","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4aa9f4f1-3b05-446e-a5c8-175ce020f7dd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ef76fef3-dd84-4cf8-9fa5-ff136eea6618","name":"Get attribution metrics for one or more Brevo campaigns or workflows - default","request":{"urlPathTemplate":"/ecommerce/attribution/metrics","method":"GET","queryParameters":{"periodFrom":{"equalTo":"2022-01-02T00:00:00Z"},"periodTo":{"equalTo":"2022-01-03T00:00:00Z"}}},"response":{"status":200,"body":"{\n \"results\": [\n {\n \"averageBasket\": 3,\n \"conversionSource\": \"email_campaign\",\n \"id\": 1.1,\n \"ordersCount\": 300,\n \"revenue\": 900\n },\n {\n \"averageBasket\": 4,\n \"conversionSource\": \"email_campaign\",\n \"id\": 1.1,\n \"ordersCount\": 200,\n \"revenue\": 800\n }\n ],\n \"totals\": {\n \"averageBasket\": 3.4,\n \"ordersCount\": 500,\n \"revenue\": 1700\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"ef76fef3-dd84-4cf8-9fa5-ff136eea6618","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"a673ac7e-f9a7-4c21-bd80-b49ff3c73efc","name":"Get detailed attribution metrics for a single Brevo campaign or workflow - default","request":{"urlPathTemplate":"/ecommerce/attribution/metrics/{conversionSource}/{conversionSourceId}","method":"GET","pathParameters":{"conversionSource":{"equalTo":"email_campaign"},"conversionSourceId":{"equalTo":"sale"}}},"response":{"status":200,"body":"{\n \"averageBasket\": 1.1,\n \"conversionSource\": \"email_campaign\",\n \"id\": 1.1,\n \"ordersCount\": 1.1,\n \"revenue\": 1.1,\n \"newCustomersCount\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"a673ac7e-f9a7-4c21-bd80-b49ff3c73efc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d80e42ab-4376-47f6-9971-baead08cd9ec","name":"Get attributed product sales for a single Brevo campaign or workflow - default","request":{"urlPathTemplate":"/ecommerce/attribution/products/{conversionSource}/{conversionSourceId}","method":"GET","pathParameters":{"conversionSource":{"equalTo":"email_campaign"},"conversionSourceId":{"equalTo":"sale"}}},"response":{"status":200,"body":"{\n \"products\": [\n {\n \"id\": \"1\",\n \"imageUrl\": \"http://mydomain.com/product-absoulte-url/img.jpeg\",\n \"name\": \"Milky Way Galaxy\",\n \"ordersCount\": 200,\n \"price\": 1000,\n \"revenue\": 999.99,\n \"sku\": \"sku-1\",\n \"url\": \"https://mydomain.com/products/alpina-panoma-classic\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d80e42ab-4376-47f6-9971-baead08cd9ec","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ab816e77-ae78-42da-b0ac-c9e2a426dd38","name":"Get the ISO 4217 compliant display currency code for your Brevo account - default","request":{"urlPathTemplate":"/ecommerce/config/displayCurrency","method":"GET"},"response":{"status":200,"body":"{\n \"code\": \"EUR\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"ab816e77-ae78-42da-b0ac-c9e2a426dd38","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"c8c71b7b-bc9d-4d4f-83d0-1d4a57463596","name":"Set the ISO 4217 compliant display currency code for your Brevo account - default","request":{"urlPathTemplate":"/ecommerce/config/displayCurrency","method":"POST"},"response":{"status":200,"body":"{\n \"code\": \"EUR\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c8c71b7b-bc9d-4d4f-83d0-1d4a57463596","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a36a1140-3b78-405a-bb99-4be25b0e6f61","name":"Get order details - default","request":{"urlPathTemplate":"/orders","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 1,\n \"orders\": [\n {\n \"amount\": 2000,\n \"billing\": {\n \"address\": \"Sec 62, Noida\",\n \"city\": \"Noida\",\n \"country\": \"India\",\n \"countryCode\": \"IN\",\n \"paymentMethod\": \"Net banking\",\n \"phone\": 9238283982,\n \"postCode\": 110001,\n \"region\": \"North India\"\n },\n \"contact_id\": 2,\n \"coupons\": [\n \"flat50\",\n \"flat40\"\n ],\n \"createdAt\": \"2021-12-31T11:42:35.638Z\",\n \"email\": \"testvisitor@sendinblue.com\",\n \"id\": \"order1803\",\n \"identifiers\": {\n \"ext_id\": \"ab12\",\n \"loyalty_subscription_id\": \"1234\"\n },\n \"products\": [\n {\n \"price\": 100,\n \"productId\": 21,\n \"quantity\": 2,\n \"quantityFloat\": 0,\n \"variantId\": \"P100\"\n },\n {\n \"price\": 100,\n \"productId\": 21,\n \"quantity\": 0,\n \"quantityFloat\": 2.52,\n \"variantId\": \"P15756\"\n }\n ],\n \"status\": \"complete\",\n \"storeId\": \"123\",\n \"updatedAt\": \"2022-03-03T14:48:31.867Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"a36a1140-3b78-405a-bb99-4be25b0e6f61","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7063107e-0ad5-4bbd-97ec-def7bdb05465","name":"Managing the status of the order - default","request":{"urlPathTemplate":"/orders/status","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"7063107e-0ad5-4bbd-97ec-def7bdb05465","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1d3a52e5-1eb4-4b21-9a58-9136f4d6cdda","name":"Create orders in batch - default","request":{"urlPathTemplate":"/orders/status/batch","method":"POST"},"response":{"status":202,"body":"{\n \"batchId\": 1.1,\n \"count\": 17655\n}","headers":{"Content-Type":"application/json"}},"uuid":"1d3a52e5-1eb4-4b21-9a58-9136f4d6cdda","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fd7eae8c-354e-4a43-8cea-0aa947291dea","name":"Return all your products - default","request":{"urlPathTemplate":"/products","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 2,\n \"products\": [\n {\n \"brand\": \"Adidas\",\n \"categories\": [\n \"279638835374\",\n \"279502848174\"\n ],\n \"createdAt\": \"2022-06-30T10:29:16.078Z\",\n \"description\": \"Shoes for sports\",\n \"id\": \"P11\",\n \"imageUrl\": \"http://mydomain.com/product-absoulte-url/img.jpeg\",\n \"isDeleted\": true,\n \"metaInfo\": {\n \"brand\": \"addidas\",\n \"description\": \"Shoes for sports\"\n },\n \"modifiedAt\": \"2022-06-30T10:29:16.078Z\",\n \"name\": \"Alpina Panoma Classic\",\n \"parentId\": \"parentId\",\n \"price\": 49.95,\n \"alternativePrice\": 39.95,\n \"s3Original\": \"https://img-ecom.mailinblue.com/path-to-original/img.jpg\",\n \"s3ThumbAnalytics\": \"https://img-ecom.mailinblue.com/path-to-analytics/img.jpg\",\n \"s3ThumbEditor\": \"https://img-ecom.mailinblue.com/path-to-editor/img.jpg\",\n \"sku\": \"186622-9\",\n \"stock\": 100,\n \"url\": \"https://mydomain.com/products/alpina-panoma-classic\"\n },\n {\n \"brand\": \"Adidas\",\n \"categories\": [\n \"2d79638835374\",\n \"27d9502848174\"\n ],\n \"createdAt\": \"2022-06-30T10:29:16.078Z\",\n \"description\": \"Shoes for sports\",\n \"id\": \"P11\",\n \"imageUrl\": \"http://mydomain.com/product-absoulte-url/img.jpeg\",\n \"isDeleted\": true,\n \"metaInfo\": {\n \"brand\": \"addidas\",\n \"description\": \"Shoes for sports\"\n },\n \"modifiedAt\": \"2022-06-30T10:29:16.078Z\",\n \"name\": \"Alpina Panoma Classic2\",\n \"parentId\": \"parentId\",\n \"price\": 49.95,\n \"alternativePrice\": 44.95,\n \"s3Original\": \"https://img-ecom.mailinblue.com/path-to-original/img.jpg\",\n \"s3ThumbAnalytics\": \"https://img-ecom.mailinblue.com/path-to-analytics/img.jpg\",\n \"s3ThumbEditor\": \"https://img-ecom.mailinblue.com/path-to-editor/img.jpg\",\n \"sku\": \"186622-9\",\n \"stock\": 350,\n \"url\": \"https://mydomain.com/products/alpina-panoma-classic2\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fd7eae8c-354e-4a43-8cea-0aa947291dea","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"8a42981c-cdd8-404e-bdb0-edaac19b7e0c","name":"Create/Update a product - default","request":{"urlPathTemplate":"/products","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"P11\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8a42981c-cdd8-404e-bdb0-edaac19b7e0c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5f2f0859-18a7-463c-bee7-4afb4ba092b0","name":"Create products in batch - default","request":{"urlPathTemplate":"/products/batch","method":"POST"},"response":{"status":201,"body":"{\n \"createdCount\": 2,\n \"updatedCount\": 7\n}","headers":{"Content-Type":"application/json"}},"uuid":"5f2f0859-18a7-463c-bee7-4afb4ba092b0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dcc8be20-9ebc-41b7-a9e0-2e9b9004756a","name":"Get a product's details - default","request":{"urlPathTemplate":"/products/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"brand\": \"Adidas\",\n \"categories\": [\n \"categories\"\n ],\n \"createdAt\": \"2017-05-12T12:30:00Z\",\n \"description\": \"Shoes for sports\",\n \"id\": \"P11\",\n \"imageUrl\": \"http://mydomain.com/product-absoulte-url/img.jpeg\",\n \"isDeleted\": true,\n \"metaInfo\": {\n \"brand\": \"addidas\",\n \"description\": \"Shoes for sports\"\n },\n \"modifiedAt\": \"2017-05-12T12:30:00Z\",\n \"name\": \"Iphone 11\",\n \"parentId\": \"parentId\",\n \"price\": 1.1,\n \"alternativePrice\": 1.1,\n \"s3Original\": \"s3Original\",\n \"s3ThumbAnalytics\": \"s3ThumbAnalytics\",\n \"s3ThumbEditor\": \"s3ThumbEditor\",\n \"sku\": \"sku\",\n \"stock\": 100,\n \"url\": \"http://mydomain.com/product/electronics/product1\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"dcc8be20-9ebc-41b7-a9e0-2e9b9004756a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e82388ef-e4d4-4ac5-874c-2f802a602bed","name":"Create a product alert for a contact - default","request":{"urlPathTemplate":"/products/{id}/alerts/{type}","method":"POST","pathParameters":{"id":{"equalTo":"id"},"type":{"equalTo":"back_in_stock"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"e82388ef-e4d4-4ac5-874c-2f802a602bed","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1afa5f6e-118c-4482-b744-5ef2a9799cf5","name":"Get all your coupon collections - default","request":{"urlPathTemplate":"/couponCollections","method":"GET"},"response":{"status":200,"body":"{\n \"createdAt\": \"2023-01-06T05:03:47Z\",\n \"defaultCoupon\": \"10 OFF\",\n \"expirationDate\": \"2024-01-01T00:00:00Z\",\n \"id\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"name\": \"SummerPromotions\",\n \"remainingCoupons\": 5000,\n \"remainingCouponsAlert\": 5,\n \"remainingDaysAlert\": 5,\n \"totalCoupons\": 10000\n}","headers":{"Content-Type":"application/json"}},"uuid":"1afa5f6e-118c-4482-b744-5ef2a9799cf5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"e6cacd7a-7ba8-4b0a-822c-0d6971f40073","name":"Create Π° coupon collection - default","request":{"urlPathTemplate":"/couponCollections","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"23befbae-1505-47a8-bd27-e30ef739f32c\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e6cacd7a-7ba8-4b0a-822c-0d6971f40073","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dff4a2fb-73ac-479f-ab4c-2c9110fd1537","name":"Get a coupon collection by id - default","request":{"urlPathTemplate":"/couponCollections/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"createdAt\": \"2023-01-06T05:03:47Z\",\n \"defaultCoupon\": \"10 OFF\",\n \"expirationDate\": \"2024-01-01T00:00:00Z\",\n \"id\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"name\": \"SummerPromotions\",\n \"remainingCoupons\": 5000,\n \"remainingCouponsAlert\": 5,\n \"remainingDaysAlert\": 5,\n \"totalCoupons\": 10000\n}","headers":{"Content-Type":"application/json"}},"uuid":"dff4a2fb-73ac-479f-ab4c-2c9110fd1537","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e28907c7-b011-4634-bb47-d32e210b128b","name":"Update a coupon collection by id - default","request":{"urlPathTemplate":"/couponCollections/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"defaultCoupon\": \"10 OFF\",\n \"id\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"name\": \"SummerPromotions\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e28907c7-b011-4634-bb47-d32e210b128b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eef10e8c-75d8-4adc-9fb0-8c2daeb31145","name":"Create coupons for a coupon collection - default","request":{"urlPathTemplate":"/coupons","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"eef10e8c-75d8-4adc-9fb0-8c2daeb31145","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"35f2e6da-c185-4829-b6ce-3bd466f76681","name":"Create a payment request - default","request":{"urlPathTemplate":"/payments/requests","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 122,\n \"url\": \"https://pay.brevo.com/payment/6d4ec0b2b48ef803df4103ve\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"35f2e6da-c185-4829-b6ce-3bd466f76681","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"173baf22-0f60-411a-b5e3-f68c427c3a5d","name":"Get payment request details - default","request":{"urlPathTemplate":"/payments/requests/{id}","method":"GET","pathParameters":{"id":{"equalTo":"050db7b0-9bb7-4c1e-9c68-5a8dace8c1dc"}}},"response":{"status":200,"body":"{\n \"cart\": {\n \"currency\": \"EUR\",\n \"specificAmount\": 1200\n },\n \"configuration\": {\n \"customSuccessUrl\": \"https://my-company.com/payment-success\"\n },\n \"contactId\": 43,\n \"notification\": {\n \"channel\": \"email\",\n \"text\": \"Please pay for your yoga class.\"\n },\n \"numberOfRemindersSent\": 5,\n \"reference\": \"Invoice #INV0001\\n\",\n \"status\": \"paid\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"173baf22-0f60-411a-b5e3-f68c427c3a5d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"87ef813d-0336-4656-a5b5-e0899662397f","name":"Delete a payment request. - default","request":{"urlPathTemplate":"/payments/requests/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"9ae7d68a-565c-4695-9381-d8fb3e3a14cc"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"87ef813d-0336-4656-a5b5-e0899662397f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ba454d34-a70b-484d-a728-ffc42856a7b5","name":"Get events - default","request":{"urlPathTemplate":"/events","method":"GET"},"response":{"status":200,"body":"{\n \"events\": [\n {\n \"contact_id\": 211,\n \"event_date\": \"2024-02-06T20:59:23Z\",\n \"event_name\": \"order_created\",\n \"event_filter_id\": \"abc123\",\n \"object_type\": \"subscription\",\n \"event_properties\": {\n \"duration\": 142,\n \"video_title\": \"Brevo β€” The most approachable CRM suite\"\n },\n \"contact_properties\": {\n \"AGE\": 32,\n \"GENDER\": \"FEMALE\"\n }\n }\n ],\n \"count\": 2\n}","headers":{"Content-Type":"application/json"}},"uuid":"ba454d34-a70b-484d-a728-ffc42856a7b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"aed029ff-9be1-4acb-9dcf-a4c3e218a560","name":"Create an event - default","request":{"urlPathTemplate":"/events","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"aed029ff-9be1-4acb-9dcf-a4c3e218a560","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"89ae63a4-2b31-419a-87b1-c44e0fa54de2","name":"Create events in batch - default","request":{"urlPathTemplate":"/events/batch","method":"POST"},"response":{"status":202,"body":"{\n \"message\": \"Batch accepted. Valid events have been added to the processing queue.\",\n \"count\": 7\n}","headers":{"Content-Type":"application/json"}},"uuid":"89ae63a4-2b31-419a-87b1-c44e0fa54de2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"09aa7143-15a9-433c-a1e0-3444863bbf64","name":"Get the list of all the events for the received emails. - default","request":{"urlPathTemplate":"/inbound/events","method":"GET"},"response":{"status":200,"body":"{\n \"events\": [\n {\n \"date\": \"2017-03-11T12:30:00Z\",\n \"recipient\": \"alexa@example.com\",\n \"sender\": \"john@example.com\",\n \"uuid\": \"1a825d56-029b-4a41-b8e4-1a825d56\"\n },\n {\n \"date\": \"2017-03-12T12:30:00Z\",\n \"recipient\": \"bob@example.com\",\n \"sender\": \"alice@example.com\",\n \"uuid\": \"1a825d56-029b-4a41-b8e4-61670463431b\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"09aa7143-15a9-433c-a1e0-3444863bbf64","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"ee4248db-9736-4af1-a32a-5a7de6f5328a","name":"Fetch all events history for one particular received email. - default","request":{"urlPathTemplate":"/inbound/events/{uuid}","method":"GET","pathParameters":{"uuid":{"equalTo":"uuid"}}},"response":{"status":200,"body":"{\n \"attachments\": [\n {\n \"contentLength\": 12345,\n \"contentType\": \"application/pdf\",\n \"name\": \"invoice.pdf\"\n }\n ],\n \"deliveredAt\": \"2017-03-12T12:31:00Z\",\n \"logs\": [\n {\n \"date\": \"2017-03-12T12:30:00Z\",\n \"type\": \"received\"\n },\n {\n \"date\": \"2017-03-12T12:30:04Z\",\n \"type\": \"webhookFailed\"\n },\n {\n \"date\": \"2017-03-12T12:31:04Z\",\n \"type\": \"webhookDelivered\"\n }\n ],\n \"messageId\": \"\",\n \"receivedAt\": \"2017-03-12T12:30:00Z\",\n \"recipient\": \"bob@example.com\",\n \"sender\": \"alice@example.com\",\n \"subject\": \"Re: Question about your API\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"ee4248db-9736-4af1-a32a-5a7de6f5328a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3426b7cd-c7c6-4cd0-8359-916c1482c4a3","name":"Retrieve inbound attachment with download token. - default","request":{"urlPathTemplate":"/inbound/attachments/{downloadToken}","method":"GET","pathParameters":{"downloadToken":{"equalTo":"downloadToken"}}},"response":{"status":200,"body":"{\n \"key\": \"value\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"3426b7cd-c7c6-4cd0-8359-916c1482c4a3","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b8273ac4-3d1a-4b9a-b003-bb49ef16337f","name":"Get Active Balances API - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/active-balance","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}},"queryParameters":{"contactId":{"equalTo":"1000000"},"balanceDefinitionId":{"equalTo":"balanceDefinitionId"}}},"response":{"status":200,"body":"{\n \"count\": 1000000,\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"contactId\": 1000000,\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"activeBalances\": [\n {\n \"id\": \"id\",\n \"amount\": 1.1,\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"expiresAt\": \"2024-01-15T09:30:00Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"b8273ac4-3d1a-4b9a-b003-bb49ef16337f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"7ed4ff5a-868f-45ef-a95a-550b62f69d5a","name":"Get balance definition list - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"imageRef\": \"imageRef\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"unit\": \"POINTS\",\n \"minAmount\": 1.1,\n \"maxAmount\": 1.1,\n \"maxCreditAmountLimit\": 1.1,\n \"maxDebitAmountLimit\": 1.1,\n \"balanceOptionAmountOvertakingStrategy\": \"strict\",\n \"balanceOptionCreditRounding\": \"lower\",\n \"balanceOptionDebitRounding\": \"lower\",\n \"balanceAvailabilityDurationValue\": 1,\n \"balanceAvailabilityDurationUnit\": \"day\",\n \"balanceAvailabilityDurationModifier\": \"noModification\",\n \"balanceExpirationDate\": \"balanceExpirationDate\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"deletedAt\": \"2024-01-15T09:30:00Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"7ed4ff5a-868f-45ef-a95a-550b62f69d5a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9db15f6f-dd09-4033-bff7-9d94ef6ae471","name":"Create balance definition - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"imageRef\": \"imageRef\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"unit\": \"POINTS\",\n \"minAmount\": 1.1,\n \"maxAmount\": 1.1,\n \"maxCreditAmountLimit\": 1.1,\n \"maxDebitAmountLimit\": 1.1,\n \"balanceOptionAmountOvertakingStrategy\": \"strict\",\n \"balanceOptionCreditRounding\": \"lower\",\n \"balanceOptionDebitRounding\": \"lower\",\n \"balanceAvailabilityDurationValue\": 1,\n \"balanceAvailabilityDurationUnit\": \"day\",\n \"balanceAvailabilityDurationModifier\": \"noModification\",\n \"balanceExpirationDate\": \"balanceExpirationDate\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"deletedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"9db15f6f-dd09-4033-bff7-9d94ef6ae471","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5171ff4c-8ab1-4886-96b9-72845239dcb2","name":"Get balance definition - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}","method":"GET","pathParameters":{"pid":{"equalTo":"pid"},"bdid":{"equalTo":"bdid"}}},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"imageRef\": \"imageRef\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"unit\": \"POINTS\",\n \"minAmount\": 1.1,\n \"maxAmount\": 1.1,\n \"maxCreditAmountLimit\": 1.1,\n \"maxDebitAmountLimit\": 1.1,\n \"balanceOptionAmountOvertakingStrategy\": \"strict\",\n \"balanceOptionCreditRounding\": \"lower\",\n \"balanceOptionDebitRounding\": \"lower\",\n \"balanceAvailabilityDurationValue\": 1,\n \"balanceAvailabilityDurationUnit\": \"day\",\n \"balanceAvailabilityDurationModifier\": \"noModification\",\n \"balanceExpirationDate\": \"balanceExpirationDate\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"deletedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"5171ff4c-8ab1-4886-96b9-72845239dcb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1da76c71-d209-4641-9094-43a7214838ef","name":"Update balance definition - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}","method":"PUT","pathParameters":{"pid":{"equalTo":"pid"},"bdid":{"equalTo":"bdid"}}},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"imageRef\": \"imageRef\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"unit\": \"POINTS\",\n \"minAmount\": 1.1,\n \"maxAmount\": 1.1,\n \"maxCreditAmountLimit\": 1.1,\n \"maxDebitAmountLimit\": 1.1,\n \"balanceOptionAmountOvertakingStrategy\": \"strict\",\n \"balanceOptionCreditRounding\": \"lower\",\n \"balanceOptionDebitRounding\": \"lower\",\n \"balanceAvailabilityDurationValue\": 1,\n \"balanceAvailabilityDurationUnit\": \"day\",\n \"balanceAvailabilityDurationModifier\": \"noModification\",\n \"balanceExpirationDate\": \"balanceExpirationDate\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"deletedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"1da76c71-d209-4641-9094-43a7214838ef","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a3817b26-f6c9-4900-86c4-6d4869b41b38","name":"Delete balance definition - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"},"bdid":{"equalTo":"bdid"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a3817b26-f6c9-4900-86c4-6d4869b41b38","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d2118a4-5218-46f1-8513-ef75d832d7d5","name":"Create balance limits - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits","method":"POST","pathParameters":{"pid":{"equalTo":"pid"},"bdid":{"equalTo":"bdid"}}},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"transactionType\": \"credit\",\n \"constraintType\": \"transaction\",\n \"durationValue\": 1,\n \"durationUnit\": \"hour\",\n \"value\": 1.1,\n \"slidingSchedule\": true,\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"3d2118a4-5218-46f1-8513-ef75d832d7d5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5def443d-7ef0-4c5c-99d3-9e38a21ed142","name":"Get balance limits - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}","method":"GET","pathParameters":{"pid":{"equalTo":"pid"},"bdid":{"equalTo":"bdid"},"blid":{"equalTo":"blid"}}},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"transactionType\": \"credit\",\n \"constraintType\": \"transaction\",\n \"durationValue\": 1,\n \"durationUnit\": \"hour\",\n \"value\": 1.1,\n \"slidingSchedule\": true,\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"5def443d-7ef0-4c5c-99d3-9e38a21ed142","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3c24feb3-061c-4954-a12f-81100122b866","name":"Updates balance limit - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}","method":"PUT","pathParameters":{"pid":{"equalTo":"pid"},"bdid":{"equalTo":"bdid"},"blid":{"equalTo":"blid"}}},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"transactionType\": \"credit\",\n \"constraintType\": \"transaction\",\n \"durationValue\": 1,\n \"durationUnit\": \"hour\",\n \"value\": 1.1,\n \"slidingSchedule\": true,\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"3c24feb3-061c-4954-a12f-81100122b866","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"60e7789f-ecdc-4330-96f5-426c8865aa02","name":"Delete balance limit - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"},"bdid":{"equalTo":"bdid"},"blid":{"equalTo":"blid"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"60e7789f-ecdc-4330-96f5-426c8865aa02","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a00ea68f-14e1-4bbc-a3ad-1f4c555dbd92","name":"Get balance list - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/contact-balances","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}},"queryParameters":{"balanceDefinitionId":{"equalTo":"balanceDefinitionId"}}},"response":{"status":200,"body":"{\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"balances\": [\n {\n \"contactId\": 1,\n \"loyaltySubscriptionId\": \"loyaltySubscriptionId\",\n \"updatedAt\": \"updatedAt\",\n \"value\": 1.1\n }\n ],\n \"count\": 1,\n \"loyaltyProgramId\": \"loyaltyProgramId\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"a00ea68f-14e1-4bbc-a3ad-1f4c555dbd92","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"24af1e00-9fca-4515-89c5-bce7048b3f2e","name":"Create balance order - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/create-order","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"amount\": 1.1,\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"contactId\": 1,\n \"createdAt\": \"createdAt\",\n \"dueAt\": \"dueAt\",\n \"expiresAt\": \"expiresAt\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"processedAt\": \"processedAt\",\n \"transactionid\": \"transactionid\",\n \"updatedAt\": \"updatedAt\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"24af1e00-9fca-4515-89c5-bce7048b3f2e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"bd77b0ff-3379-4930-aa93-f8cc25163bee","name":"Get subscription balances - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/subscriptions/{cid}/balances","method":"GET","pathParameters":{"pid":{"equalTo":"pid"},"cid":{"equalTo":"cid"}}},"response":{"status":200,"body":"{\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"contactId\": 1000000,\n \"balance\": [\n {\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"value\": 1.1\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"bd77b0ff-3379-4930-aa93-f8cc25163bee","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"06abbd3e-aec8-48f0-9c90-49887599e5ac","name":"Create subscription balances - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/subscriptions/{cid}/balances","method":"POST","pathParameters":{"pid":{"equalTo":"pid"},"cid":{"equalTo":"cid"}}},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"amount\": 1.1,\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"organizationId\": 1000000,\n \"contactId\": 1000000,\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"expiresAt\": \"2024-01-15T09:30:00Z\",\n \"consumedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"06abbd3e-aec8-48f0-9c90-49887599e5ac","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d806b377-c3f2-46e1-af10-826fc8cb7a77","name":"Get Transaction History API - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/transaction-history","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}},"queryParameters":{"contactId":{"equalTo":"1000000"},"balanceDefinitionId":{"equalTo":"balanceDefinitionId"}}},"response":{"status":200,"body":"{\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"contactId\": 1,\n \"count\": 1,\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"transactionHistory\": [\n {\n \"amount\": 1.1,\n \"transactionType\": \"credit\",\n \"balanceExpirationDate\": \"balanceExpirationDate\",\n \"cancelledAt\": \"cancelledAt\",\n \"completedAt\": \"completedAt\",\n \"createdAt\": \"createdAt\",\n \"id\": \"id\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rejectReason\": \"rejectReason\",\n \"rejectedAt\": \"rejectedAt\",\n \"status\": \"status\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d806b377-c3f2-46e1-af10-826fc8cb7a77","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"01dd65f2-fc30-4f9a-94e7-cf908b0c0b6a","name":"Create new transaction - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/transactions","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"amount\": 1.1,\n \"transactionType\": \"credit\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"status\": \"pending\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"contactId\": 1000000,\n \"eventTime\": \"2024-01-15T09:30:00Z\",\n \"rejectReason\": \"rejectReason\",\n \"rejectedAt\": \"2024-01-15T09:30:00Z\",\n \"expirationDate\": \"2024-01-15T09:30:00Z\",\n \"completedAt\": \"2024-01-15T09:30:00Z\",\n \"cancelledAt\": \"2024-01-15T09:30:00Z\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"01dd65f2-fc30-4f9a-94e7-cf908b0c0b6a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"bd42f484-63b7-431c-9d4b-a149ff9cd0b8","name":"Cancel transaction - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/transactions/{tid}/cancel","method":"POST","pathParameters":{"pid":{"equalTo":"pid"},"tid":{"equalTo":"tid"}}},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"amount\": 1.1,\n \"transactionType\": \"credit\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"status\": \"pending\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"contactId\": 1000000,\n \"eventTime\": \"2024-01-15T09:30:00Z\",\n \"rejectReason\": \"rejectReason\",\n \"rejectedAt\": \"2024-01-15T09:30:00Z\",\n \"expirationDate\": \"2024-01-15T09:30:00Z\",\n \"completedAt\": \"2024-01-15T09:30:00Z\",\n \"cancelledAt\": \"2024-01-15T09:30:00Z\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"bd42f484-63b7-431c-9d4b-a149ff9cd0b8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fbed8bbf-cc97-48fb-a7f6-e56e37f2cf2e","name":"Complete transaction - default","request":{"urlPathTemplate":"/loyalty/balance/programs/{pid}/transactions/{tid}/complete","method":"POST","pathParameters":{"pid":{"equalTo":"pid"},"tid":{"equalTo":"tid"}}},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"amount\": 1.1,\n \"transactionType\": \"credit\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"status\": \"pending\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"contactId\": 1000000,\n \"eventTime\": \"2024-01-15T09:30:00Z\",\n \"rejectReason\": \"rejectReason\",\n \"rejectedAt\": \"2024-01-15T09:30:00Z\",\n \"expirationDate\": \"2024-01-15T09:30:00Z\",\n \"completedAt\": \"2024-01-15T09:30:00Z\",\n \"cancelledAt\": \"2024-01-15T09:30:00Z\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"fbed8bbf-cc97-48fb-a7f6-e56e37f2cf2e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"26205d6c-548c-4928-8845-8eb6528a066d","name":"Get loyalty program list - default","request":{"urlPathTemplate":"/loyalty/config/programs","method":"GET"},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"state\": \"inactive\",\n \"subscriptionPoolId\": \"subscriptionPoolId\",\n \"subscriptionGeneratorId\": \"subscriptionGeneratorId\",\n \"pattern\": \"pattern\",\n \"codeCount\": 1000000,\n \"documentId\": \"documentId\",\n \"birthdayAttribute\": \"birthdayAttribute\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"26205d6c-548c-4928-8845-8eb6528a066d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"58d70d75-ea78-49d2-a9d6-beab3075e797","name":"Create loyalty program - default","request":{"urlPathTemplate":"/loyalty/config/programs","method":"POST"},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"state\": \"inactive\",\n \"subscriptionPoolId\": \"subscriptionPoolId\",\n \"subscriptionGeneratorId\": \"subscriptionGeneratorId\",\n \"pattern\": \"pattern\",\n \"codeCount\": 1000000,\n \"documentId\": \"documentId\",\n \"birthdayAttribute\": \"birthdayAttribute\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"58d70d75-ea78-49d2-a9d6-beab3075e797","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c0fa09f4-d2b6-46f5-9560-abd8eb19c934","name":"Get loyalty program Info - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"state\": \"inactive\",\n \"subscriptionPoolId\": \"subscriptionPoolId\",\n \"subscriptionGeneratorId\": \"subscriptionGeneratorId\",\n \"pattern\": \"pattern\",\n \"codeCount\": 1000000,\n \"documentId\": \"documentId\",\n \"birthdayAttribute\": \"birthdayAttribute\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c0fa09f4-d2b6-46f5-9560-abd8eb19c934","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"861e512a-8f3c-4e67-9519-b050d07984c6","name":"Update loyalty program - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}","method":"PUT","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"state\": \"inactive\",\n \"subscriptionPoolId\": \"subscriptionPoolId\",\n \"subscriptionGeneratorId\": \"subscriptionGeneratorId\",\n \"pattern\": \"pattern\",\n \"codeCount\": 1000000,\n \"documentId\": \"documentId\",\n \"birthdayAttribute\": \"birthdayAttribute\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"861e512a-8f3c-4e67-9519-b050d07984c6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a87fbb4c-71e6-4806-9622-174c92be89d1","name":"Delete Loyalty Program - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a87fbb4c-71e6-4806-9622-174c92be89d1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8a2689f4-70a0-4e02-8ce4-3c55e07bc708","name":"Partially update loyalty program - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}","method":"PATCH","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"state\": \"inactive\",\n \"subscriptionPoolId\": \"subscriptionPoolId\",\n \"subscriptionGeneratorId\": \"subscriptionGeneratorId\",\n \"pattern\": \"pattern\",\n \"codeCount\": 1000000,\n \"documentId\": \"documentId\",\n \"birthdayAttribute\": \"birthdayAttribute\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8a2689f4-70a0-4e02-8ce4-3c55e07bc708","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d32199cf-9ffa-4318-a330-2e9fda3da2d2","name":"Get Subscription Data - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}/account-info","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"balance\": {\n \"balances\": [\n {}\n ],\n \"contactId\": 1,\n \"loyaltyProgramId\": \"loyaltyProgramId\"\n },\n \"members\": [\n {\n \"createdAt\": \"createdAt\",\n \"memberContactId\": 1,\n \"updatedAt\": \"updatedAt\"\n }\n ],\n \"reward\": [\n {\n \"code\": \"code\",\n \"contactId\": 1,\n \"createdAt\": \"createdAt\",\n \"expirationDate\": \"expirationDate\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rewardId\": \"rewardId\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"validFrom\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"tier\": [\n {\n \"contactId\": 1,\n \"createdAt\": \"createdAt\",\n \"groupId\": \"groupId\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"tierId\": \"tierId\",\n \"updatedAt\": \"updatedAt\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d32199cf-9ffa-4318-a330-2e9fda3da2d2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0878ece4-9fe9-491a-9a7c-daaf7cf9c341","name":"Delete subscription - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}/contact/{cid}","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"},"cid":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"0878ece4-9fe9-491a-9a7c-daaf7cf9c341","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e628ecea-6ac2-4237-bf4e-d3e911f50954","name":"Publish loyalty program - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}/publish","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"e628ecea-6ac2-4237-bf4e-d3e911f50954","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c63d1aae-db4f-4b4c-b82f-19e95683e037","name":"Create subscription member - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}/subscription-members","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"organizationId\": 1000000,\n \"ownerContactId\": 1000000,\n \"memberContactIds\": [\n 1000000\n ],\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c63d1aae-db4f-4b4c-b82f-19e95683e037","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"efc3a783-b09a-41eb-8c6f-6f3f03271ef4","name":"Delete subscription member - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}/subscription-members","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"}},"queryParameters":{"memberContactIds":{"equalTo":"memberContactIds"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"efc3a783-b09a-41eb-8c6f-6f3f03271ef4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c73cc6cc-b51b-4e8a-ae72-3446029b9ec5","name":"Create subscription - default","request":{"urlPathTemplate":"/loyalty/config/programs/{pid}/subscriptions","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"organizationId\": 1000000,\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"versionId\": 1,\n \"contactId\": 1000000,\n \"loyaltySubscriptionId\": \"loyaltySubscriptionId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c73cc6cc-b51b-4e8a-ae72-3446029b9ec5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"da280697-1454-4e11-996a-89c499cf8d7f","name":"Get code count - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/code-pools/{cpid}/codes-count","method":"GET","pathParameters":{"pid":{"equalTo":"pid"},"cpid":{"equalTo":"cpid"}}},"response":{"status":200,"body":"{\n \"count\": 1000000\n}","headers":{"Content-Type":"application/json"}},"uuid":"da280697-1454-4e11-996a-89c499cf8d7f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d324fa9-3782-4213-ab50-8574dc117f03","name":"Get Reward Page API - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/offers","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"endDate\": \"2024-01-15T09:30:00Z\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"publicImage\": \"publicImage\",\n \"startDate\": \"2024-01-15T09:30:00Z\",\n \"state\": \"state\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"totalCount\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"3d324fa9-3782-4213-ab50-8574dc117f03","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e24ddc18-7dbb-4302-828c-d6e53ebb4a34","name":"Create a reward - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/offers","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"publicDescription\": \"publicDescription\",\n \"publicImage\": \"publicImage\",\n \"publicName\": \"publicName\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e24ddc18-7dbb-4302-828c-d6e53ebb4a34","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"661c8611-a50c-4e77-aad2-b152b4a15e63","name":"Create a voucher - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/rewards/attribute","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"code\": \"code\",\n \"consumedAt\": \"consumedAt\",\n \"contactId\": 1000000,\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"expirationDate\": \"2024-01-15T09:30:00Z\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rewardId\": \"rewardId\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"value\": 1.1,\n \"validFrom\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"661c8611-a50c-4e77-aad2-b152b4a15e63","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"aa8692b0-126d-488d-b643-8fe0de2f8405","name":"Create redeem voucher request - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/rewards/redeem","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"cancelledAt\": \"2024-01-15T09:30:00Z\",\n \"completedAt\": \"2024-01-15T09:30:00Z\",\n \"contactId\": 1000000,\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"debitTransactionId\": \"debitTransactionId\",\n \"expiresAt\": \"2024-01-15T09:30:00Z\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rejectReason\": \"rejectReason\",\n \"rejectedAt\": \"2024-01-15T09:30:00Z\",\n \"rewardAttributionId\": \"rewardAttributionId\",\n \"status\": \"status\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"aa8692b0-126d-488d-b643-8fe0de2f8405","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"99e6b97f-e193-4c85-b833-07efab4f9b5b","name":"Complete redeem voucher request - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/rewards/redeem/{tid}/complete","method":"POST","pathParameters":{"pid":{"equalTo":"pid"},"tid":{"equalTo":"tid"}}},"response":{"status":200,"body":"{\n \"cancelledAt\": \"2024-01-15T09:30:00Z\",\n \"completedAt\": \"2024-01-15T09:30:00Z\",\n \"contactId\": 1000000,\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"debitTransactionId\": \"debitTransactionId\",\n \"expiresAt\": \"2024-01-15T09:30:00Z\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rejectReason\": \"rejectReason\",\n \"rejectedAt\": \"2024-01-15T09:30:00Z\",\n \"rewardAttributionId\": \"rewardAttributionId\",\n \"status\": \"status\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"99e6b97f-e193-4c85-b833-07efab4f9b5b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"919890cf-9d52-46fe-87bc-03565bdc4697","name":"Revoke vouchers - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/rewards/revoke","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"919890cf-9d52-46fe-87bc-03565bdc4697","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"53d2fcd5-6b39-4fa3-a257-21f60d24efc5","name":"Validate a reward - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/rewards/validate","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"authorize\": true\n}","headers":{"Content-Type":"application/json"}},"uuid":"53d2fcd5-6b39-4fa3-a257-21f60d24efc5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"66e13a60-2e6c-4f3b-9ff7-fc1cdcc147b8","name":"Get reward information - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/rewards/{rid}","method":"GET","pathParameters":{"pid":{"equalTo":"pid"},"rid":{"equalTo":"rid"}}},"response":{"status":200,"body":"{\n \"attributionPerConsumer\": 1,\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"code\": \"code\",\n \"codeCount\": 1000000,\n \"codeGeneratorId\": \"codeGeneratorId\",\n \"codePoolId\": \"codePoolId\",\n \"config\": \"config\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"disabledAt\": \"2024-01-15T09:30:00Z\",\n \"endDate\": \"2024-01-15T09:30:00Z\",\n \"expirationDate\": \"2024-01-15T09:30:00Z\",\n \"expirationModifier\": \"startOfPeriod\",\n \"expirationUnit\": \"expirationUnit\",\n \"expirationValue\": 1,\n \"generator\": {\n \"createdAt\": \"createdAt\",\n \"description\": \"description\",\n \"id\": \"id\",\n \"name\": \"name\",\n \"pattern\": \"pattern\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n },\n \"id\": \"id\",\n \"limits\": [\n {\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"durationUnit\": \"durationUnit\",\n \"durationValue\": 1,\n \"limitValue\": 1,\n \"rewardLimitId\": \"rewardLimitId\",\n \"slidingSchedule\": true,\n \"type\": \"type\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"products\": [\n {\n \"createdAt\": \"createdAt\",\n \"imageRef\": \"imageRef\",\n \"productId\": \"productId\",\n \"value\": \"value\"\n }\n ],\n \"publicDescription\": \"publicDescription\",\n \"publicImage\": \"publicImage\",\n \"publicName\": \"publicName\",\n \"redeemPerConsumer\": 1,\n \"redeemRules\": [\n \"redeemRules\"\n ],\n \"rewardConfigs\": {\n \"attribution\": \"attribution\",\n \"code\": \"code\",\n \"value\": \"value\"\n },\n \"rule\": {\n \"condition\": {\n \"op\": \"op\"\n },\n \"createdAt\": \"createdAt\",\n \"description\": \"description\",\n \"event\": {\n \"name\": \"name\",\n \"source\": \"source\"\n },\n \"isInternal\": true,\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"loyaltyVersionId\": 1,\n \"meta\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"results\": [\n {}\n ],\n \"ruleId\": \"ruleId\",\n \"ruleType\": \"ruleType\",\n \"updatedAt\": \"updatedAt\"\n },\n \"startDate\": \"2024-01-15T09:30:00Z\",\n \"subtractBalanceDefinitionId\": \"subtractBalanceDefinitionId\",\n \"subtractBalanceStrategy\": \"subtractBalanceStrategy\",\n \"subtractBalanceValue\": 1,\n \"subtractTotalBalance\": true,\n \"totalAttribution\": 1,\n \"totalRedeem\": 1,\n \"triggerId\": \"triggerId\",\n \"unit\": \"unit\",\n \"updatedAt\": \"updatedAt\",\n \"value\": 1.1,\n \"valueType\": \"valueType\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"66e13a60-2e6c-4f3b-9ff7-fc1cdcc147b8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"950e340e-ab9c-42c4-8c85-9ea1bd43113d","name":"Get voucher for a contact - default","request":{"urlPathTemplate":"/loyalty/offer/programs/{pid}/vouchers","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}},"queryParameters":{"contactId":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"contactId\": 1000000,\n \"contactRewards\": [\n {\n \"code\": \"code\",\n \"consumedAt\": \"consumedAt\",\n \"createdAt\": \"createdAt\",\n \"expirationDate\": \"expirationDate\",\n \"id\": \"id\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"rewardId\": \"rewardId\",\n \"unit\": \"unit\",\n \"updatedAt\": \"updatedAt\",\n \"value\": 1.1,\n \"validFrom\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"count\": 1,\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"loyaltySubscriptionId\": \"loyaltySubscriptionId\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"950e340e-ab9c-42c4-8c85-9ea1bd43113d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f3e1d26e-fbde-4b7e-afe4-fabb4960ff71","name":"Assign a tier - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/contacts/{cid}/tiers/{tid}","method":"POST","pathParameters":{"pid":{"equalTo":"pid"},"cid":{"equalTo":"cid"},"tid":{"equalTo":"tid"}}},"response":{"status":200,"body":"{\n \"contactId\": 1,\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"groupId\": \"groupId\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"meta\": {\n \"key\": \"value\"\n },\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f3e1d26e-fbde-4b7e-afe4-fabb4960ff71","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e6fc762d-7440-4454-beb1-ff71f4a9080e","name":"List tier groups - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tier-groups","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"downgradeStrategy\": \"real_time\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"tierOrder\": [\n \"tierOrder\"\n ],\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"upgradeStrategy\": \"real_time\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e6fc762d-7440-4454-beb1-ff71f4a9080e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d33f2b3b-2dd3-4911-8200-e4b4ef965933","name":"Create a tier group - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tier-groups","method":"POST","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"downgradeStrategy\": \"real_time\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"tierOrder\": [\n \"tierOrder\"\n ],\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"upgradeStrategy\": \"real_time\",\n \"upgradeSchedule\": {\n \"strategy\": \"strategy\",\n \"durationValue\": 1,\n \"durationUnit\": \"day\",\n \"durationModifier\": \"start_of_period\",\n \"scheduledDate\": \"scheduledDate\"\n },\n \"downgradeSchedule\": {\n \"strategy\": \"strategy\",\n \"durationValue\": 1,\n \"durationUnit\": \"day\",\n \"durationModifier\": \"start_of_period\",\n \"scheduledDate\": \"scheduledDate\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"d33f2b3b-2dd3-4911-8200-e4b4ef965933","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"562fecbb-8cc8-46ae-b519-3fd2825bb107","name":"Get tier group - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tier-groups/{gid}","method":"GET","pathParameters":{"pid":{"equalTo":"pid"},"gid":{"equalTo":"gid"}}},"response":{"status":200,"body":"{\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"downgradeStrategy\": \"real_time\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"tierOrder\": [\n \"tierOrder\"\n ],\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"upgradeStrategy\": \"real_time\",\n \"upgradeSchedule\": {\n \"strategy\": \"strategy\",\n \"durationValue\": 1,\n \"durationUnit\": \"day\",\n \"durationModifier\": \"start_of_period\",\n \"scheduledDate\": \"scheduledDate\"\n },\n \"downgradeSchedule\": {\n \"strategy\": \"strategy\",\n \"durationValue\": 1,\n \"durationUnit\": \"day\",\n \"durationModifier\": \"start_of_period\",\n \"scheduledDate\": \"scheduledDate\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"562fecbb-8cc8-46ae-b519-3fd2825bb107","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67f29817-d31a-4186-b787-9277e465e139","name":"Update tier group - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tier-groups/{gid}","method":"PUT","pathParameters":{"pid":{"equalTo":"pid"},"gid":{"equalTo":"gid"}}},"response":{"status":200,"body":"{\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"downgradeStrategy\": \"real_time\",\n \"id\": \"id\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"tierOrder\": [\n \"tierOrder\"\n ],\n \"updatedAt\": \"2024-01-15T09:30:00Z\",\n \"upgradeStrategy\": \"real_time\",\n \"upgradeSchedule\": {\n \"strategy\": \"strategy\",\n \"durationValue\": 1,\n \"durationUnit\": \"day\",\n \"durationModifier\": \"start_of_period\",\n \"scheduledDate\": \"scheduledDate\"\n },\n \"downgradeSchedule\": {\n \"strategy\": \"strategy\",\n \"durationValue\": 1,\n \"durationUnit\": \"day\",\n \"durationModifier\": \"start_of_period\",\n \"scheduledDate\": \"scheduledDate\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"67f29817-d31a-4186-b787-9277e465e139","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a9e14ece-a957-40e8-b723-4b89904599dd","name":"Delete tier group - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tier-groups/{gid}","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"},"gid":{"equalTo":"gid"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a9e14ece-a957-40e8-b723-4b89904599dd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d2b435bf-764a-46a6-a860-04672e2611c0","name":"Create a tier - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tier-groups/{gid}/tiers","method":"POST","pathParameters":{"pid":{"equalTo":"pid"},"gid":{"equalTo":"gid"}}},"response":{"status":200,"body":"{\n \"accessConditions\": [\n {\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"minimumValue\": 1,\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"groupId\": \"groupId\",\n \"imageRef\": \"imageRef\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"tierId\": \"tierId\",\n \"tierRewards\": [\n {\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"rewardId\": \"rewardId\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"d2b435bf-764a-46a6-a860-04672e2611c0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e335b644-b3a8-4e92-9222-a80f9a8dd3ab","name":"List tiers - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tiers","method":"GET","pathParameters":{"pid":{"equalTo":"pid"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"accessConditions\": [\n {}\n ],\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"groupId\": \"groupId\",\n \"imageRef\": \"imageRef\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"tierId\": \"tierId\",\n \"tierRewards\": [\n {}\n ],\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e335b644-b3a8-4e92-9222-a80f9a8dd3ab","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c299567a-50ff-4db3-a919-280c95c9de65","name":"Update tier - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tiers/{tid}","method":"PUT","pathParameters":{"pid":{"equalTo":"pid"},"tid":{"equalTo":"tid"}}},"response":{"status":200,"body":"{\n \"accessConditions\": [\n {\n \"balanceDefinitionId\": \"balanceDefinitionId\",\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"minimumValue\": 1,\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"groupId\": \"groupId\",\n \"imageRef\": \"imageRef\",\n \"loyaltyProgramId\": \"loyaltyProgramId\",\n \"name\": \"name\",\n \"tierId\": \"tierId\",\n \"tierRewards\": [\n {\n \"createdAt\": \"2024-01-15T09:30:00Z\",\n \"rewardId\": \"rewardId\",\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"updatedAt\": \"2024-01-15T09:30:00Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c299567a-50ff-4db3-a919-280c95c9de65","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"05e6afcc-fb74-4457-a108-1dc6a10a5be7","name":"Delete tier - default","request":{"urlPathTemplate":"/loyalty/tier/programs/{pid}/tiers/{tid}","method":"DELETE","pathParameters":{"pid":{"equalTo":"pid"},"tid":{"equalTo":"tid"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"05e6afcc-fb74-4457-a108-1dc6a10a5be7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"cec8c14d-adf6-497f-95ee-c48ab1d6503d","name":"Return all your created email campaigns - default","request":{"urlPathTemplate":"/emailCampaigns","method":"GET"},"response":{"status":200,"body":"{\n \"campaigns\": [\n {\n \"attachmentFile\": \"http://mydomain.com/campaign/attachment/file.pdf\",\n \"abTesting\": true,\n \"id\": 12,\n \"name\": \"EN - Sales Summer 2017\",\n \"previewText\": \"Don't miss the sale!\",\n \"scheduledAt\": \"2017-06-01T12:30:00Z\",\n \"sendAtBestTime\": true,\n \"splitRule\": 25,\n \"status\": \"sent\",\n \"subject\": \"20% OFF for 2017 Summer Sales\",\n \"subjectA\": \"Discover the New Collection!\",\n \"subjectB\": \"Want to discover the New Collection?\",\n \"type\": \"classic\",\n \"winnerCriteria\": \"open\",\n \"winnerDelay\": 50,\n \"attachmentUrl\": \"https://attachment.domain.com/file.pdf\",\n \"createdAt\": \"2017-05-01T12:30:00Z\",\n \"emailExpirationDate\": {\n \"duration\": 30\n },\n \"footer\": \"[DEFAULT_FOOTER]\",\n \"header\": \"[DEFAULT_HEADER]\",\n \"htmlContent\": \"This is my HTML Content\",\n \"inlineImageActivation\": true,\n \"mirrorActive\": true,\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"recurring\": false,\n \"replyTo\": \"replyto@domain.com\",\n \"returnBounce\": 5,\n \"sender\": {\n \"email\": \"marketing@mycompany.com\",\n \"id\": 26,\n \"name\": \"Marketing\"\n },\n \"sentDate\": \"2018-12-01T16:30:00Z\",\n \"shareLink\": \"http://example.com/fhsgccc.html?t=9865448900\",\n \"tag\": \"Newsletter\",\n \"tags\": [\n \"tag1\",\n \"tag2\"\n ],\n \"testSent\": true,\n \"toField\": \"{FNAME} {LNAME}\",\n \"utmCampaignValue\": \"myutm\",\n \"utmID\": 12,\n \"utmMedium\": \"EMAIL\",\n \"utmSource\": \"Brevo\",\n \"recipients\": {\n \"excludedSegments\": [\n 14\n ],\n \"exclusionLists\": [\n 13\n ],\n \"lists\": [\n 5\n ],\n \"segments\": [\n 23\n ]\n },\n \"statistics\": {\n \"campaignStats\": [\n {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 5,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n }\n ],\n \"globalStats\": {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n },\n \"linksStats\": {\n \"http://myUrl1.domain.com\": 80\n },\n \"mirrorClick\": 120,\n \"remaining\": 1000,\n \"statsByDomain\": {\n \"hotmail.co.uk\": {\n \"appleMppOpens\": 10,\n \"clickers\": 2720,\n \"complaints\": 5,\n \"deferred\": 30,\n \"delivered\": 117056,\n \"estimatedViews\": 560,\n \"hardBounces\": 0,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 117055,\n \"softBounces\": 111,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 1970,\n \"uniqueViews\": 21111,\n \"unsubscriptions\": 105,\n \"viewed\": 35251\n },\n \"yahoo.com\": {\n \"appleMppOpens\": 10,\n \"clickers\": 533,\n \"complaints\": 0,\n \"deferred\": 30,\n \"delivered\": 25596,\n \"estimatedViews\": 560,\n \"hardBounces\": 0,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 25601,\n \"softBounces\": 5,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 298,\n \"uniqueViews\": 3527,\n \"unsubscriptions\": 17,\n \"viewed\": 5255\n }\n }\n }\n },\n {\n \"attachmentFile\": \"http://img.mailinblue.com/{clientID-campaignID}/attachments/{fileName}\",\n \"abTesting\": true,\n \"id\": 22,\n \"name\": \"Weekly - 1\",\n \"previewText\": \"your weekly newsletter!\",\n \"scheduledAt\": \"\",\n \"sendAtBestTime\": true,\n \"splitRule\": 25,\n \"status\": \"draft\",\n \"subject\": \"Week 1 - Newsletter\",\n \"subjectA\": \"Discover the New Collection!\",\n \"subjectB\": \"Want to discover the New Collection?\",\n \"type\": \"classic\",\n \"winnerCriteria\": \"open\",\n \"winnerDelay\": 50,\n \"attachmentUrl\": \"https://attachment.domain.com/file.pdf\",\n \"createdAt\": \"2017-05-01T12:30:00Z\",\n \"emailExpirationDate\": {\n \"duration\": 30\n },\n \"footer\": \"[DEFAULT_FOOTER]\",\n \"header\": \"[DEFAULT_HEADER]\",\n \"htmlContent\": \"This is my HTML Content\",\n \"inlineImageActivation\": true,\n \"mirrorActive\": true,\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"recurring\": false,\n \"replyTo\": \"replyto@domain.com\",\n \"returnBounce\": 5,\n \"sender\": {\n \"email\": \"newsletter@mycompany.com\",\n \"id\": 26,\n \"name\": \"Newsletter\"\n },\n \"sentDate\": \"2018-12-01T16:30:00Z\",\n \"shareLink\": \"http://example.com/fhsgccc.html?t=9865448900\",\n \"tag\": \"Newsletter\",\n \"tags\": [\n \"Newsletter\",\n \"Weekly\"\n ],\n \"testSent\": false,\n \"toField\": \"{FNAME} {LNAME}\",\n \"utmCampaignValue\": \"myutm\",\n \"utmID\": 12,\n \"utmMedium\": \"EMAIL\",\n \"utmSource\": \"Brevo\",\n \"recipients\": {\n \"excludedSegments\": [\n 14\n ],\n \"exclusionLists\": [\n 45\n ],\n \"lists\": [\n 10\n ],\n \"segments\": [\n 23\n ]\n },\n \"statistics\": {\n \"campaignStats\": [\n {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 10,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n }\n ],\n \"globalStats\": {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 2,\n \"opensRate\": 29.42,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n },\n \"linksStats\": {\n \"http://myUrl1.domain.com\": 1000000,\n \"http://myUrl2.domain.com\": 1000000,\n \"http://myUrl3.domain.com\": 1000000\n },\n \"mirrorClick\": 120,\n \"remaining\": 1000,\n \"statsByDomain\": {\n \"aol\": {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n },\n \"gmail\": {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n }\n }\n }\n }\n ],\n \"count\": 2\n}","headers":{"Content-Type":"application/json"}},"uuid":"cec8c14d-adf6-497f-95ee-c48ab1d6503d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"3d7c577e-d169-438f-b91c-d1f90d441dee","name":"Create an email campaign - default","request":{"urlPathTemplate":"/emailCampaigns","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"3d7c577e-d169-438f-b91c-d1f90d441dee","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b6e00948-fca2-4a11-addd-d16045c94c90","name":"Upload an image to your account's image gallery - default","request":{"urlPathTemplate":"/emailCampaigns/images","method":"POST"},"response":{"status":201,"body":"{\n \"url\": \"https://img.mailinblue.com/100000/images/rnb/original/62casdase8wewq9df1c2f27c.jpeg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"b6e00948-fca2-4a11-addd-d16045c94c90","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"da8f0483-4951-4e2d-a495-15906071e018","name":"Get an email campaign report - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}","method":"GET","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"attachmentFile\": \"http://img.mailinblue.com/{clientID-campaignID}/attachments/{fileName}\",\n \"abTesting\": true,\n \"id\": 22,\n \"name\": \"Weekly - 1\",\n \"previewText\": \"your weekly newsletter\",\n \"scheduledAt\": \"2017-09-22T12:30:00Z\",\n \"sendAtBestTime\": true,\n \"splitRule\": 25,\n \"status\": \"draft\",\n \"subject\": \"Week 1 - Newsletter\",\n \"subjectA\": \"Discover the New Collection!\",\n \"subjectB\": \"Want to discover the New Collection?\",\n \"type\": \"classic\",\n \"winnerCriteria\": \"open\",\n \"winnerDelay\": 50,\n \"attachmentUrl\": \"https://attachment.domain.com/file.pdf\",\n \"createdAt\": \"2017-05-01T12:30:00Z\",\n \"emailExpirationDate\": {\n \"duration\": 30,\n \"unit\": \"days\"\n },\n \"footer\": \"[DEFAULT_FOOTER]\",\n \"header\": \"[DEFAULT_HEADER]\",\n \"htmlContent\": \"This is my HTML Content\",\n \"inlineImageActivation\": true,\n \"mirrorActive\": true,\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"recurring\": false,\n \"replyTo\": \"replyto@domain.com\",\n \"returnBounce\": 5,\n \"sender\": {\n \"email\": \"newsletter@mycompany.com\",\n \"id\": 26,\n \"name\": \"Newsletter\"\n },\n \"sentDate\": \"2018-12-01T16:30:00Z\",\n \"shareLink\": \"http://dhh.brevo.com/fhsgccc.html?t=9865448900\",\n \"tag\": \"Newsletter\",\n \"tags\": [\n \"Newsletter\",\n \"Weekly\"\n ],\n \"testSent\": false,\n \"toField\": \"{FNAME} {LNAME}\",\n \"utmCampaignValue\": \"myutm\",\n \"utmID\": 12,\n \"utmMedium\": \"EMAIL\",\n \"utmSource\": \"Brevo\",\n \"recipients\": {\n \"excludedSegments\": [\n 14\n ],\n \"exclusionLists\": [\n 45\n ],\n \"lists\": [\n 22\n ],\n \"segments\": [\n 23\n ]\n },\n \"statistics\": {\n \"campaignStats\": [\n {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 22,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n }\n ],\n \"globalStats\": {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 2,\n \"opensRate\": 24.59,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n },\n \"linksStats\": {\n \"http://myUrl1.domain.com\": 1000000,\n \"http://myUrl2.domain.com\": 1000000,\n \"http://myUrl3.domain.com\": 1000000\n },\n \"mirrorClick\": 120,\n \"remaining\": 1000,\n \"statsByBrowser\": {\n \"internetExplorer\": {\n \"clickers\": 0,\n \"uniqueClicks\": 0,\n \"uniqueViews\": 0,\n \"viewed\": 1\n },\n \"safari\": {\n \"clickers\": 1,\n \"uniqueClicks\": 0,\n \"uniqueViews\": 0,\n \"viewed\": 1\n },\n \"thunderbird\": {\n \"clickers\": 1,\n \"uniqueClicks\": 0,\n \"uniqueViews\": 0,\n \"viewed\": 1\n }\n },\n \"statsByDevice\": {\n \"desktop\": {\n \"mac\": {\n \"clickers\": 1,\n \"uniqueClicks\": 0,\n \"uniqueViews\": 1,\n \"viewed\": 2\n }\n },\n \"mobile\": {\n \"androidMobile\": {\n \"clickers\": 1,\n \"uniqueClicks\": 0,\n \"uniqueViews\": 0,\n \"viewed\": 1\n },\n \"iPhone\": {\n \"clickers\": 1,\n \"uniqueClicks\": 0,\n \"uniqueViews\": 0,\n \"viewed\": 2\n }\n },\n \"tablet\": {\n \"key\": {\n \"clickers\": 2665,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"viewed\": 8999\n }\n },\n \"unknown\": {\n \"key\": {\n \"clickers\": 2665,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"viewed\": 8999\n }\n }\n },\n \"statsByDomain\": {\n \"gmail\": {\n \"appleMppOpens\": 10,\n \"clickers\": 2665,\n \"complaints\": 1,\n \"deferred\": 30,\n \"delivered\": 19765,\n \"estimatedViews\": 560,\n \"hardBounces\": 87,\n \"listId\": 2,\n \"opensRate\": 29.54,\n \"returnBounce\": 5,\n \"sent\": 19887,\n \"softBounces\": 100,\n \"trackableViews\": 5661,\n \"trackableViewsRate\": 23.45,\n \"uniqueClicks\": 2300,\n \"uniqueViews\": 7779,\n \"unsubscriptions\": 2,\n \"viewed\": 8999\n }\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"da8f0483-4951-4e2d-a495-15906071e018","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"27d7a953-713c-4dcc-a03d-a5fcd5fbc134","name":"Update an email campaign - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}","method":"PUT","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"27d7a953-713c-4dcc-a03d-a5fcd5fbc134","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"28dbcc0e-eed7-4b02-a7d8-2aab0a25c731","name":"Delete an email campaign - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}","method":"DELETE","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"28dbcc0e-eed7-4b02-a7d8-2aab0a25c731","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"969348eb-29d3-48ab-82d1-c46a8412178e","name":"Get an A/B test email campaign results - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}/abTestCampaignResult","method":"GET","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"clickRate\": \"50%\",\n \"clickedLinks\": {\n \"Version A\": [\n {\n \"clickRate\": \"0%\",\n \"clicksCount\": 0,\n \"link\": \"https://google.com\"\n },\n {\n \"clickRate\": \"0%\",\n \"clicksCount\": 0,\n \"link\": \"https://youtube.com\"\n }\n ],\n \"Version B\": [\n {\n \"clickRate\": \"40%\",\n \"clicksCount\": 2,\n \"link\": \"http://www.github.com\"\n },\n {\n \"clickRate\": \"60%\",\n \"clicksCount\": 3,\n \"link\": \"http://www.stackoverflow.com\"\n }\n ]\n },\n \"openRate\": \"100%\",\n \"statistics\": {\n \"clicks\": {\n \"Version A\": \"0%\",\n \"Version B\": \"50%\"\n },\n \"complaints\": {\n \"Version A\": \"0%\",\n \"Version B\": \"0%\"\n },\n \"hardBounces\": {\n \"Version A\": \"0%\",\n \"Version B\": \"0%\"\n },\n \"openers\": {\n \"Version A\": \"20%\",\n \"Version B\": \"100%\"\n },\n \"softBounces\": {\n \"Version A\": \"0%\",\n \"Version B\": \"0%\"\n },\n \"unsubscribed\": {\n \"Version A\": \"20%\",\n \"Version B\": \"0%\"\n }\n },\n \"winningCriteria\": \"Click\",\n \"winningSubjectLine\": \"Subject Line A\",\n \"winningVersion\": \"B\",\n \"winningVersionRate\": \"0%\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"969348eb-29d3-48ab-82d1-c46a8412178e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"93e3be61-a737-4896-a697-7417b837b571","name":"Export the recipients of an email campaign - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}/exportRecipients","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":202,"body":"{\n \"processId\": 78\n}","headers":{"Content-Type":"application/json"}},"uuid":"93e3be61-a737-4896-a697-7417b837b571","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b0b17959-d743-449c-8bdd-ab28a42870cc","name":"Send an email campaign immediately, based on campaignId - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}/sendNow","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"b0b17959-d743-449c-8bdd-ab28a42870cc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"57eba48c-9a52-4e90-a12c-fa89a469f035","name":"Send the report of a campaign - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}/sendReport","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"57eba48c-9a52-4e90-a12c-fa89a469f035","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fc668b8b-10da-4f83-ae38-5004f0a64ae7","name":"Send an email campaign to your test list - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}/sendTest","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"fc668b8b-10da-4f83-ae38-5004f0a64ae7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6bc6114e-fc20-4aa2-ba22-7e7fe7f95244","name":"Get a shared template url - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}/sharedUrl","method":"GET","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"sharedUrl\": \"https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx-\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"6bc6114e-fc20-4aa2-ba22-7e7fe7f95244","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8d661344-163b-4798-a243-ba10bd08cbe9","name":"Update an email campaign status - default","request":{"urlPathTemplate":"/emailCampaigns/{campaignId}/status","method":"PUT","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"8d661344-163b-4798-a243-ba10bd08cbe9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ffedd57d-0198-49a4-9112-ce7ae8751ebc","name":"Returns the information for all your created SMS campaigns - default","request":{"urlPathTemplate":"/smsCampaigns","method":"GET"},"response":{"status":200,"body":"{\n \"campaigns\": [\n {\n \"content\": \"Visit our Store and get some discount !\",\n \"createdAt\": \"2017-06-01T12:30:00Z\",\n \"id\": 2,\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"name\": \"PROMO CODE\",\n \"organisationPrefix\": \"MyCompany\",\n \"scheduledAt\": \"2017-06-01T12:30:00Z\",\n \"sender\": \"MyCompany\",\n \"sentDate\": \"2017-06-01T12:30:00Z\",\n \"status\": \"sent\",\n \"unsubscribeInstruction\": \"send Stop if you want to unsubscribe.\",\n \"recipients\": {\n \"excludedSegments\": [\n 14\n ],\n \"exclusionLists\": [\n 13\n ],\n \"lists\": [\n 21\n ],\n \"segments\": [\n 23\n ]\n },\n \"statistics\": {\n \"answered\": 2,\n \"delivered\": 2987,\n \"hardBounces\": 1,\n \"processing\": 0,\n \"sent\": 3000,\n \"softBounces\": 3,\n \"unsubscriptions\": 3\n }\n },\n {\n \"content\": \"Summer Sale is starting tomorrow. Get extra 10% with this code:SUM17\",\n \"createdAt\": \"2017-06-01T12:30:00Z\",\n \"id\": 10,\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"name\": \"SUMMER SALE\",\n \"organisationPrefix\": \"\",\n \"scheduledAt\": \"2017-08-04T12:30:00Z\",\n \"sender\": \"MyCompany\",\n \"sentDate\": \"2017-06-01T12:30:00Z\",\n \"status\": \"draft\",\n \"unsubscribeInstruction\": \"\",\n \"recipients\": {\n \"excludedSegments\": [\n 14\n ],\n \"exclusionLists\": [\n 13\n ],\n \"lists\": [\n 21\n ],\n \"segments\": [\n 23\n ]\n },\n \"statistics\": {\n \"answered\": 2,\n \"delivered\": 2987,\n \"hardBounces\": 1,\n \"processing\": 0,\n \"sent\": 3000,\n \"softBounces\": 3,\n \"unsubscriptions\": 3\n }\n }\n ],\n \"count\": 12\n}","headers":{"Content-Type":"application/json"}},"uuid":"ffedd57d-0198-49a4-9112-ce7ae8751ebc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"ff5b73cc-83d1-4d1c-9038-f01bc11a604e","name":"Creates an SMS campaign - default","request":{"urlPathTemplate":"/smsCampaigns","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"ff5b73cc-83d1-4d1c-9038-f01bc11a604e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9ff5c02a-8b74-486b-aca9-7ac003b1838c","name":"Get an SMS campaign - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}","method":"GET","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"content\": \"Visit our Store and get some discount !\",\n \"createdAt\": \"2017-06-01T12:30:00Z\",\n \"id\": 2,\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"name\": \"PROMO CODE\",\n \"organisationPrefix\": \"MyCompany\",\n \"scheduledAt\": \"2017-06-01T12:30:00Z\",\n \"sender\": \"MyCompany\",\n \"sentDate\": \"2017-06-01T12:30:00Z\",\n \"status\": \"sent\",\n \"unsubscribeInstruction\": \"send Stop if you want to unsubscribe.\",\n \"recipients\": {\n \"exclusionLists\": [\n {\n \"id\": 13,\n \"name\": \"Exclusion List\"\n }\n ],\n \"lists\": [\n {\n \"id\": 21,\n \"name\": \"Main List\"\n }\n ]\n },\n \"statistics\": {\n \"answered\": 2,\n \"delivered\": 2987,\n \"hardBounces\": 1,\n \"processing\": 0,\n \"sent\": 3000,\n \"softBounces\": 3,\n \"unsubscriptions\": 3\n },\n \"tags\": [\n \"promo\"\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"9ff5c02a-8b74-486b-aca9-7ac003b1838c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"828e0b76-55ec-4b20-83fd-ff0d9c6a807f","name":"Update an SMS campaign - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}","method":"PUT","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"828e0b76-55ec-4b20-83fd-ff0d9c6a807f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0938f276-c211-4150-91ac-9ea5e3ddf7fe","name":"Delete an SMS campaign - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}","method":"DELETE","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"0938f276-c211-4150-91ac-9ea5e3ddf7fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"daaeea82-c583-43fb-b4c7-a6bbc940fc47","name":"Export an SMS campaign's recipients - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}/exportRecipients","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":202,"body":"{\n \"processId\": 78\n}","headers":{"Content-Type":"application/json"}},"uuid":"daaeea82-c583-43fb-b4c7-a6bbc940fc47","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b7dd5175-f7a0-4b5e-9224-203d4fae1c4d","name":"Send your SMS campaign immediately - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}/sendNow","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"b7dd5175-f7a0-4b5e-9224-203d4fae1c4d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"64e8bd39-5b33-477a-ae7f-0501cb5a6140","name":"Send an SMS campaign's report - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}/sendReport","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"64e8bd39-5b33-477a-ae7f-0501cb5a6140","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"734d1bda-9010-4188-9a00-57d5b302eee4","name":"Send a test SMS campaign - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}/sendTest","method":"POST","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"734d1bda-9010-4188-9a00-57d5b302eee4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"694adffd-8af9-45be-8225-5e44e17d7454","name":"Update a campaign's status - default","request":{"urlPathTemplate":"/smsCampaigns/{campaignId}/status","method":"PUT","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"694adffd-8af9-45be-8225-5e44e17d7454","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"03183785-7a99-4733-896c-eb489047065c","name":"Return all your created WhatsApp campaigns - default","request":{"urlPathTemplate":"/whatsappCampaigns","method":"GET"},"response":{"status":200,"body":"{\n \"campaigns\": [\n {\n \"campaignName\": \"campaign_22\",\n \"campaignStatus\": \"sent\",\n \"createdAt\": \"2017-05-01T12:30:00Z\",\n \"errorReason\": \"NONE\",\n \"id\": 1672035851100690,\n \"invalidatedContacts\": 0,\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"readPercentage\": 28.57,\n \"scheduledAt\": \"2022-12-27T09:50:00Z\",\n \"stats\": {\n \"delivered\": 3,\n \"notSent\": 4,\n \"read\": 2,\n \"sent\": 3,\n \"unsubscribe\": 0\n },\n \"templateId\": \"templateId\"\n }\n ],\n \"count\": 23\n}","headers":{"Content-Type":"application/json"}},"uuid":"03183785-7a99-4733-896c-eb489047065c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"5fc3f144-a51f-454f-a5d0-019b38ba3c15","name":"Create and Send a WhatsApp campaign - default","request":{"urlPathTemplate":"/whatsappCampaigns","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"5fc3f144-a51f-454f-a5d0-019b38ba3c15","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"cc80c9bc-ff82-4140-9b7a-dfb84c8e99a7","name":"Get your WhatsApp API account information - default","request":{"urlPathTemplate":"/whatsappCampaigns/config","method":"GET"},"response":{"status":200,"body":"{\n \"businessStatus\": \"verified\",\n \"phoneNumberNameStatus\": \"APPROVED\",\n \"phoneNumberQuality\": \"GREEN\",\n \"sendingLimit\": \"TIER_1K\",\n \"whatsappBusinessAccountId\": \"whatsappBusinessAccountId\",\n \"whatsappBusinessAccountStatus\": \"APPROVED\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"cc80c9bc-ff82-4140-9b7a-dfb84c8e99a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"5217f5cb-e270-45d2-bf41-0aa3651c5839","name":"Create a WhatsApp template - default","request":{"urlPathTemplate":"/whatsappCampaigns/template","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"5217f5cb-e270-45d2-bf41-0aa3651c5839","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e541402c-10e0-447d-ab89-e9102a312296","name":"Return all your created WhatsApp templates - default","request":{"urlPathTemplate":"/whatsappCampaigns/template-list","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 2,\n \"templates\": [\n {\n \"category\": \"MARKETING\",\n \"createdAt\": \"2017-05-01T12:30:00Z\",\n \"errorReason\": \"NONE\",\n \"id\": 235,\n \"language\": \"en\",\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"name\": \"campaign_22\",\n \"status\": \"approved\",\n \"type\": \"whatsapp\"\n },\n {\n \"category\": \"MARKETING\",\n \"createdAt\": \"2017-0\",\n \"errorReason\": \"NONE\",\n \"id\": 124,\n \"language\": \"\",\n \"modifiedAt\": \"2017-05-01T12:30:00Z\",\n \"name\": \"test-template\",\n \"status\": \"draft\",\n \"type\": \"whatsapp\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e541402c-10e0-447d-ab89-e9102a312296","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"c47467e5-3355-486f-b83b-ecf963b249b4","name":"Send your WhatsApp template for approval - default","request":{"urlPathTemplate":"/whatsappCampaigns/template/approval/{templateId}","method":"POST","pathParameters":{"templateId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c47467e5-3355-486f-b83b-ecf963b249b4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6d437255-9beb-48aa-9616-0b438eb437f6","name":"Get a WhatsApp campaign - default","request":{"urlPathTemplate":"/whatsappCampaigns/{campaignId}","method":"GET","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"campaignName\": \"Test WhatsApp Campaign\",\n \"campaignStatus\": \"sent\",\n \"createdAt\": \"2022-12-26T06:50:00Z\",\n \"id\": 1672035851100690,\n \"modifiedAt\": \"2022-12-26T08:50:00Z\",\n \"scheduledAt\": \"2022-12-27T09:50:00Z\",\n \"recipients\": {\n \"excludedLists\": [\n 45\n ],\n \"includedLists\": [\n 22\n ],\n \"segments\": [\n 23\n ],\n \"type\": \"list\"\n },\n \"senderNumber\": \"senderNumber\",\n \"stats\": {\n \"delivered\": 3,\n \"notSent\": 4,\n \"read\": 2,\n \"sent\": 3,\n \"unsubscribe\": 0\n },\n \"template\": {\n \"body_variables\": [\n {\n \"datatype\": \"text\",\n \"default\": \"INVALID_HEADER\",\n \"name\": \"FIRSTNAME\"\n }\n ],\n \"button_type\": \"CALL_TO_ACTION\",\n \"category\": \"MARKETING\",\n \"components\": [\n {\n \"text\": \"making it look like readable English.\",\n \"type\": \"BODY\"\n },\n {\n \"text\": \"Life is a long lesson in humility\",\n \"type\": \"BUTTONS\"\n }\n ],\n \"contains_button\": true,\n \"display_header\": false,\n \"header_type\": \"text\",\n \"header_variables\": [\n {\n \"datatype\": \"text\",\n \"default\": \"INVALID HEADER\",\n \"name\": \"FIRSTNAME\"\n }\n ],\n \"hide_footer\": true,\n \"language\": \"en\",\n \"name\": \"official_campaign8\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6d437255-9beb-48aa-9616-0b438eb437f6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eb75a9a4-36c5-4126-9a14-85044f19f2c1","name":"Update a WhatsApp campaign - default","request":{"urlPathTemplate":"/whatsappCampaigns/{campaignId}","method":"PUT","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"eb75a9a4-36c5-4126-9a14-85044f19f2c1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b4ef121d-89fa-4fb6-984d-39467bf9fd6b","name":"Delete a WhatsApp campaign - default","request":{"urlPathTemplate":"/whatsappCampaigns/{campaignId}","method":"DELETE","pathParameters":{"campaignId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"b4ef121d-89fa-4fb6-984d-39467bf9fd6b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eb31fc6b-22fd-431f-ba7e-59e0d7773487","name":"Get all Companies - default","request":{"urlPathTemplate":"/companies","method":"GET"},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"attributes\": {\n \"created_at\": \"2022-01-13T19:04:24.376+05:30\",\n \"domain\": \"xyz\",\n \"last_updated_at\": \"2022-04-01T18:47:48.283+05:30\",\n \"name\": \"text\",\n \"number_of_contacts\": 0,\n \"owner\": \"62260474111b1101704a9d85\",\n \"owner_assign_date\": \"2022-04-01T18:21:13.379+05:30\",\n \"phone_number\": 8171844192,\n \"revenue\": 10\n },\n \"id\": \"629475917295261d9b1f4403\",\n \"linkedContactsIds\": [\n 1,\n 2,\n 3\n ],\n \"linkedDealsIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ]\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"eb31fc6b-22fd-431f-ba7e-59e0d7773487","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"e17f5536-5a6b-4a26-8102-3170dd47ae3d","name":"Create a company - default","request":{"urlPathTemplate":"/companies","method":"POST"},"response":{"status":200,"body":"{\n \"id\": \"61a5cd07ca1347c82306ad06\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e17f5536-5a6b-4a26-8102-3170dd47ae3d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f390d3a7-6a70-4b45-ad33-f4f3d3000538","name":"Import companies(creation and updation) - default","request":{"urlPathTemplate":"/companies/import","method":"POST"},"response":{"status":200,"body":"{\n \"processId\": 50\n}","headers":{"Content-Type":"application/json"}},"uuid":"f390d3a7-6a70-4b45-ad33-f4f3d3000538","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"708feaed-27c0-429f-8086-5e7c5e4ecd8d","name":"Link and Unlink company with contact and deal - default","request":{"urlPathTemplate":"/companies/link-unlink/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"708feaed-27c0-429f-8086-5e7c5e4ecd8d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"00aba53e-3870-4157-ace9-c2d252198e11","name":"Get a company - default","request":{"urlPathTemplate":"/companies/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"attributes\": {\n \"created_at\": \"2022-01-13T19:04:24.376+05:30\",\n \"domain\": \"xyz\",\n \"last_updated_at\": \"2022-04-01T18:47:48.283+05:30\",\n \"name\": \"text\",\n \"number_of_contacts\": 0,\n \"owner\": \"62260474111b1101704a9d85\",\n \"owner_assign_date\": \"2022-04-01T18:21:13.379+05:30\",\n \"phone_number\": 8171844192,\n \"revenue\": 10\n },\n \"id\": \"629475917295261d9b1f4403\",\n \"linkedContactsIds\": [\n 1,\n 2,\n 3\n ],\n \"linkedDealsIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"00aba53e-3870-4157-ace9-c2d252198e11","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ed72bcbe-33c2-48e2-93e4-756a46e8fd90","name":"Delete a company - default","request":{"urlPathTemplate":"/companies/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"ed72bcbe-33c2-48e2-93e4-756a46e8fd90","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d37f940-80db-41f6-9f83-1f3a2c69804b","name":"Update a company - default","request":{"urlPathTemplate":"/companies/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"attributes\": {\n \"created_at\": \"2022-01-13T19:04:24.376+05:30\",\n \"domain\": \"xyz\",\n \"last_updated_at\": \"2022-04-01T18:47:48.283+05:30\",\n \"name\": \"text\",\n \"number_of_contacts\": 0,\n \"owner\": \"62260474111b1101704a9d85\",\n \"owner_assign_date\": \"2022-04-01T18:21:13.379+05:30\",\n \"phone_number\": 8171844192,\n \"revenue\": 10\n },\n \"id\": \"629475917295261d9b1f4403\",\n \"linkedContactsIds\": [\n 1,\n 2,\n 3\n ],\n \"linkedDealsIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"3d37f940-80db-41f6-9f83-1f3a2c69804b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1a24ce32-7c2c-41a5-80a9-1681d05767ad","name":"Create a company/deal attribute - default","request":{"urlPathTemplate":"/crm/attributes","method":"POST"},"response":{"status":200,"body":"{\n \"id\": \"61a5cd07ca1347c82306ad07\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"1a24ce32-7c2c-41a5-80a9-1681d05767ad","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"360c88d6-c7bb-4c00-b1ab-146f803e9eff","name":"Delete an attribute - default","request":{"urlPathTemplate":"/crm/attributes/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"360c88d6-c7bb-4c00-b1ab-146f803e9eff","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a9790cec-51da-4b91-ae52-a3b58fa8c717","name":"Update an attribute - default","request":{"urlPathTemplate":"/crm/attributes/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a9790cec-51da-4b91-ae52-a3b58fa8c717","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"696b098d-c426-490d-993d-82b72a9a6eec","name":"Get company attributes - default","request":{"urlPathTemplate":"/crm/attributes/companies","method":"GET"},"response":{"status":200,"body":"[\n {\n \"internalName\": \"name\",\n \"attributeTypeName\": \"text\",\n \"label\": \"Company Name\",\n \"attributeOptions\": [\n {\n \"key\": \"custom key\",\n \"value\": \"custom label\"\n }\n ],\n \"isRequired\": true,\n \"isValueReadonly\": false\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"696b098d-c426-490d-993d-82b72a9a6eec","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"3db982e0-00b7-41af-bc9d-fe3f54d90a12","name":"Get deal attributes - default","request":{"urlPathTemplate":"/crm/attributes/deals","method":"GET"},"response":{"status":200,"body":"[\n {\n \"internalName\": \"deal_name\",\n \"attributeTypeName\": \"text\",\n \"label\": \"Deal Name\",\n \"attributeOptions\": [\n {\n \"key\": \"custom key\",\n \"value\": \"custom label\"\n }\n ],\n \"isRequired\": true,\n \"isValueReadonly\": false\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"3db982e0-00b7-41af-bc9d-fe3f54d90a12","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4ee2c155-e8d9-4aee-b095-699a2c9a6263","name":"Get all deals - default","request":{"urlPathTemplate":"/crm/deals","method":"GET"},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"id\": \"629475917295261d9b1f4403\",\n \"attributes\": {\n \"amount\": 12,\n \"created_at\": \"2022-05-30T07:42:05.671Z\",\n \"deal_name\": \"testname\",\n \"deal_owner\": \"6093d2425a9b436e9519d034\",\n \"deal_stage\": \"9e577ff7-8e42-4ab3-be26-2b5e01b42518\",\n \"last_activity_date\": \"2022-06-06T08:38:36.000Z\",\n \"last_updated_date\": \"2022-06-06T08:38:36.761Z\",\n \"number_of_activities\": 0,\n \"number_of_contacts\": 1,\n \"pipeline\": \"6093d296ad1e9c5cf2140a58\",\n \"stage_updated_at\": \"2022-05-30T07:42:05.671Z\"\n },\n \"linkedContactsIds\": [\n 1,\n 2,\n 3\n ],\n \"linkedCompaniesIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ]\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"4ee2c155-e8d9-4aee-b095-699a2c9a6263","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"21216821-874f-4e2a-a690-4b805b03c721","name":"Create a deal - default","request":{"urlPathTemplate":"/crm/deals","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"61a5cd07ca1347c82306ad06\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"21216821-874f-4e2a-a690-4b805b03c721","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ce9e7723-550c-4f51-af88-6cde553f45b7","name":"Import deals(creation and updation) - default","request":{"urlPathTemplate":"/crm/deals/import","method":"POST"},"response":{"status":200,"body":"{\n \"processId\": 50\n}","headers":{"Content-Type":"application/json"}},"uuid":"ce9e7723-550c-4f51-af88-6cde553f45b7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f89fa5e6-0434-46e0-8c77-535bea98fc1a","name":"Link and Unlink a deal with contacts and companies - default","request":{"urlPathTemplate":"/crm/deals/link-unlink/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"f89fa5e6-0434-46e0-8c77-535bea98fc1a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a3513f5b-5df8-443d-aa67-5efd91e58f3d","name":"Get a deal - default","request":{"urlPathTemplate":"/crm/deals/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"id\": \"629475917295261d9b1f4403\",\n \"attributes\": {\n \"amount\": 12,\n \"created_at\": \"2022-05-30T07:42:05.671Z\",\n \"deal_name\": \"testname\",\n \"deal_owner\": \"6093d2425a9b436e9519d034\",\n \"deal_stage\": \"9e577ff7-8e42-4ab3-be26-2b5e01b42518\",\n \"last_activity_date\": \"2022-06-06T08:38:36.000Z\",\n \"last_updated_date\": \"2022-06-06T08:38:36.761Z\",\n \"number_of_activities\": 0,\n \"number_of_contacts\": 1,\n \"pipeline\": \"6093d296ad1e9c5cf2140a58\",\n \"stage_updated_at\": \"2022-05-30T07:42:05.671Z\"\n },\n \"linkedContactsIds\": [\n 1,\n 2,\n 3\n ],\n \"linkedCompaniesIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"a3513f5b-5df8-443d-aa67-5efd91e58f3d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"54ba1660-4170-41b9-86d2-963468e28812","name":"Delete a deal - default","request":{"urlPathTemplate":"/crm/deals/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"54ba1660-4170-41b9-86d2-963468e28812","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e555066b-bfb4-4582-9f37-6eec50af9fe4","name":"Update a deal - default","request":{"urlPathTemplate":"/crm/deals/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"e555066b-bfb4-4582-9f37-6eec50af9fe4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"00d065e6-8a4f-4ac9-a849-298a81551e9c","name":"Get pipeline stages - default","request":{"urlPathTemplate":"/crm/pipeline/details","method":"GET"},"response":{"status":200,"body":"{\n \"pipeline\": \"5ea675e3da0dd085acaea610\",\n \"pipeline_name\": \"Sales Pipeline\",\n \"stages\": [\n {\n \"id\": \"9e577ff7-8e42-4ab3-be26-2b5e01b42518\",\n \"name\": \"New\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"00d065e6-8a4f-4ac9-a849-298a81551e9c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"e75093b9-5f73-46e0-a2af-1f7c47922829","name":"Get all pipelines - default","request":{"urlPathTemplate":"/crm/pipeline/details/all","method":"GET"},"response":{"status":200,"body":"[\n {\n \"pipeline\": \"5ea675e3da0dd085acaea610\",\n \"pipeline_name\": \"Sales Pipeline\",\n \"stages\": [\n {\n \"id\": \"9e577ff7-8e42-4ab3-be26-2b5e01b42518\",\n \"name\": \"New\"\n }\n ]\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e75093b9-5f73-46e0-a2af-1f7c47922829","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"2882799f-edf8-4d3b-826d-3692f300d025","name":"Get a pipeline - default","request":{"urlPathTemplate":"/crm/pipeline/details/{pipelineID}","method":"GET","pathParameters":{"pipelineID":{"equalTo":"pipelineID"}}},"response":{"status":200,"body":"[\n {\n \"pipeline\": \"5ea675e3da0dd085acaea610\",\n \"pipeline_name\": \"Sales Pipeline\",\n \"stages\": [\n {\n \"id\": \"9e577ff7-8e42-4ab3-be26-2b5e01b42518\",\n \"name\": \"New\"\n }\n ]\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"2882799f-edf8-4d3b-826d-3692f300d025","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2e96e9dc-f52d-4354-a185-de3257903a02","name":"Get all files - default","request":{"urlPathTemplate":"/crm/files","method":"GET"},"response":{"status":200,"body":"[\n {\n \"id\": \"61a5ce58c5d4795761045991\",\n \"name\": \"example.png\",\n \"authorId\": \"61a5ce58c5d4795761045991\",\n \"contactId\": 1,\n \"dealId\": \"61a5ce58c5d4795761045991\",\n \"companyId\": \"61a5ce58c5d4795761045991\",\n \"size\": 10,\n \"createdAt\": \"2017-05-01T17:05:03Z\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"2e96e9dc-f52d-4354-a185-de3257903a02","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"54153a26-e96d-4b54-acab-08a1b6bb6027","name":"Upload a file - default","request":{"urlPathTemplate":"/crm/files","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"61a5ce58c5d4795761045991\",\n \"name\": \"example.png\",\n \"authorId\": \"61a5ce58c5d4795761045991\",\n \"contactId\": 1,\n \"dealId\": \"61a5ce58c5d4795761045991\",\n \"companyId\": \"61a5ce58c5d4795761045991\",\n \"size\": 10,\n \"createdAt\": \"2017-05-01T17:05:03Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"54153a26-e96d-4b54-acab-08a1b6bb6027","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fea850a9-ab2c-4fee-89b8-e564df22e53a","name":"Download a file - default","request":{"urlPathTemplate":"/crm/files/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"fileUrl\": \"https://storage.googleapis.com/brevo-app-crm.......-sample.pdf\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"fea850a9-ab2c-4fee-89b8-e564df22e53a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"38b72322-9ea0-47f2-b639-7d466c243b82","name":"Delete a file - default","request":{"urlPathTemplate":"/crm/files/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"38b72322-9ea0-47f2-b639-7d466c243b82","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1ee1505b-b76c-47f3-addc-8d237075f2a3","name":"Get file details - default","request":{"urlPathTemplate":"/crm/files/{id}/data","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"id\": \"61a5ce58c5d4795761045991\",\n \"name\": \"example.png\",\n \"authorId\": \"61a5ce58c5d4795761045991\",\n \"contactId\": 1,\n \"dealId\": \"61a5ce58c5d4795761045991\",\n \"companyId\": \"61a5ce58c5d4795761045991\",\n \"size\": 10,\n \"createdAt\": \"2017-05-01T17:05:03Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"1ee1505b-b76c-47f3-addc-8d237075f2a3","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"608a87de-9e4a-45e5-bb3a-e0683eb220b8","name":"Get all notes - default","request":{"urlPathTemplate":"/crm/notes","method":"GET"},"response":{"status":200,"body":"[\n {\n \"id\": \"61a5cd07ca1347c82306ad09\",\n \"text\": \"

Meeting notes: Action item - visit Brevo for details.

\",\n \"contactIds\": [\n 247,\n 1,\n 2\n ],\n \"companyIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\"\n ],\n \"dealIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\"\n ],\n \"authorId\": {\n \"email\": \"johndoe@example.com\",\n \"id\": \"61a5ce58y5d4795761045991\",\n \"locale\": \"en_GB\",\n \"name\": {\n \"fullName\": \"John Doe\"\n },\n \"timezone\": \"Asia/Kolkata\"\n },\n \"createdAt\": \"2017-05-01T17:05:03Z\",\n \"updatedAt\": \"2017-05-01T17:05:03Z\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"608a87de-9e4a-45e5-bb3a-e0683eb220b8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"0ceb328a-0b27-4d1d-8ba3-3abc8979d485","name":"Create a note - default","request":{"urlPathTemplate":"/crm/notes","method":"POST"},"response":{"status":200,"body":"{\n \"id\": \"61a5cd07ca1347c82306ad09\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"0ceb328a-0b27-4d1d-8ba3-3abc8979d485","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f9cf8ca7-3372-4b74-854e-93a3d45c5d56","name":"Get a note - default","request":{"urlPathTemplate":"/crm/notes/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"id\": \"61a5cd07ca1347c82306ad09\",\n \"text\": \"

Meeting notes: Action item - visit Brevo for details.

\",\n \"contactIds\": [\n 247,\n 1,\n 2\n ],\n \"companyIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\"\n ],\n \"dealIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\"\n ],\n \"authorId\": {\n \"email\": \"johndoe@example.com\",\n \"id\": \"61a5ce58y5d4795761045991\",\n \"locale\": \"en_GB\",\n \"name\": {\n \"fullName\": \"John Doe\"\n },\n \"timezone\": \"Asia/Kolkata\"\n },\n \"createdAt\": \"2017-05-01T17:05:03Z\",\n \"updatedAt\": \"2017-05-01T17:05:03Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f9cf8ca7-3372-4b74-854e-93a3d45c5d56","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b382d16e-0455-423c-9dd1-42efa255a495","name":"Delete a note - default","request":{"urlPathTemplate":"/crm/notes/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"b382d16e-0455-423c-9dd1-42efa255a495","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"458a7a9b-298d-44e2-a117-63db0c9047f0","name":"Update a note - default","request":{"urlPathTemplate":"/crm/notes/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"458a7a9b-298d-44e2-a117-63db0c9047f0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ce9a81b3-1605-4c76-bf79-fc52ff6a2653","name":"Get all tasks - default","request":{"urlPathTemplate":"/crm/tasks","method":"GET","queryParameters":{"sortBy":{"equalTo":"name"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"id\": \"61a5cd07ca1347c82306ad06\",\n \"taskTypeId\": \"61a5cd07ca1347c82306ad09\",\n \"name\": \"Task: Connect with client\",\n \"companiesIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ],\n \"dealsIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ],\n \"contactsIds\": [\n 1,\n 2,\n 3\n ],\n \"assignToId\": \"5faab4b7f195bb3c4c31e62a\",\n \"date\": \"2021-11-01T17:44:54Z\",\n \"notes\": \"In communication with client for resolution of queries.\",\n \"done\": false,\n \"createdAt\": \"2021-11-01T17:44:54Z\",\n \"updatedAt\": \"2021-11-01T17:44:54Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"ce9a81b3-1605-4c76-bf79-fc52ff6a2653","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"60ee1139-00c5-4746-b240-523605d43bb4","name":"Create a task - default","request":{"urlPathTemplate":"/crm/tasks","method":"POST"},"response":{"status":201,"body":"{\n \"id\": \"61a5cd07ca1347c82306ad06\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"60ee1139-00c5-4746-b240-523605d43bb4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"909b9f4c-1f5b-4271-82fe-a4e4847db6c7","name":"Get a task - default","request":{"urlPathTemplate":"/crm/tasks/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"id\": \"61a5cd07ca1347c82306ad06\",\n \"taskTypeId\": \"61a5cd07ca1347c82306ad09\",\n \"name\": \"Task: Connect with client\",\n \"companiesIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ],\n \"dealsIds\": [\n \"61a5ce58c5d4795761045990\",\n \"61a5ce58c5d4795761045991\",\n \"61a5ce58c5d4795761045992\"\n ],\n \"contactsIds\": [\n 1,\n 2,\n 3\n ],\n \"assignToId\": \"5faab4b7f195bb3c4c31e62a\",\n \"date\": \"2021-11-01T17:44:54Z\",\n \"notes\": \"In communication with client for resolution of queries.\",\n \"done\": false,\n \"createdAt\": \"2021-11-01T17:44:54Z\",\n \"updatedAt\": \"2021-11-01T17:44:54Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"909b9f4c-1f5b-4271-82fe-a4e4847db6c7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"040ca6a6-b7b7-4cfd-95b2-a493ccc1691e","name":"Delete a task - default","request":{"urlPathTemplate":"/crm/tasks/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"040ca6a6-b7b7-4cfd-95b2-a493ccc1691e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"90199d04-c868-46bf-8e40-5e330c257e75","name":"Update a task - default","request":{"urlPathTemplate":"/crm/tasks/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"90199d04-c868-46bf-8e40-5e330c257e75","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"667b0721-7004-49d8-9017-b6d086394c2f","name":"Get all task types - default","request":{"urlPathTemplate":"/crm/tasktypes","method":"GET"},"response":{"status":200,"body":"[\n {\n \"id\": \"61a88a2eb7a574180261234\",\n \"title\": \"Email\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"667b0721-7004-49d8-9017-b6d086394c2f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"22a7a09a-6fad-41dd-aed4-b8806c57a34a","name":"Send a WhatsApp message - default","request":{"urlPathTemplate":"/whatsapp/sendMessage","method":"POST"},"response":{"status":201,"body":"{\n \"messageId\": \"23befbae-1505-47a8-bd27-e30ef739f32c\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"22a7a09a-6fad-41dd-aed4-b8806c57a34a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fab3ac15-a813-4c2f-9673-e64845544c00","name":"Get all your WhatsApp activity (unaggregated events) - default","request":{"urlPathTemplate":"/whatsapp/statistics/events","method":"GET"},"response":{"status":200,"body":"{\n \"events\": [\n {\n \"body\": \"Hi! I am a reply\",\n \"contactNumber\": \"contactNumber\",\n \"date\": \"2017-03-12T12:30:00Z\",\n \"event\": \"sent\",\n \"mediaUrl\": \"https://example.com/media.png\",\n \"messageId\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"reason\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"senderNumber\": \"senderNumber\"\n },\n {\n \"body\": \"Hi! I am a reply\",\n \"contactNumber\": \"contactNumber\",\n \"date\": \"2017-03-12T12:30:00Z\",\n \"event\": \"error\",\n \"mediaUrl\": \"https://example.com/media.png\",\n \"messageId\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"reason\": \"error reason\",\n \"senderNumber\": \"senderNumber\"\n },\n {\n \"body\": \"Hi! I am a reply\",\n \"contactNumber\": \"contactNumber\",\n \"date\": \"2017-03-12T12:30:00Z\",\n \"event\": \"soft-bounce\",\n \"mediaUrl\": \"https://example.com/media.png\",\n \"messageId\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"reason\": \"invalid whatsapp contact\",\n \"senderNumber\": \"senderNumber\"\n },\n {\n \"body\": \"body only in case of text reply & url will be empty\",\n \"contactNumber\": \"contactNumber\",\n \"date\": \"2017-03-12T12:30:00Z\",\n \"event\": \"reply\",\n \"mediaUrl\": \"media url only in case media reply & body will be empty\",\n \"messageId\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"reason\": \"23befbae-1505-47a8-bd27-e30ef739f32c\",\n \"senderNumber\": \"senderNumber\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fab3ac15-a813-4c2f-9673-e64845544c00","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"28f43c06-69ca-463d-ad60-4a71c61a0440","name":"Get the list of blocked or unsubscribed transactional contacts - default","request":{"urlPathTemplate":"/smtp/blockedContacts","method":"GET"},"response":{"status":200,"body":"{\n \"contacts\": [\n {\n \"blockedAt\": \"2017-05-01T12:30:00Z\",\n \"email\": \"abc@xyz.com\",\n \"reason\": {\n \"code\": \"adminBlocked\",\n \"message\": \"Admin blocked\"\n },\n \"senderEmail\": \"ez312@gmal.com\"\n }\n ],\n \"count\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"28f43c06-69ca-463d-ad60-4a71c61a0440","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"e81c8495-0ef3-44b1-a9ce-45cc2bef7798","name":"Unblock or resubscribe a transactional contact - default","request":{"urlPathTemplate":"/smtp/blockedContacts/{email}","method":"DELETE","pathParameters":{"email":{"equalTo":"email"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"e81c8495-0ef3-44b1-a9ce-45cc2bef7798","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0aab435d-618c-452b-8545-7c35e9088c78","name":"Get the list of blocked domains - default","request":{"urlPathTemplate":"/smtp/blockedDomains","method":"GET"},"response":{"status":200,"body":"{\n \"domains\": [\n \"example.com\",\n \"testdomain.com\"\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"0aab435d-618c-452b-8545-7c35e9088c78","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"350fd1cc-de1c-4197-ae49-46ce6a1d6c03","name":"Add a new domain to the list of blocked domains - default","request":{"urlPathTemplate":"/smtp/blockedDomains","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"350fd1cc-de1c-4197-ae49-46ce6a1d6c03","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f5e28407-a9c3-4231-b722-a6b8bbd8af4a","name":"Unblock an existing domain from the list of blocked domains - default","request":{"urlPathTemplate":"/smtp/blockedDomains/{domain}","method":"DELETE","pathParameters":{"domain":{"equalTo":"domain"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"f5e28407-a9c3-4231-b722-a6b8bbd8af4a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d0e027cd-c123-40e7-9aad-30cdce7cf01d","name":"Delete hardbounces - default","request":{"urlPathTemplate":"/smtp/deleteHardbounces","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d0e027cd-c123-40e7-9aad-30cdce7cf01d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4682dc2f-8d22-401b-bb70-9d7939f0b7f7","name":"Send a transactional email - default","request":{"urlPathTemplate":"/smtp/email","method":"POST"},"response":{"status":201,"body":"{\n \"messageId\": \"<201798300811.5787683@relay.domain.com>\",\n \"messageIds\": [\n \"messageIds\"\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"4682dc2f-8d22-401b-bb70-9d7939f0b7f7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5b6bfccd-a5f9-44e8-ab53-d5429f8f9e49","name":"Delete scheduled emails by batchId or messageId - default","request":{"urlPathTemplate":"/smtp/email/{identifier}","method":"DELETE","pathParameters":{"identifier":{"equalTo":"4320f270-a4e3-4a2e-b591-edfe30a5e627"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"5b6bfccd-a5f9-44e8-ab53-d5429f8f9e49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"7b3f5d29-5b44-4d25-ba1b-9b35d7e1bb44","name":"Fetch scheduled emails by batchId or messageId - default","request":{"urlPathTemplate":"/smtp/emailStatus/{identifier}","method":"GET","pathParameters":{"identifier":{"equalTo":"4320f270-a4e3-4a2e-b591-edfe30a5e627"}},"queryParameters":{"startDate":{"equalTo":"2022-02-02"},"endDate":{"equalTo":"2022-03-02"}}},"response":{"status":200,"body":"{\n \"batches\": [\n {\n \"createdAt\": \"2022-02-26T11:36:43Z\",\n \"scheduledAt\": \"2022-02-28T11:36:43Z\",\n \"status\": \"queued\"\n },\n {\n \"createdAt\": \"2022-02-24T11:36:43Z\",\n \"scheduledAt\": \"2022-02-25T11:36:43Z\",\n \"status\": \"processed\"\n },\n {\n \"createdAt\": \"2022-02-25T11:36:43Z\",\n \"scheduledAt\": \"2022-02-26T11:36:43Z\",\n \"status\": \"inProgress\"\n }\n ],\n \"count\": 3\n}","headers":{"Content-Type":"application/json"}},"uuid":"7b3f5d29-5b44-4d25-ba1b-9b35d7e1bb44","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"59d3278a-2ea0-47c9-9d55-a4046d1b1377","name":"Get the list of transactional emails on the basis of allowed filters - default","request":{"urlPathTemplate":"/smtp/emails","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 120,\n \"transactionalEmails\": [\n {\n \"date\": \"2019-05-25T11:53:26Z\",\n \"email\": \"abc@xyz.com\",\n \"from\": \"diana.doe@example.com\",\n \"messageId\": \"<201798300811.5787683@relay.domain.com>\",\n \"subject\": \"summer camp\",\n \"tags\": [\n \"tag1\"\n ],\n \"templateId\": 15,\n \"uuid\": \"5a78c-209ok98262910-std2341\"\n },\n {\n \"date\": \"2019-05-25T07:28:11Z\",\n \"email\": \"test@test.com\",\n \"from\": \"diana.doe@example.com\",\n \"messageId\": \"<201798300811.5700093@relay.domain.com>\",\n \"subject\": \"details verification\",\n \"tags\": [\n \"tag1\"\n ],\n \"templateId\": 15,\n \"uuid\": \"5a78c-209ok98262910-s99a341\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"59d3278a-2ea0-47c9-9d55-a4046d1b1377","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"242bc913-9644-453e-a76b-b6898985c451","name":"Get the personalized content of a sent transactional email - default","request":{"urlPathTemplate":"/smtp/emails/{uuid}","method":"GET","pathParameters":{"uuid":{"equalTo":"uuid"}}},"response":{"status":200,"body":"{\n \"attachmentCount\": 2,\n \"body\": \"

Greetings from the team

This is the actual html content sent

\",\n \"date\": \"2016-02-25T11:53:26Z\",\n \"email\": \"abc@example.com\",\n \"events\": [\n {\n \"name\": \"sent\",\n \"time\": \"2016-02-25T11:53:26Z\"\n },\n {\n \"name\": \"delivered\",\n \"time\": \"2016-02-25T11:55:26Z\"\n },\n {\n \"name\": \"opened\",\n \"time\": \"2016-02-26T09:53:26Z\"\n }\n ],\n \"subject\": \"Summer Camps\",\n \"templateId\": 12\n}","headers":{"Content-Type":"application/json"}},"uuid":"242bc913-9644-453e-a76b-b6898985c451","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1060a95a-b193-4fcb-a2c0-82a02a746067","name":"Delete an SMTP transactional log - default","request":{"urlPathTemplate":"/smtp/log/{identifier}","method":"DELETE","pathParameters":{"identifier":{"equalTo":"identifier"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"1060a95a-b193-4fcb-a2c0-82a02a746067","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4506e73c-7b47-483f-9ffc-09cb13f3d99a","name":"Get your transactional email activity aggregated over a period of time - default","request":{"urlPathTemplate":"/smtp/statistics/aggregatedReport","method":"GET"},"response":{"status":200,"body":"{\n \"blocked\": 2,\n \"clicks\": 9987,\n \"delivered\": 18996,\n \"hardBounces\": 234,\n \"invalid\": 0,\n \"opens\": 17654,\n \"range\": \"2016-09-08|2017-04-28\",\n \"requests\": 19887,\n \"softBounces\": 1533,\n \"spamReports\": 1,\n \"uniqueClicks\": 8766,\n \"uniqueOpens\": 13688,\n \"unsubscribed\": 2\n}","headers":{"Content-Type":"application/json"}},"uuid":"4506e73c-7b47-483f-9ffc-09cb13f3d99a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"a81e1c33-f793-49d1-adb6-8083ca10de20","name":"Get all your transactional email activity (unaggregated events) - default","request":{"urlPathTemplate":"/smtp/statistics/events","method":"GET"},"response":{"status":200,"body":"{\n \"events\": [\n {\n \"date\": \"2017-03-12T12:30:00Z\",\n \"email\": \"john.smith@example.com\",\n \"event\": \"deferred\",\n \"from\": \"john@example.com\",\n \"ip\": \"165.87.3.15\",\n \"link\": \"https://www.someexamplelink.com\",\n \"messageId\": \"<201798300811.5787683@example.domain.com>\",\n \"reason\": \"Error connection timeout\",\n \"subject\": \"Sib client test\",\n \"tag\": \"OrderConfirmation\",\n \"templateId\": 4\n },\n {\n \"date\": \"2017-03-13T16:30:00Z\",\n \"email\": \"john.smith@example.com\",\n \"event\": \"delivered\",\n \"from\": \"john@example.com\",\n \"ip\": \"165.87.3.15\",\n \"link\": \"https://www.someexamplelink.com\",\n \"messageId\": \"<201798300811.5787683@example.domain.com>\",\n \"reason\": \"Error connection timeout\",\n \"subject\": \"Sib client test\",\n \"tag\": \"OrderConfirmation\",\n \"templateId\": 5\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"a81e1c33-f793-49d1-adb6-8083ca10de20","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"0d36a3c1-9ba5-4da3-9f9a-5d81dcb8cbc6","name":"Get your transactional email activity aggregated per day - default","request":{"urlPathTemplate":"/smtp/statistics/reports","method":"GET"},"response":{"status":200,"body":"{\n \"reports\": [\n {\n \"blocked\": 519,\n \"clicks\": 1026,\n \"date\": \"2017-04-30\",\n \"delivered\": 10103,\n \"hardBounces\": 21,\n \"invalid\": 1,\n \"opens\": 5091,\n \"requests\": 10756,\n \"softBounces\": 137,\n \"spamReports\": 0,\n \"uniqueClicks\": 720,\n \"uniqueOpens\": 2318,\n \"unsubscribed\": 0\n },\n {\n \"blocked\": 920,\n \"clicks\": 1514,\n \"date\": \"2017-05-01\",\n \"delivered\": 17499,\n \"hardBounces\": 34,\n \"invalid\": 2,\n \"opens\": 10089,\n \"requests\": 18812,\n \"softBounces\": 254,\n \"spamReports\": 0,\n \"uniqueClicks\": 1090,\n \"uniqueOpens\": 4393,\n \"unsubscribed\": 3\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"0d36a3c1-9ba5-4da3-9f9a-5d81dcb8cbc6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"81e1ac28-8b42-4ff7-a4f4-ad4a4fe0d149","name":"Generate the rendered preview of transactional template - default","request":{"urlPathTemplate":"/smtp/template/preview","method":"POST"},"response":{"status":200,"body":"{\n \"fromEmail\": \"fromEmail\",\n \"fromName\": \"fromName\",\n \"html\": \"html\",\n \"previewText\": \"previewText\",\n \"subject\": \"subject\",\n \"usedFeedNames\": [\n \"usedFeedNames\",\n \"usedFeedNames\"\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"81e1ac28-8b42-4ff7-a4f4-ad4a4fe0d149","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0e4d0a9a-9763-4d0b-92ab-7b1483ddd81b","name":"Get the list of email templates - default","request":{"urlPathTemplate":"/smtp/templates","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 2,\n \"templates\": [\n {\n \"createdAt\": \"2016-02-24T14:44:24Z\",\n \"doiTemplate\": false,\n \"htmlContent\": \"HTML CONTENT 1\",\n \"id\": 5,\n \"isActive\": false,\n \"modifiedAt\": \"2016-02-24T15:37:11Z\",\n \"name\": \"ChristomasTimeTemplate\",\n \"replyTo\": \"replyto@domain.com\",\n \"sender\": {\n \"email\": \"john.smith@example.com\",\n \"id\": \"id\",\n \"name\": \"John\"\n },\n \"subject\": \"Merry Christmas\",\n \"tag\": \"Festival\",\n \"testSent\": false,\n \"toField\": \"\",\n \"customTemplateId\": \"my-custom-template-001\"\n },\n {\n \"createdAt\": \"2016-02-25T11:53:26Z\",\n \"doiTemplate\": false,\n \"htmlContent\": \"HTML CONTENT 2\",\n \"id\": 12,\n \"isActive\": true,\n \"modifiedAt\": \"2016-02-25T11:53:26Z\",\n \"name\": \"SummerSales2017Template\",\n \"replyTo\": \"replyto@domain.com\",\n \"sender\": {\n \"email\": \"john.smith@example.com\",\n \"id\": \"id\",\n \"name\": \"John\"\n },\n \"subject\": \"Enjoy our summer Sales !\",\n \"tag\": \"Summer\",\n \"testSent\": false,\n \"toField\": \"\",\n \"customTemplateId\": \"my-custom-template-001\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"0e4d0a9a-9763-4d0b-92ab-7b1483ddd81b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"a7314e1c-958e-4335-9dd3-e65802b21168","name":"Create an email template - default","request":{"urlPathTemplate":"/smtp/templates","method":"POST"},"response":{"status":201,"body":"{\n \"id\": 5\n}","headers":{"Content-Type":"application/json"}},"uuid":"a7314e1c-958e-4335-9dd3-e65802b21168","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"845ecf0d-a02f-461d-908b-25fe3eab4ec9","name":"Returns the template information - default","request":{"urlPathTemplate":"/smtp/templates/{templateId}","method":"GET","pathParameters":{"templateId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"createdAt\": \"2016-02-25T11:53:26Z\",\n \"doiTemplate\": false,\n \"htmlContent\": \"HTML CONTENT 4\",\n \"id\": 33,\n \"isActive\": true,\n \"modifiedAt\": \"2016-02-25T11:53:26Z\",\n \"name\": \"OrderConfirmation\",\n \"replyTo\": \"replyto@domain.com\",\n \"sender\": {\n \"email\": \"john.smith@example.com\",\n \"id\": \"id\",\n \"name\": \"John\"\n },\n \"subject\": \"Order Confirmation : Thanks for your Purchase !\",\n \"tag\": \"\",\n \"testSent\": false,\n \"toField\": \"\",\n \"customTemplateId\": \"my-custom-template-001\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"845ecf0d-a02f-461d-908b-25fe3eab4ec9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"65a53a30-7428-4b1a-b0a4-88869d5b8d78","name":"Update an email template - default","request":{"urlPathTemplate":"/smtp/templates/{templateId}","method":"PUT","pathParameters":{"templateId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"65a53a30-7428-4b1a-b0a4-88869d5b8d78","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ee12d2af-6eea-4dd3-b43d-ca1463b36b14","name":"Delete an inactive email template - default","request":{"urlPathTemplate":"/smtp/templates/{templateId}","method":"DELETE","pathParameters":{"templateId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"ee12d2af-6eea-4dd3-b43d-ca1463b36b14","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"10979c60-afa4-4a94-a43e-5fc9613e22da","name":"Send a template to your test list - default","request":{"urlPathTemplate":"/smtp/templates/{templateId}/sendTest","method":"POST","pathParameters":{"templateId":{"equalTo":"1000000"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"10979c60-afa4-4a94-a43e-5fc9613e22da","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"df5bc4e6-ca5e-4cd7-809c-269c0845b24d","name":"Send SMS message asynchronously to a mobile number - default","request":{"urlPathTemplate":"/transactionalSMS/send","method":"POST"},"response":{"status":201,"body":"{\n \"messageId\": 1511882900176220\n}","headers":{"Content-Type":"application/json"}},"uuid":"df5bc4e6-ca5e-4cd7-809c-269c0845b24d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"70d5f369-4f59-482d-a10b-be3e50b4a40a","name":"Send SMS message to a mobile number - default","request":{"urlPathTemplate":"/transactionalSMS/sms","method":"POST"},"response":{"status":201,"body":"{\n \"messageId\": 1511882900176220,\n \"reference\": \"ab1cde2fgh3i4jklmno\",\n \"remainingCredits\": 82.85,\n \"smsCount\": 2,\n \"usedCredits\": 0.7\n}","headers":{"Content-Type":"application/json"}},"uuid":"70d5f369-4f59-482d-a10b-be3e50b4a40a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"31feec95-40fc-4b7e-9c08-86c997f2dfb0","name":"Get your SMS activity aggregated over a period of time - default","request":{"urlPathTemplate":"/transactionalSMS/statistics/aggregatedReport","method":"GET"},"response":{"status":200,"body":"{\n \"accepted\": 6,\n \"blocked\": 4,\n \"delivered\": 16,\n \"hardBounces\": 5,\n \"range\": \"2015-05-22|2017-11-29\",\n \"rejected\": 14,\n \"replied\": 8,\n \"requests\": 54,\n \"skipped\": 1,\n \"softBounces\": 26,\n \"unsubscribed\": 10\n}","headers":{"Content-Type":"application/json"}},"uuid":"31feec95-40fc-4b7e-9c08-86c997f2dfb0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"8bec6502-a4a6-4405-88f8-c7b97f2bc0e4","name":"Get all your SMS activity (unaggregated events) - default","request":{"urlPathTemplate":"/transactionalSMS/statistics/events","method":"GET"},"response":{"status":200,"body":"{\n \"events\": [\n {\n \"date\": \"2015-05-20T12:30:00Z\",\n \"event\": \"sent\",\n \"messageId\": \"1473139351170140\",\n \"phoneNumber\": \"phoneNumber\",\n \"reason\": \"Recipient is currently unreachable\",\n \"reply\": \"reply\",\n \"tag\": \"cabWaiting\"\n },\n {\n \"date\": \"2015-05-20T16:30:00Z\",\n \"event\": \"delivered\",\n \"messageId\": \"1473139351170140\",\n \"phoneNumber\": \"phoneNumber\",\n \"reason\": \"Recipient is currently unreachable\",\n \"reply\": \"reply\",\n \"tag\": \"cabRequest\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"8bec6502-a4a6-4405-88f8-c7b97f2bc0e4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"34ebfec8-ca13-4071-9f58-e116c00c6446","name":"Get your SMS activity aggregated per day - default","request":{"urlPathTemplate":"/transactionalSMS/statistics/reports","method":"GET"},"response":{"status":200,"body":"{\n \"reports\": [\n {\n \"accepted\": 2318,\n \"blocked\": 1026,\n \"date\": \"2017-04-30\",\n \"delivered\": 10103,\n \"hardBounces\": 21,\n \"rejected\": 0,\n \"replied\": 5091,\n \"requests\": 10756,\n \"skipped\": 1,\n \"softBounces\": 137,\n \"unsubscribed\": 720\n },\n {\n \"accepted\": 4393,\n \"blocked\": 1514,\n \"date\": \"2017-05-01\",\n \"delivered\": 17499,\n \"hardBounces\": 34,\n \"rejected\": 0,\n \"replied\": 10089,\n \"requests\": 18812,\n \"skipped\": 0,\n \"softBounces\": 254,\n \"unsubscribed\": 1090\n },\n {\n \"accepted\": 4689,\n \"blocked\": 1646,\n \"date\": \"2017-05-02\",\n \"delivered\": 13427,\n \"hardBounces\": 16,\n \"rejected\": 0,\n \"replied\": 11563,\n \"requests\": 14321,\n \"skipped\": 1,\n \"softBounces\": 176,\n \"unsubscribed\": 1170\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"34ebfec8-ca13-4071-9f58-e116c00c6446","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"b2c77971-5a16-41bb-99c4-62a5707d47bb","name":"Return all your created SMS templates - default","request":{"urlPathTemplate":"/transactionalSMS/templates","method":"GET"},"response":{"status":200,"body":"{\n \"count\": 1,\n \"templates\": [\n {\n \"id\": 4,\n \"name\": \"Order Confirmation - EN\",\n \"short_url_enabled\": false,\n \"message\": \"Thanks for your order !\",\n \"compliance\": {\n \"compliance_toggle\": true,\n \"organisation_prefix\": \"BREVO\",\n \"stop_keyword\": \"STOP\"\n },\n \"encryption\": true,\n \"unicode_sms\": true,\n \"media_file\": \"brv-logo.png\",\n \"media_file_size\": \"media_file_size\",\n \"media_url\": \"https://img-st2.mailinblue.com/1232/images/content_library/original/69282fe28f55fd22de6e0cf9.png\",\n \"createdAt\": \"2025-05-01T12:30:00Z\",\n \"updatedAt\": \"2025-05-01T12:30:00Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"b2c77971-5a16-41bb-99c4-62a5707d47bb","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]}],"meta":{"total":284}} \ No newline at end of file