### Event Info Response Example Source: https://developers.hotmart.com/docs/pt-BR/v1/tickets/get-info-tickets This is an example of a successful JSON response when retrieving event information. It includes product details, start and end dates, and a list of ticket lots. ```json { "product": { "name": "Product Name", "id": 4744896 }, "start_event_date": 1656007620000, "end_event_date": 1677607680000, "lots": [ { "id": 234900, "name": "Lote 1 - Teste" }, { "id": 234901, "name": "Lote gratuito - Teste" } ] } ``` -------------------------------- ### Product Plan Response Example Source: https://developers.hotmart.com/docs/pt-BR/v1/product/product-plans This JSON structure represents a successful response (200 OK) from the product plans API. It includes an array of plan items, each detailing pricing, payment mode, subscription recovery and plan switching enablement, description, periodicity, name, maximum installments, and a unique code. It also includes pagination information. ```json { "items": [ { "price": { "currency_code": "BRL", "value": 10 }, "payment_mode": "ASSINATURA", "is_subscription_recovery_enabled": false, "is_switch_plan_enabled": true, "description": "Plano básico mensal", "periodicity": "MONTHLY", "name": "Básico Mensal", "max_installments": 1, "code": "tz12qeev" }, { "price": { "currency_code": "BRL", "value": 20 }, "payment_mode": "ASSINATURA", "is_subscription_recovery_enabled": false, "is_switch_plan_enabled": true, "description": "Plano padrão bimestral", "periodicity": "BIMONTHLY", "name": "Padrão Bimestral", "max_installments": 1, "code": "15nesfeb" }, { "price": { "currency_code": "BRL", "value": 30 }, "payment_mode": "ASSINATURA", "is_subscription_recovery_enabled": false, "is_switch_plan_enabled": true, "description": "Plano premium trimestral", "periodicity": "QUARTERLY", "name": "Premium Trimestral", "max_installments": 1, "code": "smodok6s" }, { "price": { "currency_code": "BRL", "value": 350 }, "payment_mode": "ASSINATURA", "is_subscription_recovery_enabled": false, "is_switch_plan_enabled": false, "description": "Plano avançado semestral", "periodicity": "BIANNUAL", "name": "Avançado Semestral", "max_installments": 3, "code": "x1n6kb1y" }, { "price": { "currency_code": "BRL", "value": 600 }, "payment_mode": "ASSINATURA", "is_subscription_recovery_enabled": false, "is_switch_plan_enabled": false, "description": "Plano completo anual", "periodicity": "ANNUAL", "name": "Completo Anual", "max_installments": 1, "code": "vgpycfyl" }, { "price": { "currency_code": "BRL", "value": 200 }, "payment_mode": "ASSINATURA", "is_subscription_recovery_enabled": false, "is_switch_plan_enabled": false, "description": "Plano teste mensal com trial", "periodicity": "MONTHLY", "name": "Plano com Trial", "max_installments": 1, "trial_period": 7, "code": "pr6yifbw" }, { "price": { "currency_code": "EUR", "value": 45.99 }, "payment_mode": "ASSINATURA", "is_subscription_recovery_enabled": false, "is_switch_plan_enabled": false, "description": "Plano internacional anual", "periodicity": "ANNUAL", "name": "Internacional EUR", "max_installments": 4, "trial_period": 14, "code": "6xrozvay" } ], "page_info": { "results_per_page": 7 } } ``` -------------------------------- ### Get Subscribers with Multiple Statuses (cURL) Source: https://developers.hotmart.com/docs/pt-BR/v1/subscription/get-subscribers This example demonstrates how to retrieve subscribers by specifying multiple status values in the query parameters. Ensure you replace ':access_token' with your valid API access token. ```bash curl --location --request GET 'https://developers.hotmart.com/payments/api/v1/subscriptions?status=CANCELLED_BY_SELLER&status=ACTIVE' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer :access_token' ``` -------------------------------- ### GET Request Example Source: https://developers.hotmart.com/docs/pt-BR/start/pagination Use this cURL command to fetch paginated data from an API endpoint. Replace `:page_token` and `:access_token` with actual values. The `page_token` is used to specify which page of results to retrieve. ```curl curl --location --request GET 'https://developers.hotmart.com/payments/api/v1/subscriptions?page_token=:page_token' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer :access_token' ``` -------------------------------- ### Get Subscription Summary with cURL Source: https://developers.hotmart.com/docs/pt-BR/v1/subscription/get-subscription-summary This example demonstrates how to retrieve a summary of subscriptions using cURL, including parameters for accession date, end accession date, and maximum results. Ensure you replace ':access_token' with your actual access token. ```curl curl --location --request GET 'https://developers.hotmart.com/payments/api/v1/subscriptions/summary?accession_date=1682910000000&end_accession_date=1696374925000&max_results=500' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer :access_token' ``` -------------------------------- ### Get Sales History with cURL Source: https://developers.hotmart.com/docs/pt-BR/v1/sales/sales-history This example demonstrates how to fetch sales history using cURL, filtering by 'APPROVED' transaction status. Ensure you replace ':access_token' with your actual API access token. ```bash curl --location --request GET 'https://developers.hotmart.com/payments/api/v1/sales/history?transaction_status=APPROVED' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer :access_token' ``` -------------------------------- ### Example Purchase Webhook Request Source: https://developers.hotmart.com/docs/pt-BR/2.0.0/webhook/purchase-webhook This is an example of a purchase webhook request payload. It contains details about the transaction and the buyer. ```json { "transaction": { "id": "txn_12345", "status": "completed", "amount": 1000, "currency": "USD", "created_at": "2023-10-27T10:00:00Z" }, "buyer": { "id": "buyer_abcde", "email": "buyer@example.com" }, "product": { "id": "prod_xyz", "name": "Awesome Product" } } ``` -------------------------------- ### Get Products List (cURL) Source: https://developers.hotmart.com/docs/pt-BR/v1/product/product-list Use this cURL command to make a GET request to the products endpoint. Ensure you replace ':access_token' with your valid Hotmart API access token. This is useful for integrating product data into external systems. ```bash curl --location --request GET 'https://developers.hotmart.com/products/api/v1/products' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer :access_token' ``` -------------------------------- ### Cancel Subscription with Custom Response Source: https://developers.hotmart.com/docs/pt-BR/start/custom-response This example demonstrates how to cancel a subscription and specify which fields to include in the response using the 'select' query parameter. ```APIDOC ## POST /payments/api/v1/subscriptions/:subscriber_code/cancel ### Description Cancels a subscription and allows customization of the response fields. ### Method POST ### Endpoint `https://developers.hotmart.com/payments/api/v1/subscriptions/:subscriber_code/cancel?select=subscriber_code,date_last_recurrence,status` ### Parameters #### Query Parameters - **select** (string) - Required - A comma-separated list of attributes to include in the response. Supports nested attributes using dot notation (e.g., `address.country`) and array elements (e.g., `products.name`). #### Path Parameters - **subscriber_code** (string) - Required - The unique code of the subscriber. #### Request Body - **Authorization** (string) - Required - Bearer token for authentication. - **Content-Type** (string) - Required - Set to `application/json`. ### Request Example ```curl curl --location --request POST 'https://developers.hotmart.com/payments/api/v1/subscriptions/:subscriber_code/cancel?select=subscriber_code,date_last_recurrence,status' \ --header 'Content-Type: application / json' \ --header 'Authorization: Bearer: access_token' ``` ### Response #### Success Response (200) Returns a JSON object containing only the fields specified in the 'select' query parameter. If no fields are found, an empty JSON object is returned. Example response structure (fields depend on the 'select' parameter): ```json { "subscriber_code": "some_code", "date_last_recurrence": "2023-10-27T10:00:00Z", "status": "CANCELLED" } ``` ``` -------------------------------- ### Sales Summary Response Source: https://developers.hotmart.com/docs/pt-BR/v1/sales/sales-summary This is an example of a successful response from the Sales Summary API, showing the total number of items and their total value, broken down by currency. ```json { "items": [ { "total_items": 2, "total_value": { "value": 3.7, "currency_code": "USD" } } ], "page_info": { "total_results": 1, "results_per_page": 1 } } ``` -------------------------------- ### Buyer Object with Email Field Source: https://developers.hotmart.com/docs/pt-BR/changelog Example of the buyer object structure within the Sales History endpoint, now including the buyer's email address. ```json { "buyer": { "name": "Ian Victor Baptista", "ucode": "839F1A4F-43DC-F60F-13FE-6C8BD23F6781", "email": "ian@teste.com" } } ``` -------------------------------- ### Get Subscribers Response Example Source: https://developers.hotmart.com/docs/pt-BR/v1/subscription/get-subscribers This JSON object represents a successful response from the Get Subscribers API, detailing subscriber information and pagination data. ```json { "items": [ { "subscriber_code": "ABC12DEF", "subscription_id": 123456, "status": "ACTIVE", "accession_date": 1577847600, "end_accession_date": 1641005999, "request_date": 1577847600, "date_next_charge": 1580558059, "trial": false, "transaction": "HP16616613605324", "plan": { "name": "Plan name", "id": 726420, "recurrency_period": 30, "max_charge_cycles": 6 }, "product": { "id": 123456, "name": "Product Name", "ucode": "12a34bcd-56e7-4847-fg89-h1i23j4567l8" }, "price": { "value": 123.45, "currency_code": "BRL" }, "subscriber": { "name": "Subscriber name", "email": "subscriber@email.com.br", "ucode": "10a98bcd-76e5-4321-fg09-h8i76j5432l1" } } ], "page_info": { "total_results": 30, "next_page_token": "05b60506b659c1c6e728db93eada6271e3adcfb4edf507b679874458e31577b3", "prev_page_token": "cf1fg8bd082e2864069035c057eca0bac7eb5d604719c5a76e80f0933f49c217", "results_per_page": 10 } } ``` -------------------------------- ### Get Product Offers using cURL Source: https://developers.hotmart.com/docs/pt-BR/v1/product/product-offers Use this cURL command to make a request to the product offers endpoint. Ensure you replace ':ucode' with the product's unique identifier and ':access_token' with your valid access token. ```bash curl --location 'https://developers.hotmart.com/products/api/v1/products/:ucode/offers' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer :access_token' ``` -------------------------------- ### Get Product Plans using cURL Source: https://developers.hotmart.com/docs/pt-BR/v1/product/product-plans Use this cURL command to retrieve detailed information about subscription plans for a specific product. Ensure you replace ':ucode' with the product's unique identifier and ':access_token' with your valid API access token. ```bash curl --location --request GET 'https://developers.hotmart.com/products/api/v1/products/:ucode/plans' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer :access_token' ``` -------------------------------- ### Create Coupon Source: https://developers.hotmart.com/docs/pt-BR/v1/coupon/coupon-post-coupon This endpoint allows you to dynamically create coupons for your sales strategy. You need to specify the product, the coupon code, and the discount percentage. Optional fields include start and end dates, applicable offer codes, and affiliate exclusivity. ```APIDOC ## POST /products/api/v1/product/:product_id/coupon ### Description Allows dynamic creation of coupons for sales strategies. ### Method POST ### Endpoint /products/api/v1/product/:product_id/coupon ### Parameters #### Path Parameters - **product_id** (long) - Required - Unique identifier (ID) of the product being sold (7-digit number). #### Request Body - **code** (string) - Required - Coupon code (max length = 25). - **discount** (double) - Required - Must be greater than 0 and less than 0.99 (0 < discount < 0.99). - **start_date** (long) - Optional - Activation date for the coupon in milliseconds since the Unix epoch. - **end_date** (long) - Optional - Deactivation date for the coupon in milliseconds since the Unix epoch. - **affiliate** (long) - Optional - Specific affiliate ID for coupon sharing. - **offer_ids** (array containing longs) - Optional - Offer codes to which the coupon applies. ### Request Example ```json { "code": "SUMMER20", "discount": 0.20, "start_date": 1678886400000, "end_date": 1681564800000, "affiliate": 12345, "offer_ids": [67890] } ``` ### Response #### Success Response (200) An empty JSON object indicates success. ```json { } ``` ``` -------------------------------- ### Product Listing Response Example Source: https://developers.hotmart.com/docs/pt-BR/v1/product/product-list This JSON structure represents a successful response from the product listing endpoint. It includes an array of product items, each with detailed information, and pagination data for navigating through results. ```json { "items": [ { "id": 698441, "name": "Product A", "ucode": "f2b3be1f-313f-4a2d-b5b7-1c39d67dd3ee", "status": "DRAFT", "created_at": 1586459699000, "format": "EBOOK", "is_subscription": false, "warranty_period": 7 }, { "id": 1117869, "name": "Product B", "ucode": "26a97448-2ac2-458d-9e03-bcc01e82bdd8", "status": "DRAFT", "created_at": 1603816477000, "format": "ONLINE_COURSE", "is_subscription": true, "warranty_period": 15 }, { "id": 486869, "name": "Product C", "ucode": "6505e7ed-ff32-4d1a-8baa-62958d5c790a", "status": "CHANGES_PENDING_ON_PRODUCT", "created_at": 1569933453000, "format": "ETICKET", "is_subscription": false, "warranty_period": 7 }, { "id": 4319408, "name": "Product D", "ucode": "e211d636-dd19-4411-9397-ab3428e966a2", "status": "DRAFT", "created_at": 1721077570000, "format": "BUNDLE", "is_subscription": true, "warranty_period": 7 } ], "page_info": { "next_page_token": "eyJyb3dzIjo1LCJwYWdlIjozfQ==", "prev_page_token": "eyJyb3dzIjo1LCJwYWdlIjoxfQ==", "results_per_page": 4 } } ``` -------------------------------- ### Get Subscription Summary Source: https://developers.hotmart.com/docs/pt-BR/v1/subscription/get-subscription-summary Retrieves a summary of subscriptions, smart installments, and smart recovery. This endpoint allows filtering by product ID, subscriber code, accession date, end accession date, and next charge date. It also supports pagination with `max_results` and `page_token`. ```APIDOC ## GET /payments/api/v1/subscriptions/summary ### Description Provides a summary of all recurring billing types available on Hotmart, including Subscriptions, Smart Installments, and Smart Recovery. This endpoint is useful for understanding the status of recurring payments and for implementing customer retention strategies. ### Method GET ### Endpoint /payments/api/v1/subscriptions/summary ### Parameters #### Query Parameters - **max_results** (integer) - Optional - The maximum number of items per page that can be returned. - **page_token** (string) - Optional - The cursor used for pagination. It is a reference to the part of the list you want to access. - **product_id** (integer) - Optional - The ID (a 7-digit number) of your subscription product. - **subscriber_code** (integer) - Optional - Alphanumeric code that identifies a Subscriber-Subscription. The same buyer can have multiple subscriber codes. - **accession_date** (integer) - Optional - The start date of the subscription. If no value is provided, the current date minus 30 days will be considered. The date must be in milliseconds, counting from 1970-01-01 00:00:00 UTC. - **end_accession_date** (integer) - Optional - The date the subscriber requested to cancel the subscription. The date must be in milliseconds, counting from 1970-01-01 00:00:00 UTC. - **date_next_charge** (date) - Optional - The date of the next payment attempt. In the case of canceled subscriptions, it will indicate the subscriber's last access date to the product, and therefore no charge will be made after this period. This data will be returned in milliseconds, counting from 1970-01-01 00:00:00 UTC. Here the filter will be applied for subscriptions with the next payment attempt date from this date. If no value is provided, the current date will be considered. The date must be in milliseconds, counting from 1970-01-01 00:00:00 UTC. ### Request Example ```curl curl --location --request GET 'https://developers.hotmart.com/payments/api/v1/subscriptions/summary?accession_date=1682910000000&end_accession_date=1696374925000&max_results=500' --header 'Content-Type: application/json' --header 'Authorization: Bearer :access_token' ``` ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Get Products Source: https://developers.hotmart.com/docs/pt-BR/v1/product/product-list Retrieves a paginated list of products with various filtering and sorting options. Includes product ID, name, status, creation date, format, subscription status, and warranty period. ```APIDOC ## GET /products/api/v1/products ### Description Retrieves a list of products associated with the creator. This endpoint provides essential information for managing and analyzing product catalogs. ### Method GET ### Endpoint https://developers.hotmart.com/products/api/v1/products ### Parameters #### Query Parameters - **max_results** (integer) - Optional - The maximum number of items to return per page. Defaults to 50. - **page_token** (string) - Optional - The cursor for pagination. Used to navigate through different pages of results. - **id** (long) - Optional - Unique identifier (7-digit number) of the product. - **status** (string) - Optional - The status of the product. Possible values: `DRAFT`, `ACTIVE`, `PAUSED`, `NOT_APPROVED`, `IN_REVIEW`, `DELETED`, `CHANGES_PENDING_ON_PRODUCT`. - **format** (string) - Optional - The format of the product. Possible values: `EBOOK`, `SOFTWARE`, `MOBILE_APPS`, `VIDEOS`, `AUDIOS`, `TEMPLATES`, `IMAGES`, `ONLINE_COURSE`, `SERIAL_CODES`, `ETICKET`, `ONLINE_SERVICE`, `ONLINE_EVENT`, `BUNDLE`, `COMMUNITY`, `AGENT`. ### Request Example ```bash curl --location --request GET 'https://developers.hotmart.com/products/api/v1/products' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer :access_token' ``` ### Response #### Success Response (200) - **items** (array) - An array of product objects. - **id** (integer) - The unique identifier of the product. - **name** (string) - The name of the product. - **ucode** (string) - A unique code for the product. - **status** (string) - The current status of the product. - **created_at** (integer) - The timestamp when the product was created. - **format** (string) - The format of the product. - **is_subscription** (boolean) - Indicates if the product is a subscription. - **warranty_period** (integer) - The duration of the warranty period in days. - **page_info** (object) - Pagination information. - **next_page_token** (string) - Token for the next page of results. - **prev_page_token** (string) - Token for the previous page of results. - **results_per_page** (integer) - The number of results displayed per page. #### Response Example ```json { "items": [ { "id": 698441, "name": "Product A", "ucode": "f2b3be1f-313f-4a2d-b5b7-1c39d67dd3ee", "status": "DRAFT", "created_at": 1586459699000, "format": "EBOOK", "is_subscription": false, "warranty_period": 7 }, { "id": 1117869, "name": "Product B", "ucode": "26a97448-2ac2-458d-9e03-bcc01e82bdd8", "status": "DRAFT", "created_at": 1603816477000, "format": "ONLINE_COURSE", "is_subscription": true, "warranty_period": 15 } ], "page_info": { "next_page_token": "eyJyb3dzIjo1LCJwYWdlIjozfQ==", "prev_page_token": "eyJyb3dzIjo1LCJwYWdlIjoxfQ==", "results_per_page": 4 } } ``` ``` -------------------------------- ### Get Sales Summary with cURL Source: https://developers.hotmart.com/docs/pt-BR/v1/sales/sales-summary Use this cURL command to fetch the sales summary. Replace `:access_token` with your actual access token and `1234567` with the desired product ID. ```bash curl --location --request GET 'https://developers.hotmart.com/payments/api/v1/sales/summary?product_id=1234567' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer :access_token' ``` -------------------------------- ### CloudFront 403 Error Example Source: https://developers.hotmart.com/docs/pt-BR/2.0.0/webhook/update-subscription-charge-date This is an example of a 403 error message generated by CloudFront. The Request ID is crucial for identifying specific requests when troubleshooting. ```text Generated by cloudfront (CloudFront) Request ID: haGANnUAoMw-dvImNSjYG1tF-8wVlCjdvet6CmQgU15Vo4Mt1Vznjg== ``` -------------------------------- ### Get All Users in a Club Source: https://developers.hotmart.com/docs/pt-BR/v1/club/get-users-club This endpoint retrieves all users within a specified Member Area. You can optionally filter by email to get a specific user's details. ```APIDOC ## GET /club/api/v1/users ### Description Retrieves a list of users from a Member Area. Supports filtering by email for specific user retrieval. ### Method GET ### Endpoint /club/api/v1/users ### Parameters #### Query Parameters - **subdomain** (string) - Required - The subdomain of the Member Area to retrieve users from. - **email** (string) - Optional - The email address of a specific user to retrieve. Can be a full email or a partial match. ### Request Example ```curl curl --location --request GET 'https://developers.hotmart.com/club/api/v1/users?subdomain=my-subdomain&email=user.one@hotmart.com' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer :access_token' ``` ### Response #### Success Response (200) - **items** (array) - A list of user objects. - **user_id** (string) - The unique identifier for the user. - **engagement** (string) - User engagement level (e.g., NONE, LOW, MEDIUM). - **name** (string) - The name of the user. - **email** (string) - The email address of the user. - **last_access_date** (integer) - Timestamp of the user's last access. - **role** (string) - The user's role within the Member Area (e.g., STUDENT, FREE_STUDENT, OWNER). - **first_access_date** (integer) - Timestamp of the user's first access. - **locale** (string) - The user's locale. - **plus_access** (string) - The user's Plus Access status (e.g., WITHOUT_PLUS_ACCESS, HOLDER). - **progress** (object) - User's progress information. - **completed_percentage** (integer) - Percentage of content completed. - **total** (integer) - Total number of content items. - **completed** (integer) - Number of content items completed. - **status** (string) - The user's status (e.g., ACTIVE, BLOCKED, OVERDUE). - **purchase_date** (integer) - Timestamp of the user's purchase (if applicable). - **access_count** (integer) - Number of times the user has accessed the Member Area. - **is_deletable** (boolean) - Indicates if the user can be deleted. - **class_id** (string) - Identifier for the user's class or course. - **type** (string) - The type of user (e.g., BUYER, IMPORTED, FREE). - **page_info** (object) - Pagination information. - **total_results** (integer) - Total number of results available. - **next_page_token** (string) - Token for fetching the next page of results. - **prev_page_token** (string) - Token for fetching the previous page of results. - **results_per_page** (integer) - Number of results per page. #### Response Example ```json { "items": [ { "user_id": "n2OM623n46", "engagement": "NONE", "name": "Hotmart Example User One", "email": "user.one@hotmart.com", "last_access_date": 1546728645, "role": "FREE_STUDENT", "first_access_date": 1607054711, "locale": "pt_BR", "plus_access": "WITHOUT_PLUS_ACCESS", "progress": { "completed_percentage": 45, "total": 11, "completed": 5 }, "status": "ACTIVE", "access_count": 1, "is_deletable": true, "class_id": "qV7y1Jm7Jn", "type": "FREE" } ], "page_info": { "total_results": 111, "next_page_token": "eyJwYWdlIjoyLCJyb3dzIjoxMH0=", "prev_page_token": "eyJwYWdlIjoyLCJyb3dzIjoxMH0=", "results_per_page": 3 } } ``` ``` -------------------------------- ### Exemplo de Resposta de Compras de Assinantes Source: https://developers.hotmart.com/docs/pt-BR/v1/subscription/get-subscription-purchases Esta é uma resposta de exemplo para a requisição de compras de assinantes, mostrando os detalhes de uma transação aprovada. ```json [ { "transaction": "HP12315823516751", "approved_date": 1583331578000, "payment_engine": "HotPay", "status": "APPROVED", "price": { "value": 108.0, "currency_code": "BRL" }, "payment_type": "CREDIT_CARD", "payment_method": "VISA_CREDIT_CARD", "recurrency_number": 1, "under_warranty": false, "purchase_subscription": true } ] ``` -------------------------------- ### Subscriptions Endpoint: Plan ID in Get Subscriptions Source: https://developers.hotmart.com/docs/pt-BR/changelog The unique plan identifier is now included in the 'items.plan.id' field for the Get Subscriptions endpoint. It is recommended to use 'plan_id' for searching subscriptions by plan. ```json { "plan": { "name": "Plan Name", "id": 334546, "recurrency_period": 30, "max_charge_cycles": 6 } } ``` -------------------------------- ### Product Offers API Success Response Source: https://developers.hotmart.com/docs/pt-BR/v1/product/product-offers This is an example of a successful response (200 OK) from the product offers endpoint. It includes an array of offer items and pagination information. ```json { "items": [ { "is_currency_conversion_enabled": true, "is_main_offer": true, "is_smart_recovery_enabled": false, "price": { "value": 10, "currency_code": "BRL" }, "code": "02mhofjd", "description": "", "name": "", "payment_mode": "PAY_IN_FULL" } ], "page_info": { "next_page_token": "eyJwYWdlIjoyLCJzaXplIjoxOH0=", "prev_page_token": null, "results_per_page": 1 } } ``` -------------------------------- ### Get Subscriber Purchases API Call (cURL) Source: https://developers.hotmart.com/docs/pt-BR/tutorials/canceled-subscriptions Use this cURL command to call the 'Get Subscriber Purchases' endpoint. Pass the subscriber_code in the path to retrieve transaction details like payment_type and payment_method. This call also returns the transaction ID needed for the next step. ```bash curl --location --request GET 'https://developers.hotmart.com/payments/api/v1/subscriptions/:subscriber_code/purchases' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer :access_token' ``` -------------------------------- ### Get Students Source: https://developers.hotmart.com/docs/pt-BR/tutorials/club-engagement Retrieves all students from a Member Area. Requires the 'subdomain' of the course. ```APIDOC ## GET /club/api/v1/users ### Description Retrieves a list of all students enrolled in a specific Hotmart Club Member Area. ### Method GET ### Endpoint /club/api/v1/users ### Parameters #### Query Parameters - **subdomain** (string) - Required - The subdomain of the Member Area to retrieve students from. ### Request Example ```bash curl --location --request GET 'https://developers.hotmart.com/club/api/v1/users?subdomain=my-subdomain' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer :access_token' ``` ### Response #### Success Response (200) - **last_access_date** (string) - The date of the student's last access to the member area. - **first_access_date** (string) - The date of the student's first access to the member area. - **locale** (string) - The language used by the user during purchase or import. - **progress** (object) - Student's progress data in the course. - **total_completed** (number) - The percentage of the course completed by the student. - **total_pages** (number) - The total number of pages in the course. - **total_pages_completed** (number) - The total number of pages the student has completed. - **engagement** (number) - The student's engagement index in the course. - **status** (string) - The current status of the student. - **access_count** (number) - The number of times the student has accessed the Member Area. - **purchase_date** (string) - The date the purchase was made. #### Response Example { "last_access_date": "2023-10-27T10:00:00Z", "first_access_date": "2023-01-15T09:00:00Z", "locale": "pt-BR", "progress": { "total_completed": 75.5, "total_pages": 100, "total_pages_completed": 75 }, "engagement": 0.85, "status": "active", "access_count": 50, "purchase_date": "2023-01-10T14:30:00Z" } ``` -------------------------------- ### Resposta de Sucesso (200 OK) Source: https://developers.hotmart.com/docs/pt-BR/v1/coupon/coupon-get-coupon Exemplo da estrutura JSON retornada quando a requisição para obter informações de um cupom é bem-sucedida. Inclui detalhes de paginação e a lista de cupons encontrados. ```json { "page_info": { "next_page_token": "05b60506b659c1c6e728db93eada6271e3adcfb4edf507b679874458e31577b3", "prev_page_token": "cf1fg8bd082e2864069035c057eca0bac7eb5d604719c5a76e80f0933f49c217" "results_per_page": 20 }, "items": [ { "coupon_code": "couponCode", "active": true, "start_date": 16806975000, "discount": 0.1, "time_zone": { "offset": "-03:00", "description": "Fuso horário de Brasília", "id": "America/Sao_Paulo", "name": "AMERICA_SAO_PAULO" }, "status": "valid", "id": 123456 } ] } ``` -------------------------------- ### Get Event Information Source: https://developers.hotmart.com/docs/pt-BR/v1/tickets/get-info-tickets This endpoint retrieves information for a specific event using its ID. ```APIDOC ## GET /events/api/v1/:event_id/info ### Description Retrieves information about a specific event and its respective attributes. ### Method GET ### Endpoint /events/api/v1/:event_id/info ### Parameters #### Path Parameters - **event_id** (long) - Required - ID of the product (product in the format Event Ticket). ### Request Example ```curl curl --location 'https://developers.hotmart.com/events/api/v1/:event_id/info' \ --header 'Authorization: Bearer :access_token' ``` ### Response #### Success Response (200) - **product** (object) - Information about the product. - **name** (string) - The name of the product. - **id** (long) - The ID of the product. - **start_event_date** (long) - The start date of the event. - **end_event_date** (long) - The end date of the event. - **lots** (array of objects) - Ticket lots available for the event. - **id** (long) - The ID of the lot. - **name** (string) - The name of the lot. #### Response Example ```json { "product": { "name": "Product Name", "id": 4744896 }, "start_event_date": 1656007620000, "end_event_date": 1677607680000, "lots": [ { "id": 234900, "name": "Lote 1 - Teste" }, { "id": 234901, "name": "Lote gratuito - Teste" } ] } ``` ```