Get Product Detail

Get detailed information about a specific product.

Request

use dodopayments_rust::{to_pretty_json, DodoPaymentsClientBuilder};

#[tokio::main]

async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let api_key = std::env::var("DODO_API_KEY")?;

    let client = DodoPaymentsClientBuilder::new()
        .bearer_token(&api_key)
        .enviroment("test_mode")
        .build()?;

    let product_id = "prod_xxxxxxxxxx";

    let resp = client.products().id(product_id).retrieve().send().await?;

    println!("{}", to_pretty_json(&resp)?);

    Ok(())
}

Path Parameters

ParameterTypeDescription
idstringProduct Id

Responses

200 Status

FieldTypeDescription
addonsobjectAvailable Addons for subscription products
brand_idstring
business_idstringUnique identifier for the business to which the product belongs.
created_atstringTimestamp when the product was created.
credit_entitlementsarray<CreditEntitlementMappingResponse>Attached credit entitlements with settings
descriptionobjectDescription of the product, optional.
digital_product_deliveryobject
imageobjectURL of the product image, optional.
is_recurringbooleanIndicates if the product is recurring (e.g., subscriptions).
license_key_activation_messageobjectMessage sent upon license key activation, if applicable.
license_key_activations_limitobjectLimit on the number of activations for the license key, if enabled.
license_key_durationobject
license_key_enabledbooleanIndicates whether the product requires a license key.
metadataMetadataAdditional custom data associated with the product
nameobjectName of the product, optional.
pricePricePricing information for the product.
product_collection_idobjectThe product collection ID this product belongs to, if any
product_idstringUnique identifier for the product.
tax_categoryTaxCategoryTax category associated with the product.
updated_atstringTimestamp when the product was last updated.

Product Details

500 Status

Something went wrong :(