cURL
curl --request GET \
--url https://api.lomadee.com.br/affiliate/shortener/urls/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.lomadee.com.br/affiliate/shortener/urls/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.lomadee.com.br/affiliate/shortener/urls/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lomadee.com.br/affiliate/shortener/urls/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lomadee.com.br/affiliate/shortener/urls/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lomadee.com.br/affiliate/shortener/urls/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lomadee.com.br/affiliate/shortener/urls/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"originalUrl": "<string>",
"shortUrl": "<string>",
"urlCode": "<string>",
"organizationId": "<string>",
"active": true,
"count": 123,
"linkType": "Coupon"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"success": false,
"message": "<string>",
"code": "<string>"
}Shorten
Get Shortened URL by ID
Get a URL Shortened by its urlCode
GET
/
affiliate
/
shortener
/
urls
/
{id}
cURL
curl --request GET \
--url https://api.lomadee.com.br/affiliate/shortener/urls/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.lomadee.com.br/affiliate/shortener/urls/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.lomadee.com.br/affiliate/shortener/urls/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lomadee.com.br/affiliate/shortener/urls/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lomadee.com.br/affiliate/shortener/urls/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lomadee.com.br/affiliate/shortener/urls/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lomadee.com.br/affiliate/shortener/urls/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"originalUrl": "<string>",
"shortUrl": "<string>",
"urlCode": "<string>",
"organizationId": "<string>",
"active": true,
"count": 123,
"linkType": "Coupon"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"success": false,
"message": "<string>",
"code": "<string>"
}Get Shortened URL by urlCode
Returns a single shortened URL. The path parameter is theurlCode (not a numeric database id). Requires scope shortener:read.
HTTP Request
GET https://api-beta.lomadee.com.br/affiliate/shortener/urls/{urlCode}
Response
{
"data": {
"originalUrl": "https://...",
"shortUrl": "https://staging.lmdee.link/xWkSzD7vmsK8",
"urlCode": "xWkSzD7vmsK8",
"active": true,
"linkType": "Offer"
}
}
Example
curl -X GET "https://api-beta.lomadee.com.br/affiliate/shortener/urls/xWkSzD7vmsK8" \
-H "x-api-key: your-api-key"
Authorizations
Path Parameters
The urlCode of the shortened URL to retrieve
Response
Shorten URL response
The original URL
The short URL
The unique identifier for the shortened URL
The organization ID
If the URL is active
The count of clicks of the URL
The link type
Available options:
Coupon, BrandPage, Offer