Short link and QR Code
Create short link
platformClient.application("<APPLICATION_ID>").share.createShortLink(body: body) { (response, error) in
// Use response
}
Argument | Type | Required | Description |
---|---|---|---|
body | ShortLinkReq | yes | Request body |
Create short link
Returned Response:
Success
Example:
{
"url": {
"original": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh",
"short": "https://0icof6vvsf.hostx0.de/l/3qKlnsq-x",
"hash": "3qKlnsq-x"
},
"redirects": {
"ios": {
"type": "web",
"link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
},
"android": {
"type": "web",
"link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
},
"web": {
"type": "web",
"link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
},
"expiry": "",
"url": "",
"force_web": false
},
"created_by": "team",
"personalized": false,
"app_redirect": false,
"fallback": "web",
"enable_tracking": false,
"active": true,
"count": 0,
"_id": "601a54054c0349592e76c8f3",
"title": "new ",
"meta": {
"type": "brand"
},
"expire_at": "",
"application": "5eda528b97457fe43a733ace",
"user_id": "5e4d01e2c39837ab66144f6d",
"created_at": "2021-02-03T07:43:01.342Z",
"updated_at": "2021-02-03T07:43:01.342Z"
}
Get short links
platformClient.application("<APPLICATION_ID>").share.getShortLinks(pageNo: pageNo, pageSize: pageSize, createdBy: createdBy, active: active, q: q) { (response, error) in
// Use response
}
Argument | Type | Required | Description |
---|---|---|---|
pageNo | Int? | no | Current page number |
pageSize | Int? | no | Current page size |
createdBy | String? | no | Short link creator |
active | String? | no | Short link active status |
q | String? | no | Search text for original and short url |
Get short links
Returned Response:
Success
Example:
{
"items": [
{
"url": {
"original": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh",
"short": "https://0icof6vvsf.hostx0.de/l/3qKlnsq-x",
"hash": "3qKlnsq-x"
},
"redirects": {
"ios": {
"type": "web",
"link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
},
"android": {
"type": "web",
"link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
},
"web": {
"type": "web",
"link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
},
"expiry": "",
"url": "",
"force_web": false
},
"created_by": "team",
"personalized": false,
"app_redirect": false,
"fallback": "web",
"enable_tracking": false,
"active": true,
"count": 0,
"_id": "601a54054c0349592e76c8f3",
"title": "new ",
"meta": {
"type": "brand"
},
"expire_at": "",
"application": "5eda528b97457fe43a733ace",
"user_id": "5e4d01e2c39837ab66144f6d",
"created_at": "2021-02-03T07:43:01.342Z",
"updated_at": "2021-02-03T07:43:01.342Z"
}
],
"page": {
"size": 10,
"type": "number",
"page": 1,
"item_total": 30,
"has_next": true
}
}
Get short link by hash
platformClient.application("<APPLICATION_ID>").share.getShortLinkByHash(hash: hash) { (response, error) in
// Use response
}
Argument | Type | Required | Description |
---|---|---|---|
hash | String | yes | Hash of short url |
Get short link by hash
Returned Response:
Success
Example:
{
"url": {
"original": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh",
"short": "https://0icof6vvsf.hostx0.de/l/3qKlnsq-x",
"hash": "3qKlnsq-x"
},
"redirects": {
"ios": {
"type": "web",
"link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
},
"android": {
"type": "web",
"link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
},
"web": {
"type": "web",
"link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
},
"expiry": "",
"url": "",
"force_web": false
},
"created_by": "team",
"personalized": false,
"app_redirect": false,
"fallback": "web",
"enable_tracking": false,
"active": true,
"count": 0,
"_id": "601a54054c0349592e76c8f3",
"title": "new ",
"meta": {
"type": "brand"
},
"expire_at": "",
"application": "5eda528b97457fe43a733ace",
"user_id": "5e4d01e2c39837ab66144f6d",
"created_at": "2021-02-03T07:43:01.342Z",
"updated_at": "2021-02-03T07:43:01.342Z"
}
Update short link by id
platformClient.application("<APPLICATION_ID>").share.updateShortLinkById(id: id, body: body) { (response, error) in
// Use response
}
Argument | Type | Required | Description |
---|---|---|---|
id | String | yes | Short link document identifier |
body | ShortLinkReq | yes | Request body |
Update short link by id
Returned Response:
Success
Example:
{
"url": {
"original": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh",
"short": "https://0icof6vvsf.hostx0.de/l/3qKlnsq-x",
"hash": "3qKlnsq-x"
},
"redirects": {
"ios": {
"type": "web",
"link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
},
"android": {
"type": "web",
"link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
},
"web": {
"type": "web",
"link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
},
"expiry": "",
"url": "",
"force_web": false
},
"created_by": "team",
"personalized": false,
"app_redirect": false,
"fallback": "web",
"enable_tracking": false,
"active": true,
"count": 0,
"_id": "601a54054c0349592e76c8f3",
"title": "new ",
"meta": {
"type": "brand"
},
"expire_at": "",
"application": "5eda528b97457fe43a733ace",
"user_id": "5e4d01e2c39837ab66144f6d",
"created_at": "2021-02-03T07:43:01.342Z",
"updated_at": "2021-02-03T07:43:01.342Z"
}
Get click statistics for a short link
platformClient.application("<APPLICATION_ID>").share.getShortLinkClickStats(surlId: surlId) { (response, error) in
// Use response
}
Argument | Type | Required | Description |
---|---|---|---|
surlId | String | yes | Short link ID for which click statistics are to be retrieved. |
Retrieve click statistics for a given short link ID.
Returned Response:
Successful retrieval of click statistics.
Example:
Properties | Type | Nullable | Description |
---|---|---|---|
clickStats | [ClickStatsItem] | no | An array of click statistics for the short link. |
Properties | Type | Nullable | Description |
---|---|---|---|
display | String | no | The display name of the click statistic. |
total | Int | no | The total number of clicks for the statistic. |
Properties | Type | Nullable | Description |
---|---|---|---|
link | String? | yes | |
type | String? | yes |
Properties | Type | Nullable | Description |
---|---|---|---|
link | String? | yes | |
type | String? | yes |
Properties | Type | Nullable | Description |
---|---|---|---|
ios | RedirectDevice? | yes | |
android | RedirectDevice? | yes | |
web | WebRedirect? | yes | |
forceWeb | Bool? | yes |
Properties | Type | Nullable | Description |
---|---|---|---|
source | String? | yes | |
medium | String? | yes |
Properties | Type | Nullable | Description |
---|---|---|---|
campaignCookieExpiry | String? | yes |
Properties | Type | Nullable | Description |
---|---|---|---|
title | String? | yes | |
description | String? | yes | |
image | String? | yes |
Properties | Type | Nullable | Description |
---|---|---|---|
title | String | no | Give a name to the link. |
url | String | no | The web address to shorten. |
hash | String? | yes | |
active | Bool? | yes | |
expireAt | String? | yes | |
enableTracking | Bool? | yes | |
personalized | Bool? | yes | To create personalized short links. |
campaign | CampaignShortLink? | yes | |
redirects | Redirects? | yes | |
attribution | Attribution? | yes | |
socialMediaTags | SocialMediaTags? | yes | |
count | Int? | yes |
Properties | Type | Nullable | Description |
---|---|---|---|
original | String? | yes | |
short | String? | yes | |
hash | String? | yes |
Properties | Type | Nullable | Description |
---|---|---|---|
title | String? | yes | |
url | UrlInfo? | yes | |
createdBy | String? | yes | |
appRedirect | Bool? | yes | |
fallback | String? | yes | |
active | Bool? | yes | |
id | String? | yes | |
enableTracking | Bool? | yes | |
expireAt | String? | yes | |
application | String? | yes | |
userId | String? | yes | |
createdAt | String? | yes | |
meta | [String: Any]? | yes | |
updatedAt | String? | yes | |
personalized | Bool? | yes | To create personalized short links |
campaign | CampaignShortLink? | yes | |
redirects | Redirects? | yes | |
attribution | Attribution? | yes | |
socialMediaTags | SocialMediaTags? | yes | |
count | Int? | yes |
Properties | Type | Nullable | Description |
---|---|---|---|
itemTotal | Int? | yes | |
nextId | String? | yes | |
hasPrevious | Bool? | yes | |
hasNext | Bool? | yes | |
current | Int? | yes | |
type | String | no | |
size | Int? | yes |
Properties | Type | Nullable | Description |
---|---|---|---|
items | [ShortLinkRes]? | yes | |
page | Page? | yes |
Properties | Type | Nullable | Description |
---|---|---|---|
message | String? | yes |