Skip to main content

Ad endpoints

info

these are endpoints relating to the system

tip

How to format checkpoint urls:

Callback url:

  • https://ads.luaauth.com/verify/{CALLBACK_ID}

Postback url:

  • https://ads.luaauth.com/postback/{POSTBACK_ID}

Getting provider info

GET /ads/providers

Response

{
"success": true,
"providers": {
"PROVIDER_NAME": [{
"id": "SETTING_ID",
"name": "SETTING_NAME",
"type": "toggle" OR "text" OR "info",
"info": "SETTING_INFO"
}]
}
}

Creating a new system

POST /ads/systems/new

Body

NameTypeNullableDefaultDescription
project_idStringProject system should use
nameStringName for the system
key_durationNumber86400000Key duration given for completing the system
max_keysNumber1Max keys allowed per system user
allow_extendingBooleanTrueAllow users to extend their keys duration
max_durationNumber604800000Max duration a users key is allowed to be extended to

Response

{
"success": true,
"system_id": "SYSTEM_ID"
}

Getting systems

GET /ads/systems

Response

{
"success": true,
"systems": [{
"id": "SYSTEM_ID",
"project_id": "PROJECT_ID",
"name": "SYSTEM_NAME",
"key_duration": 86400000,
"max_keys": 1,
"allow_extending": true,
"max_duration": 604800000
}]
}

Getting system info

GET /ads/systems/:system_id

Parameters

NameTypeDescription
system_idStringThe systems id

Response

{
"success": true,
"system": {
"id": "SYSTEM_ID",
"project_id": "PROJECT_ID",
"name": "SYSTEM_NAME",
"key_duration": 86400000,
"max_keys": 1,
"allow_extending": true,
"max_duration": 604800000
}
}

Editing a system

POST /ads/systems/:system_id/edit

Parameters

NameTypeDescription
system_idStringThe systems id

Body

NameTypeNullableDescription
project_idStringProject system should use
nameStringName for the system
key_durationNumberKey duration given for completing the system
max_keysNumberMax keys allowed per system user
allow_extendingBooleanAllow users to extend their keys duration
max_durationNumberMax duration a users key is allowed to be extended to

Response

{ "success": true }

Setting a systems custom url

POST /ads/systems/:system_id/url

Parameters

NameTypeDescription
system_idStringThe systems id

Body

NameTypeNullableDescription
urlStringCustom url to use (A-Z, a-z, 0-9, _ and - allowed only)

Response

{ "success": true }

Deleting a system

POST /ads/systems/:system_id/remove

Parameters

NameTypeDescription
system_idStringThe systems id

Response

{ "success": true }

Getting checkpoints

GET /ads/systems/:system_id/checkpoints

Parameters

NameTypeDescription
system_idStringThe systems id

Response

{
"success": true,
"checkpoints": [{
"id": "CHECKPOINT_ID",
"system_id": "SYSTEM_ID",
"name": "CHECKPOINT_NAME",
"url": "PROVIDER_URL",
"index": 0,
"provider": "linkvertise" OR "lootlabs" OR "work.ink",
"provider_data": {
"SETTING_ID": "SETTING_VALUE" // check provider info endpoint for this
},
"callback_id": "CALLBACK_ID",
"total_completed": 0,
"total_failed": 0,
"average_time_taken": 0 // ms
}]
}

Preparing a new checkpoint

POST /ads/systems/:system_id/checkpoints/prepare

info

you must do this request before you can create a new checkpoint

Parameters

NameTypeDescription
system_idStringThe systems id

Response

{
"success": true,
"id": "CHECKPOINT_ID",
"callback_id": "CALLBACK_ID"
}

Creating a new checkpoint

POST /ads/systems/:system_id/checkpoints/new

Parameters

NameTypeDescription
system_idStringThe systems id

Body

NameTypeOptionsNullableDescription
nameStringName for the checkpoint
urlStringUrl for the checkpoint given by your provider
providerEnum'linkvertise' OR 'lootlabs' OR 'work.ink'Provider your using for this checkpoint
provider_dataJSONProvider specific data for this checkpoint

Response

{
"success": true,
"checkpoint_id": "CHECKPOINT_ID",
"postback_id": "POSTBACK_ID" OR null
}

Getting checkpoint info

GET /ads/checkpoints/:checkpoint_id

Parameters

NameTypeDescription
checkpoint_idStringThe checkpoints id

Response

{
"success": true,
"checkpoint": {
"id": "CHECKPOINT_ID",
"system_id": "SYSTEM_ID",
"name": "CHECKPOINT_NAME",
"url": "PROVIDER_URL",
"index": 0,
"provider": "linkvertise" OR "lootlabs" OR "work.ink",
"provider_data": {
"SETTING_ID": "SETTING_VALUE" // check provider info endpoint for this
},
"callback_id": "CALLBACK_ID",
"total_completed": 0,
"total_failed": 0,
"average_time_taken": 0 // ms
}
}

Editing a checkpoint

POST /ads/checkpoints/:checkpoint_id/edit

Parameters

NameTypeDescription
checkpoint_idStringThe checkpoints id

Body

NameTypeOptionsNullableDescription
nameStringName for the checkpoint
urlStringUrl for the checkpoint given by your provider
providerEnum'linkvertise' OR 'lootlabs' OR 'work.ink'Provider your using for this checkpoint
provider_dataJSONProvider specific data for this checkpoint

Response

{
"success": true,
"postback_id": "POSTBACK_ID" OR null
}

Swapping checkpoints

POST /ads/checkpoints/:checkpoint_id/swap

Parameters

NameTypeDescription
checkpoint_idStringThe checkpoints id

Body

NameTypeNullableDescription
indexNumberIndex to swap with

Response

{ "success": true }

Deleting a checkpoint

POST /ads/checkpoints/:checkpoint_id/remove

Parameters

NameTypeDescription
checkpoint_idStringThe checkpoints id

Response

{ "success": true }