Introduction
The Codefling API offers extensive REST API access for creators and third-party developers and applications to interact with various services and features of Codefling, such as managing files, comments, and user accounts. The API allows you to perform tasks like downloading files, viewing reviews, and more.
Authorization
The Codefling API uses OAuth for authorization, ensuring secure access to user data. When accessing the REST API with OAuth, you will provide an access token that has been granted to a specific user. The data the user can see and the actions they can perform will be limited to their permissions.
For example, if you send an API request to GET /core/me
, only the data visible to the authenticated user will be included. Similarly, if a topic is created using POST /forums/topics
, it will be created on behalf of the authenticated user, and their identity cannot be changed in this context.
Some endpoints are only available when using OAuth. For instance, GET /core/me
can only be accessed via OAuth, as it retrieves data about the authenticated user.
Using OAuth (Advanced)
OAuth is a standard protocol for authorization that allows applications to interact with the Codefling API on behalf of users. The OAuth workflow involves obtaining an access token through various grant types (such as authorization code grant) and using this token to make API requests.
Once you have obtained an OAuth access token, include it in the Authorization header of your requests to interact with the API. For example:
<?php
= 'https://codefling.com/';
= 'your_access_token_here';
= '/core/hello';
= curl_init( . 'api' . );
curl_setopt_array(, array(
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_HTTPHEADER => array("Authorization: Bearer "),
CURLOPT_USERAGENT => "MyUserAgent/1.0"
));
= curl_exec();
In the OAuth model, users are authenticated and granted specific scopes, which determine the API endpoints they can access. The scopes you configure will depend on how you intend the API to be used within your application.
Parameters
For all GET requests, parameters should be passed in the query string. For PUT and POST requests, parameters should be Form URL Encoded in the body.
Response
All API responses are in JSON format.
Error Handling
When an error occurs, the response will look like this:
{
"errorCode": "3S290/7",
"errorMessage": "INVALID_ACCESS_TOKEN"
}
Common error codes across endpoints include:
Code |
Message |
Description |
1S290/A or 1S290/C |
IP_ADDRESS_BANNED |
The IP address sending the request has been banned due to repeated invalid API keys or requests. |
1S290/D |
TOO_MANY_REQUESTS_WITH_BAD_KEY |
The IP address has sent multiple requests with an invalid API key, temporarily preventing further requests. |
2S290/6 |
NO_API_KEY |
No API key or OAuth access token was sent in the request. |
2S290/8 |
IP_ADDRESS_NOT_ALLOWED |
The request came from an IP address not authorized to use the provided API key. |
2S290/B |
CANNOT_USE_KEY_AS_URL_PARAM |
The API key cannot be used as a URL parameter; it must be used in the Authorization header. |
3S290/7 |
INVALID_API_KEY |
The API key provided is not valid. |
2S290/9 |
INVALID_LANGUAGE |
An invalid value was passed in the X-IPS-Language header (used to specify a language ID). |
3S290/3 |
INVALID_APP |
The request was sent to an invalid app endpoint. |
3S290/4 |
INVALID_CONTROLLER |
The request was sent to an invalid controller endpoint. |
2S290/1 |
INVALID_APP |
The requested app endpoint does not exist. |
1S290/2 |
APP_DISABLED |
The requested application has been disabled. |
2S290/5 |
INVALID_CONTROLLER |
The requested controller endpoint does not exist. |
2S291/1 |
NO_ENDPOINT |
The request URL contains too many levels and does not match an existing endpoint. |
2S291/3 |
NO_PERMISSION |
The API key does not have permission to access the requested endpoint. |
3S291/2 |
BAD_METHOD |
The HTTP method (GET, POST, etc.) is incorrect for the requested endpoint. |
3S290/9 |
INVALID_ACCESS_TOKEN |
The OAuth access token provided is not valid. |
1S290/E |
EXPIRED_ACCESS_TOKEN |
The OAuth access token has expired. |
3S290/B |
NO_SCOPES |
The OAuth access token has not been authorized for any scopes. |
Sample Code
Here’s a simple example of a request to the /core/hello
endpoint:
<?php
= 'https://codefling.com/';
= 'your_access_token_here';
= curl_init( . 'api/core/hello');
curl_setopt_array(, array(
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_HTTPHEADER => array("Authorization: Bearer "),
CURLOPT_USERAGENT => "MyUserAgent/1.0"
));
= curl_exec();
echo ;
A successful response will look like this:
{
"communityName": "Codefling",
"communityUrl": "https://codefling.com",
"version": "1.0"
}
Create API Keys
To use the Codefling API, you must create an API key. Follow these steps to generate and configure your API key:
- Click your name in the top-right corner of the page to open the dropdown menu.
- Select Account Settings from the dropdown.
- In the left-hand menu, click Apps.
- Click Add App in the top-right corner.
- From the dropdown, select Creator API.
- Choose the required Scopes for your app and click Add.
Once added, the app will appear in your list of apps. You can refresh the app, delete it, or view your configured scopes. Additionally, you can retrieve your access token directly from this page.
For convenience, you can access the Apps page directly using the following link:
https://codefling.com/settings/apps/
GET https://codefling.com/api/downloads/files
Get list of files
For requests using an OAuth Access Token for a particular member, only files the authorized user can view will be included.
Parameters
Name |
Type |
Description |
ids |
string |
Comma-delimited list of file IDs |
categories |
string |
Comma-delimited list of category IDs |
authors |
string |
Comma-delimited list of member IDs - if provided, only files started by those members are returned |
locked |
int |
If 1, only files which are locked are returned, if 0 only unlocked |
hidden |
int |
If 1, only files which are hidden are returned, if 0 only not hidden |
pinned |
int |
If 1, only files which are pinned are returned, if 0 only not pinned |
featured |
int |
If 1, only files which are featured are returned, if 0 only not featured |
sortBy |
string |
What to sort by. Can be 'date' for creation date, 'title', 'updated', 'popular' or leave unspecified for ID |
sortDir |
string |
Sort direction. Can be 'asc' or 'desc' - defaults to 'asc' |
page |
int |
Page number |
perPage |
int |
Number of results per page - defaults to 25 |
Response
Name |
Type |
Description |
page |
int |
The page number for the results being shown |
perPage |
int |
The number of results that will be on each page |
totalResults |
int |
The total number of results |
totalPages |
int |
The number of pages of results |
results |
array of file objects |
The results for this page |
GET https://codefling.com/api/downloads/files/{id}
View information about a specific file
Parameters
Name |
Type |
Description |
version |
int |
If specified, will show a previous version of a file (see GET /downloads/files/{id}/versions) |
Exceptions
Code |
Message |
Description |
2S303/1 |
INVALID_ID |
The file ID does not exist or the authorized user does not have permission to view it |
2S303/6 |
INVALID_VERSION |
The version ID does not exist |
Response
Name |
Type |
Description |
id |
int |
ID number |
title |
string |
Title |
category |
category object |
Category |
author |
member object |
Author |
date |
datetime |
When the file was created |
updated |
datetime |
When the file was last updated |
description |
string |
Description |
version |
string |
Current version number |
changelog |
string |
Description of what changed between this version and the previous one |
primaryScreenshot |
file object |
The primary screenshot |
screenshots |
array of file objects |
Screenshots |
screenshotsThumbnails |
array of file objects |
Screenshots in Thumbnail size |
downloads |
int |
Number of downloads |
comments |
int |
Number of comments |
reviews |
int |
Number of reviews |
views |
int |
Number of views |
prefix |
string |
The prefix tag, if there is one |
tags |
array of strings |
The tags |
locked |
bool |
File is locked |
hidden |
bool |
File is hidden |
pinned |
bool |
File is pinned |
featured |
bool |
File is featured |
url |
string |
URL |
topic |
topic object |
The topic |
isPaid |
bool |
Is the file paid? |
prices |
array of floats |
Prices (key is currency, value is price). Does not consider associated packages. |
canDownload |
bool |
If the authenticated member can download. Will be NULL for requests made using an API Key or the Client Credentials Grant Type |
canBuy |
bool |
Can purchase the file |
canReview |
bool |
Can review the file |
rating |
float |
File rating |
purchases |
int |
Number of purchases |
hasPendingVersion |
bool |
Whether the file has a new version pending. Will be NULL for client requests where the authorized member cannot upload new versions. |
POST https://codefling.com/api/downloads/files
Upload a file
For requests using an OAuth Access Token for a particular member, any parameters the user doesn't have permission to use are ignored (for example, locked will only be honored if the authenticated user has permission to lock files).
Parameters
Name |
Type |
Description |
Required category |
int |
The ID number of the category the file should be created in |
Required author |
int |
The ID number of the member creating the file (0 for guest). Required for API Key or Client Credentials Grant requests. |
Required title |
string |
The file name |
Required description |
string |
The description as HTML (e.g. <p>This is a file.</p>). Will be sanitized for OAuth token requests. |
Required files |
object |
Files to upload. Keys should be filename (e.g. 'file.txt') and values should be file content |
version |
string |
The version number of the file |
screenshots |
object |
Screenshots. Keys should be filenames and values should be file content. |
prefix |
string |
Prefix tag for the file |
tags |
string |
Comma-separated list of tags |
date |
datetime |
The date/time of file creation. Defaults to current date/time if not provided. |
ip_address |
string |
The IP address for the file creation. Defaults to the requester's IP address. |
locked |
int |
1/0 indicating if the file should be locked |
hidden |
int |
0 = unhidden, 1 = hidden pending approval, -1 = hidden by moderator |
pinned |
int |
1/0 indicating if the file should be pinned |
featured |
int |
1/0 indicating if the file should be featured |
anonymous |
bool |
If true, the file will be posted anonymously |
Exceptions
Code |
Message |
Description |
1S303/7 |
NO_CATEGORY |
The category ID does not exist |
1S303/8 |
NO_AUTHOR |
The author ID does not exist |
1S303/9 |
NO_TITLE |
No title was supplied |
1S303/B |
NO_FILES |
No files were supplied |
2S303/H |
NO_PERMISSION |
The user does not have permission to create a file in that category |
1S303/I |
BAD_FILE_EXT |
One of the files has a disallowed file type |
Response
Name |
Type |
Description |
id |
int |
ID number of the uploaded file |
title |
string |
Title of the file |
category |
category object |
Category of the file |
author |
member object |
Author of the file |
POST https://codefling.com/api/downloads/files/{id}
Edit a file
For requests using an OAuth Access Token for a particular member, any parameters the user doesn't have permission to use are ignored
(for example, locked
will only be honored if the authenticated user has permission to lock files).
Parameters
Name |
Type |
Description |
Required category |
int |
The ID number of the category the file should be moved to |
author |
int |
The ID number of the member who created the file. Ignored for OAuth Access Token requests. |
title |
string |
The name of the file |
description |
string |
The description as HTML. Sanitized for OAuth token requests. |
tags |
string |
Comma-separated list of tags |
locked |
int |
1/0 indicating whether the file should be locked |
hidden |
int |
0 = unhidden, 1 = hidden pending approval, -1 = hidden by moderator |
featured |
int |
1/0 indicating whether the file should be featured |
Exceptions
Code |
Message |
Description |
2S303/C |
INVALID_ID |
The file ID is invalid or the authorized user does not have permission to edit it |
1S303/D |
NO_CATEGORY |
The category ID does not exist or the user does not have permission to post in it |
1S303/E |
NO_AUTHOR |
The author ID does not exist |
2S303/O |
NO_PERMISSION |
The authorized user does not have permission to edit the file |
Response
Name |
Type |
Description |
id |
int |
ID number of the file |
title |
string |
Title of the file |
category |
category object |
Category of the file |
author |
member object |
Author of the file |
updated |
datetime |
When the file was last updated |
downloads |
int |
Number of downloads |
GET https://codefling.com/api/core/me
Get basic information about the authorized user
This endpoint is only available for requests made using an OAuth Access Token for a particular member, not using an API Key or the Client Credentials Grant Type.
Parameters
No parameters are accepted for this endpoint.
Exceptions
Code |
Message |
Description |
3S290/C |
MEMBER_ONLY |
Request was made using an API Key or the Client Credentials Grant Type. |
Response
Name |
Type |
Description |
id |
int |
ID number of the user. |
name |
string |
Username of the user. |
title |
string |
Member title of the user. |
timezone |
string |
User's timezone. |
formattedName |
string |
Username with group formatting. |
primaryGroup |
group object |
Primary group of the user. |
secondaryGroups |
array of group objects |
Secondary groups of the user. |
email |
string |
User's email address. |
joined |
datetime |
Registration date of the user. |
registrationIpAddress |
string |
IP address when the user registered. |
warningPoints |
int |
Number of active warning points. |
reputationPoints |
int |
Number of reputation points. |
photoUrl |
string |
URL to the user's profile photo. |
photoUrlIsDefault |
bool |
Indicates whether the photo URL is the site's default. |
coverPhotoUrl |
string |
URL to the user's profile cover photo. |
profileUrl |
string|null |
URL to the user's profile. |
validating |
bool |
Whether the user's account is still validating. |
posts |
int |
Number of content item submissions made by the user. |
lastActivity |
datetime|null |
Last activity date on the site. |
lastVisit |
datetime|null |
Last distinct visit date on the site. |
lastPost |
datetime|null |
Latest content submission date. |
profileViews |
int |
Number of times the user's profile has been viewed. |
birthday |
string |
User's birthday in MM/DD/YYYY format. |
customFields |
array of fieldgroup objects |
Custom profile fields. Only fields the authorized user can view are included. |
rank |
array of rank objects |
User's rank. |
achievements_points |
int |
Number of achievement points earned. |
allowAdminEmails |
bool |
Whether the user wants to receive admin emails. |
completed |
bool |
Whether the user's registration is complete. |
GET https://codefling.com/api/core/me/email
Get authorized user's email address
This endpoint is only available for requests made using an OAuth Access Token for a particular member, not using an API Key or the Client Credentials Grant Type.
Parameters
No parameters are accepted for this endpoint.
Exceptions
Code |
Message |
Description |
3S290/C |
MEMBER_ONLY |
Request was made using an API Key or the Client Credentials Grant Type. |
Response
Name |
Type |
Description |
email |
string |
Email address |
GET https://codefling.com/api/downloads/files/{id}/download
Download a file, increments download counter
This endpoint is only available for requests made using an OAuth Access Token for a particular member, not using an API Key or the Client Credentials Grant Type.
Parameters
Name |
Type |
Description |
version |
int |
If specified, will show a previous version of a file (see GET /downloads/files/{id}/versions) |
Exceptions
Code |
Message |
Description |
2S303/M |
INVALID_ID |
The file ID does not exist or the authorized user does not have permission to view it |
2S303/N |
NO_PERMISSION |
The file cannot be downloaded by the authorized member |
2S303/O |
INVALID_VERSION |
The version ID does not exist |
3S290/C |
MEMBER_ONLY |
Request was made using an API Key or the Client Credentials Grant Type. |
Response
Name |
Type |
Description |
files |
array of file objects |
The files |
GET https://codefling.com/api/downloads/files/{id}/reviews
Get reviews on a file
Parameters
Name |
Type |
Description |
hidden |
int |
If 1, only comments which are hidden are returned; if 0, only not hidden |
sortDir |
string |
Sort direction. Can be 'asc' or 'desc' - defaults to 'asc' |
page |
int |
Page number |
perPage |
int |
Number of results per page - defaults to 25 |
Exceptions
Code |
Message |
Description |
2S303/3 |
INVALID_ID |
The file ID does not exist or the authorized user does not have permission to view it |
Response
Name |
Type |
Description |
page |
int |
The page number for the results being shown |
perPage |
int |
The number of results that will be on each page |
totalResults |
int |
The total number of results |
totalPages |
int |
The number of pages of results |
results |
array of review objects |
The results for this page |
GET https://codefling.com/api/downloads/files/{id}/history
Get previous versions for a file
Parameters
No parameters are accepted for this endpoint.
Exceptions
Code |
Message |
Description |
2S303/4 |
INVALID_ID |
The file ID does not exist or the authorized user does not have permission to view it |
Response
Name |
Type |
Description |
id |
int |
The version ID number (use to get more information about this version in GET /downloads/files/{id}) |
version |
string |
The version number provided by the user |
changelog |
string |
What was new in this version |
date |
datetime |
Datetime the backup was stored |
hidden |
bool |
If this version is hidden |
POST https://codefling.com/api/downloads/files/{id}/history
Upload a new file version
Parameters
Name |
Type |
Description |
Required files |
object |
Files. Keys should be the filename (e.g. 'file.txt') and values should be file content. Will replace all current files. |
title |
string |
The file name |
description |
string |
The description as HTML (e.g. "<p>This is a file.</p>"). |
version |
string |
The version number |
changelog |
string |
What changed in this version |
save |
int |
If 1, this will be saved as a new version and the previous version available in history. If 0, will simply replace the existing files/screenshots. Defaults to 1. |
screenshots |
object |
Screenshots. Keys should be the filename (e.g. 'screenshot1.png') and values should be file content. Will replace all current screenshots. |
Exceptions
Code |
Message |
Description |
2S303/F |
INVALID_ID |
The file ID is invalid or the authorized user does not have permission to view it |
1S303/G |
NO_FILES |
No files were supplied |
2S303/Q |
NO_PERMISSION |
The authorized user does not have permission to edit the file |
2S303/P |
PENDING_VERSION |
The file already has a new version waiting for approval |
1S303/I |
BAD_FILE_EXT |
One of the files has a file type that is not allowed |
1S303/J |
BAD_FILE_SIZE |
One of the files is too big |
1S303/K |
BAD_SS |
One of the screenshots is not a valid image |
1S303/L |
BAD_SS_SIZE |
One of the screenshots is too big by filesize |
1S303/M |
BAD_SS_DIMS |
One of the screenshots is too big by dimensions |
1S303/N |
NO_SS |
No screenshots are provided, but screenshots are required for the category |
Response
Name |
Type |
Description |
id |
int |
ID number |
title |
string |
Title |
category |
category object |
Category |
author |
member object |
Author |
date |
datetime |
When the file was created |
updated |
datetime |
When the file was last updated |
description |
string |
Description |
version |
string |
Current version number |
changelog |
string |
Description of what changed between this version and the previous one |
downloads |
int |
Number of downloads |
GET https://codefling.com/api/downloads/categories
Get list of categories
For requests using an OAuth Access Token for a particular member, only categories the authorized user can view will be included.
Parameters
Name |
Type |
Description |
clubs |
int |
0|1 Include club categories, default: 1 |
page |
int |
Page number |
perPage |
int |
Number of results per page - defaults to 25 |
Exceptions
This endpoint doesn't throw any exceptions.
Response
Name |
Type |
Description |
page |
int |
The page number for the results being shown |
perPage |
int |
The number of results that will be on each page |
totalResults |
int |
The total number of results |
totalPages |
int |
The number of pages of results |
results |
array of category objects |
The results for this page |
GET https://codefling.com/api/downloads/categories/{id}
Get specific category
Parameters
No parameters are accepted for this endpoint.
Exceptions
This endpoint doesn't throw any exceptions.
Response
Name |
Type |
Description |
id |
int |
The category ID |
name |
string |
Name of the category |
url |
string |
URL of the category |
class |
string |
Node class |
parentId |
int|null |
ID of the parent node (if any) |
permissions |
object|null |
Permissions for the node |
GET https://codefling.com/api/downloads/comments/{id}
View information about a specific comment.
Parameters
No parameters are accepted for this endpoint.
Exceptions
Code |
Message |
Description |
2D304/1 |
INVALID_ID |
The comment ID does not exist or the authorized user does not have permission to view it. |
Response
Name |
Type |
Description |
id |
int |
ID number |
item_id |
int |
The ID number of the item this belongs to |
author |
string |
Author |
date |
datetime |
Date |
content |
string |
The content |
hidden |
bool |
Is hidden? |
url |
string |
URL to content |
reactions |
array |
Array of reactions given |
GET https://codefling.com/api/nexus/withdrawals
Get list of withdrawal requests
For requests using an OAuth Access Token for a particular member, only the member's own withdrawal requests will be included.
Parameters
Name |
Type |
Description |
customers |
string |
Comma-delimited list of customer IDs - if provided, only invoices belonging to those customers are returned. Ignored for requests using an OAuth Access Token for a particular member. |
statuses |
string |
Comma-delimited list of statuses - if provided, only transactions with those statuses are returned. |
sortBy |
string |
What to sort by. Can be 'date', 'completed' (for the date it was completed), 'amount', or leave unspecified for ID. |
sortDir |
string |
Sort direction. Can be 'asc' or 'desc' - defaults to 'asc'. |
page |
int |
Page number. |
perPage |
int |
Number of results per page - defaults to 25. |
Exceptions
This endpoint doesn't throw any exceptions.
Response
Name |
Type |
Description |
page |
int |
The page number for the results being shown. |
perPage |
int |
The number of results that will be on each page. |
totalResults |
int |
The total number of results. |
totalPages |
int |
The number of pages of results. |
results |
array of order objects |
The results for this page. |
GET https://codefling.com/api/nexus/withdrawals/{id}
Get information about a specific withdrawal request
Parameters
No parameters are accepted for this endpoint.
Exceptions
Code |
Message |
Description |
2X307/1 |
INVALID_ID |
The withdrawal ID does not exist or the authorized user does not have permission to view it |
Response
Name |
Type |
Description |
id |
int |
ID number |
status |
string |
Status: 'done' = Payment sent; 'pend' = Pending; 'canc' = Canceled |
amount |
money object |
Amount of the withdrawal |
gateway |
string |
The gateway that will process the withdrawal |
data |
string |
The data provided by the member for the process. For example, if the gateway is PayPal, this will be their PayPal email address |
requestedDate |
datetime |
Date the withdrawal was requested |
completedDate |
datetime |
Date the withdrawal was completed |
gatewayId |
string |
Any ID number provided by the gateway to identify the transaction on their end |
customer |
customer object |
Customer information |
POST https://codefling.com/api/core/messages
Create a new personal conversation
This endpoint is only available for requests made using an API Key or the Client Credentials Grant Type, not using an OAuth Access Token for a particular member.
Parameters
Name |
Type |
Description |
from |
int |
User ID conversation is from |
to |
array |
One or more user IDs conversation is sent to |
title |
string |
Conversation title |
body |
string |
Conversation body |
Exceptions
Code |
Message |
Description |
1C374/2 |
INVALID_SENDER |
Sender was not supplied or is invalid |
1C374/3 |
INVALID_RECIPIENT |
No recipients were supplied |
1C374/4 |
INVALID_RECIPIENT |
One or more recipients are invalid |
1C374/5 |
MISSING_TITLE_OR_BODY |
The title and/or body of the conversation were not supplied |
3S290/D |
CLIENT_ONLY |
Request was made using an OAuth Access Token for a particular member. |
Response
This endpoint doesn't return a response.
POST https://codefling.com/api/core/messages/{id}
Add a reply to a personal conversation
This endpoint is only available for requests made using an API Key or the Client Credentials Grant Type, not using an OAuth Access Token for a particular member.
Parameters
Name |
Type |
Description |
body |
string |
Message body |
from |
int |
Person responding to message (must be part of the conversation) |
Exceptions
Code |
Message |
Description |
1C374/6 |
INVALID_ID |
The personal conversation ID does not exist |
1C374/7 |
INVALID_SENDER |
The sender ID supplied was not valid |
1C374/8 |
SENDER_NO_PERMISSION |
The sender supplied does not have permission to reply to the conversation |
3S290/D |
CLIENT_ONLY |
Request was made using an OAuth Access Token for a particular member. |
Response
This endpoint doesn't return a response.
DELETE https://codefling.com/api/core/messages/{id}
Deletes a personal conversation
This endpoint is only available for requests made using an API Key or the Client Credentials Grant Type, not using an OAuth Access Token for a particular member.
Parameters
No parameters are accepted for this endpoint.
Exceptions
Code |
Message |
Description |
1C292/2 |
INVALID_ID |
The personal conversation ID does not exist |
3S290/D |
CLIENT_ONLY |
Request was made using an OAuth Access Token for a particular member. |
Response
This endpoint doesn't return a response.
GET https://codefling.com/api/core/search
Perform a search and get a list of results
For requests using an OAuth Access Token for a particular member, only content the authorized user can view will be included and the "search_as" parameter will be ignored.
Parameters
Name |
Type |
Description |
page |
int |
Page number |
perPage |
int |
Number of results per page - defaults to 25 |
q |
string |
String to search for |
tags |
string |
Comma-separated list of tags to search for |
type |
string |
Content type class to restrict searches to |
item |
int |
Restrict searches to comments or reviews made to the specified item |
nodes |
string |
Comma-separated list of node IDs to restrict searches to |
search_min_comments |
int |
Minimum number of comments search results must have |
search_min_replies |
int |
Minimum number of comments search results must have for content types that require the first comment (e.g. topics) |
search_min_reviews |
int |
Minimum number of reviews search results must have |
search_min_views |
int |
Minimum number of views search results must have (not supported by elasticsearch) |
author |
string |
Restrict searches to results posted by this member (name) |
club |
string |
Comma-separated list of club IDs to restrict searches to |
start_before |
string |
Date period (from current time) that search results should start before |
start_after |
string |
Date period (from current time) that search results should start after |
updated_before |
string |
Date period (from current time) that search results should last be updated before |
updated_after |
string |
Date period (from current time) that search results should last be updated after |
sortby |
string |
Sort by method (newest or relevancy) |
eitherTermsOrTags |
string |
Whether to search both tags and search term ("and") or either ("or") |
search_and_or |
string |
Whether to perform an "and" search or an "or" search for all search terms |
search_in |
string |
Specify "titles" to search in titles only, otherwise both titles and content are searched |
search_as |
int |
Member ID to perform the search as (guest permissions will be used when this parameter is omitted) |
doNotTrack |
bool |
If doNotTrack is passed with a value of 1, the search will not be tracked for statistical purposes |
Exceptions
This endpoint doesn't throw any exceptions.
Response
Name |
Type |
Description |
page |
int |
The page number for the results being shown |
perPage |
int |
The number of results that will be on each page |
totalResults |
int |
The total number of results |
totalPages |
int |
The number of pages of results |
results |
array of result objects |
The results for this page |
GET https://codefling.com/api/core/search/contenttypes
Get list of content types that can be searched.
Parameters
No parameters are accepted for this endpoint.
Exceptions
This endpoint doesn't throw any exceptions.
Response
Name |
Type |
Description |
contenttypes |
array |
Content types that can be used in /search requests in the 'type' parameter. |
GET https://codefling.com/api/downloads/reviews
Get list of reviews.
For requests using an OAuth Access Token for a particular member, only reviews the authorized user can view will be included.
Parameters
Name |
Type |
Description |
categories |
string |
Comma-delimited list of category IDs |
authors |
string |
Comma-delimited list of member IDs - if provided, only reviews started by those members are returned |
locked |
int |
If 1, only reviews from events which are locked are returned, if 0 only unlocked |
hidden |
int |
If 1, only reviews which are hidden are returned, if 0 only not hidden |
featured |
int |
If 1, only reviews from events which are featured are returned, if 0 only not featured |
sortBy |
string |
What to sort by. Can be 'date', 'title' or leave unspecified for ID |
sortDir |
string |
Sort direction. Can be 'asc' or 'desc' - defaults to 'asc' |
page |
int |
Page number |
perPage |
int |
Number of results per page - defaults to 25 |
Exceptions
This endpoint doesn't throw any exceptions.
Response
Name |
Type |
Description |
page |
int |
The page number for the results being shown |
perPage |
int |
The number of results that will be on each page |
totalResults |
int |
The total number of results |
totalPages |
int |
The number of pages of results |
results |
array of review objects |
The results for this page |
GET https://codefling.com/api/downloads/reviews/{id}
View information about a specific review.
Parameters
No parameters are accepted for this endpoint.
Exceptions
Code |
Message |
Description |
2D305/1 |
INVALID_ID |
The review ID does not exist or the authorized user does not have permission to view it. |
Response
Name |
Type |
Description |
id |
int |
ID number |
item |
int |
The ID number of the item this belongs to |
author |
member object |
Author |
date |
datetime |
Date |
rating |
int |
The number of stars this review gave |
votesTotal |
int |
The number of users that have voted if this review was helpful or unhelpful |
votesHelpful |
int |
The number of users that voted helpful |
content |
string |
The content |
hidden |
bool |
Is hidden? |
url |
string |
URL to content |
authorResponse |
string|null |
The content item's author's response to the review, if any |
POST https://codefling.com/api/downloads/reviews
Create a review.
For requests using an OAuth Access Token for a particular member, any parameters the user doesn't have permission to use are ignored (for example, hidden will only be honored if the authenticated user has permission to hide content).
Parameters
Name |
Type |
Description |
Required file |
int |
The ID number of the file the review is for. |
Required author |
int |
The ID number of the member making the review (0 for guest). Required for requests made using an API Key or the Client Credentials Grant Type. For requests using an OAuth Access Token for a particular member, that member will always be the author. |
Required content |
string |
The review content as HTML (e.g. "<p>This is a review.</p>"). |
Required rating |
int |
Star rating. |
author_name |
string |
If author is 0, the guest name that should be used. |
date |
datetime |
The date/time that should be used for the review date. If not provided, will use the current date/time. |
ip_address |
string |
The IP address that should be stored for the review. If not provided, will use the IP address from the API request. |
hidden |
int |
0 = unhidden; 1 = hidden, pending moderator approval; -1 = hidden (as if hidden by a moderator). |
anonymous |
bool |
If 1, the item will be posted anonymously. |
Exceptions
Code |
Message |
Description |
2D305/2 |
INVALID_ID |
The forum ID does not exist. |
1D305/3 |
NO_AUTHOR |
The author ID does not exist. |
1D305/4 |
NO_CONTENT |
No content was supplied. |
1D305/5 |
INVALID_RATING |
The rating is not a valid number up to the maximum rating. |
2D305/A |
NO_PERMISSION |
The authorized user does not have permission to review that file. |
Response
Name |
Type |
Description |
id |
int |
ID number. |
item |
int |
The ID number of the item this belongs to. |
author |
member object |
Author. |
date |
datetime |
Date. |
rating |
int |
The number of stars this review gave. |
votesTotal |
int |
The number of users that have voted if this review was helpful or unhelpful. |
votesHelpful |
int |
The number of users that voted helpful. |
content |
string |
The content. |
hidden |
bool |
Is hidden? |
url |
string |
URL to content. |
authorResponse |
string|null |
The content item's author's response to the review, if any. |
POST https://codefling.com/api/downloads/reviews/{id}
Edit a review.
For requests using an OAuth Access Token for a particular member, any parameters the user doesn't have permission to use are ignored (for example, hidden will only be honored if the authenticated user has permission to hide content).
Parameters
Name |
Type |
Description |
author |
int |
The ID number of the member making the review (0 for guest). Ignored for requests using an OAuth Access Token for a particular member. |
author_name |
string |
If author is 0, the guest name that should be used. |
content |
string |
The review content as HTML (e.g. "<p>This is a review.</p>"). Will be sanitized for requests using an OAuth Access Token for a particular member; will be saved unaltered for requests made using an API Key or the Client Credentials Grant Type. |
hidden |
int |
1/0 indicating if the review should be hidden. |
rating |
int |
Star rating. |
anonymous |
bool |
If 1, the item will be posted anonymously. |
Exceptions
Code |
Message |
Description |
2D305/6 |
INVALID_ID |
The review ID does not exist or the authorized user does not have permission to view it. |
1D305/7 |
NO_AUTHOR |
The author ID does not exist. |
1D305/8 |
INVALID_RATING |
The rating is not a valid number up to the maximum rating. |
2D305/B |
NO_PERMISSION |
The authorized user does not have permission to edit the review. |
Response
Name |
Type |
Description |
id |
int |
ID number. |
item |
int |
The ID number of the item this belongs to. |
author |
member object |
Author. |
date |
datetime |
Date. |
rating |
int |
The number of stars this review gave. |
votesTotal |
int |
The number of users that have voted if this review was helpful or unhelpful. |
votesHelpful |
int |
The number of users that voted helpful. |
content |
string |
The content. |
hidden |
bool |
Is hidden? |
url |
string |
URL to content. |
authorResponse |
string|NULL |
The content item's author's response to the review, if any. |
DELETE https://codefling.com/api/downloads/reviews/{id}
Deletes a review.
Parameters
No parameters are accepted for this endpoint.
Exceptions
Code |
Message |
Description |
2D305/9 |
INVALID_ID |
The review ID does not exist. |
2D305/C |
NO_PERMISSION |
The authorized user does not have permission to delete the comment. |
Response
This endpoint doesn't return a response.
POST https://codefling.com/api/downloads/reviews/{id}/react
Add a reaction.
If the author has already reacted to this content, any existing reaction will be removed first.
Parameters
Name |
Type |
Description |
id |
int |
ID of the reaction to add |
Exceptions
Code |
Message |
Description |
1S425/2 |
NO_REACTION |
The reaction ID does not exist. |
1S425/3 |
NO_AUTHOR |
The author ID does not exist. |
1S425/4 |
REACT_ERROR |
Error adding the reaction. |
1S425/5 |
INVALID_ID |
Object ID does not exist. |
Response
This endpoint doesn't return a response.
DELETE https://codefling.com/api/downloads/reviews/{id}/react
Delete a reaction.
If the author has already reacted to this content, any existing reaction will be removed first.
Parameters
No parameters are accepted for this endpoint.
Exceptions
Code |
Message |
Description |
1S425/6 |
NO_AUTHOR |
The author ID does not exist. |
1S425/7 |
REACT_ERROR |
Error adding the reaction. |
1S425/8 |
INVALID_ID |
Object ID does not exist. |
Response
This endpoint doesn't return a response.
POST https://codefling.com/api/downloads/reviews/{id}/report
Reports a review.
Parameters
Name |
Type |
Description |
author |
int |
ID of the member reporting |
report_type |
int |
Report type (0 is default and is for notifying the CMGR team, more options via core_automatic_moderation_types) |
message |
string |
Optional message |
Exceptions
Code |
Message |
Description |
1S425/B |
NO_AUTHOR |
The author ID does not exist. |
1S425/C |
REPORTED_ALREADY |
The member has reported this item in the past 24 hours. |
Response
This endpoint doesn't return a response.
GET https://codefling.com/api/core/members
Get list of members.
Parameters
Name |
Type |
Description |
ids |
string |
Comma-delimited list of member IDs |
sortBy |
string |
What to sort by. Can be 'joined', 'name', 'last_activity', or leave unspecified for ID |
sortDir |
string |
Sort direction. Can be 'asc' or 'desc' - defaults to 'asc' |
name |
string |
(Partial) username to search for |
email |
string |
(Partial) email address to search for |
group |
int|array |
Group ID or IDs to search for |
activity_after |
int |
Find members that have been active since the provided unix timestamp |
activity_before |
int |
Find members that have been active before the provided unix timestamp |
page |
int |
Page number |
perPage |
int |
Number of results per page - defaults to 25 |
Exceptions
This endpoint doesn't throw any exceptions.
Response
Name |
Type |
Description |
page |
int |
The page number for the results being shown |
perPage |
int |
The number of results that will be on each page |
totalResults |
int |
The total number of results |
totalPages |
int |
The number of pages of results |
results |
array of member objects |
The results for this page |
GET https://codefling.com/api/core/members/{id}
Get information about a specific member.
Parameters
Name |
Type |
Description |
otherFields |
array |
An array of additional non-standard fields to return via the REST API |
Exceptions
Code |
Message |
Description |
1C292/2 |
INVALID_ID |
The member ID does not exist. |
Response
Name |
Type |
Description |
id |
int |
ID number |
name |
string |
Username |
title |
string |
Member title |
timezone |
string |
Member timezone |
formattedName |
string |
Username with group formatting |
primaryGroup |
int |
Primary group ID |
secondaryGroups |
array of int |
Secondary group IDs |
email |
string |
Email address |
joined |
datetime |
Registration date |
warningPoints |
int |
Number of active warning points |
reputationPoints |
int |
Number of reputation points |
photoUrl |
string |
URL to profile photo |
photoUrlIsDefault |
bool |
Indicates if the photo URL is the default |
coverPhotoUrl |
string |
URL to profile cover photo |
profileUrl |
string |
URL to the member's profile |
lastActivity |
datetime|null |
Last activity date on the site |
GET https://codefling.com/api/core/members/{id}/follows
Get list of items a member is following.
Parameters
Name |
Type |
Description |
page |
int |
Page number |
perPage |
int |
Number of results per page - defaults to 25 |
Exceptions
Code |
Message |
Description |
2C292/F |
NO_PERMISSION |
The authorized user does not have permission to view the follows |
2C292/I |
INVALID_ID |
The member could not be found |
Response
Name |
Type |
Description |
page |
int |
The page number for the results being shown |
perPage |
int |
The number of results that will be on each page |
totalResults |
int |
The total number of results |
totalPages |
int |
The number of pages of results |
results |
array of follow objects |
The results for this page |
POST https://codefling.com/api/core/members/{id}/follows
Store a new follow for the member.
Parameters
Name |
Type |
Description |
Required followApp |
string |
Application of the content to follow |
Required followArea |
string |
Area of the content to follow |
Required followId |
int |
ID of the content to follow |
followAnon |
bool |
Whether or not to follow anonymously |
followNotify |
bool |
Whether or not to receive notifications |
followType |
string |
Type of notification to receive (immediate, daily, or weekly) |
Exceptions
Code |
Message |
Description |
2C292/G |
NO_PERMISSION |
The authorized user does not have permission to follow this content |
2C292/H |
INVALID_ID |
The member could not be found |
2C292/J |
INVALID_CONTENT |
The app, area, or content ID could not be found |
Response
Name |
Type |
Description |
followKey |
int |
Unique key that represents the follow |
followApp |
string |
The application of the content that was followed |
followArea |
string |
The area of the content that was followed |
followId |
int |
The ID of the content that was followed |
followAnon |
bool |
Whether or not the follow is anonymous |
followNotify |
bool |
Whether or not notifications will be sent |
followType |
string|null |
Notification type or null if no notifications |
followSent |
datetime|null |
Date the last notification was sent, or null |
followName |
string |
Textual representation of the content followed |
followUrl |
string |
URL to the followed content |
DELETE https://codefling.com/api/core/members/{id}/follows/{followKey}
Delete a follow for the member.
Parameters
No parameters are accepted for this endpoint.
Exceptions
Code |
Message |
Description |
2C292/C |
INVALID_ID |
The member could not be found |
2C292/E |
INVALID_FOLLOW_KEY |
The follow does not exist or does not belong to this member |
2C292/D |
NO_PERMISSION |
The authorized user does not have permission to delete the follow |
Response
This endpoint doesn't return a response.
GET https://codefling.com/api/core/members/{id}/notifications
Get list of notifications for a member.
Parameters
Name |
Type |
Description |
page |
int |
Page number |
perPage |
int |
Number of results per page - defaults to 25 |
Exceptions
Code |
Message |
Description |
2C292/K |
NO_PERMISSION |
The authorized user does not have permission to view the notifications. |
2C292/L |
INVALID_ID |
The member could not be found. |
Response
Name |
Type |
Description |
page |
int |
The page number for the results being shown |
perPage |
int |
The number of results that will be on each page |
totalResults |
int |
The total number of results |
totalPages |
int |
The number of pages of results |
results |
array of inline objects |
The results for this page |
TYPE Member Object
Represents a member in the system.
Fields
Name |
Type |
Description |
id |
int |
ID number of the member. |
name |
string |
Username of the member. |
title |
string |
Member title of the user. |
timezone |
string |
The member's timezone. |
formattedName |
string |
Username with group formatting. |
primaryGroup |
group object |
Primary group the user belongs to. |
secondaryGroups |
array of group objects |
Secondary groups the member is part of. |
email |
string |
Member's email address. |
joined |
datetime |
Date when the member registered. |
registrationIpAddress |
string |
IP address when the member registered. |
warningPoints |
int |
Active warning points on the member's account. |
reputationPoints |
int |
Total reputation points of the member. |
photoUrl |
string |
URL to the member's profile picture. |
photoUrlIsDefault |
bool |
Indicates whether the profile photo is the site's default. |
coverPhotoUrl |
string |
URL to the cover photo on the member's profile. |
profileUrl |
string|null |
URL to the member's profile. |
validating |
bool |
Indicates if the member is still validating their account. |
posts |
int |
Number of posts or content items the member has submitted. |
lastActivity |
datetime|null |
Last recorded activity on the site. |
lastVisit |
datetime|null |
Last distinct visit date on the site. |
lastPost |
datetime|null |
Date of the member's most recent post. |
profileViews |
int |
Number of times the member's profile has been viewed. |
birthday |
string |
Member's birthday in MM/DD/YYYY format. |
customFields |
array of Fieldgroup objects |
Custom fields for the member's profile. |
rank |
array of rank objects |
Ranks assigned to the member. |
achievements_points |
int |
Achievement points earned by the member. |
allowAdminEmails |
bool |
Whether the member wants to receive admin emails. |
completed |
bool |
Indicates if the member's registration is completed. |
TYPE Group Object
Represents a group in the system.
Fields
Name |
Type |
Description |
id |
int |
ID number of the group. |
name |
string |
Name of the group. |
formattedName |
string |
Group name with any special formatting (e.g., colors, styles). |
TYPE Fieldgroup Object
Details about the fieldgroup
object, used to group custom fields in a structured format.
Fields
Name |
Type |
Description |
name |
string |
The name of the field group. |
fields |
array of field objects |
Array of fields associated with this group. |
TYPE Field Object
Details about the field
object, used to represent custom profile or item fields.
Fields
Name |
Type |
Description |
name |
string |
The name of the field. |
value |
string |
The value associated with the field. |
TYPE Rank Object
Details about the rank
object, used to represent the rank or level of a user in the system.
Fields
Name |
Type |
Description |
id |
int |
The ID number of the rank. |
name |
string |
The name of the rank. |
url |
string |
Path to the icon or image associated with the rank. |
points |
int |
The number of points required for the rank. |
TYPE File Object
Details about the file
object, used to represent files in the system, such as downloads or media.
Fields
Name |
Type |
Description |
name |
string |
The filename. |
url |
string |
URL to where the file is stored. |
size |
int |
Filesize in bytes. |
TYPE Category
Object
This object defines a category within the system.
Fields
Name |
Type |
Description |
id |
int |
ID number |
name |
string |
Name of the category |
url |
string |
URL to the category |
class |
string |
Node class |
parentId |
int|null |
Parent Node ID, or null if no parent exists |
permissions |
object|null |
Node permissions or null if not set |
TYPE Review
Object
This object defines a review left by a member for a specific content item.
Fields
Name |
Type |
Description |
id |
int |
ID number |
item |
int |
The ID number of the item this review belongs to |
author |
member object |
Author of the review |
date |
datetime |
Date of the review |
rating |
int |
The number of stars this review gave |
votesTotal |
int |
The number of users that have voted if this review was helpful or unhelpful |
votesHelpful |
int |
The number of users that voted helpful |
content |
string |
The content of the review |
hidden |
bool |
Whether the review is hidden |
url |
string |
URL to the review |
authorResponse |
string|null |
The content item's author's response to the review, if any |
TYPE Order
Object
This object defines an order within the system.
Fields
Name |
Type |
Description |
id |
int |
ID number |
status |
string |
Status: 'done' = Shipped; 'pend' = Waiting to be shipped; 'canc' = Canceled |
invoiceId |
int |
Invoice ID Number |
method |
flatrate object |
The shipment method (may be null if using EasyPost) |
items |
object |
The items in the shipment and their quantities |
requestDate |
datetime |
When the shipment was requested |
shipDate |
datetime |
When the shipment was shipped |
address |
geolocation Object |
The delivery address |
trackingUrl |
string |
The URL to view tracking information, if available |
TYPE Flatrate
Object
This object defines a flat rate shipping method within the system.
Fields
Name |
Type |
Description |
id |
int |
ID number |
name |
string |
Name of the flat rate shipping method |
TYPE Geolocation
Object
This object defines a geographical location, typically used for addresses within the system.
Fields
Name |
Type |
Description |
lat |
float |
Latitude |
long |
float |
Longitude |
addressLines |
array of strings |
Lines of the street address |
city |
string |
City |
region |
string |
State/Region |
country |
string |
2-letter country code |
postalCode |
string |
ZIP/Postal Code |
TYPE money
object
This object defines a monetary value with a specific currency.
Attributes
Name |
Type |
Description |
currency |
string |
The currency code (e.g., 'USD') |
amount |
string |
The amount in the specified currency |
TYPE customer
object
This object defines a customer, representing the user who has requested or is associated with the withdrawal.
Attributes
Name |
Type |
Description |
id |
int |
ID number of the customer |
name |
string |
Username of the customer |
title |
string |
Customer's title |
email |
string |
Email address of the customer |
joined |
datetime |
Date the customer joined the platform |
posts |
int |
Number of content item submissions made by the customer |
reputationPoints |
int |
Number of reputation points the customer has earned |
profileUrl |
string|null |
URL to the customer’s profile |
TYPE result
object
This object defines the search result returned from the search endpoint.
Attributes
Name |
Type |
Description |
title |
string |
Title of the search result |
content |
string |
Content of the search result |
class |
string |
Content class of the search result |
objectId |
int |
Content ID of the search result |
itemClass |
string |
Content item class of the search result (if search result is of a content item, this will match class) |
itemId |
int |
Content item ID of the search result (if search result is of a content item, this will match objectId) |
started |
datetime |
Datetime the search result was submitted |
updated |
datetime |
Datetime the search result was last updated |
itemUrl |
string |
URL to the content item |
objectUrl |
string |
URL to the search result item (if search result is of a content item, this will match itemUrl) |
reputation |
int |
Number of reputation points for the search result |
comments |
int|null |
Number of comments or replies for the search result, or NULL if commenting is not supported |
reviews |
int|null |
Number of reviews for the search result, or NULL if reviewing is not supported |
container |
string |
Title of the container of the search result |
containerUrl |
string |
URL to the container of the search result |
author |
string |
Author name of the search result |
authorUrl |
string|null |
URL to the author's profile, or NULL if the result was submitted by a guest |
authorPhoto |
string |
URL to the author's profile photo |
authorPhotoThumbnail |
string |
URL to the author's profile photo thumbnail |
tags |
array |
Array of tags associated with the search result |
TYPE Follow
Object
This object defines the follow data for content that a member is following.
Attributes
Name |
Type |
Description |
followKey |
int |
Unique key that represents the follow |
followApp |
string |
The application of the content that was followed |
followArea |
string |
The area of the content that was followed |
followId |
int |
The ID of the content that was followed |
followAnon |
bool |
Flag to indicate if the member is following anonymously |
followNotify |
bool |
Flag to indicate if notifications should be sent |
followType |
string|null |
Notification preference for this follow, or null if notifications are not being sent |
followSent |
datetime|null |
Date and time the last notification was sent, or NULL if none has been sent |
followName |
string |
Textual representation of the content that was followed (title, name, etc.) |
followUrl |
string |
URL to the content that was followed |
TYPE Inline
Object
This object defines the notifications returned from the notifications endpoint.
Attributes
Name |
Type |
Description |
notificationType |
string |
The type (key) of notification sent |
notificationApp |
string |
The app that processes this type of notification |
itemClass |
string |
The class that triggered the notification |
itemId |
int |
The ID of the content that triggered the notification |
subItemClass |
string |
The sub-class that triggered the notification (e.g. for comments or reviews) |
subItemId |
int |
The sub-ID of the content that triggered the notification (e.g. for comments or reviews) |
item |
object|null |
A representation of the item being notified about (if supported), or null |
itemSub |
object|null |
A representation of the sub-item being notified about (if supported), or null |
sentDate |
datetime |
Date and time the notification was sent |
updatedDate |
datetime |
Date and time the notification was last updated |
readDate |
datetime|null |
Date and time the notification was read by the user |
notificationData |
array |
Array of additional data relevant to this specific notification |