Unarchive Product

Unarchive a previously archived 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).unarchive().send().await?;

    println!("Product unarchived successfully");

    Ok(())
}

Path Parameters

ParameterTypeDescription
idstring``

Responses

200 Status

Product Delected Successfully

500 Status

Something went wrong :(