Achievements API (1.0.0)

Download OpenAPI specification:

Achievement

Create an achievement

header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json
Request Body schema: application/json
required
categoryId
required
string
name
required
string
activeImageUrl
required
string
inactiveImageUrl
required
string
requirement
required
string
source
required
string
Value: "academy"
status
string or null
Enum: "published" "draft"
groupId
string or null
groupRank
integer or null

Responses

Request samples

Content type
application/json
{
  • "categoryId": "2114e5ac-774f-11ed-b5c8-0242ac120007",
  • "name": "Achievement Name",
  • "activeImageUrl": "/path/to/active/image.jpg",
  • "inactiveImageUrl": "/path/to/inactive/image.jpg",
  • "requirement": "Achievement requirement description",
  • "source": "academy",
  • "status": "published",
  • "groupId": "2114e5ac-774f-11ed-b5c8-0242ac120007",
  • "groupRank": 1
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Fetch multiple achievements

Fetch a list of achievements with their registrants. Providing admin credentials will return all achievements, otherwise returns only the achievements that are live

query Parameters
page
number
Example: page=1
perPage
number
Example: perPage=25
header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json
X-Username
any
X-Password
any

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Category

Create a category

header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json
Request Body schema: application/json
required
name
required
string
sort
integer or null

Responses

Request samples

Content type
application/json
{
  • "name": "Category Name",
  • "sort": 1
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Fetch multiple categories

Fetch a list of categories with their registrants. Providing admin credentials will return all categories, otherwise returns only the categories that are live

query Parameters
page
number
Example: page=1
perPage
number
Example: perPage=25
header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Find a category

Fetch a single category by id

path Parameters
id
required
string
Example: e4cc5e1a-1240-11eb-9573-0242ac140005
header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete a category

Delete a category by id

path Parameters
id
required
string
Example: e4cc5e1a-1240-11eb-9573-0242ac140005
header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Update a category

Update category by id

path Parameters
id
required
string
Example: e4cc5e1a-1240-11eb-9573-0242ac140005
header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json
Request Body schema: application/json
required
name
string or null
sort
integer or null

Responses

Request samples

Content type
application/json
{
  • "name": "Updated Category Name",
  • "sort": 1
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Rule

Create a rule

header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json
Request Body schema: application/json
required
event
required
string
times
required
integer
targetId
string or null
achievementId
required
string or null
type
string or null
Enum: "consecutive" "count" null
period
string or null
Enum: "daily" null

Responses

Request samples

Content type
application/json
{
  • "event": "Event Name",
  • "times": 1,
  • "targetId": "2114e5ac-774f-11ed-b5c8-0242ac120007",
  • "achievementId": "2114e5ac-774f-11ed-b5c8-0242ac120007",
  • "type": "count",
  • "period": "daily"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Fetch multiple rules

Fetch a list of rules with their registrants. Providing admin credentials will return all rules, otherwise returns only the rules that are live

query Parameters
page
number
Example: page=1
perPage
number
Example: perPage=25
header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Find a rule

Fetch a single rule by id

path Parameters
id
required
string
Example: e4cc5e1a-1240-11eb-9573-0242ac140005
header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete a rule

Delete a rule by id

path Parameters
id
required
string
Example: e4cc5e1a-1240-11eb-9573-0242ac140005
header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Update a rule

Update rule by id

path Parameters
id
required
string
Example: e4cc5e1a-1240-11eb-9573-0242ac140005
header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json
Request Body schema: application/json
required
event
string
times
integer
targetId
string or null
achievementId
string or null
type
string or null
Enum: "consecutive" "count" null
period
string or null
Enum: "daily" null

Responses

Request samples

Content type
application/json
{
  • "event": "Updated Event Name",
  • "times": 2,
  • "targetId": "2114e5ac-774f-11ed-b5c8-0242ac120007",
  • "achievementId": "2114e5ac-774f-11ed-b5c8-0242ac120007",
  • "type": "count",
  • "period": "daily"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

User Achievement

Create a user achievement

header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json
Request Body schema: application/json
required
achievementId
required
string

Responses

Request samples

Content type
application/json
{
  • "achievementId": "2114e5ac-774f-11ed-b5c8-0242ac120007"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Fetch multiple user achievements

Fetch a list of user achievements with their registrants. Providing admin credentials will return all user achievements, otherwise returns only the user achievements that are live

query Parameters
page
number
Example: page=1
perPage
number
Example: perPage=25
header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Delete a user achievement

Delete a user achievement by id

path Parameters
id
required
string
Example: e4cc5e1a-1240-11eb-9573-0242ac140005
header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

User Event

Create a user event

header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json
Request Body schema: application/json
required
event
required
string
targetId
string or null

Responses

Request samples

Content type
application/json
{
  • "event": "event.name",
  • "targetId": "2114e5ac-774f-11ed-b5c8-0242ac120007"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Create a user event

header Parameters
Accept
required
string
Example: application\json
Content-Type
required
string
Example: application\json
X-Username
required
string
Example: exampleUser@uscca.com
X-Password
required
string
Example: password
Request Body schema: application/json
required
event
required
string
count
required
integer [ 0 .. 50 ]
targetId
string or null

Responses

Request samples

Content type
application/json
{
  • "event": "Admin Event Name",
  • "count": 10,
  • "targetId": "2114e5ac-774f-11ed-b5c8-0242ac120007"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}