Simulate Create Line Cost
Return the credit cost of creating a regular line without persisting it.
curl --request POST \
--url https://api.reselliptv.com/v1/lines/simulate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"duration": 12,
"username": "<string>",
"password": "<string>",
"label": "My TV Line",
"connections": 1,
"macaddress": "67:21:4C:24:76:97",
"parental_code": "0000",
"bouquets": [
1,
2,
3
],
"enabled": true
}
'import requests
url = "https://api.reselliptv.com/v1/lines/simulate"
payload = {
"duration": 12,
"username": "<string>",
"password": "<string>",
"label": "My TV Line",
"connections": 1,
"macaddress": "67:21:4C:24:76:97",
"parental_code": "0000",
"bouquets": [1, 2, 3],
"enabled": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
duration: 12,
username: '<string>',
password: '<string>',
label: 'My TV Line',
connections: 1,
macaddress: '67:21:4C:24:76:97',
parental_code: '0000',
bouquets: [1, 2, 3],
enabled: true
})
};
fetch('https://api.reselliptv.com/v1/lines/simulate', 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.reselliptv.com/v1/lines/simulate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'duration' => 12,
'username' => '<string>',
'password' => '<string>',
'label' => 'My TV Line',
'connections' => 1,
'macaddress' => '67:21:4C:24:76:97',
'parental_code' => '0000',
'bouquets' => [
1,
2,
3
],
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reselliptv.com/v1/lines/simulate"
payload := strings.NewReader("{\n \"duration\": 12,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"label\": \"My TV Line\",\n \"connections\": 1,\n \"macaddress\": \"67:21:4C:24:76:97\",\n \"parental_code\": \"0000\",\n \"bouquets\": [\n 1,\n 2,\n 3\n ],\n \"enabled\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.reselliptv.com/v1/lines/simulate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"duration\": 12,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"label\": \"My TV Line\",\n \"connections\": 1,\n \"macaddress\": \"67:21:4C:24:76:97\",\n \"parental_code\": \"0000\",\n \"bouquets\": [\n 1,\n 2,\n 3\n ],\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reselliptv.com/v1/lines/simulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"duration\": 12,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"label\": \"My TV Line\",\n \"connections\": 1,\n \"macaddress\": \"67:21:4C:24:76:97\",\n \"parental_code\": \"0000\",\n \"bouquets\": [\n 1,\n 2,\n 3\n ],\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"cost": 25
}{
"code": "request_errors",
"message": "Request error occurred.",
"data": {
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": [
"<string>"
]
}
]
}
}{
"code": "not_authorized",
"message": "Not authorized to perform this action."
}{
"message": "Username already exists."
}{
"code": "rate_limit",
"message": "Rate limit exceeded."
}{
"code": "server_error",
"message": "Internal server error occurred.",
"requestId": "<string>"
}Authorizations
API Key
Body
The duration of the line in months. Valid values are 1, 3, 6, or 12.
12
The username of the line. Must be RFC 3986 compliant. If not provided, a random username will be generated.
12 - 30The password of the line. Must be RFC 3986 compliant. If not provided, a random password will be generated.
14 - 30The label of the line.
30"My TV Line"
The number of simultaneous connections allowed for the line. Should be an integer between 1 and 6.
1 <= x <= 61
The MAC address to assign to the line.
"67:21:4C:24:76:97"
The parental code of the MAG access. Should be 4 digits.
4"0000"
The IDs of the bouquets to link on creation of the line.
[1, 2, 3]
Specifies whether the created line should be active or not.
Response
OK: Returns the simulated creation cost.
25
curl --request POST \
--url https://api.reselliptv.com/v1/lines/simulate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"duration": 12,
"username": "<string>",
"password": "<string>",
"label": "My TV Line",
"connections": 1,
"macaddress": "67:21:4C:24:76:97",
"parental_code": "0000",
"bouquets": [
1,
2,
3
],
"enabled": true
}
'import requests
url = "https://api.reselliptv.com/v1/lines/simulate"
payload = {
"duration": 12,
"username": "<string>",
"password": "<string>",
"label": "My TV Line",
"connections": 1,
"macaddress": "67:21:4C:24:76:97",
"parental_code": "0000",
"bouquets": [1, 2, 3],
"enabled": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
duration: 12,
username: '<string>',
password: '<string>',
label: 'My TV Line',
connections: 1,
macaddress: '67:21:4C:24:76:97',
parental_code: '0000',
bouquets: [1, 2, 3],
enabled: true
})
};
fetch('https://api.reselliptv.com/v1/lines/simulate', 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.reselliptv.com/v1/lines/simulate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'duration' => 12,
'username' => '<string>',
'password' => '<string>',
'label' => 'My TV Line',
'connections' => 1,
'macaddress' => '67:21:4C:24:76:97',
'parental_code' => '0000',
'bouquets' => [
1,
2,
3
],
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reselliptv.com/v1/lines/simulate"
payload := strings.NewReader("{\n \"duration\": 12,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"label\": \"My TV Line\",\n \"connections\": 1,\n \"macaddress\": \"67:21:4C:24:76:97\",\n \"parental_code\": \"0000\",\n \"bouquets\": [\n 1,\n 2,\n 3\n ],\n \"enabled\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.reselliptv.com/v1/lines/simulate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"duration\": 12,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"label\": \"My TV Line\",\n \"connections\": 1,\n \"macaddress\": \"67:21:4C:24:76:97\",\n \"parental_code\": \"0000\",\n \"bouquets\": [\n 1,\n 2,\n 3\n ],\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reselliptv.com/v1/lines/simulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"duration\": 12,\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"label\": \"My TV Line\",\n \"connections\": 1,\n \"macaddress\": \"67:21:4C:24:76:97\",\n \"parental_code\": \"0000\",\n \"bouquets\": [\n 1,\n 2,\n 3\n ],\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"cost": 25
}{
"code": "request_errors",
"message": "Request error occurred.",
"data": {
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": [
"<string>"
]
}
]
}
}{
"code": "not_authorized",
"message": "Not authorized to perform this action."
}{
"message": "Username already exists."
}{
"code": "rate_limit",
"message": "Rate limit exceeded."
}{
"code": "server_error",
"message": "Internal server error occurred.",
"requestId": "<string>"
}