### Get Products Source: https://developer.samcart.com/ Retrieve a list of all products available in SamCart. ```APIDOC ## getProducts Retrieve all products ### Method GET ### Endpoint /v1/products ### Responses #### Success Response (200) Successful operation. Response will return an array of products. ``` -------------------------------- ### Get Product by ID Source: https://developer.samcart.com/ Retrieves a specific product by its SamCart ID. ```APIDOC ## GET /products/{id} ### Description Retrieves a specific product by its SamCart ID. ### Method GET ### Endpoint https://api.samcart.com/v1/products/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The SamCart ID for the product. #### Query Parameters - **created_at_min** (string ) - Optional - Filter by created at date/time at or after given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 00:00:00 UTC. - **created_at_max** (string ) - Optional - Filter by created at date/time at or before given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 23:59:59 UTC. - **status** (string) - Optional - Enum: "live" "test" "archived" Filter product by status. - **product_category** (string) - Optional - Enum: "physical" "digital" Filter product by category. - **pricing_type** (string) - Optional - Enum: "one_time" "limited_subscription" "recurring_subscription" "pwyw_one_time" "pwyw_recurring_subscription" "pwyw_limited_subscription" Filter product by pricing type. ### Responses #### Success Response (200) Successful operation. #### Error Response (404) Product could not be found. ``` -------------------------------- ### Get Charges Response Sample Source: https://developer.samcart.com/ This is a sample JSON response for retrieving a list of charges. It includes charge details and pagination information. ```json { "data": [ { "id": 1337, "customer_id": 1234, "affiliate_id": 1001, "order_id": 1001, "subscription_rebill_id": 1001, "test_mode": true, "processor_name": "Stripe", "processor_transaction_id": "01234ABCD", "currency": "USD", "card_used": "4242", "charge_refund_status": "partially_refunded", "order_date": "2021-03-08 00:18:35", "created_at": "2021-03-08 00:18:35", "total": 10025 } ], "pagination": { "next": "https://example.samcart.com/v1/example?offset=1337&dir=next", "prev": null } } ``` -------------------------------- ### Get Customers Source: https://developer.samcart.com/ Retrieve a list of all customers, with options for filtering and pagination. ```APIDOC ## GET /customers ### Description Retrieve a list of all customers, with options for filtering and pagination. ### Method GET ### Endpoint https://api.samcart.com/v1/customers ### Parameters #### Query Parameters - **email** (string) - Optional - Filter customers by email address (case-insensitive, exact match). Accepts a single email or multiple comma-separated emails (maximum 25). - **created_at_min** (string ) - Optional - Filter by created at date/time at or after given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 00:00:00 UTC. - **created_at_max** (string ) - Optional - Filter by created at date/time at or before given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 23:59:59 UTC. - **offset** (integer) - Optional - The offset value used to paginate through a list of entries. If the dir query parameter is prev then the offset will be the id of the first record of the data set otherwise the offset will be the id of the last record. - **limit** (integer) - Optional - An optional limit for the number of entries on a page with a maximum value of 100. Default value is 100 if not provided. - **dir** (string) - Optional - Enum: "next" "prev" - The direction to paginate the next set of data. If dir is prev the page will return a data set before the offset otherwise the data set will be after the offset. Default value is next if not provided. ### Response #### Success Response (200) Successful operation. Response will return an array of 0 or more customers. ### Response Example ```json { "data": [ { "id": 1337, "first_name": "John", "last_name": "Doe", "email": "jdoe@gmail.com", "phone": "5555555555", "customer_tags": [ { "name": "new" } ], "lifetime_value": 95025, "updated_at": "2020-03-04 00:18:35", "created_at": "2020-03-04 00:18:35", "addresses": [ { "type": "shipping", "street": "221B Baker Street", "postal_code": "1234", "city": "Austin", "state": "TX", "region": "Quebec", "country": "United States" } ] } ], "pagination": { "next": "https://example.samcart.com/v1/example?offset=1337&dir=next", "prev": null } } ``` ``` -------------------------------- ### getRefund Source: https://developer.samcart.com/ Get a single refund. ```APIDOC ## getRefund ### Description Get a single refund. ### Method GET ### Endpoint /v1/refunds/{id} ### Parameters #### Path Parameters - **refund_id** (integer) - Required - The SamCart ID for the refund ### Responses #### Success Response (200) Successful operation #### Error Response (404) Refund could not be found ``` -------------------------------- ### getAllRefunds Source: https://developer.samcart.com/ Get a paginated list of refunds for the marketplace. Custom sorting is not allowed, and results are sorted by Refund ID. ```APIDOC ## getAllRefunds ### Description Get a paginated list of refunds for the marketplace. Custom sorting is not allowed, and results are sorted by Refund ID. ### Method GET ### Endpoint /v1/refunds ### Parameters #### Query Parameters - **offset** (integer) - Optional - The offset value used to paginate through a list of entries. If the dir query parameter is prev then the offset will be the id of the first record of the data set otherwise the offset will be the id of the last record - **limit** (integer) - Optional - An optional limit for the number of entries on a page with a maximum value of 100. Default value is 100 if not provided. - **dir** (string) - Optional - Enum: "next" "prev" The direction to paginate the next set of data. If dir is prev the page will return a data set before the offset otherwise the data set will be after the offset. Default value is next if not provided. ### Responses #### Success Response (200) Successful operation ``` -------------------------------- ### Get Refunds by Charge ID Response Sample Source: https://developer.samcart.com/ This is a sample JSON response for retrieving all refunds associated with a specific charge. It includes detailed refund information and nested charge/order objects. ```json [ { "id": 1337, "charge_id": 1337, "cart_item_id": 1234, "created_at": "2020-03-04 00:18:35", "test_mode": true, "charge_refund_status": "refunded", "currency": "USD", "refund_amount": 1525, "remaining_refundable_amount": 7500, "charge": { "id": "1", "charge_date": "2021-03-08 00:18:35", "total": "15000", "test_mode": true, "processor_transaction_id": "H241L4ZX", "currency": "USD", "card_used": "4242", "paypal_email": "my_paypal@email.com" }, "order": { "id": "1", "test_mode": true, "subtotal": "100000", "total": "100000", "shipping": "500", "tax": "100" } } ] ``` -------------------------------- ### Get Charge by ID Response Sample Source: https://developer.samcart.com/ This is a sample JSON response for retrieving a single charge by its ID. It details the charge's attributes. ```json { "id": 1337, "customer_id": 1234, "affiliate_id": 1001, "order_id": 1001, "subscription_rebill_id": 1001, "test_mode": true, "processor_name": "Stripe", "processor_transaction_id": "01234ABCD", "currency": "USD", "card_used": "4242", "charge_refund_status": "partially_refunded", "order_date": "2021-03-08 00:18:35", "created_at": "2021-03-08 00:18:35", "total": 10025 } ``` -------------------------------- ### Get Customer Charges Source: https://developer.samcart.com/ Retrieves all charges for a customer, with options to filter by creation date and test mode. Requires API key authorization. ```http get/customers/{id}/charges ``` -------------------------------- ### Get Customer Orders Source: https://developer.samcart.com/ Retrieves all orders for a customer, with options to filter by creation date and test mode. Requires API key authorization. ```http get/customers/{id}/orders ``` -------------------------------- ### Sample Plan Response Source: https://developer.samcart.com/ This is a sample JSON response for a plan associated with a subscription. It details product ID, plan status, pricing, and trial information. ```json { "id": 1337, "product_id": 1234, "plan_status": "active", "plan_archived_date": "2021-03-02 01:23:34", "plan_duration": 2, "plan_frequency": "days", "plan_price": 9825, "trial_period": 2, "rebill_days": 15, "stripe_compatible": true, "stripe_plan_id": "samcart_plan_1_12345", "on_stripe_sandbox": true, "recurring_shipping": true } ``` -------------------------------- ### Customer Charges Sample Source: https://developer.samcart.com/ Sample JSON response for a customer's charges, including charge ID, customer ID, affiliate ID, order details, test mode status, processor information, currency, card used, refund status, order date, creation date, and total amount. ```json [ { "id": 1337, "customer_id": 1234, "affiliate_id": 1001, "order_id": 1001, "subscription_rebill_id": 1001, "test_mode": true, "processor_name": "Stripe", "processor_transaction_id": "01234ABCD", "currency": "USD", "card_used": "4242", "charge_refund_status": "partially_refunded", "order_date": "2021-03-08 00:18:35", "created_at": "2021-03-08 00:18:35", "total": 10025 } ] ``` -------------------------------- ### Sample Subscription Response (JSON) Source: https://developer.samcart.com/ This is a sample JSON response for a successful retrieval of subscription data. It includes details about the order, product, pricing, coupon, cancellation schedule, processor information, and billing dates. ```json { "data": [ { "id": 1337, "customer_id": 1234, "affiliate_id": 1001, "order_id": 1001, "product_id": 1001, "sku": "sku123", "status": "active", "type": "recurring_subscription", "product_name": "Cool Product", "internal_product_name": "Cool Product", "initial_price": { "subtotal": 10000, "taxes": 500, "shipping": 300, "total": 9800 }, "recurring_price": { "subtotal": 10000, "taxes": 500, "shipping": 300, "total": 10800 }, "coupon": { "id": "1234", "charge_instance": "one_time", "code": "summersale", "type": "flat_rate", "discount_amount": null, "discount_percentage": 10 }, "cancel_schedule": { "status": "scheduled", "cancel_date": "2021-03-08 00:18:35" }, "processor_name": "Stripe", "test_mode": true, "card_used": "4242", "created_at": "2021-03-08 00:18:35", "start_date": "2021-03-08 00:18:35", "end_date": "2021-03-08 00:18:35", "next_rebilling_date": "2021-04-08 00:18:35", "total_failed_charges": 1, "subscription_interval": "monthly", "stripe_plan_id": "plan_abc123" } ], "pagination": { "next": "https://example.samcart.com/v1/example?offset=1337&dir=next", "prev": null } } ``` -------------------------------- ### Sample Product Response Source: https://developer.samcart.com/ This is a sample JSON response for a product. It includes details like ID, SKU, pricing, categories, and associated upsells or bundles. ```json { "id": 1337, "sku": "sku123", "internal_product_name": "internal-book-product", "product_name": "Book", "description": "This is a good book", "currency": "USD", "price": 1025, "product_category": "physical", "pricing_type": "one_time", "status": "live", "taxes": true, "upsell_funnel": "Additional Offer", "order_bumps": [ { "product_id": 1234, "product_name": "Binder" } ], "bundled_products": [ { "product_id": 3423, "product_name": "Magazine" } ], "slug": "book", "custom_domain": "https://google.com", "product_tags": [ { "name": "digital" } ], "created_at": "2021-01-14 18:03:59", "updated_at": "2021-01-14 18:03:59", "archived_date": "2021-01-14 18:03:59" } ``` -------------------------------- ### Sample Subscription Response Source: https://developer.samcart.com/ This is a sample JSON response for a subscription object, detailing subscription attributes and pricing. ```json [ { "id": 1337, "customer_id": 1234, "affiliate_id": 1001, "order_id": 1001, "product_id": 1001, "sku": "sku123", "status": "active", "type": "recurring_subscription", "product_name": "Cool Product", "internal_product_name": "Cool Product", "initial_price": { "subtotal": 10000, "taxes": 500, "shipping": 300, "total": 9800 }, "recurring_price": { "subtotal": 10000, "taxes": 500, "shipping": 300, "total": 10800 }, "coupon": { "id": "1234", "charge_instance": "one_time", "code": "summersale", "type": "flat_rate", "discount_amount": null, "discount_percentage": 10 }, "cancel_schedule": { "status": "scheduled", "cancel_date": "2021-03-08 00:18:35" }, "processor_name": "Stripe", "test_mode": true, "card_used": "4242", "created_at": "2021-03-08 00:18:35", "start_date": "2021-03-08 00:18:35", "end_date": "2021-03-08 00:18:35", "next_rebilling_date": "2021-04-08 00:18:35", "total_failed_charges": 1, "subscription_interval": "monthly", "stripe_plan_id": "plan_abc123" } ] ``` -------------------------------- ### Get Charge Refund Source: https://developer.samcart.com/ Retrieves details of a specific refund for a given charge. ```APIDOC ## GET /charges/{id}/refunds/{refund_id} ### Description Retrieves details of a specific refund for a given charge. ### Method GET ### Endpoint https://api.samcart.com/v1/charges/{id}/refunds/{refund_id} ### Parameters #### Path Parameters - **id** (integer) - Required - The SamCart ID for the charge - **refund_id** (integer) - Required - The SamCart ID for the refund ### Response #### Success Response (200) - **id** (integer) - Description - **charge_id** (integer) - Description - **cart_item_id** (integer) - Description - **created_at** (string) - Description - **test_mode** (boolean) - Description - **charge_refund_status** (string) - Description - **currency** (string) - Description - **refund_amount** (integer) - Description - **remaining_refundable_amount** (integer) - Description - **charge** (object) - Description - **order** (object) - Description ### Response Example ```json { "id": 1337, "charge_id": 1337, "cart_item_id": 1234, "created_at": "2020-03-04 00:18:35", "test_mode": true, "charge_refund_status": "refunded", "currency": "USD", "refund_amount": 1525, "remaining_refundable_amount": 7500, "charge": { "id": "1", "charge_date": "2021-03-08 00:18:35", "total": "15000", "test_mode": true, "processor_transaction_id": "H241L4ZX", "currency": "USD", "card_used": "4242", "paypal_email": "my_paypal@email.com" }, "order": { "id": "1", "test_mode": true, "subtotal": "100000", "total": "100000", "shipping": "500", "tax": "100" } } ``` ``` -------------------------------- ### Get Customer By ID Source: https://developer.samcart.com/ Retrieves details for a specific customer using their SamCart ID. ```APIDOC ## GET /customers/{id} ### Description Retrieves details for a specific customer using their SamCart ID. ### Method GET ### Endpoint https://api.samcart.com/v1/customers/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The SamCart ID for the customer #### Query Parameters - **created_at_min** (string ) - Optional - Filter by created at date/time at or after given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 00:00:00 UTC. - **created_at_max** (string ) - Optional - Filter by created at date/time at or before given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 23:59:59 UTC. ### Response #### Success Response (200) Successful operation. #### Error Response (404) Customer could not be found. ``` -------------------------------- ### Get Customer by Order ID Source: https://developer.samcart.com/ Retrieves the customer information associated with a specific order. ```APIDOC ## getCustomerByOrderId Retrieve customer on an order ### Description Retrieves the customer information associated with a specific order. ### Method GET ### Endpoint /orders/{id}/customer ### Parameters #### Path Parameters - **id** (integer) - Required - The SamCart ID for the order ### Response #### Success Response (200) - Returns the customer object associated with the order. #### Error Response (404) - Order or customer could not be found. ``` -------------------------------- ### Subscription Response Sample Source: https://developer.samcart.com/ This is a sample JSON response for a subscription object. It includes details about the customer, product, pricing, and billing status. ```json { "id": 1337, "customer_id": 1234, "affiliate_id": 1001, "order_id": 1001, "product_id": 1001, "sku": "sku123", "status": "active", "type": "recurring_subscription", "product_name": "Cool Product", "internal_product_name": "Cool Product", "initial_price": { "subtotal": 10000, "taxes": 500, "shipping": 300, "total": 9800 }, "recurring_price": { "subtotal": 10000, "taxes": 500, "shipping": 300, "total": 10800 }, "coupon": { "id": "1234", "charge_instance": "one_time", "code": "summersale", "type": "flat_rate", "discount_amount": null, "discount_percentage": 10 }, "cancel_schedule": { "status": "scheduled", "cancel_date": "2021-03-08 00:18:35" }, "processor_name": "Stripe", "test_mode": true, "card_used": "4242", "created_at": "2021-03-08 00:18:35", "start_date": "2021-03-08 00:18:35", "end_date": "2021-03-08 00:18:35", "next_rebilling_date": "2021-04-08 00:18:35", "total_failed_charges": 1, "subscription_interval": "monthly", "stripe_plan_id": "plan_abc123" } ``` -------------------------------- ### Sample Subscription Response Source: https://developer.samcart.com/ This is a sample JSON response for a subscription. It includes details like subscription ID, new status, source, type, and change date. ```json [ { "id": 1337, "subscription_id": 1001, "new_status": "active", "source": "dashboard", "type": "status", "change_date": "2021-03-08 00:18:35" } ] ``` -------------------------------- ### Get Customer Addresses Source: https://developer.samcart.com/ Retrieves all addresses associated with a specific customer ID. Requires API key authorization. ```http get/customers/{id}/addresses ``` -------------------------------- ### Retrieve Products with Query Parameters Source: https://developer.samcart.com/ Use this endpoint to retrieve a list of products. You can filter by creation date, status, category, and pricing type. Pagination is supported using offset and direction parameters. ```json { "data": [ { "id": 1337, "sku": "sku123", "internal_product_name": "internal-book-product", "product_name": "Book", "description": "This is a good book", "currency": "USD", "price": 1025, "product_category": "physical", "pricing_type": "one_time", "status": "live", "taxes": true, "upsell_funnel": "Additional Offer", "order_bumps": [ { "product_id": 1234, "product_name": "Binder" } ], "bundled_products": [ { "product_id": 3423, "product_name": "Magazine" } ], "slug": "book", "custom_domain": "https://google.com", "product_tags": [ { "name": "digital" } ], "created_at": "2021-01-14 18:03:59", "updated_at": "2021-01-14 18:03:59", "archived_date": "2021-01-14 18:03:59" } ], "pagination": { "next": "https://example.samcart.com/v1/example?offset=1337&dir=next", "prev": null } } ``` -------------------------------- ### Get Charges by Order ID Source: https://developer.samcart.com/ Retrieves all charges associated with a specific order. Supports filtering by creation date and test mode. ```APIDOC ## getChargesByOrderId Retrieve all charges on an order ### Description Retrieves all charges associated with a specific order. Supports filtering by creation date and test mode. ### Method GET ### Endpoint /orders/{id}/charges ### Parameters #### Path Parameters - **id** (integer) - Required - The SamCart ID for the order #### Query Parameters - **created_at_min** (string) - Optional - Filter by created at date/time at or after given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). - **created_at_max** (string) - Optional - Filter by created at date/time at or before given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). - **test_mode** (boolean) - Optional - Filter by test mode. ### Response #### Success Response (200) - Returns an array of charge objects. #### Response Example ```json [ { "id": 1337, "customer_id": 1234, "affiliate_id": 1001, "order_id": 1001, "subscription_rebill_id": 1001, "test_mode": true, "processor_name": "Stripe", "processor_transaction_id": "01234ABCD", "currency": "USD", "card_used": "4242", "charge_refund_status": "partially_refunded", "order_date": "2021-03-08 00:18:35", "created_at": "2021-03-08 00:18:35", "total": 10025 } ] ``` ``` -------------------------------- ### Sample Subscription Response Source: https://developer.samcart.com/ This is a sample JSON response for a subscription, showing detailed information about a customer's recurring order. ```json [ { "id": 1337, "customer_id": 1234, "affiliate_id": 1001, "order_id": 1001, "product_id": 1001, "sku": "sku123", "status": "active", "type": "recurring_subscription", "product_name": "Cool Product", "internal_product_name": "Cool Product", "initial_price": { "subtotal": 10000, "taxes": 500, "shipping": 300, "total": 9800 }, "recurring_price": { "subtotal": 10000, "taxes": 500, "shipping": 300, "total": 10800 }, "coupon": { "id": "1234", "charge_instance": "one_time", "code": "summersale", "type": "flat-rate", "discount_amount": null, "discount_percentage": 10 }, "cancel_schedule": { "status": "scheduled", "cancel_date": "2021-03-08 00:18:35" }, "processor_name": "Stripe", "test_mode": true, "card_used": "4242", "created_at": "2021-03-08 00:18:35", "start_date": "2021-03-08 00:18:35", "end_date": "2021-03-08 00:18:35", "next_rebilling_date": "2021-04-08 00:18:35", "total_failed_charges": 1, "subscription_interval": "monthly", "stripe_plan_id": "plan_abc123" } ] ``` -------------------------------- ### Customer Data Sample Source: https://developer.samcart.com/ This is a sample JSON response for a customer's data, including their ID, name, email, phone, tags, lifetime value, and addresses. ```json { "id": 1337, "first_name": "John", "last_name": "Doe", "email": "jdoe@gmail.com", "phone": "5555555555", "customer_tags": [ { "name": "new" } ], "lifetime_value": 95025, "updated_at": "2020-03-04 00:18:35", "created_at": "2020-03-04 00:18:35", "addresses": [ { "type": "shipping", "street": "221B Baker Street", "postal_code": "1234", "city": "Austin", "state": "TX", "region": "Quebec", "country": "United States" } ] } ``` -------------------------------- ### SamCart Subscription Response Sample Source: https://developer.samcart.com/ This is a sample JSON response for a subscription in SamCart. It includes details about the subscription status, pricing, and billing information. ```json { "id": 1337, "customer_id": 1234, "affiliate_id": 1001, "order_id": 1001, "product_id": 1001, "sku": "sku123", "status": "active", "type": "recurring_subscription", "product_name": "Cool Product", "internal_product_name": "Cool Product", "initial_price": { "subtotal": 10000, "taxes": 500, "shipping": 300, "total": 9800 }, "recurring_price": { "subtotal": 10000, "taxes": 500, "shipping": 300, "total": 10800 }, "coupon": { "id": "1234", "charge_instance": "one_time", "code": "summersale", "type": "flat_rate", "discount_amount": null, "discount_percentage": 10 }, "cancel_schedule": { "status": "scheduled", "cancel_date": "2021-03-08 00:18:35" }, "processor_name": "Stripe", "test_mode": true, "card_used": "4242", "created_at": "2021-03-08 00:18:35", "start_date": "2021-03-08 00:18:35", "end_date": "2021-03-08 00:18:35", "next_rebilling_date": "2021-04-08 00:18:35", "total_failed_charges": 1, "subscription_interval": "monthly", "stripe_plan_id": "plan_abc123" } ``` -------------------------------- ### Get Subscriptions by Customer ID Source: https://developer.samcart.com/ Retrieve all subscriptions associated with a specific customer ID. This endpoint allows filtering by various date parameters and subscription status. ```APIDOC ## GET /customers/{id}/subscriptions ### Description Retrieve all subscriptions for a customer. ### Method GET ### Endpoint https://api.samcart.com/v1/customers/{id}/subscriptions ### Parameters #### Path Parameters - **id** (integer) - Required - The SamCart ID for the customer #### Query Parameters - **created_at_min** (string) - Optional - Filter by created at date/time at or after given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 00:00:00 UTC. - **created_at_max** (string) - Optional - Filter by created at date/time at or before given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 23:59:59 UTC. - **rebilling_at_min** (string) - Optional - Filter by rebilling date/time at or after given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 00:00:00 UTC. - **rebilling_at_max** (string) - Optional - Filter by rebilling date/time at or before given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 23:59:59 UTC. - **canceled_at_min** (string) - Optional - Filter by canceled date/time at or after given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 00:00:00 UTC. - **canceled_at_max** (string) - Optional - Filter by canceled date/time at or before given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 23:59:59 UTC. - **status** (string) - Optional - Filter subscriptions by status. Enum: "active" "canceled" "delinquent" "completed" "paused" "invalid_processor" "sca_required" "deleted" - **type** (string) - Optional - Filter subscriptions by type. Enum: "limited_subscription" "recurring_subscription" - **test_mode** (boolean) - Optional - Filter by test mode ### Responses #### Success Response (200) Successful operation. Response will return an array of 0 or more subscriptions. ```json [ { "id": 1337, "customer_id": 1234, "affiliate_id": 1001, "funnel_id": 12345, "upsell_id": 5678, "test_mode": true, "order_date": "2021-03-08 00:18:35", "cart_items": [ { "id": 1234, "product_id": 1234, "subscription_id": 1234, "sku": "sku1234", "internal_product_name": "internal-book-product", "product_name": "Book", "charge_id": 1234, "pricing_type": "one_time", "processor_transaction_id": "01234ABCD", "currency": "USD", "quantity": 2, "status": "charged", "upgraded": true, "initial_price": { "subtotal": 10000, "taxes": 500, "shipping": 300, "total": 9800 }, "recurring_price": { "subtotal": 10000, "taxes": 500, "shipping": 300, "total": 10800 }, "coupon": { "id": "1234", "charge_instance": "one_time", "code": "summersale", "type": "flat_rate", "discount_amount": null, "discount_percentage": 10 } } ], "subtotal": 10000, "discount": 1000, "taxes": 500, "shipping": 300, "shipping_address": { "type": "shipping", "street": "221B Baker Street", "postal_code": "1234", "city": "Austin", "state": "TX", "region": "Quebec", "country": "United States" }, "total": 9800, "card_used": "0123", "processor_name": "Stripe", "custom_fields": { "Name": { "value": "Blue", "slug": "custom_zL6FLFM3" } }, "upsell_custom_fields": { }, "utm_parameters": { "medium": "string", "source": "string", "campaign": "string", "content": "string", "lead_source": "string" }, "custom_parameters": { "key": "string" } } ] ``` #### Error Response (404) Customer could not be found. ``` -------------------------------- ### List Products Source: https://developer.samcart.com/ Retrieves a list of products with options for filtering by creation date, status, category, pricing type, and pagination. ```APIDOC ## GET /products ### Description Retrieves a list of products with options for filtering and pagination. ### Method GET ### Endpoint https://api.samcart.com/v1/products ### Parameters #### Query Parameters - **created_at_min** (string ) - Optional - Filter by created at date/time at or after given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 00:00:00 UTC. - **created_at_max** (string ) - Optional - Filter by created at date/time at or before given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 23:59:59 UTC. - **status** (string) - Optional - Enum: "live" "test" "archived" Filter product by status. - **product_category** (string) - Optional - Enum: "physical" "digital" Filter product by category. - **pricing_type** (string) - Optional - Enum: "one_time" "limited_subscription" "recurring_subscription" "pwyw_one_time" "pwyw_recurring_subscription" "pwyw_limited_subscription" Filter product by pricing type. - **offset** (integer) - Optional - The offset value used to paginate through a list of entries. If the dir query parameter is prev then the offset will be the id of the first record of the data set otherwise the offset will be the id of the last record. - **limit** (integer) - Optional - An optional limit for the number of entries on a page with a maximum value of 100. Default value is 100 if not provided. - **dir** (string) - Optional - Enum: "next" "prev" The direction to paginate the next set of data. If dir is prev the page will return a data set before the offset otherwise the data set will be after the offset. Default value is next if not provided. ### Response #### Success Response (200) Successful operation. Response will return an array of 0 or more products. #### Response Example { "data": [ { "id": 1337, "sku": "sku123", "internal_product_name": "internal-book-product", "product_name": "Book", "description": "This is a good book", "currency": "USD", "price": 1025, "product_category": "physical", "pricing_type": "one_time", "status": "live", "taxes": true, "upsell_funnel": "Additional Offer", "order_bumps": [ { "product_id": 1234, "product_name": "Binder" } ], "bundled_products": [ { "product_id": 3423, "product_name": "Magazine" } ], "slug": "book", "custom_domain": "https://google.com", "product_tags": [ { "name": "digital" } ], "created_at": "2021-01-14 18:03:59", "updated_at": "2021-01-14 18:03:59", "archived_date": "2021-01-14 18:03:59" } ], "pagination": { "next": "https://example.samcart.com/v1/example?offset=1337&dir=next", "prev": null } } ```