Headers:
-
Authorization: nadeo_v1 t={token}An access token for theNadeoLiveServicesaudience
Service provided by Openplanet
Create club campaign
POST
https://live-services.trackmania.nadeo.live/api/token/club/{clubId}/campaign/create
Headers:
Authorization: nadeo_v1 t={token}
An access token for the NadeoLiveServices audience
Path parameters:
{clubId}
integer
The ID of the club where the campaign should be created
*
Body parameters:
{name}
string
The name of the new campaign
*
20 characters
{playlist}
object[]
A list of maps, with their positions and UIDs
{position}
integer
The position of the map in the campaign (see remarks below)
{mapUid}
string
The UID of a specific map
{folderId}
integer
The ID of the folder where the campaign should be created
The request body is an object containing the campaign details:
{
"name": name,
"playlist": [
{
"position": position,
"mapUid": mapUid
}
],
"folderId": folderId
}
Creates a campaign in a club.
Remarks:
playlist array in the request body, rather than by their position parameter. It is still recommended to pass the desired position.mapUid or position, the campaign will be created, but the map will be skipped..dds media files by default, while several scaled .png/.jpg versions are available using separate fields (see example below for reference). This only applies for custom media files, and not for preset themes.Example request:
POST https://live-services.trackmania.nadeo.live/api/token/club/103034/campaign/create
{
"name": "RPG",
"playlist": [
{
"position": 0,
"mapUid": "zx45UUBTayedFisP7N_wYWZa3Ih"
},
{
"position": 1,
"mapUid": "XiynRhPNCztF7UeXGa7bmYL32xm"
}
],
"folderId": 0
}
Example response:
{
"creationTimestamp": 1771654457,
"clubName": "Fort's club",
"id": 1004334,
"clubDecalUrl": "",
"publicationTimestamp": 1771654457,
"activityId": 1004334,
"campaignId": 127119,
"name": "RPG",
"clubId": 103034,
"mediaUrlPngSmall": "",
"mediaUrl": "",
"latestEditorAccountId": "69f31664-4252-48e0-a433-024c49caee8c",
"mediaUrlPngLarge": "",
"campaign": {
"day": -1,
"id": 127119,
"video": false,
"publicationTimestamp": 1771654457,
"monthDay": -1,
"color": "",
"name": "RPG",
"clubId": 103034,
"month": -1,
"endTimestamp": 0,
"monthYear": -1,
"rankingSentTimestamp": null,
"mediaUrl": "",
"startTimestamp": 1771654457,
"editionTimestamp": 1771654457,
"leaderboardGroupUid": "NLS-jZ46Fn4oNK9KLokxwvMLMo0bOwQFca1Dq0A",
"seasonUid": "NLS-jZ46Fn4oNK9KLokxwvMLMo0bOwQFca1Dq0A",
"categories": [
{
"name": "RPG",
"position": 0,
"length": 5
}
],
"year": -1,
"media": {
"decalUrl": "",
"popUpImageUrl": "",
"liveButtonForegroundUrl": "",
"liveButtonBackgroundUrl": "",
"buttonBackgroundUrl": "",
"popUpBackgroundUrl": "",
"buttonForegroundUrl": ""
},
"published": true,
"useCase": 2,
"playlist": [
{
"id": 1516902,
"mapUid": "zx45UUBTayedFisP7N_wYWZa3Ih",
"position": 0
},
{
"id": 1516903,
"mapUid": "XiynRhPNCztF7UeXGa7bmYL32xm",
"position": 1
}
],
"week": -1,
"latestSeasons": [
{
"uid": "NLS-jZ46Fn4oNK9KLokxwvMLMo0bOwQFca1Dq0A",
"campaignId": 127119,
"name": "RPG",
"endTimestamp": 0,
"startTimestamp": 1771654457,
"relativeEnd": 0,
"active": true,
"relativeStart": 0
}
]
},
"mediaTheme": "",
"popularityLevel": 0,
"creatorAccountId": "69f31664-4252-48e0-a433-024c49caee8c",
"mediaUrlDds": "",
"mapsCount": 2,
"mediaUrlPngMedium": ""
}
If the club does not exist or the authenticated account is not a member of the club, the response will contain an error:
[
"clubMemberRole:error-notMember"
]
If the authenticated account does not have enough permissions in the club to create campaigns, the response will contain an error:
[
"clubMemberRole:error-notContentCreator"
]
An invalid or duplicated mapUid results in a 500 response code with an error object in the response body.