POST
/
affiliate
/
shorten
/
url
cURL
curl --request POST \
  --url https://api-beta.lomadee.com.br/affiliate/shorten/url \
  --header 'x-api-key: <api-key>'
{
  "type": [
    {
      "id": "<string>",
      "name": "<string>",
      "availableChannel": {
        "id": "<string>",
        "name": "<string>"
      },
      "shortUrls": [
        "<string>"
      ],
      "message": "<string>"
    }
  ]
}

Shorten a URL

HTTP Request

Authorizations

x-api-key
string
header
required

Query Parameters

url
string
required

The URL to shorten.

Required when type is set to Custom.

organizationId
string
required

ID of the organization to generate the URL for

featureId
string

Unique identifier used to generate campaign URLs for coupons or offers.

Required when type is set to Coupon or Offer. This ID is used to track and attribute conversions to specific campaigns. To get this ID, you can use the GET /affiliate/campaigns endpoint.

type
enum<string>
required

Specifies the type of URL to be generated.

Available options:

BrandPage: Generates a URL for the brand's main website.

Coupon: Generates a URL for a coupon campaign. Requires featureId.

Offer: Generates a URL for a promotional offer. Requires featureId.

Custom: Generates a URL for a custom URL. Requires url.

Available options:
Coupon,
BrandPage,
Offer,
Custom
mdasc
string

This field is used to pass additional identifier to the URL. This identifier will be used to track the URL for your custom purposes.

Response

200 - application/json

Shorten URL response

The response is of type object.