Changing URLs
Definition
This API endpoint is used to modify shortened url, for future use in BulkGate Portal.
API URL
URL used to send HTTP requests:
https://portal.bulkgate.com/api/1.0/shortener/change
POST /api/1.0/shortener/change HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json
Cache-Control: no-cache
Api has
20
request per minute limit.
Parameters table
PARAMETER NAME | VALUE | MANDATORY | DEFAULT VALUE |
---|---|---|---|
application_id | Application ID | Yes | - |
application_token | Application token | Yes | - |
short_url | Abbreviated url to be changed | Yes | - |
target_url | New URL | Yes | - |
Example of full request:
POST /api/1.0/shortener/change HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json
Cache-Control: no-cache
{
"application_id": "APPLICATION_ID",
"application_token": "APPLICATION_TOKEN",
"short_url": "u1.pm/K",
"target_url": "www.insymbo.com"
}
Response to this command may be:
In case of success:
{
"data": {
"short_url": "http://u1.pm/K",
"target_url": "http://www.insymbo.com",
"final_url": "https://www.insymbo.com/en",
"title": "Online assessment tool for employee selection - INSYMBO"
}
}
In case of error:
{
"type": "url_not_found",
"code": 400,
"error": "Url not found",
"detail": null
}
{
"type": "url_type_is_incorrect",
"code": 400,
"error": "Url type is incorrect",
"detail": null
}
{
"type": "the_per_minute_quota_has_been_exceeded",
"code": 400,
"error": "The per minute quota has been exceeded",
"detail": null
}
{
"type": "url_is_unavailable",
"code": 400,
"error": "Url is unavailable",
"detail": null
}