Passer au contenu principal
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);
}
{
  "items": [
    {
      "created_at": "2023-11-07T05:31:56Z",
      "full_url": "<string>",
      "product_id": "<string>",
      "short_url": "<string>"
    }
  ]
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de requête

page_size
integer<int32>

Page size default is 10 max is 100

Plage requise: x >= 0
page_number
integer<int32>

Page number default is 0

Plage requise: x >= 0
product_id
string

Filter by product ID

Réponse

Short URLs for the Business

items
object[]
requis