Products
शॉर्ट लिंक की सूची
व्यवसाय द्वारा बनाए गए सभी शॉर्ट लिंक की सूची। शॉर्ट लिंक आपके उत्पादों के लिए कस्टम स्लग के साथ संक्षिप्त चेकआउट URL प्रदान करते हैं।
GET
/
products
/
short_links
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const shortLinkListResponse of client.products.shortLinks.list()) {
console.log(shortLinkListResponse.product_id);
}import os
from dodopayments import DodoPayments
client = DodoPayments(
bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted
)
page = client.products.short_links.list()
page = page.items[0]
print(page.product_id)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
page, err := client.Products.ShortLinks.List(context.TODO(), dodopayments.ProductShortLinkListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.products.shortlinks.ShortLinkListPage;
import com.dodopayments.api.models.products.shortlinks.ShortLinkListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
ShortLinkListPage page = client.products().shortLinks().list();
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.products.shortlinks.ShortLinkListPage
import com.dodopayments.api.models.products.shortlinks.ShortLinkListParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val page: ShortLinkListPage = client.products().shortLinks().list()
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
page = dodo_payments.products.short_links.list
puts(page)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;
$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);
try {
$page = $client->products->shortLinks->list(
pageNumber: 0, pageSize: 0, productID: 'product_id'
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Products.ShortLinks;
DodoPaymentsClient client = new();
ShortLinkListParams parameters = new();
var page = await client.Products.ShortLinks.List(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let result = client
.products()
.short_links()
.list()
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/products/short_links \
--header 'Authorization: Bearer <token>'{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"full_url": "<string>",
"product_id": "<string>",
"short_url": "<string>"
}
]
}प्राधिकरण
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
क्वेरी पैरामीटर
Page size default is 10 max is 100
आवश्यक सीमा:
x >= 0Page number default is 0
आवश्यक सीमा:
x >= 0Filter by product ID
प्रतिक्रिया
Short URLs for the Business
Show child attributes
Show child attributes
अंतिम संशोधन 1 अप्रैल 2026
वाज़ दिस पेज हेल्पफुल
प्रीवियस
शॉर्ट लिंक बनाएंएक उत्पाद के लिए कस्टम स्लग के साथ एक शॉर्ट चेकआउट URL बनाता है। इसके पीछे एक स्थिर चेकआउट URL का उपयोग किया जाता है।
नेक्स्ट
⌘I
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const shortLinkListResponse of client.products.shortLinks.list()) {
console.log(shortLinkListResponse.product_id);
}import os
from dodopayments import DodoPayments
client = DodoPayments(
bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted
)
page = client.products.short_links.list()
page = page.items[0]
print(page.product_id)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
page, err := client.Products.ShortLinks.List(context.TODO(), dodopayments.ProductShortLinkListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.products.shortlinks.ShortLinkListPage;
import com.dodopayments.api.models.products.shortlinks.ShortLinkListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
ShortLinkListPage page = client.products().shortLinks().list();
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.products.shortlinks.ShortLinkListPage
import com.dodopayments.api.models.products.shortlinks.ShortLinkListParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val page: ShortLinkListPage = client.products().shortLinks().list()
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
page = dodo_payments.products.short_links.list
puts(page)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;
$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);
try {
$page = $client->products->shortLinks->list(
pageNumber: 0, pageSize: 0, productID: 'product_id'
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Products.ShortLinks;
DodoPaymentsClient client = new();
ShortLinkListParams parameters = new();
var page = await client.Products.ShortLinks.List(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let result = client
.products()
.short_links()
.list()
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/products/short_links \
--header 'Authorization: Bearer <token>'{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"full_url": "<string>",
"product_id": "<string>",
"short_url": "<string>"
}
]
}