> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dodopayments.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Danh sách Liên kết Ngắn

> Liệt kê tất cả các liên kết ngắn được tạo bởi doanh nghiệp. Các liên kết ngắn cung cấp URL thanh toán rút gọn với các slug tùy chỉnh cho sản phẩm của bạn.



## OpenAPI

````yaml get /products/short_links
openapi: 3.1.0
info:
  title: public
  description: ''
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 1.106.2
servers:
  - url: https://test.dodopayments.com/
    description: Test Mode Server Host
  - url: https://live.dodopayments.com/
    description: Live Mode Server Host
security: []
tags:
  - name: Products
  - name: Payments
  - name: Subscriptions
  - name: Addons
  - name: Customers
  - name: Refunds
  - name: Disputes
  - name: Events
  - name: License Keys
  - name: Entitlements
  - name: Licenses
  - name: Discounts
  - name: Meters
  - name: Credit Entitlements
  - name: Credit Entitlement Balances
  - name: Outgoing Webhooks
  - name: Checkout
  - name: Webhook Events
  - name: Payment Connector Webhooks
paths:
  /products/short_links:
    get:
      tags:
        - Products
      summary: Lists all short links created by the business.
      operationId: list_all_short_links_handler
      parameters:
        - name: page_size
          in: query
          description: Page size default is 10 max is 100
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
          style: form
        - name: page_number
          in: query
          description: Page number default is 0
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
          style: form
        - name: product_id
          in: query
          description: Filter by product ID
          required: false
          schema:
            type: string
          style: form
      responses:
        '200':
          description: Short URLs for the Business
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListShortLinksResponse'
        '500':
          description: Something went wrong :(
      security:
        - API_KEY: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            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);
            }
        - lang: Python
          source: |-
            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)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/dodopayments/dodopayments-go\"\n\t\"github.com/dodopayments/dodopayments-go/option\"\n)\n\nfunc main() {\n\tclient := dodopayments.NewClient(\n\t\toption.WithBearerToken(\"My Bearer Token\"),\n\t)\n\tpage, err := client.Products.ShortLinks.List(context.TODO(), dodopayments.ProductShortLinkListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Java
          source: >-
            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();
                }
            }
        - lang: Kotlin
          source: >-
            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()
            }
        - lang: Ruby
          source: |-
            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)
        - lang: PHP
          source: |-
            <?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();
            }
        - lang: C#
          source: |-
            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);
            }
        - lang: Rust
          source: |-
            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(())
            }
components:
  schemas:
    ListShortLinksResponse:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ShortLinkItem'
    ShortLinkItem:
      type: object
      required:
        - product_id
        - short_url
        - full_url
        - created_at
      properties:
        created_at:
          type: string
          format: date-time
          description: When the short url was created
        full_url:
          type: string
          description: Full URL the short url redirects to
        product_id:
          type: string
          description: Product ID associated with the short link
        short_url:
          type: string
          description: Short URL
  securitySchemes:
    API_KEY:
      type: http
      scheme: bearer

````