Skip to main content

Create and Renew Enpoints - EXAMPLE SEPARATE PAGES

POST /ext/line/create

v2.0.9-2 - updated available request body params - include bouquets list

POST BODY

{
    "username": "larry_line",
    "password": "12345",
    "package": 107,
    "reseller_notes": "larry's home line",
    "bouquets": [2]
    "rid": "xDg456Hdfjdeg45"
}

Request parameters

Name Requirements Note
username Optional, string, max 255 If not provided - random string will be generated
password Optional, string, max 255 If not provided - random string will be generated
package Required, integer  
reseller_notes Optional, string  
mac_addr Optional, string, valid MAC address format If provided - the created record will be Device
max_connections Optional, integer If provided - will override the value in the package
bouquets Optional, array of integers !!! Bouquets that are not part of the selected package will not be added to the created line
If not provided all bouquets in the selected package will be added to the created line
rid Optional, Unique string parameter is supplied to ensure action not performed multiple times

Response

{
    "line_id": "1734da33-9723-4df6-90d1-38dc589aa0ec",
    "expire_at": "2021-12-16T23:42:49+00:00",
    "transaction_amount": -100,
    "rid": "xDg456Hdfjdeg45"
}


POST /ext/line/{{line-uuid}}/renew (line_id)

POST BODY

{
    "package": 108,
    "rid": "hfd5774466Gdhut"
}
  • Optional: package, rid

rid parameter is supplied to ensure action not performed multiple times

Response

{
    "line_id": "1734da33-9723-4df6-90d1-38dc589aa0ec",
    "expire_at": "2021-12-16T23:42:49+00:00",
    "transaction_amount": -100,
    "rid": "hfd5774466Gdhut"
}

POST /ext/line/create-advanced

Create line without charging credits, can pick bouquets etc.

needed permission: createLines (not typical for resellers)

POST BODY:

{
    "mac_addr": "00:00:00:11:11:11",
    "bouquets": [1,2,3,4],
    "reseller_notes": "larry's home line 888",
    "rid": "xDg456Hdfjnthkyjhtrjjhhbdehgk45"
}

Request parameters

Name Requirements Note
username Optional, string, max 255 If not provided - random string will be generated
password Optional, string, max 255 If not provided - random string will be generated
expire_at Optional, string, ISO 8601 date format If not provided - the created line will have Unlimited expiration
is_enabled Optional, boolean Default: TRUE
is_restreamer Optional, boolean (Added in v2.0.7-5) Default: FALSE
is_trial Optional, boolean (Added in v2.0.7-5) Default: FALSE
package_id Optional, integer (Added in v2.0.7-5) If provided - will only link the line to the package, will not apply any package properties (expiration date, restrictions, locks, etc.) to the created line.
If you wish the new line to have the package properties please use the "POST /ext/line/create" endpoint
bouquets Optional, array of integers  
reseller_notes Optional, string  
mac_addr Optional, string, valid MAC address format If provided - the created record will be Device
max_connections Optional, integer Default: 1
can_watch_adult Optional, boolean Default: FALSE
owner_id Optional, Integer, Valid user ID (Added in v2.0.10) Works ONLY for SUPER-ADMIN users. Attaches the created line to the user with the provided ID. If not provided - the user of the used "User API Access Token" will be set as line owner
rid Optional, Unique string parameter is supplied to ensure action not performed multiple times

Response

{
    "line_id": "1734da33-9723-4df6-90d1-38dc589aa0ec",
    "username": "13456yhtgrf",
    "password": "umyjntrgfe6",
    "mac_addr": "00:00:00:11:11:11",
    "owner": "billing",
    "type": "device",
    "expire_at": null,
    "is_enabled": true,
    "is_restreamer":false,
    "is_trial": false,
    "package_id": null,
    "bouquets": [1,2,3,4],
    "transaction_amount": 0,
    "max_connections": 1,
    "reseller_notes": "larry's home mac",
    "rid": "xDg456Hdffjdeg45"
}