NAV Navbar
Logo
cURL python

Introduction

Code Examples with response data

This side panel will give you code examples as to how to use the API. You can switch between the example languages using the tabs above.

Welcome to The Freelancer Club API.

We have language bindings in Curl and Python, and we can provide example in other languages if required. You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

There are two API end points:

If you have any issues, please contact support@thefreelancerclub.co.uk

Errors

An example error returned as JSON

The startingafter parameter should be a positive integer. This is what would be shown if you passed added the parameter startingafter with a value of dave.

{
  "status": false,
  "message": "The startingafter variable should be a positive integer"
}

Freelancerclub uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, an invlaid attribute or filter was sent etc.), and codes in the 5xx range indicate an error with Freelancerclub's servers.

Not all errors map cleanly onto HTTP response codes, however. When a request is valid but does not complete successfully (e.g., there is no data to return), we return a 404 'Not Found' error code.

Error Code Meaning
200 Everything worked as expected
400 Bad Request -- Your request is invalid, often due to a missing parameter
401 Unauthorised - No valid API key provided
403 Forbidden -- The resource requested is hidden for administrators only
404 Not Found -- The specified resource could not be found
405 Method Not Allowed -- You tried to access a resource with an invalid method
406 Not Acceptable -- You requested an invalid format
410 Gone -- The resource requested has been removed from our servers
429 Too Many Requests hit the API! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarially offline for maintanance. Please try again later.

Content Types

You can retreive your data in various formats. JSON is returned by default, but you can use the "Accept" header to change the format of the returned data.

curl -X GET 
   -H "Authorization: Bearer wgckso8c8scwckg8o4ko084g04k4484wc80g4g4k" 
   -H "Accept: application/xml"
   'https://api.freelancerclub.net/usage'
import requests

url = "https://api.freelancerclub.net/usage"
headers = {
    'Authorization': 'Bearer wgckso8c8scwckg8o4ko084g04k4484wc80g4g4k',
    'Accept': 'application/xml'
    }
response = requests.request("GET", url, headers=headers)

print(response.text)

You can see that various allowed types on the left. The above would return the XML below

<?xml version="1.0" encoding="utf-8"?>

<xml>
    <hasmore>1</hasmore>
    <data>
        <datum>
            <usage_id>4401</usage_id>
            <email>matt@example.co.uk</email>
            <user_id>1981</user_id>
            <report_date>2015-07-05</report_date>
            <upload>0</upload>
            <download>520</download>
            <full_usage>520</full_usage>
            <new_user>Yes</new_user>
            <locationname/>
            <mac/>
        </datum>
        <datum>
            <usage_id>4402</usage_id>
            <email>testing@Freelancerclub.co.uk</email>
            <user_id>29105</user_id>
            <report_date>2015-07-05</report_date>
            <upload>837244</upload>
            <download>1556104</download>
            <full_usage>2393348</full_usage>
            <new_user>No</new_user>
            <locationname/>
            <mac/>
        </datum>

        ...

There are many different formats that you can return your data in. The default format is JSON and we would recommend you stick with that. If needed you can change the format by sending an 'Accept' header in your request.

HTTP Request

curl -X GET -H "Freelancerclub-API-KEY: wgckso8c8scwckg8o4ko084g04k4484wc80g4g4k" -H "Accept: application/xml" 'https://api.freelancerclub.net/usage/startdate/2015-07-05/enddate/2015-07-06'

You can also append the format on to the end of your URL

GET https://api.freelancerclub.net/usage.xml

GET https://api.freelancerclub.net/usage.array

Formats Available

Format Code Description
array Array data structure
csv Comma separated file
json Default JSON format.
jsonp JSONP format
html HTML using the table library in CodeIgniter
php Using var_export
serialized A serialized php object
xml SImple XML format

Authentication

Use the Auth endpoint to get a JWT token for the user:

curl -X POST 
     -F "email=test@user.com" -F "password=testuserpass"
     'https://api.freelancerclub.net/auth/login'
import requests

url = "https://api.freelancerclub.net/auth/login"
response = requests.request("POST", url, headers=headers, data = {'email':'test@user.com', 'password':'testuserpass'})

print(response.text)

The above will return the Token and a user object. The tokens in the documentation are shortened for berevity; expect much longer tokens.

{
  "token": "eyJ0eXAiOiJKV1QiLciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6",
  "data": {
    "id": "1",
    "email": "matt.nelson@example.com",
    "image": "3cfa348997f2b8e08f1432e54f1013b7.jpg",
    "slug": "mattnelson",
    "account": "pro",
    "discipline": "Photographer, Graphic Designer, newitem"
  }
}

All endpoints require a valid JWT Token to be passed in the headers under the key Authorization. To get a token you need to post the users email address and password to /auth/login

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

THe API will look for a HTTP header with the key Authorization on each request. An invalid or missing token will result in an HTTP 403 Forbidden.

Authorization: Bearer eyJ0eXAiOiJKJhbGciOiJIUzI1NiJ9.eyJpZCI6eyJpZCI6I

Token Messages

Every time a request is made to a resource, the token will be checked. If there is a problem with the token you will receive one of the following errors.

Error Code Meaning
'token_not_provided' You forgot to include the token
'token_expired' The token has expired
'token_invalid' The token is invalid (need to reauthenticate)

Each token is valid for 1 week. After a token has expired you can use the refresh endpoint to request a new token for up to two weeks after the token has expired.

Refreshing a Token

curl -X GET 
     -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLzI1NiJ9.eyJpZCI6eyJpZCI6Ij"
     'https://api.freelancerclub.net/auth/refresh'
import requests

url = "https://api.freelancerclub.net/auth/refresh"
headers = {'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJIUzI1NiJ9.eyJpZCI6eyJpZCI6Ij'}
response = requests.request("GET", url, headers=headers)

print(response.text)

On sucess, this will return a new token with a status code of 200

{
  "token": "eyJ0eXAiOiJKV1QiLciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6",
  "data": {
    "id": "1",
    "email": "matt.nelson@example.com",
    "image": "3cfa348997f2b8e08f1432e54f1013b7.jpg",
    "slug": "mattnelson",
    "account": "pro",
    "discipline": "Photographer, Graphic Designer, newitem"
  }
}

If we are unable to generate a new token, we will return a 403 with an error message

{
  "status": "error",
  "message": "Token too old to refresh"
}

HTTP Request

GET https://api.freelancerclub.net/auth/refresh

Disciplines

Get a list of discplines which can be used in the site search.

{
    "data": [
        {
            "id": "2",
            "name": "Graphic Designer",
            "insearch": "1",
            "sub": "Websites, Fasion, Photography, Art",
            "alias1": "",
            "alias2": "",
            "description": "",
            "suggestions": "GD Disc1, GD Disc2, GD Disc3, GD Disc4, GD Disc5, GD Disc6",
            "subs": [
                {
                    "id": "6",
                    "discipline_id": "2",
                    "name": "Illustrator",
                    "suggestions": "Ill Skill1, Ill Skill2, Ill Skill13, Ill Skill4, Ill Skill5, Ill Skill6"
                },
                {
                    "id": "7",
                    "discipline_id": "2",
                    "name": "Retouching",
                    "suggestions": "Retouch Skill1, Retouch Skil2, Retouch Skill3, Retouch Skill4"
                },
                {
                    "id": "8",
                    "discipline_id": "2",
                    "name": "Web Design",
                    "suggestions": "Web Design 1, Web Design 2, Web Design 3, Web Design 4, Web Design 5"
                }
            ]
        },
        {
            "id": "6",
            "name": "Hair",
            "insearch": "1",
            "sub": null,
            "alias1": null,
            "alias2": null,
            "description": null,
            "suggestions": null,
            "subs": []
        },
        {
            "id": "1",
            "name": "Photographer",
            "insearch": "1",
            "sub": "Wedding, Landscape, Fashion, Beauty, Design, Forests, Option 3, option 4, Option 5",
            "alias1": "TOG",
            "alias2": "Shooter",
            "description": "Photography",
            "suggestions": "Photoshop, Illustrator, Touching Up, SpeedLight",
            "subs": [
                {
                    "id": "3",
                    "discipline_id": "1",
                    "name": "Wedding Photographer",
                    "suggestions": "Wedding Skill1, Wedding Skill2"
                },
                {
                    "id": "4",
                    "discipline_id": "1",
                    "name": "Landscape Photographer",
                    "suggestions": "Land Skill1, land Skill2, Land skill3, Land Skill4, Land Skill5, Land Skill6, land skill Long "
                },
                {
                    "id": "5",
                    "discipline_id": "1",
                    "name": "Portrait Photographer",
                    "suggestions": "Port1, Port2, Port3, Port4, Port5, Port6"
                }
            ]
        }
    ]
}

This endpoint retrieves a list of disciplines and sub-diciplines. The IDs are just used internally, just submit a comma seperated list of names when submititng the disciplines or sub-disciplines.

When suggesting skills, we should show the suggestions for the discipline as soon as they have choosen that, but then remove those suggestions when a sub-dicipline is choosen (only removing the suggestinos of the 'parent' discipline of the sub-discipline choosen). If two discipline are selected, both suggestiosn shouldbe shown, and whne a sub discipline is choosen, just remove the skills for it's parent discipline.

IMPORTANT: make sure you remove duplicates as the same suggestion may exist in multiple disciplines.

HTTP Request

GET http://api.freelancerclub.net/auth/disciplines

Returns

A list of disciplines.

Users

Get logged in user

Get the User from the Token.

curl -X GET 
   -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLzI1NiJ9.eyJpZCI6eyJpZCI6Ij" 
   'https://api.freelancerclub.net/users/me'
import requests

url = "https://api.freelancerclub.net/users/me"
headers = {'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJIUzI1NiJ9.eyJpZCI6eyJpZCI6Ij'}
response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "id": "1",
        "role_id": "1",
        "email": "matt.nelson@silverark.co.uk",
        "created_on": "2015-05-23 14:57:26",
        "deleted": "0",
        "display_name": "Matttty Nelson",
        "slug": "mattnelson",
        "discipline": "Photographer, Dancer",
        "city": "york",
        "website": "http://not a website",
        "contact": "01904 290 190",
        "facebook": "https://www.facebook.com/silverark",
        "twitter": "https://twitter.com/silver_ark",
        "pinterest": "",
        "instagram": "http://Instagram.Com/liansjadan",
        "youtube": "https://www.youtube.com/channel/UCR5HhU_7IpjxgMueKTzADSg",
        "tags": "photoshop,illustrator",
        "bio": "I am a software engineer living in York who builds amazing websites and web based applications for small to medium sized businesses. I am a software engineer living in York who builds amazing websites and web based applications for small to medium sized businesses.",
        "image": "463e7481a2273338e3128462eb96edea.png",
        "account": "pro",
        "renew": "2018-09-08 15:28:18",
        "mentor": "1",
        "badge": "1",
        "notifications": "hourly",
        "systemnotifications": "hourly",
        "notificationsapplicants": "hourly",
        "group_id": "1",
        "testing": "yes",
        "portfolios": [
            {
                "id": "1",
                "user_id": "1",
                "title": "Wedding",
                "discipline": "photographer",
                "deleted": "0",
                "created_on": "2015-06-11 10:18:31",
                "modified_on": "0000-00-00 00:00:00",
                "img_count": "3"
            },
            {
                "id": "3",
                "user_id": "1",
                "title": "Fashion",
                "discipline": "photographer",
                "deleted": "0",
                "created_on": "2015-06-11 10:19:21",
                "modified_on": "0000-00-00 00:00:00",
                "img_count": "5"
            }
        ],
        "profile_complete": "1",
        "rate_hourly": null,
        "rate_day": "3500.00",
        "mentorurl": "",
        "profile_hidden": "0",
        "latitude": "53.95997",
        "longitude": "1.00000",
        "country": "US",
        "hidetel": "1",
        "regaff": "0",
        "suspended": "0",
        "previous_account": "pro",
        "change_membership": "2018-03-08 14:28:19",
        "is_mentor": "1",
        "mentor_rate": "35.00",
        "socialtotal": "30383",
        "followers": "7",
        "views": "121",
        "likes": "13",
        "star_points": "0.000",
        "star_avg": "0.000",
        "reviews": "0",
        "push_job_alerts": "1",
        "push_inmail": "1",
        "stars": null,
        "twitter_followers": "2069",
        "facebook_likes": "63",
        "youtube_subscribers": "3695",
        "instagram_count": "24556",
        "user_id": "1",
        "image_url": "https://dev.freelancerclub.net/images/profile/120/463e7481a2273338e3128462eb96edea.png",
        "facebook_username": "silverark",
        "instagram_username": "liansjadan",
        "youtube_username": "UCR5HhU_7IpjxgMueKTzADSg",
        "twitter_username": "silver_ark",
        "pinterest_username": ""
    }
}

This endpoint retreives the user from the token.

HTTP Request

GET https://api.freelancerclub.net/users/me

Get all users

The below returns the users in the system attached to your portal.

curl -X GET 
   -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLzI1NiJ9.eyJpZCI6eyJpZCI6Ij" 
   'https://api.freelancerclub.net/users'
import requests

url = "https://api.freelancerclub.net/users"
headers = {'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJIUzI1NiJ9.eyJpZCI6eyJpZCI6Ij'}
response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "meta": {
        "total": 154,
        "limit": 20,
        "offset": 0
    },
    "data": [
        {
            "id": "70",
            "display_name": "David Bradford",
            "slug": "davidbradford",
            "discipline": "Photographer",
            "city": null,
            "website": null,
            "contact": null,
            "facebook": null,
            "twitter": null,
            "pinterest": null,
            "instagram": null,
            "youtube": null,
            "tags": "Fashion, make up, beauty",
            "bio": null,
            "image": "d71d63b492bd114b6ee643f4965cc356.png",
            "account": "pro",
            "mentor": "0",
            "badge": "0",
            "group_id": "0",
            "testing": "dns",
            "portfolios": "Wedding photographer, ",
            "rate_hourly": null,
            "rate_day": null,
            "mentorurl": null,
            "latitude": "0.00000",
            "longitude": "0.00000",
            "country": "United Kingdom",
            "is_mentor": "0",
            "mentor_rate": null,
            "followers": "1",
            "likes": "7",
            "star_points": "22.500",
            "star_avg": "3.375",
            "reviews": "8",
            "rating": "119.50",
            "stars": "3.375000",
            "reviewcount": "8",
            "twitter_followers": null,
            "facebook_likes": null,
            "youtube_subscribers": null,
            "images": [
                {
                    "id": "43",
                    "title": "3",
                    "description": "3",
                    "public": "1",
                    "user_id": "70",
                    "filename": "79a3715a52aef5fa5f0e43fd5a466645.png",
                    "created_on": "2016-05-11 13:44:43",
                    "modified_on": "2018-04-25 10:51:07",
                    "views": "5",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "1",
                    "width": "1204",
                    "height": "728",
                    "image_tags": "Marek, hereareafew, dance",
                    "latitude": "0.00000",
                    "longitude": "0.00000",
                    "country": "",
                    "locationtype": "locality",
                    "city": "Holborn Station, Kingsway, London, UK",
                    "likescount": "2"
                },
                {
                    "id": "44",
                    "title": "4",
                    "description": "4",
                    "public": "1",
                    "user_id": "70",
                    "filename": "129addcfdc88cfc4719c97a86bf60cb0.png",
                    "created_on": "2016-05-11 13:44:59",
                    "modified_on": "2018-04-25 11:01:45",
                    "views": "14",
                    "tags": ",Matt Nelson:139,Matt Nelson:161,Matthew Nelson:1",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "1",
                    "width": "1204",
                    "height": "728",
                    "image_tags": "Marek, hereareafew, dance",
                    "latitude": "0.00000",
                    "longitude": "0.00000",
                    "country": "",
                    "locationtype": "locality",
                    "city": "Holborn Station, Kingsway, London, UK",
                    "likescount": "2"
                },
                {
                    "id": "41",
                    "title": "1",
                    "description": "",
                    "public": "1",
                    "user_id": "70",
                    "filename": "6a915bb99a93a5a2241d94d0fe90a6e3.png",
                    "created_on": "2016-05-11 13:43:58",
                    "modified_on": "2018-02-23 16:06:16",
                    "views": "8",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "1",
                    "width": "3840",
                    "height": "1080",
                    "image_tags": "Marek, hereareafew, dance",
                    "latitude": "0.00000",
                    "longitude": "0.00000",
                    "country": "",
                    "locationtype": "locality",
                    "city": "Holborn Station, Kingsway, London, UK",
                    "likescount": "1"
                }
            ],
            "user_id": "70",
            "image_url": "https://dev.freelancerclub.net/images/profile/120/d71d63b492bd114b6ee643f4965cc356.png",
            "twitter_username": "",
            "pinterest_username": ""
        },
        {
            "id": "4",
            "display_name": "User 1",
            "slug": "user1",
            "discipline": "Photographer, Makeup Artist, Form Building Pro, tog, Dancer",
            "city": "Dunnington, North Yorkshire, England",
            "website": "",
            "contact": "01904 456 789",
            "facebook": "http://facebook.com/cocacolaGB",
            "twitter": "http://twitter.com/silver_ark",
            "pinterest": "",
            "instagram": "111",
            "youtube": "http://youtube.com/user/tomska",
            "tags": "Fashion, make up, beauty",
            "bio": "",
            "image": "5e038a1b8bb61e90538d82fd49b0ed4f.jpg",
            "account": "pro",
            "mentor": "0",
            "badge": "1",
            "group_id": "0",
            "testing": "dns",
            "portfolios": "",
            "rate_hourly": null,
            "rate_day": null,
            "mentorurl": null,
            "latitude": "53.96431",
            "longitude": "-0.98787",
            "country": "United Kingdom",
            "is_mentor": "1",
            "mentor_rate": null,
            "followers": "1",
            "likes": "1",
            "star_points": "5.000",
            "star_avg": "5.000",
            "reviews": "1",
            "views": "13",
            "rating": "26.00",
            "stars": "5.000000",
            "reviewcount": "1",
            "twitter_followers": "2069",
            "facebook_likes": "107550129",
            "youtube_subscribers": "0",
            "images": [
                {
                    "id": "35",
                    "title": "My TItle 2 Dance",
                    "description": "Here is a dance thing with dance",
                    "public": "1",
                    "user_id": "4",
                    "filename": "8ac1ed4edfcbc435714f1300b5baf4c5.png",
                    "created_on": "2015-06-11 16:52:02",
                    "modified_on": "2018-02-23 16:08:43",
                    "views": "8",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "1",
                    "width": "1229",
                    "height": "746",
                    "image_tags": "Marek, hereareafew, dance",
                    "latitude": "0.00000",
                    "longitude": "0.00000",
                    "country": "",
                    "locationtype": "locality",
                    "city": "Holborn Station, Kingsway, London, UK",
                    "likescount": "1"
                },
                {
                    "id": "34",
                    "title": "My TItle1",
                    "description": "",
                    "public": "1",
                    "user_id": "4",
                    "filename": "324cfced6ba3ebb8ba3cccea5a536722.png",
                    "created_on": "2015-06-11 16:51:46",
                    "modified_on": "2018-01-31 19:13:28",
                    "views": "2",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "1",
                    "width": "1204",
                    "height": "728",
                    "image_tags": "Marek, hereareafew, dance",
                    "latitude": "0.00000",
                    "longitude": "0.00000",
                    "country": "",
                    "locationtype": "locality",
                    "city": "Holborn Station, Kingsway, London, UK",
                    "likescount": "0"
                },
                {
                    "id": "61",
                    "title": "The Sound of Silence (Original Version from 1964)",
                    "description": "Lyrics: Hello darkness, my old friend \r\nI've come to talk with you again \r\nBecause a vision softly creeping \r\nLeft its seeds while I was sleeping \r\nAnd the vision that was planted in my brain \r\nStill remains \r\nWithin the sound of silence \r\n\r\nIn restless dreams I walked alone \r\nNarrow streets of cobblestone \r\n'Neath the halo of a street lamp \r\nI turned my collar to the cold and damp \r\nWhen my eyes were stabbed by the flash of a neon light \r\nThat split the night \r\nAnd touched the sound of silence \r\n\r\nAnd in the naked light I saw \r\nTen thousand people maybe more \r\nPeople talking without speaking \r\nPeople hearing without listening \r\nPeople writing songs that voices never shared \r\nNo one dared \r\nDisturb the sound of silence \r\n\r\n\"Fools,\" said I, \"you do not know \r\nSilence like a cancer grows \r\nHear my words that I might teach you \r\nTake my arms that I might reach you\" \r\nBut my words like silent raindrops fell \r\nAnd echoed in the wells of silence \r\n\r\nAnd the people bowed and prayed \r\nTo the neon god they made \r\nAnd the sign flashed out its warning \r\nIn the words that it was forming \r\nAnd the sign said \"The words of the prophets are written on the subway walls \r\nAnd tenement halls \r\nAnd whispered in the sound of silence\"\r\n\r\nThis is the original version from 1964 from the album \"Wednesday Morning, 3 AM.\" Just Simon's guitar and the vocals. The famous version was released in 1966. After \"Wednesday Morning, 3 AM\" flopped, they split up. Without either their knowledge, electric guitars and drums were added and that version of The Sound of Silence became very popular, reaching #1 on the charts in America on New Years Day, 1966. Because of this, Simon and Garfunkel teamed up again and created three more studio albums, one of which one a Grammy award for album of the year and song of the year (Bridge Over Troubled Water).",
                    "public": "1",
                    "user_id": "4",
                    "filename": "https://i.ytimg.com/vi/4zLfCnGVeL4/hqdefault.jpg",
                    "created_on": "2016-11-24 14:54:04",
                    "modified_on": "2018-04-19 15:39:55",
                    "views": "3",
                    "tags": "",
                    "type": "video",
                    "video_id": "4zLfCnGVeL4",
                    "video_type": "youtube",
                    "authorised": "1",
                    "width": "480",
                    "height": "360",
                    "image_tags": "Marek, hereareafew, dance",
                    "latitude": "0.00000",
                    "longitude": "0.00000",
                    "country": "",
                    "locationtype": "locality",
                    "city": "Holborn Station, Kingsway, London, UK",
                    "likescount": "0"
                }
            ],
            "user_id": "4",
            "image_url": "https://dev.freelancerclub.net/images/profile/120/5e038a1b8bb61e90538d82fd49b0ed4f.jpg",
            "facebook_username": "cocacolaGB",
            "instagram_username": "111",
            "youtube_username": "tomska",
            "twitter_username": "silver_ark",
            "pinterest_username": ""
        }, ...

This endpoint retrieves a list of users from the system; the list can be filtered and is paginated by default. This represents the Discover Freelancers section of the website.

HTTP Request

GET https://api.freelancerclub.net/users

Query Parameters

Parameter Default Description
offset (optional) 0 When paginating, sending the offset will return the rows from that position.
limit (optional) 20 The number of rows to return as a positive integer between 1 and 500.
discipline (optional) null Filter by a discipline (e.g. photographer, makeup artist)
searchstr (optional) null Pass through a search String (e.g Wedding)
influence (optional) off 'off' or 'on' - Order by influence
testing (optional) off 'off' or 'on' - Only show user who are 'testing'
mentor (optional) off 'off' or 'on' - Only show user who are 'mentors'
online (optional) off 'off' or 'on' - Only show user who are online
city, longitude, latitude (optional) null Using Google places you can provide the City name and the long and lat to search by location. When this option is emnabled, you can also pass 'distance' through as shown below.
distance (optional) 40 When the city, long and lat are set, then you can also pass through the distance from the city to search by. The default is 40 miles.

Returns

A dictionary with a 'users' property that contains an array of up to limit users. Each entry in the array is a separate user object. If no more users are available, the resulting data will equal false. This request should never return an error.

Attribute Description
data An array containing the actual response elements, paginated by any request parameters.
total The total number of results available when not paginated
limit The limit that was used
offset The offset that was used

Get a specific User

The below returns a specific User based on their ID.

curl -X GET 
   -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLzI1NiJ9.eyJpZCI6eyJpZCI6Ij" 
   'https://api.freelancerclub.net/users/542154'
import requests

url = "https://api.freelancerclub.net/users/542154"
headers = {'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJIUzI1NiJ9.eyJpZCI6eyJpZCI6Ij'}
response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "id": "1",
        "display_name": "Matttty Nelson",
        "slug": "mattnelson",
        "discipline": "Photographer, Dancer",
        "city": "york",
        "website": "http://not a website",
        "contact": "01904 290 190",
        "facebook": "https://www.facebook.com/silverark",
        "twitter": "https://twitter.com/silver_ark",
        "pinterest": "",
        "instagram": "http://Instagram.Com/liansjadan",
        "youtube": "https://www.youtube.com/channel/UCR5HhU_7IpjxgMueKTzADSg",
        "tags": "photoshop,illustrator",
        "bio": "I am a software engineer living in York who builds amazing websites and web based applications for small to medium sized businesses. I am a software engineer living in York who builds amazing websites and web based applications for small to medium sized businesses.",
        "image": "463e7481a2273338e3128462eb96edea.png",
        "account": "pro",
        "mentor": "1",
        "badge": "1",
        "group_id": "1",
        "testing": "yes",
        "portfolios": [
            {
                "id": "1",
                "user_id": "1",
                "title": "Wedding",
                "discipline": "photographer",
                "deleted": "0",
                "created_on": "2015-06-11 10:18:31",
                "modified_on": "0000-00-00 00:00:00",
                "img_count": "3"
            },
            {
                "id": "3",
                "user_id": "1",
                "title": "Fashion",
                "discipline": "photographer",
                "deleted": "0",
                "created_on": "2015-06-11 10:19:21",
                "modified_on": "0000-00-00 00:00:00",
                "img_count": "5"
            }
        ],
        "rate_hourly": null,
        "rate_day": "3500.00",
        "mentorurl": "",
        "latitude": "53.95997",
        "longitude": "1.00000",
        "country": "US",
        "is_mentor": "1",
        "mentor_rate": "35.00",
        "socialtotal": "30383",
        "followers": "7",
        "likes": "13",
        "star_points": "0.000",
        "star_avg": "0.000",
        "reviews": "0",
        "views": "141",
        "stars": null,
        "twitter_followers": "2069",
        "facebook_likes": "63",
        "youtube_subscribers": "3695",
        "instagram_count": "24556",
        "user_id": "1",
        "image_url": "https://dev.freelancerclub.net/images/profile/120/463e7481a2273338e3128462eb96edea.png",
        "facebook_username": "silverark",
        "instagram_username": "liansjadan",
        "youtube_username": "UCR5HhU_7IpjxgMueKTzADSg",
        "twitter_username": "silver_ark",
        "pinterest_username": ""
    }
}

If the user doens't exist you will get a 404 status code and the following json

{
  "status": "404",
  "message": "Sorry that freelancer was not found."
}

This endpoint retrieves a specific user by their user_id.

HTTP Request

GET https://api.freelancerclub.net/users/<user_id>

Query Parameters

Parameter Default Description
user_id (required) Required The user_id of the Users

Returns

A dictionary with information about the user.

Get site disciplines

Get a list of discplines which can be used in the site search.

{
    "data": [
        {
            "id": "3",
            "name": "Model",
            "insearch": "1",
            "sub": "Wedding, Fashion, Magazine, Experimental",
            "alias1": "",
            "alias2": "",
            "description": null,
            "suggestions": null
        },
        {
            "id": "1",
            "name": "Photographer",
            "insearch": "1",
            "sub": "Wedding, Landscape, Fashion, Beauty, Design, Forests, Option 3, option 4, Option 5",
            "alias1": "TOG",
            "alias2": "Shooter",
            "description": "Photography",
            "suggestions": "Photoshop, Illustrator, Touching Up, SpeedLight"
        },
        {
            "id": "5",
            "name": "Stylist",
            "insearch": "1",
            "sub": null,
            "alias1": null,
            "alias2": null,
            "description": null,
            "suggestions": "Hair, Make up, Blusher"
        }
    ]
}

This endpoint retrieves a list of disciplines which can be used to search by. When submitting a search just submit the "name" element.

HTTP Request

GET https://api.freelancerclub.net/users/discipines

Returns

A list of disciplines.

Update a User

The below will update the current user.

curl -X POST 
   -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLzI1NiJ9.eyJpZCI6eyJpZCI6Ij" 
   -d "display_name=Matty%20Nelson"
   'https://api.freelancerclub.net/users/578'
import requests

url = "https://api.freelancerclub.net/users/578"
headers = {'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJIUzI1NiJ9.eyJpZCI6eyJpZCI6Ij'}
data = {'display_name': 'Matty%20Nelson'}
response = requests.request("GET", url, headers=headers, data=data)

print(response.text)

The above command returns JSON structured like this:

{
  "status": "200",
  "message": "Updated User Succesfully"
}

If the input is incorrect you will receive error similar to the below

{
  "status": "404",
  "message": "Sorry that freelancer was not found."
}
{
  "status": "400",
  "message": "Thre are errors with the data submitted",
  "errors": "\"The Mentorship Hourly Rate field must contain only numeric characters.\\n\""
}

You can update the current user using the endpoint below and their user_id.

HTTP Request

POST https://api.freelancerclub.net/users/<user_id>

Query Parameters

Parameter Default Description
user_id (required) Required The user_id of the Users
display_name (optional) The users Full name.
discipline (optional) A comma seperated list of Disciplines (Photographer, Dancer)
subdiscipline (optional) A comma seperated list of Sub Disciplines (Wedding photography, Landscape Photography)
hidetel (optional) Hide the telphone number. 0 or 1
website (optional)
contact (optional)
tags (optional)
rate_hourly (optional)
rate_day (optional)
rate_hourly (optional)
rate_day (optional)
is_mentor (optional)
mentor_rate (optional)
facebook (optional) Their facebook URL
twitter (optional) Their twitter URL
instagram (optional)
pinterest (optional)
youtube (optional)
testing (optional) Are they currently testing? 0 or 1
bio (optional) A brief bio about the user
profile_hidden (optional) Is their profile hidden? 0 or 1
city (optional) City Name
country (optional) Country
longitude (optional) Long
latitude (optional) Lat
notifications (optional) String one of the following 'instant', 'daily', 'hourly', 'never'
systemnotifications (optional) String one of the following 'instant', 'daily', 'hourly', 'never'
notificationsapplicants (optional) String one of the following 'instant', 'daily', 'hourly', 'never'
push_job_alerts (optional) Control the push notification for job alerts. 0 for Off, 1 for On
push_inmail (optional) Control the push notification for In Mail. 0 for Off, 1 for On

Returns\

A 200 status if successful. An error message if not under 400 or 404.

Register a User

curl -X POST \
  http://api.freelancerclub.net/users \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NjIzODgyMiwiZXhwIjoxNDk2ODQzNjIyfQ.msRKLMMfuClYY9Vg9y3mSR4_xlQGsD14r1TWGHtjaDKvbzgyfSAMruTDj6P_MJVcZo69WjFqi7f-MT2nFFAaKQ' \
  -F email=newapissss@silverark.co.uk \
  -F password=abcd1234 \
  -F pass_confirm=abcd1234 \
  -F 'display_name=API User' \
  -F discipline=Photographer \
  -F 'city=Leeds, United Kingdom' \
  -F 'country=United Kingdom'

import requests

url = "http://api.freelancerclub.net/users"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nnewapissss@silverark.co.uk\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"password\"\r\n\r\nabcd1234\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"pass_confirm\"\r\n\r\nabcd1234\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"display_name\"\r\n\r\nAPI User\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"discipline\"\r\n\r\nPhotographer\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nLeeds, United Kingdom\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUnited Kingdom\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NjIzODgyMiwiZXhwIjoxNDk2ODQzNjIyfQ.msRKLMMfuClYY9Vg9y3mSR4_xlQGsD14r1TWGHtjaDKvbzgyfSAMruTDj6P_MJVcZo69WjFqi7f-MT2nFFAaKQ"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

Returns either Success

{
    "status": "200",
    "message": "Created user successfully"
}

Or failure with a reason. json { "status": "400", "message": "Thre are errors with the data submitted", "errors": "The value in &quot;Email Address&quot; is already being used." }

You can register a new user using the following endpoint:

HTTP Request

POST https://api.freelancerclub.net/users

Query Parameters

Parameter Default Description
email required The email address for the user. Must be unique in our system
password required The users password
pass_confirm required Confirmation of the users password
display_name required The users full name
discipline required A tab delimited list of disciplines for the user. Must match the disciplines from the /users/disciplines endpoint
subdiscipline (optional) a comma separated list of subdisciplines
tags (optional) A comma seperated list of skills tags (Photoshop, Lightroom)
contact (optional) A telephone number
city required The city the user is from (Use google maps API)
country required The country the user is from (Use google maps API)
longitude required The longitude (Use google maps API)
latitude required The latitude (Use google maps API)

Register a Client

curl -X POST \
  https://api.freelancerclub.net/clients \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzU' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F email=newapiuser@silverark.co.uk \
  -F password=abcd1234 \
  -F 'display_name=API User'

import requests

url = "https://api.freelancerclub.net/clients"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nnewapiuser@silverark.co.uk\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"password\"\r\n\r\nabcd1234\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"display_name\"\r\n\r\nAPI User\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {

    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOi5NjIzODgyMiwi",
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

Returns either Success

{
    "status": "200",
    "message": "Created user successfully"
}

Or failure with a reason. json { "status": "400", "message": "Thre are errors with the data submitted", "errors": "The value in &quot;Email Address&quot; is already being used." }

You can register a new client using the following endpoint:

HTTP Request

POST https://api.freelancerclub.net/clients

Query Parameters

Parameter Default Description
email required The email address for the user. Must be unique in our system
password required The users password
display_name required The users full name

Request Password Reset Email

HTTP Request

POST https://api.freelancerclub.net/users/forgot

Query Parameters

Parameter Default Description
email required The email address for the user. Must be unique in our system

Update a user's profile image

The below will update the current user.

curl -X POST \
  http://api.freelancerclub.net/users/1/profile \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUwOTU0ODQzMSwiZXhwIjoxNTEwMTUzMjMxfQ.wgxEXqsVrUn-CA-YXKk0Ny7fmuje0FolaCFsv_yK2h4wdNLyiH5PNQTbsHyMzF1H8qyuYc0AWpNPzptKSqg7mQ' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F image-file=@arkdns-dailymail.png

import requests

url = "http://api.freelancerclub.net/users/1/profile"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"image-file\"; filename=\"arkdns-dailymail.png\"\r\nContent-Type: image/png\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUwOTU0ODQzMSwiZXhwIjoxNTEwMTUzMjMxfQ.wgxEXqsVrUn-CA-YXKk0Ny7fmuje0FolaCFsv_yK2h4wdNLyiH5PNQTbsHyMzF1H8qyuYc0AWpNPzptKSqg7mQ"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "status" : "200",
    "message": "Image updated successfully",
    "filename": "790e8d9888b21911ab7c277a03f073b3.png"
}

If the input is incorrect you will receive error similar to the below

{
    "status": "400",
    "message": "Error: You did not select a file to upload."
}

You can add an image for the user using the following endpoint wiht their user_id.

HTTP Request

POST https://api.freelancerclub.net/users/<user_id>/profile

Query Parameters

Parameter Default Description
image-file (none) Image File in format (gif,jpg,png,jpeg) and maximum file size of 8MB.

Rather than using the image-file you can pass through a base64 encoded image using the field image-base64. If no image-file is presented above, we will check for an image-base64 field instead.

Returns

A 200 status if successful. An error message if not under 400 or 404.

Get a List of Images/videos for a User

curl -X GET \
  http://api.freelancerclub.net/users/1/images \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w' 

import requests

url = "http://api.freelancerclub.net/users/1/images"

headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w"
    }

response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "meta": {
        "total": 29,
        "limit": 20,
        "offset": 0
    },
    "data": [
      {
        "id": "86",
        "title": "Belfy",
        "description": "Photo of St Mikes",
        "public": "1",
        "user_id": "1",
        "filename": "95df5a4b726e4892f473ffa15a24962f.png",
        "created_on": "2017-05-10 15:44:36",
        "modified_on": "2017-06-13 13:35:54",
        "views": "3",
        "tags": "",
        "type": "image",
        "video_id": null,
        "video_type": null,
        "authorised": "0",
        "width": "480",
        "height": "360",
        "likes": "0",
        "comments": "5",
        "like": "0",
        "img_thumb": "https://freelancerclub.net/images/portfoliocrop/1/253/199/95df5a4b726e4892f473ffa15a24962f.png",
        "img_full": "https://freelancerclub.net/images/portfolio/1/775/95df5a4b726e4892f473ffa15a24962f.png"
      },
      {
          "id": "59",
          "title": "MY FAVORITE TECH RIGHT NOW",
          "description": "ALL RELEVANT LINKS DOWN HERE\nFree Graphic Stock Trial - http://graphicstock.com/x/UnboxTherapy_0616\n50% Off Toothbrush (CODE = UNBOX) - http://www.taoclean.com/\n\nMY FAVORITE STUFF RIGHT NOW\n\nPacSafe Z400 - http://amzn.to/1WB3XKG\nMy full video - https://youtu.be/2zJTfmAhOUo\n\nLogitech MX Master - http://amzn.to/1WB5vV9\nMy full video - https://youtu.be/0_oPsFTyhjY\n\nNexus 6P - http://amzn.to/2649O0s\nMy full video - https://youtu.be/BOVai9EdUN4\nNexus 6P skin by dbrand - http://dbrand.com\n\nFOLLOW ME IN THESE PLACES FOR UPDATES\nTwitter - http://twitter.com/unboxtherapy\nFacebook - http://facebook.com/lewis.hilsenteger\nInstagram - http://instagram.com/unboxtherapy\nGoogle Plus - http://bit.ly/1auEeak\n\nVideo sponsored by Graphic Stock",
          "public": "1",
          "user_id": "1",
          "filename": "https://i.ytimg.com/vi/HXdWzEAvgGg/hqdefault.jpg",
          "created_on": "2016-11-23 17:50:16",
          "modified_on": "2016-11-24 09:26:01",
          "views": "2",
          "tags": "",
          "type": "video",
          "video_id": "HXdWzEAvgGg",
          "video_type": "youtube",
          "authorised": "1",
          "width": "1110",
          "height": "725",
          "likes": "0",
          "comments": "5",
          "like": "0"
      },
      {
          "id": "56",
          "title": "Rooftop Films 20th Anniversary Trailer",
          "description": "Director: Mark Elijah Rosenberg<br />\r\nProducers: Bryan Reisberg, Andrew D. Corkin",
          "public": "0",
          "user_id": "1",
          "filename": "http://i.vimeocdn.com/video/583781473_200x150.jpg",
          "created_on": "2016-11-17 18:26:39",
          "modified_on": "2016-11-18 09:34:56",
          "views": "2",
          "tags": "",
          "type": "video",
          "video_id": "176374157",
          "video_type": "vimeo",
          "authorised": "1",
          "width": "1110",
          "height": "725",
          "likes": "0",
          "comments": "5",
          "like": "0"
      }
    ],
    "portfolios": [
        {
          "id": "1",
          "user_id": "1",
          "title": "Wedding",
          "discipline": "photographer",
          "deleted": "0",
          "created_on": "2015-06-11 10:18:31",
          "modified_on": "0000-00-00 00:00:00",
          "img_count": "20"
        },
        {
          "id": "3",
          "user_id": "1",
          "title": "Fashion",
          "discipline": "photographer",
          "deleted": "0",
          "created_on": "2015-06-11 10:19:21",
          "modified_on": "0000-00-00 00:00:00",
          "img_count": "8"
        }
      ]
 }
]

Or failure with a reason. json { "status": "404", "message": "No Images found for that user" }

Return a list of the user's portfolio images/videos and a list of the user's portfolios. The object 'type' shows if it's a video or image. Video filenames are full URL's, where the image filenames just show the actual filename from the system, but do also have the img_full and img_full attributes attached.

HTTP Request

GET http://api.freelancerclub.net/users/<user_id>/images

Query Parameters

Parameter Default Description
user_id (required) required The user_id of the User
portfolioid (optional) null The id of the portfolio if you wish to filter by portfolio. Works with pagination parameters.
limit (optional) 20 The number of rows to return as a positive integer between 1 and 500.
offset (optional) 0 When paginating, sending the offset will return the rows from that position.

Add an image for a user

The below will add an image for a user

curl -X POST \
  http://api.freelancerclub.net/users/1/images \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUwOTU0ODQzMSwiZXhwIjoxNTEwMTUzMjMxfQ.wgxEXqsVrUn-CA-YXKk0Ny7fmuje0FolaCFsv_yK2h4wdNLyiH5PNQTbsHyMzF1H8qyuYc0AWpNPzptKSqg7mQ' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F image-file=@after-migration-1.png \
  -F 'title=My Awesome Picture' \
  -F public=1 \
  -F 'description=I shot this with some friends whilst travelling in Bognor Regis'

import requests

url = "http://api.freelancerclub.net/users/1/images"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"image-file\"; filename=\"after-migration-1.png\"\r\nContent-Type: image/png\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nMy Awesome Picture\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"public\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nI shot this with some friends whilst travelling in Bognor Regis\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUwOTU0ODQzMSwiZXhwIjoxNTEwMTUzMjMxfQ.wgxEXqsVrUn-CA-YXKk0Ny7fmuje0FolaCFsv_yK2h4wdNLyiH5PNQTbsHyMzF1H8qyuYc0AWpNPzptKSqg7mQ"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "message": "Image uploaded successfully",
        "image_id": 85,
        "width": 200,
        "height": 197,
        "filename": "645287d9080f2aa3fe523b1689333978.jpg"
    }
}

If the input is incorrect you will receive error similar to the below

{
    "status": "400",
    "message": "There are errors with the data submitted",
    "errors": "The title is required and should be more then 1 charaters long and be less than 300 characters."
}

You can add an image for the user using the following endpoint user_id.

HTTP Request

POST https://api.freelancerclub.net/users/<user_id>/images

Query Parameters

Parameter Default Description
title (none) The Title of the image (max 300 characters)
description (optional) A description of the image (max 800 characters)
public 1 Do they want the image included in the public directory (1 or 0 = yes or no). Default should be 1
image-file (none) Image File in format (gif,jpg,png,jpeg) and maximum file size of 8MB.

Rather than using the image-file you can pass through a base64 encoded image using the field image-base64. If no image-file is presented above, we will check for an image-base64 field instead.

Returns

A 200 status if successful. An error message if not under 400 or 404.

Add a video for a user

The below will add a video for a user

curl -X POST \
  http://api.freelancerclub.net/users/1/videos \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA' \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: ba9caf5f-9927-8283-ac5f-40ad74661908' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F public=1 \
  -F 'video_url=https://www.youtube.com/watch?v=tsEHfL-Ul1Y'

import requests

url = "http://api.freelancerclub.net/users/1/videos"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"public\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"video_url\"\r\n\r\nhttps://www.youtube.com/watch?v=tsEHfL-Ul1Y\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA",
    'Cache-Control': "no-cache",
    'Postman-Token': "bd20f1cc-d289-6dbd-b96c-03b3df1ae199"
    }

response = requests.request("POST", url, data=payload, headers=headers)

The above command returns JSON structured like this:

{
    "data": {
        "status": "200",
        "message": "The video has been added",
        "video_id": 64
    }
}

If the input is incorrect you will receive error similar to the below

{
    "status": "400",
    "message": "We could not determine the source of the video. Please enter the full Youtube or Vimeo URL."
}

You can add an video for the user using the following endpoint. Only videos from Youtube or Vimeo will be accepted. The full url is required so we can detect where the video is hosted, but it doens't matter if they missed the http or www parts.

HTTP Request

POST http://api.freelancer.localhost/users/<user_id>/videos

Query Parameters

Parameter Default Description
video_url (none) The full URL to the video
public 1 Do they want the image included in the public directory (1 or 0 = yes or no). Default should be 1

Returns

A 200 status if successful. An error message if not under 400 or 404.

Delete an Image or video for a user

The below will delete and image or video for a user

curl -X DELETE \
  http://api.freelancerclub.net/users/1/images/63 \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA' \
  -H 'Cache-Control: no-cache'

import requests

url = "http://api.freelancerclub.net/users/1/images/63"

headers = {
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA",
    'Cache-Control': "no-cache",
    'Postman-Token': "36edf24b-5b87-c3b1-57bc-a97652c10844"
    }

response = requests.request("DELETE", url, headers=headers)

The above command returns JSON structured like this:

{
    "status": "200",
    "message": "Image/Video Deleted"
}

If there is an error you will receive a message like this:

{
    "status": "404",
    "message": "That image does not exist."
}

You can delete an image or video for a user using the endpoint below passing in the and the . Videos and image live in the same table so they are called 'image ids' even though they are separate types.

HTTP Request

DELETE http://api.freelancer.localhost/users/<user_id>/images/<image_id>

Query Parameters

There are no query parameters

Returns

A 200 status if successful. An error message if not under 400 or 404.

Get Portfolios for a user

curl -X GET \
  http://api.freelancerclub.net/users/1/portfolios \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA' \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: d0fa4992-ff31-3746-55c1-fc396f9925c7' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' 
import requests

url = "http://api.freelancerclub.net/users/1/portfolios"

payload = ""
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA",
    'Cache-Control': "no-cache",
    'Postman-Token': "1455b7cd-fbb0-4826-e746-1edf88535889"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "meta": {
        "total": 2
    },
    "data": [
        {
            "id": "1",
            "user_id": "1",
            "title": "Wedding",
            "discipline": "photographer",
            "deleted": "0",
            "created_on": "2015-06-11 10:18:31",
            "modified_on": "0000-00-00 00:00:00",
            "img_count": "3",
            "images": [
                {
                    "id": "4",
                    "title": "Another Image",
                    "description": "",
                    "public": "0",
                    "user_id": "1",
                    "filename": "043c6ae719a504861cd31f48de1a4891.png",
                    "created_on": "2014-07-22 16:16:09",
                    "modified_on": "2016-08-05 16:36:36",
                    "views": "3",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "1",
                    "width": "0",
                    "height": "0",
                    "image_tags": null,
                    "likescount": "0",
                    "default": "1"
                },
                {
                    "id": "1",
                    "title": "Case Factory",
                    "description": "",
                    "public": "0",
                    "user_id": "1",
                    "filename": "6b25123785cc5126f955e54d41211221.png",
                    "created_on": "2014-07-22 16:11:53",
                    "modified_on": "2016-08-05 16:36:36",
                    "views": "2",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "1",
                    "width": "0",
                    "height": "0",
                    "image_tags": null,
                    "likescount": "0",
                    "default": "1"
                },
                {
                    "id": "62",
                    "title": "Pension",
                    "description": "",
                    "public": "1",
                    "user_id": "1",
                    "filename": "cfb685db9adf6d37bcdca86a37155e84.jpg",
                    "created_on": "2018-02-15 15:36:00",
                    "modified_on": "0000-00-00 00:00:00",
                    "views": "0",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "0",
                    "width": "1920",
                    "height": "1080",
                    "image_tags": "",
                    "likescount": "0",
                    "default": "1"
                }
            ]
        },
        {
            "id": "3",
            "user_id": "1",
            "title": "Fashion",
            "discipline": "photographer",
            "deleted": "0",
            "created_on": "2015-06-11 10:19:21",
            "modified_on": "0000-00-00 00:00:00",
            "img_count": "5",
            "images": [
                {
                    "id": "20",
                    "title": "Model 20 with a long title",
                    "description": "asda sa adassdas as",
                    "public": "0",
                    "user_id": "1",
                    "filename": "7667c040936b9cf94aff58498ffa1007.jpeg",
                    "created_on": "2014-08-20 10:41:33",
                    "modified_on": "2016-08-05 16:36:36",
                    "views": "8",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "1",
                    "width": "0",
                    "height": "0",
                    "image_tags": null,
                    "likescount": "1",
                    "default": "0"
                },
                {
                    "id": "19",
                    "title": "Model 8",
                    "description": "dasas das asd asdd ssad ass",
                    "public": "0",
                    "user_id": "1",
                    "filename": "6c4d13d98fe43a5540c4db2465fdc059.jpeg",
                    "created_on": "2014-08-20 10:41:08",
                    "modified_on": "2016-08-05 16:36:36",
                    "views": "6",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "1",
                    "width": "0",
                    "height": "0",
                    "image_tags": null,
                    "likescount": "1",
                    "default": "0"
                },
                {
                    "id": "18",
                    "title": "Model 5",
                    "description": "asd  asdadaa dasd as",
                    "public": "0",
                    "user_id": "1",
                    "filename": "b8c832c91ce9db2185060c17c14971b1.jpeg",
                    "created_on": "2014-08-20 10:40:56",
                    "modified_on": "2016-08-05 16:36:36",
                    "views": "4",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "1",
                    "width": "0",
                    "height": "0",
                    "image_tags": null,
                    "likescount": "1",
                    "default": "0"
                }
            ]
        }
    ]
}

Return a list of the user's portfolios with first three images. If the portfolio does not have 3 default images, then additional images will be chosen by the highest 'likes'. The images show if they are default images by the 'default' attribute. Default images will always be first, followed by non-default.

HTTP Request

GET http://api.freelancerclub.net/users/<user_id>/portfolios

Query Parameters

There are no query parameters

Get a Portfolio for a user

curl -X GET \
  http://api.freelancerclub.net/users/1/portfolios/1 \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA' \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: d0fa4992-ff31-3746-55c1-fc396f9925c7' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' 
import requests

url = "http://api.freelancerclub.net/users/1/portfolios/1"

payload = ""
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA",
    'Cache-Control': "no-cache",
    'Postman-Token': "1455b7cd-fbb0-4826-e746-1edf88535889"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "meta": {
        "total": 1
    },
    "data":  
    {
        "id": "1",
        "user_id": "1",
        "title": "Wedding",
        "discipline": "photographer",
        "deleted": "0",
        "created_on": "2015-06-11 10:18:31",
        "modified_on": "0000-00-00 00:00:00",
        "img_count": "3",
        "images": [
            {
                "id": "4",
                "title": "Another Image",
                "description": "",
                "public": "0",
                "user_id": "1",
                "filename": "043c6ae719a504861cd31f48de1a4891.png",
                "created_on": "2014-07-22 16:16:09",
                "modified_on": "2016-08-05 16:36:36",
                "views": "3",
                "tags": "",
                "type": "image",
                "video_id": null,
                "video_type": null,
                "authorised": "1",
                "width": "0",
                "height": "0",
                "image_tags": null,
                "likescount": "0",
                "default": "1"
            },
            {
                "id": "1",
                "title": "Case Factory",
                "description": "",
                "public": "0",
                "user_id": "1",
                "filename": "6b25123785cc5126f955e54d41211221.png",
                "created_on": "2014-07-22 16:11:53",
                "modified_on": "2016-08-05 16:36:36",
                "views": "2",
                "tags": "",
                "type": "image",
                "video_id": null,
                "video_type": null,
                "authorised": "1",
                "width": "0",
                "height": "0",
                "image_tags": null,
                "likescount": "0",
                "default": "1"
            },
            {
                "id": "62",
                "title": "Pension",
                "description": "",
                "public": "1",
                "user_id": "1",
                "filename": "cfb685db9adf6d37bcdca86a37155e84.jpg",
                "created_on": "2018-02-15 15:36:00",
                "modified_on": "0000-00-00 00:00:00",
                "views": "0",
                "tags": "",
                "type": "image",
                "video_id": null,
                "video_type": null,
                "authorised": "0",
                "width": "1920",
                "height": "1080",
                "image_tags": "",
                "likescount": "0",
                "default": "1"
            }
        ]
    }

}

Return a user's portfolio with the default three images. If the portfolio does not have 3 default images, then additional images will be chosen by the highest 'likes'. The images show if they are default images by the 'default' attribute. Default images will always be first, followed by non-default.

HTTP Request

GET http://api.freelancerclub.net/users/<user_id>/portfolios/<portfolio_id>

Query Parameters

There are no query parameters

Create a Portfolio

Add a new portfolio for a user. They can have a max of 3

curl -X POST \
  http://api.freelancerclub.net/users/portfolios \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA' \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: 0b6d10e5-d946-c3f4-f0b3-b61c5e1a8acd' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F discipline=Photographer \
  -F title=Landscapes

import requests

url = "http://api.freelancerclub.net/users/portfolios"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"discipline\"\r\n\r\nPhotographer\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nLandscapes\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA",
    'Cache-Control': "no-cache",
    'Postman-Token': "3bdbd73c-d59e-eca4-8bb2-cb8f488bcdd5"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "status": "200",
        "message": "Portfolio Created",
        "portfolio_id": 20
    }
}

If the input is incorrect you will receive error similar one of the below

{
    "status": "400",
    "message": "Title is required"
}

{
    "status": "403",
    "message": "Portfolio limit reached. You already have 3 portfolios"
}

You can add a new portfolio for a user by passing through the title and the discipline. The Title can only be up to 15 characters long. The portfolio will ideally be a portfolio in the users list of portfolios they have on their bio.

HTTP Request

POST https://api.freelancerclub.net/users/portfolios

Query Parameters

Parameter Default Description
title (none) The Title of the image (max 15 characters)
portfolio (none) The name of the discipline this portfolio is targeting 'Photographer'.

Returns

A 200 status if successful. An error message if not under 400, 403 or 404.

Delete a Portfolio

Delete a users portfolio

curl -X DELETE \
  http://api.freelancerclub.net/users/portfolios/20 \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA' \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: 1ef50937-77a6-58d8-43f3-900b595c7da1'

import requests

url = "http://api.freelancerclub.net/users/portfolios/20"

headers = {
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA",
    'Cache-Control': "no-cache",
    'Postman-Token': "e4e78e65-9e94-ef79-25b1-0baff74a1c9d"
    }

response = requests.request("DELETE", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "status": "200",
        "message": "Portfolio Deleted",
        "portfolio_id": "20"
    }
}

If the input is incorrect you will receive error similar one of the below

{
    "status": "400",
    "message": "Please provide a valid portfolio_id"
}

You can delete a users portfolio by passing through the {portfolio_id}

HTTP Request

DELETE http://api.freelancerclub.net/users/portfolios/{portfolio_id} with the DELETE command

Returns

A 200 status if successful. An error message if not under 400, 403 or 404.

Attach an image to a portfolio

Attach an image to a users portfolio using the PUT command.

curl -X PUT \
  http://api.freelancerclub.net/users/portfolios/1/images/1 \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA' \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: a58aa1e7-6551-0aa8-7f27-9679cb343b7a' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'

import requests

url = "http://api.freelancerclub.net/users/portfolios/1/images/1"

payload = ""
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA",
    'Cache-Control': "no-cache",
    'Postman-Token': "e05907f5-9d40-2e63-aa60-e313f9900a0b"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "status": "200",
    "message": "The image has been attached to the portfolio"
}

If the input is incorrect you will receive error similar to the below

{
    "status": "400",
    "message": "Please provide a valid image_id"
}

You can add an image to a portfolio using the PUT command

HTTP Request

PUT http://api.freelancerclub.net/users/portfolios/1/images/1

Query Parameters

There are no Query parameters

Returns\

A 200 status if successful. An error message if not under 400 or 404.

Detach (remove) an image from a portfolio

Detach an image from a users portfolio using the DELETE command.

curl -X DELETE \
  http://api.freelancerclub.net/users/portfolios/1/images/1 \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA' \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: d73358e6-718c-c138-f11a-522ba7466bfd' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'

import requests

url = "http://api.freelancerclub.net/users/portfolios/1/images/1"

payload = ""
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA",
    'Cache-Control': "no-cache",
    'Postman-Token': "5832f888-5813-7f55-5675-ba6614c8d544"
    }

response = requests.request("DELETE", url, data=payload, headers=headers)

The above command returns JSON structured like this:

{
    "status": "200",
    "message": "The image has been removed from the portfolio"
}

If the input is incorrect you will receive error similar to the below

{
    "status": "400",
    "message": "Please provide a valid image_id"
}

You can detach (remove) an image from a portfolio using the DELETE command

HTTP Request

DELETE http://api.freelancerclub.net/users/portfolios/1/images/1

Query Parameters

There are no Query parameters

Returns\

A 200 status if successful. An error message if not under 400 or 404.

Mass Assign and Order Images in a portfolio

By passing a list of images ids we can assign and order the images at the same time

curl -X POST \
  http://api.freelancerclub.net/users/portfolios/1/images \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA' \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: aa9d0f36-0ee6-edf5-b459-12514efd27a4' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F 'images[]=4' \
  -F 'images[]=1' \
  -F 'images[]=62' \
  -F 'defaults[]=4' \
  -F 'defaults[]=1' \
  -F 'defaults[]=62'
import requests

url = "http://api.freelancerclub.net/users/portfolios/1/images"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"images[]\"\r\n\r\n4\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"images[]\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"images[]\"\r\n\r\n62\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"defaults[]\"\r\n\r\n4\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"defaults[]\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"defaults[]\"\r\n\r\n62\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA",
    'Cache-Control': "no-cache",
    'Postman-Token': "39f90f3c-12ca-f09b-0a77-1583cbdbd1dd"
    }

response = requests.request("POST", url, data=payload, headers=headers)


The above command returns JSON structured like this:

{
    "status": "200",
    "message": "Images assigned and ordered"
}

If the input is incorrect you will receive error similar to the below

{
    "status": "403",
    "message": "The image_id 3 does not belong to you. No Changes were saved"
}
{
    "status": "400",
    "message": "Not all defaults passed through are numeric: NONNUMERIC EXAMPLE"
}

You can mass assign images to a portfolio, and order them by passing an array of images in the order that you want them saved to the endpoint below. You can also pass through an array of up to 3 'defaults' to mark those images as default images for the portfolio.

HTTP Request

POST http://api.freelancerclub.net/users/portfolios/1/images

Query Parameters

Parameter Default Description
images required An array of image ids in the desired order.
defaults optional An array of image ids (Max 3)

Returns

A 200 status if successful. An error message if not under 400 or 404.

Get a List of Notifications for the Current User

Now Depreciated. Please see the 'Notification' endpoint. The endpoint shown below has been routed to use the new notification end point for backwards compatability.

HTTP Request

OLD URL

GET http://api.freelancerclub.net/users/notifications

Query Parameters

Parameter Default Description
limit (optional) 20 The number of rows to return as a positive integer between 1 and 500.
offset (optional) 0 When paginating, sending the offset will return the rows from that position.

Block a user

The below will block a user


curl -X POST \
  http://api.freelancerclub.net/users/block \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUzNjIzNzU0OCwiZXhwIjoxNTM2ODQyMzQ4fQ.wXSbIbPSxJnRcw3GoYOC2Ku2ZR5QCbM2MsQvqwpi2rMX6T24qtOUVnZTz1_pHqvIW3NGSLuH6GYGe9a_IVSd4w' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d block_user_id=66


import requests

url = "http://api.freelancerclub.net/users/block/"

payload = "block_user_id=66"
headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUzNjIzNzU0OCwiZXhwIjoxNTM2ODQyMzQ4fQ.wXSbIbPSxJnRcw3GoYOC2Ku2ZR5QCbM2MsQvqwpi2rMX6T24qtOUVnZTz1_pHqvIW3NGSLuH6GYGe9a_IVSd4w",
    'content-type': "application/x-www-form-urlencoded",
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "status": "200",
        "message": "User Blocked"
    }
}

If the input is incorrect you will receive error similar to the below

{
    "status": "404",
    "message": "Unable to find that user"
}

You can block a user by using the following endpoint.

HTTP Request

POST https://api.freelancerclub.net/users/block

Query Parameters

Parameter Default Description
block_user_id Required The id of the user that you wish to block

Returns

A 200 status if successful. An error message if not under 400 or 404.

Unblock a user

The below will remove a block on a user

curl -X DELETE \
  http://api.freelancerclub.net/users/block/10 \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUzNjIzNzU0OCwiZXhwIjoxNTM2ODQyMzQ4fQ.wXSbIbPSxJnRcw3GoYOC2Ku2ZR5QCbM2MsQvqwpi2rMX6T24qtOUVnZTz1_pHqvIW3NGSLuH6GYGe9a_IVSd4w' \
  -H 'content-type: application/x-www-form-urlencoded' \

import requests

url = "http://api.freelancerclub.net/users/block/10"

payload = ""
headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUzNjIzNzU0OCwiZXhwIjoxNTM2ODQyMzQ4fQ.wXSbIbPSxJnRcw3GoYOC2Ku2ZR5QCbM2MsQvqwpi2rMX6T24qtOUVnZTz1_pHqvIW3NGSLuH6GYGe9a_IVSd4w",
    'content-type': "application/x-www-form-urlencoded",
    }

response = requests.request("DELETE", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "status": "200",
        "message": "User Unblocked"
    }
}

If the input is incorrect you will receive error similar to the below

{
    "status": "404",
    "message": "That user could not be found"
}

You can unblock a user.

HTTP Request

POST https://api.freelancerclub.net/users/block/<user_id>

Returns

A 200 status if successful. An error message if not under 400 or 404.

Get Reviews

The below returns the reviews for a specifid user

curl -X GET \
  http://api.freelancerclub.net/users/2/reviews?offset=1&limit=1 \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9' \
  -H 'cache-control: no-cache'
import requests

url = "http://api.freelancerclub.net/users/2/reviews?offset=1&limit=1"

payload = ""
headers = {
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
     "meta": {
           "total": 2,
           "limit": "1",
           "offset": "1"
       },
       "data": [
           {
               "id": "1",
               "reviewer_id": "15",
               "user_id": "2",
               "message": "Very good",
               "stars": "5.00",
               "authorised": "1",
               "created_on": "2019-01-01 15:30:00",
               "modified_on": "2019-01-01 15:30:00:00",
               "authorised_on": "2019-01-05 07:59:00",
               "review_name": "Mark",
               "discipline": "Photographer"
           }
       ]
}

This endpoint retrieves a list of reviews for a user

HTTP Request

GET https://api.freelancerclub.net/users/<user_id>/reviews

Query Parameters

Parameter Default Description
user_id (required) (required) the id of the user whose reviews you are requesting.
offset (optional) 0 When paginating, sending the offset will return the rows from that position.
limit (optional) 20 The number of rows to return as a positive integer between 1 and 500.

Returns

A dictionary with a 'data' property that contains an array of up to limit of reviews for this user.

Attribute Description
data An array containing the actual response elements, paginated by any request parameters.
total The total number of results available when not paginated
limit The limit that was used
offset The offset that was used

Images

Get a List of Images

curl -X GET \
  http://api.freelancerclub.net/users/images \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NjIzODgyMiwiZXhwIjoxNDk2ODQzNjIyfQ.msRKLMMfuClYY9Vg9y3mSR4_xlQGsD14r1TWGHtjaDKvbzgyfSAMruTDj6P_MJVcZo69WjFqi7f-MT2nFFAaKQ' \


import requests

url = "http://api.freelancerclub.net/users/images"
headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NjIzODgyMiwiZXhwIjoxNDk2ODQzNjIyfQ.msRKLMMfuClYY9Vg9y3mSR4_xlQGsD14r1TWGHtjaDKvbzgyfSAMruTDj6P_MJVcZo69WjFqi7f-MT2nFFAaKQ"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "meta": {
        "total": 21,
        "limit": 20,
        "offset": 0
    },
    "data": [
     {
       "id": "64",
       "title": "LOST BOY",
       "description": "Year unknown. Population Zero. Welcome to LOST BOY. All Rights Reserved",
       "public": "1",
       "user_id": "1",
       "filename": "http://i.vimeocdn.com/video/602825220_200x150.jpg",
       "created_on": "2016-11-17 14:05:32",
       "modified_on": "2017-05-10 17:04:00",
       "views": "3",
       "tags": "",
       "type": "video",
       "video_id": "188650521",
       "video_type": "vimeo",
       "authorised": "1",
       "width": "1110",
       "height": "725",
       "likes": "0",
       "slug": "mattnelson",
       "display_name": "Matthew Nelson",
       "comments": "5",
       "like": 0
     }, 
     {
       "id": "61",
       "title": "The Sound of Silence (Original Version from 1964)",
       "description": "Lyrics: Hello darkness, my old friend \r\nI've come to talk with you again \r\nBecause a vision softly creeping \r\nLeft its seeds while I was sleeping \r\nAnd the vision that was planted in my brain \r\nStill remains \r\nWithin the sound of silence \r\n\r\nIn restless dreams I walked alone \r\nNarrow streets of cobblestone \r\n'Neath the halo of a street lamp \r\nI turned my collar to the cold and damp \r\nWhen my eyes were stabbed by the flash of a neon light \r\nThat split the night \r\nAnd touched the sound of silence \r\n\r\nAnd in the naked light I saw \r\nTen thousand people maybe more \r\nPeople talking without speaking \r\nPeople hearing without listening \r\nPeople writing songs that voices never shared \r\nNo one dared \r\nDisturb the sound of silence \r\n\r\n\"Fools,\" said I, \"you do not know \r\nSilence like a cancer grows \r\nHear my words that I might teach you \r\nTake my arms that I might reach you\" \r\nBut my words like silent raindrops fell \r\nAnd echoed in the wells of silence \r\n\r\nAnd the people bowed and prayed \r\nTo the neon god they made \r\nAnd the sign flashed out its warning \r\nIn the words that it was forming \r\nAnd the sign said \"The words of the prophets are written on the subway walls \r\nAnd tenement halls \r\nAnd whispered in the sound of silence\"\r\n\r\nThis is the original version from 1964 from the album \"Wednesday Morning, 3 AM.\" Just Simon's guitar and the vocals. The famous version was released in 1966. After \"Wednesday Morning, 3 AM\" flopped, they split up. Without either their knowledge, electric guitars and drums were added and that version of The Sound of Silence became very popular, reaching #1 on the charts in America on New Years Day, 1966. Because of this, Simon and Garfunkel teamed up again and created three more studio albums, one of which one a Grammy award for album of the year and song of the year (Bridge Over Troubled Water).",
       "public": "1",
       "user_id": "4",
       "filename": "https://i.ytimg.com/vi/4zLfCnGVeL4/hqdefault.jpg",
       "created_on": "2016-11-24 14:54:04",
       "modified_on": "2017-05-11 10:19:31",
       "views": "1",
       "tags": "",
       "type": "video",
       "video_id": "4zLfCnGVeL4",
       "video_type": "youtube",
       "authorised": "1",
       "width": "1110",
       "height": "725",
       "likes": "0",
       "slug": "user1",
       "display_name": "User 1",
       "comments": "5",
       "like": 0
     }, ...
   ]  
}

Or failure with a reason.

{
      "status": "400",
      "message": "The limit parameter should be a positive integer between 1 and 500"
}

HTTP Request

GET http://api.freelancerclub.net/images

Query Parameters

Parameter Default Description
limit (optional) 20 The number of rows to return as a positive integer between 1 and 500.
offset (optional) 0 When paginating, sending the offset will return the rows from that position.
search (optional) null Pass through a search String (e.g Wedding)

An Example using Parameters

GET http://api.freelancerclub.net/images/offset/10/limit/10

Get an Image

curl -X GET \
  http://api.freelancerclub.net/images/1 \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w' 

import requests

url = "http://api.freelancerclub.net/images/1"

headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w"
    }

response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "id": "11",
        "title": "M J! The legend",
        "description": "This painting was completed over the case of three years.",
        "public": "1",
        "user_id": "1",
        "filename": "7fee6872457135b9e138db5aea0a3747.jpg",
        "created_on": "2014-07-28 14:58:31",
        "modified_on": "2018-01-19 13:56:14",
        "views": "12",
        "tags": "",
        "type": "image",
        "video_id": null,
        "video_type": null,
        "authorised": "1",
        "width": "1378",
        "height": "775",
        "comments": "5",
        "likes": "2",
        "slug": "mattnelson",
        "display_name": "Matttty Nelson",
        "like": "1",
        "img_thumb": "https://dev.freelancerclub.net/images/portfoliocrop/1/253/199/7fee6872457135b9e138db5aea0a3747.jpg",
        "img_full": "https://dev.freelancerclub.net/images/portfolio/1/775/7fee6872457135b9e138db5aea0a3747.jpg",
        "user": {
            "id": "1",
            "role_id": "1",
            "email": "matt.nelson@silverark.co.uk",
            "display_name": "Matttty Nelson",
            "slug": "mattnelson",
            "discipline": "I'M HIRING, BOLD",
            "city": "york",
            "website": "http://not a website",
            "contact": "01904 290 190",
            "facebook": "http://Facebook.Com/liansjadan",
            "twitter": "http://Twitter.Com/liansjadan",
            "pinterest": "",
            "instagram": "http://Instagram.Com/liansjadan",
            "youtube": "",
            "tags": "photoshop,illustrator",
            "bio": "I am a software engineer living in York who builds amazing websites and web based applications for small to medium sized businesses. I am a software engineer living in York who builds amazing websites and web based applications for small to medium sized businesses.",
            "image": "896a72026dd7cd3968b6c8331057bd62.jpg",
            "account": "pro",
            "renew": "2018-02-16 00:00:00",
            "mentor": "1",
            "badge": "1",
            "systemnotifications": "hourly",
            "notificationsapplicants": "hourly",
            "group_id": "1",
            "testing": "yes",
            "portfolios": "Wedding photographer, Fashion photographer, ",
            "profile_complete": "1",
            "rate_hourly": null,
            "rate_day": "3500.00",
            "mentorurl": "",
            "profile_hidden": "0",
            "latitude": "53.95997",
            "longitude": "1.00000",
            "country": "US",
            "hidetel": "1",
            "regaff": "0",
            "suspended": "0",
            "previous_account": "pro",
            "change_membership": "2017-10-04 13:56:20",
            "is_mentor": "1",
            "mentor_rate": "35.00",
            "socialtotal": "28340",
            "views": "113",
            "likes": "13",
            "stars": null,
            "twitter_followers": "1120",
            "facebook_likes": "8487",
            "youtube_subscribers": "0",
            "instagram_count": "18733",
            "last_check": "2018-01-31 00:00:00",
            "user_id": "1",
            "image_url": "https://dev.freelancerclub.net/images/profile/120/896a72026dd7cd3968b6c8331057bd62.jpg"
        }
    }
}

Or failure with a reason.

{
      "status": "404",
      "message": "Sorry that Image was not found."
}

Return image details from the image ID {image_id} , including the user object attached to the image, count of comments, count of likes

HTTP Request

GET http://api.freelancerclub.net/images/<image_id>

Query Parameters

Parameter Default Description
image_id (required) Required The image_id for the image

Get the comments for an Image


    curl -X GET \
    http://api.freelancerclub.net/images/11/comments \
    -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w' 

import requests

url = "http://api.freelancerclub.net/images/11/comments"

headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w"
    }

response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:


{
    "meta": {
        "total": 7,
        "limit": "2",
        "offset": 0
    },
    "data": [
        {
            "id": "44",
            "user_id": "1",
            "display_name": "Matttty Nelson",
            "image": "https://dev.freelancerclub.net/images/profile/120/896a72026dd7cd3968b6c8331057bd62.jpg",
            "comment": "And the seventh",
            "created_on": "2018-02-05 17:02:04",
            "slug": "mattnelson",
            "image_url": "https://dev.freelancerclub.net/images/profile/120/896a72026dd7cd3968b6c8331057bd62.jpg"
        },
        {
            "id": "43",
            "user_id": "1",
            "display_name": "Matttty Nelson",
            "image": "https://dev.freelancerclub.net/images/profile/120/896a72026dd7cd3968b6c8331057bd62.jpg",
            "comment": "This is the sixth",
            "created_on": "2018-02-05 17:01:57",
            "slug": "mattnelson",
            "image_url": "https://dev.freelancerclub.net/images/profile/120/896a72026dd7cd3968b6c8331057bd62.jpg"
        }
    ]
}

Or failure with a reason. json { "status": "400", "message": "The limit parameter should be a positive integer between 1 and 500" }

Get the comments for an image with the image_id

HTTP Request

GET http://api.freelancerclub.net/images/<image_id>/comments

Query Parameters

Parameter Default Description
image_id (required) Required The image_id for the image
limit (optional) 20 The number of rows to return as a positive integer between 1 and 500.
offset (optional) 0 When paginating, sending the offset will return the rows from that position.

Add a Comment for an Image


    curl -X POST \
      http://api.freelancer.localhost/images/84/comments \
      -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w' \
      -F 'comment=This is an image comment.'

import requests

url = "http://api.freelancer.localhost/images/84/comments"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"comment\"\r\n\r\nThis is an image comment.\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

On success, this will return with a status code of 200

[
  {
    "status": "200",
    "message": "Comment Added Succesfully"
  }
]

Or failure with a reason.

{
  "status": "400",
  "message": "There are errors with the data submitted",
  "errors": "\"The Comment field cannot exceed 300 characters in length.\\n\""
}
{
  "status": "400",
  "message": "There are errors with the data submitted",
  "errors": "You are not allowed to comment on this image."
}

Post a comment attached to an image with an image_id

HTTP Request

POST http://api.freelancerclub.net/images/<image_id>/comments

Query Parameters

Parameter Default Description
image_id (required) Required The image_id for the image
comment (required) Required The content of the comment to be added.

Add a like for an image


  curl -X PUT \
    http://api.freelancerclub.net/images/27/like \
    -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w' 

import requests

url = "http://api.freelancerclub.net/images/27/like"

headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w",
    'cache-control': "no-cache",
    'postman-token': "a3e7dd3e-8a1c-fb37-051a-a057210cc2b5"
    }

response = requests.request("PUT", url, headers=headers)

print(response.text)

On success, this will return with a status code of 200

[
  {
    "status": "200",
    "message": "Image Liked"
  }
]

Or failure with a reason. json { "status": "400", "message": "Unable to like own image" }

Like an image with an image_id

HTTP Request

PUT http://api.freelancerclub.net/images/<image_id>/like

Query Parameters

Parameter Default Description
image_id (required) Required The image_id for the image

Delete a like for an image


 curl -X DELETE \
   http://api.freelancerclub.net/images/27/like \
   -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w' 

import requests

url = "http://api.freelancerclub.net/images/27/like"

headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w"
    }

response = requests.request("DELETE", url, headers=headers)

print(response.text)

On success, this will return with a status code of 200

[
  {
    "status": "200",
    "message": "Image Un-liked"
  }
]

Or failure with a reason. json [ { "status": "404", "message": "There was no like to remove" } ]

Un-like an image with an image_id

HTTP Request

DELETE http://api.freelancerclub.net/images/<image_id>/like

Query Parameters

Parameter Default Description
image_id (required) Required The image_id for the image

Get Image Likes


    curl -X GET \
    http://api.freelancerclub.net/images/11/likes \
    -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w' 

import requests

url = "http://api.freelancerclub.net/images/11/likes"

headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w"
    }

response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "meta": {
        "total": 3
    },
    "data": [
        {
            "display_name": "Matthew Nelson",
            "user_id": "1",
            "image": "3cfa348997f2b8e08f1432e54f1013b7.jpg",
            "img_full": "https://dev.freelancerclub.net/images/profile/120/3cfa348997f2b8e08f1432e54f1013b7.jpg"
        },
        {
            "display_name": "Test User",
            "user_id": "2",
            "image": "5e8d65a6e3a292794199cea9008a340c.jpg",
            "img_full": "https://dev.freelancerclub.net/images/profile/120/5e8d65a6e3a292794199cea9008a340c.jpg"
        },
        {
            "display_name": "Guest User",
            "user_id": "12",
            "image": "f9ea884d99b7f43eb5cf7b50475ed492.jpeg",
            "img_full": "https://dev.freelancerclub.net/images/profile/120/f9ea884d99b7f43eb5cf7b50475ed492.jpeg"
        }
    ]
}

Or failure with a reason. json { "status": "404", "message": "That image does not exist." }

Get a list of users that have liked an image by image_id

HTTP Request

GET http://api.freelancerclub.net/images/<image_id>/likes

Query Parameters

Parameter Default Description
image_id (required) Required The image_id for the image

Jobs

Get all jobs

The below returns the active jobs in the system.

curl -X GET 
   -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLzI1NiJ9.eyJpZCI6eyJpZCI6Ij" 
   'https://api.freelancerclub.net/jobs'
import requests

url = "http://api.freelancer.localhost/jobs/"

headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxNjgxMTEzOCwiZXhwIjoxNTE3NDE1OTM4fQ.Mg4n_4RSRnuCETSzwzw8yXceILGbpBZNBQZqQ_CNm4SuD1lKNpvRgk42bcGnO86no2oQRnyXHmRF_lPpK-l88A",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "meta": {
        "total": 3,
        "limit": 20,
        "offset": 0
    },
    "data": [
        {
            "id": "87",
            "title": "Photographer Needed",
            "description": "fghsfhj fghj dfjjdfgdfgsdfg dfgsdfgsdfgsdfg sdfgdfgdfgdfgdfg",
            "public": "1",
            "user_id": "3652",
            "filename": null,
            "created_on": "2017-08-04 12:08:54",
            "modified_on": "2017-08-04 12:10:59",
            "expiry_date": "2018-08-05",
            "payment_status": "test",
            "discipline": "Photographer",
            "price": "&pound;250 - &pound;500",
            "authorised": "1",
            "city": "York, United Kingdom",
            "cityid": "0",
            "deleted": "0",
            "duration": "Up To 1 Hour",
            "q1": "",
            "q2": "",
            "q3": "",
            "q4": "",
            "pagetitle": "",
            "pagedescription": "",
            "latitude": "53.95997",
            "longitude": "-1.08730",
            "country": "United Kingdom",
            "currency": "GBP",
            "notifications": "0",
            "locationtype": "locality",
            "freeoverride": "0",
            "type": "test",
            "dateto": "0000-00-00",
            "imagesused": "",
            "team_ids": "",
            "invite1": "",
            "invite2": "",
            "invite3": "",
            "invite4": "",
            "images": "",
            "dateset": "normal",
            "tags": null,
            "url": null,
            "featured": "0",
            "image": "9087d56d0ced8199c73570681027ec78.jpg",
            "slug": "mattnelson",
            "seen": "1",
            "watchlist": "0",
            "can_apply": 0,
            "apply_message": "Apire members can't apply to paid jobs"
       }, ...
    ]
}

This endpoint retrieves a list of jobs from the system; the list can be filtered and is paginated by default.

HTTP Request

GET https://api.freelancerclub.net/jobs

Query Parameters

Parameter Default Description
offset (optional) 0 When paginating, sending the offset will return the rows from that position.
limit (optional) 20 The number of rows to return as a positive integer between 1 and 500.
discipline (optional) null Filter by a discipline (e.g. photographer, makeup artist)
searchstr (optional) null Pass through a search String (e.g Wedding)
testing (optional) off 'off' or 'on' - Only show user who are 'testing'
city, longitude, latitude (optional) null Using Google places you can provide the City name and the long and lat to search by location. When this option is emnabled, you can also pass 'distance' through as shown below.
distance (optional) 40 When the city, long and lat are set, then you can also pass through the distance from the city to search by. The default is 40 miles.
payment_status (optional) null 'paid' or 'test'
tab (optional) null A filter which can be 'applied', 'match' or 'watchlist'. This will only return jobs for each filter

Returns

A dictionary with a 'jobs' property that contains an array of up to limit users. Each entry in the array is a separate user object. If no more users are available, the resulting data will equal false. This request should never return an error.

Attribute Description
jobs An array containing the actual response elements, paginated by any request parameters.
total The total number of results available when not paginated
limit The limit that was used
offset The offset that was used

Get a specific Job

The below returns a specific Job based on their ID.

curl -X GET 
   -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLzI1NiJ9.eyJpZCI6eyJpZCI6Ij" 
   'https://api.freelancerclub.net/jobs/86'
import requests

url = "https://api.freelancerclub.net/jobs/86"
headers = {'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJIUzI1NiJ9.eyJpZCI6eyJpZCI6Ij'}
response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "id": "68",
        "title": "Photographer Needed",
        "description": "Long descirpd hereLong descirpd hereLong descirpd hereLong descirpd hereLong descirpd hereLong descirpd hereLong descirpd hereLong descirpd hereLong descirpd hereLong descirpd hereLong descirpd hereLong descirpd here",
        "public": "1",
        "user_id": "325",
        "filename": null,
        "created_on": "2016-06-30 15:52:39",
        "modified_on": "2017-08-01 12:40:55",
        "expiry_date": "2018-06-01",
        "payment_status": "paid",
        "discipline": "Photographer",
        "price": "Under &pound;250",
        "authorised": "1",
        "city": "London, United Kingdom",
        "cityid": "0",
        "deleted": "0",
        "duration": "Full Day",
        "q1": "WHy?",
        "q2": "",
        "q3": "",
        "q4": "",
        "pagetitle": "",
        "pagedescription": "",
        "latitude": "51.50735",
        "longitude": "-0.12776",
        "country": "United Kingdom",
        "currency": "GBP",
        "notifications": "9",
        "locationtype": "locality",
        "freeoverride": "0",
        "type": "normal",
        "dateto": "0000-00-00",
        "imagesused": "",
        "team_ids": "",
        "invite1": "",
        "invite2": "",
        "invite3": "",
        "invite4": "",
        "images": "",
        "dateset": "normal",
        "tags": "Urgent, Tag1, Tag2",
        "url": null,
        "featured": "0",
        "image": null,
        "watchlist": "0",
        "files": [
            {
                "id": "19",
                "job_id": "207",
                "user_id": "1",
                "file_path": "/var/www/thefreelancer/website/storage",
                "encrypted_filename": "c1a07d33e439925dd286e528c881b81b.png",
                "file_name": "2019-04-meraki-no-motorola-filtered-aps.png",
                "file_size": "29.25 KB",
                "created_on": "2019-04-12 09:55:18",
                "modified_on": "2019-04-12 10:08:57",
                "url": "files/job/207192019-04-meraki-no-motorola-filtered-aps.png"
            },
            {
                "id": "20",
                "job_id": "207",
                "user_id": "1",
                "file_path": "/var/www/thefreelancer/website/storage",
                "encrypted_filename": "d089aa9a936d09a89f43b854008e0d0d.png",
                "file_name": "blurry-font.png",
                "file_size": "10.98 KB",
                "created_on": "2019-04-12 09:55:25",
                "modified_on": "2019-04-12 10:08:57",
                "url": "files/job/20720blurry-font.png"
            },
            {
                "id": "21",
                "job_id": "207",
                "user_id": "1",
                "file_path": "/var/www/thefreelancer/website/storage",
                "encrypted_filename": "1c814563cb77236437cc9b42760d2361.png",
                "file_name": "replace-issue-code.png",
                "file_size": "23.72 KB",
                "created_on": "2019-04-12 09:55:35",
                "modified_on": "2019-04-12 10:08:57",
                "url": "files/job/20721replace-issue-code.png"
            },
            {
                "id": "22",
                "job_id": "207",
                "user_id": "1",
                "file_path": "/var/www/thefreelancer/website/storage",
                "encrypted_filename": "0dbd2b0674b3f8e6a0bc1efa3cce34db.pdf",
                "file_name": "6894316_AnnualStatement_201901.pdf",
                "file_size": "66.41 KB",
                "created_on": "2019-04-12 09:55:46",
                "modified_on": "2019-04-12 10:08:57",
                "url": "files/job/207226894316_AnnualStatement_201901.pdf"
            }
        ],
        "applicant_count": 1,
        "applied": 1,
        "can_apply": 0,
        "apply_message": "Apire members can't apply to paid jobs"
    }
}

If the job doens't exist you will get a 404 status code and the following json

{
  "status": "404",
  "message": "Sorry that job was not found."
}

This endpoint retrieves a specific job by the job_id.

HTTP Request

GET https://api.freelancerclub.net/jobs/<job_id>

Query Parameters

Parameter Default Description
job_id (required) Required The job_id of the Job

Returns

A dictionary with information about the job.

Apply for a Job

The apply for a job.

curl -X POST \
  http://api.freelancer.localhost/jobs/87/apply \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjE' \
import requests

url = "http://api.freelancer.localhost/jobs/87/apply"

headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMi",
    'content-type': "application/x-www-form-urlencoded",
    }

response = requests.request("POST", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
  "status": "200",
  "message": "Application sent successfully"
}

If the input is incorrect you will receive error similar to the below

{
  "status": "404",
  "message": "Sorry that job was not found."
}
{
  "status": "400",
  "message": "Only paid members can apply for jobs."
}

You can adpply a user to a job using the apply endpoint and the job_id.

HTTP Request

POST https://api.freelancerclub.net/jobs/<job_id>/apply

Query Parameters

Parameter Default Description
job_id required ID of the job being applied for
q1 null Text for question 1 (required if question 1 is set)
q2 null Text for question 2 (required if question 2 is set)
q3 null Text for question 3 (required if question 3 is set)
q4 null Text for question 4 (required if question 4 is set)
notes (optional) Notes
jobquote null Required if the Job is 'paid'
portfolio (optional) Id of one of the user's portfolios.
currency GBP Optional, but needs ot be one of GBP, USD or EUR. Defaults to GBP

Returns\

A 200 status if successful. An error message if not under 400 or 404.

Add to Watchlist

Add a job to the users watchlist

curl -X PUT \
  http://api.freelancer.localhost/jobs/watchlist/1 \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUyMDU5MzExNCwiZXhwIjoxNTIxMTk3OTE0fQ.DhzXn12rhoJD-SweMlysZ4wIxDtfnGt3yoqJ7mG-AisAot9QlVq2zra2BP8ngiNY1QODHe1flt2oxTghm9K5YA' \
import requests

url = "http://api.freelancer.localhost/jobs/watchlist/1"

headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUyMDU5MzExNCwiZXhwIjoxNTIxMTk3OTE0fQ.DhzXn12rhoJD-SweMlysZ4wIxDtfnGt3yoqJ7mG-AisAot9QlVq2zra2BP8ngiNY1QODHe1flt2oxTghm9K5YA",
    'cache-control': "no-cache"
        }

response = requests.request("PUT", url, headers=headers)

The above command returns JSON structured like this:

{
    "status": "200",
    "message": "Added to Watchlist"
}

If the job doens't exist you will get a 404 status code and the following json

{
  "status": "404",
  "message": "Sorry that job was not found."
}

Add a job to the users watchlist

HTTP Request

PUT https://api.freelancerclub.net/jobs/watchlist/<job_id>

Query Parameters

none

Returns

200 for success.

Remove from Watchlist

Remove a job from the users watchlist.

curl -X DELETE \
  http://api.freelancer.localhost/jobs/watchlist/1 \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUyMDU5MzExNCwiZXhwIjoxNTIxMTk3OTE0fQ.DhzXn12rhoJD-SweMlysZ4wIxDtfnGt3yoqJ7mG-AisAot9QlVq2zra2BP8ngiNY1QODHe1flt2oxTghm9K5YA' \
import requests

url = "http://api.freelancer.localhost/jobs/watchlist/1"

headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUyMDU5MzExNCwiZXhwIjoxNTIxMTk3OTE0fQ.DhzXn12rhoJD-SweMlysZ4wIxDtfnGt3yoqJ7mG-AisAot9QlVq2zra2BP8ngiNY1QODHe1flt2oxTghm9K5YA",
    'cache-control': "no-cache"
    }

response = requests.request("DELETE", url, headers=headers)

The above command returns JSON structured like this:

{
    "status": "200",
    "message": "Deleted from Watchlist"
}

If the job doens't exist you will get a 404 status code and the following json

{
  "status": "404",
  "message": "Sorry that job was not found."
}

Remove the job from the users watchlist

HTTP Request

DELETE https://api.freelancerclub.net/jobs/watchlist/<job_id>

Query Parameters

none

Returns

200 for success.

Add a Job

Add a job for the logged in user.

curl -X POST \
  http://api.freelancer.localhost/jobs \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJho2wQ' \
  -H 'Postman-Token: 0d321edc-aa3d-469a-bdbf-1ec59acd13ef' \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F type=normal \
  -F 'description=This job is going to be one of the most influencial pieces of work that ...' \
  -F 'title=Photographer Needed' \
  -F 'tags=Illustrator, Photoshop, Lighting' \
  -F city=York \
  -F 'country=United Kingdom' \
  -F longitude=-1.07090 \
  -F latitude=53.96418 \
  -F locationtype=locality \
  -F discipline=Photographer \
  -F currency=GBP \
  -F 'duration=Full Day' \
  -F 'price=Under GBP250' \
  -F expiry_date=2019-12-31
import requests

url = "http://api.freelancer.localhost/jobs"

headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhb_lPpK-l88A",
    'content-type': "application/x-www-form-urlencoded",
    }

response = requests.request("POST", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
  "status": "200",
  "message": "Job Posted Successfully",
  "data": {
          "job_id": 139
      }
}

If the input is incorrect you will receive error similar to the below

{
     "status": "400",
     "message": "Unable to create job. Description must be greater than 60 characters."

}

You post a job using the endpoint below.

HTTP Request

POST https://api.freelancerclub.net/jobs

Query Parameters

Parameter Default Description
type required String: 'normal', 'test'
description required String. The description of the job (min 60 characters)
city required String containing the city name
expiry_date (optional) 90 days from creation Date that the job will start & expire (YYYY-mm-dd e.g 2019-12-31)
country required String, the country the job is located in (United Kingdom)
longitude required e.g. -1.07090
latitude required e.g. 53.96418
locationtype required locality or country
discipline required String. A comma separated list of the disciplines (Photographer, Dancer)
title required The title of the job. Must be less than 200 characters long
tags optional Tags for the job. From 0 to maximum of 10. Comma seperated (Event, Vintage, Afterparty)

Fields only relevant for Normal Jobs where the type above is set to "normal"

Parameter Default Description
currency required String: 'GBP', 'USD', 'EUR'
duration required String 'Not Sure', 'Half A Day', 'Full Day', 'A Few Days', 'On-going'
price required String. One of the following "Under GBP250", "GBP250 - GBP500", "GBP500 - GBP1000", "GBP1000 - GBP2000", "GBP2000 - GBP3000", "GBP3000 - GBP5000", "GBP5000 or higher" or "Set an appropriate budget for me"
q1 optional String. One of 4 possible questions to ask the applicants
q2 optional String. One of 4 possible questions to ask the applicants
q3 optional String. One of 4 possible questions to ask the applicants
q4 optional String. One of 4 possible questions to ask the applicants

Returns

A 200 status if successful with the new job ID. An error message if not under 400.

The below returns the user recommendations for a specific job.

curl -X GET \
  http://api.freelancerclub.net/jobs/174/recommended \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJ' \
  -H 'content-type: application/x-www-form-urlencoded' \
import requests

url = "http://api.freelancer.localhost/jobs/174/recommended"

headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciO",
    'content-type': "application/x-www-form-urlencoded",
    }

response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "meta": {
        "total": 8,
        "limit": 20,
        "offset": 0
    },
    "data": [
        {
            "longitude": "-1.54908",
            "latitude": "53.80076",
            "distance": "0.5642197604045849",
            "discrelevance": "0.9599759578704834",
            "relevance": "0.9387807846069336",
            "last_seen": "2019-03-19 11:09:25",
            "id": "3676",
            "display_name": "Insta Test",
            "slug": "instatest",
            "discipline": "Photographer",
            "city": "Leeds, UK",
            "website": null,
            "contact": "01904 290190",
            "facebook": null,
            "twitter": null,
            "pinterest": null,
            "instagram": null,
            "youtube": null,
            "tags": null,
            "bio": null,
            "image": null,
            "account": "starter",
            "mentor": "0",
            "badge": "0",
            "group_id": "1",
            "testing": "dns",
            "rate_hourly": null,
            "rate_day": null,
            "mentorurl": null,
            "is_mentor": "0",
            "mentor_rate": null,
            "socialtotal": "0",
            "followers": "0",
            "likes": "0",
            "star_points": "0.000",
            "star_avg": "0.000",
            "reviews": "0",
            "image_count": "3",
            "rating": "0.000",
            "stars": "0.000",
            "reviewcount": "0",
            "images": [
                {
                    "id": "112",
                    "title": "My awesome pic",
                    "description": "",
                    "public": "1",
                    "user_id": "3676",
                    "filename": "0613d4e4237c09be217c8b2b191bd5e1.png",
                    "created_on": "2019-02-19 18:23:08",
                    "modified_on": "0000-00-00 00:00:00",
                    "views": "0",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "0",
                    "width": "1195",
                    "height": "558",
                    "image_tags": "",
                    "latitude": "0.00000",
                    "longitude": "0.00000",
                    "country": "",
                    "locationtype": "locality",
                    "city": null,
                    "likescount": "0"
                },
                {
                    "id": "113",
                    "title": "My second pic",
                    "description": "",
                    "public": "1",
                    "user_id": "3676",
                    "filename": "f6d8cb24497e4ca08c453fd266edca0c.png",
                    "created_on": "2019-02-19 18:23:25",
                    "modified_on": "0000-00-00 00:00:00",
                    "views": "0",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "0",
                    "width": "1277",
                    "height": "828",
                    "image_tags": "",
                    "latitude": "0.00000",
                    "longitude": "0.00000",
                    "country": "",
                    "locationtype": "locality",
                    "city": null,
                    "likescount": "0"
                },
                {
                    "id": "114",
                    "title": "Awsome third pic",
                    "description": "",
                    "public": "1",
                    "user_id": "3676",
                    "filename": "9c1f731456d1b7af17a30f6b17cd4d7e.png",
                    "created_on": "2019-02-19 18:25:24",
                    "modified_on": "0000-00-00 00:00:00",
                    "views": "0",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "0",
                    "width": "362",
                    "height": "91",
                    "image_tags": "",
                    "latitude": "0.00000",
                    "longitude": "0.00000",
                    "country": "",
                    "locationtype": "locality",
                    "city": null,
                    "likescount": "0"
                }
            ],
            "user_id": "3676",
            "image_url": "https://dev.freelancerclub.net/images/profile/120/513415a798ddd49930541b6da2c1b37f.png"
        }, 

        ...   

This endpoint retrieves a list of users recommended for the job from the system; the list is paginated by default.

HTTP Request

GET https://api.freelancerclub.net/jobs/<job_id>/recommended

Query Parameters

Parameter Default Description
offset (optional) 0 When paginating, sending the offset will return the rows from that position.
limit (optional) 20 The number of rows to return as a positive integer between 1 and 500.
job_id (required) The job_id of the Job

Returns

Attribute Description
data An array containing the actual response elements, paginated by any request parameters.
total The total number of results available when not paginated
limit The limit that was used
offset The offset that was used

Invite a user (Request Quote)

Invite a user to apply to one of your jobs

curl -X POST \
  http://api.freelancerclub.net/jobs/174/invite \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiL07D2OBZncHO0cWiw' \
  -d 'userids=3673='
import requests

url = "http://api.freelancerclub.net/jobs/174/invite"

payload = "userids=3673"
headers = { 'Authorization': "Bearer eyJ0eXAiOiJKV1Q-uWg6d3mQbO3Ia807D2OBZncHO0cWiw" }
response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "status": "200",
        "message": "List of users processed",
        "job_id": "174",
        "notes": [
            "Invite sent to user with ID 180"
        ]
    }
} 

This endpoint sends an invite to the other user and adds a notification to the system for them too. It will return a 200 even if one of the users supplied does not exist or has previously been invited. If a user has previously been invited, they will not be invited again.

HTTP Request

GET https://api.freelancerclub.net/jobs/<job_id>/invite

Query Parameters

Parameter Default Description
userids (required) A comma separated list of users ids such as 180,240,9145
job_id (required) The job_id of the Job

Get Jobs for Logged in User

The below returns a list of jobs that below to the current user

curl -X GET \
  http://api.freelancerclub.net/jobs/my \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJ' \
  -H 'content-type: application/x-www-form-urlencoded' \
import requests

url = "http://api.freelancer.localhost/jobs/my"

headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciO",
    'content-type': "application/x-www-form-urlencoded",
    }

response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "meta": {
        "total": 209,
        "limit": 20,
        "offset": 0
    },
    "data": [
        {
            "id": "296",
            "title": "My New Job Title",
            "description": "This is a string that should be over a description.",
            "public": "1",
            "user_id": "1",
            "filename": null,
            "created_on": "2019-02-19 16:45:58",
            "modified_on": "2019-02-19 16:45:58",
            "expiry_date": "2019-05-20",
            "payment_status": "paid",
            "discipline": "Photographer, Makeup Artist",
            "price": "Under &pound;250",
            "authorised": "1",
            "city": "York, United Kingdom",
            "cityid": "0",
            "deleted": "0",
            "duration": "Not Sure",
            "q1": null,
            "q2": null,
            "q3": null,
            "q4": null,
            "pagetitle": "",
            "pagedescription": "",
            "latitude": "53.95997",
            "longitude": "-1.08730",
            "country": "United Kingdom",
            "currency": "GBP",
            "notifications": "0",
            "locationtype": "locality",
            "freeoverride": "0",
            "type": "normal",
            "dateto": "2019-05-20",
            "imagesused": "",
            "team_ids": "",
            "invite1": "",
            "invite2": "",
            "invite3": "",
            "invite4": "",
            "images": "",
            "dateset": "normal",
            "tags": "some, new, tags",
            "url": null,
            "featured": "0",
            "notifications_free": "0",
            "notifications_starter": "0",
            "notifications_pro": "0",
            "image_ids": "",
            "order_date": "2019-02-19 16:45:58",
            "bumped": "0",
            "image": "b1bd6708a9fef9db90b4a64dee2f8261.png",
            "slug": "mattnelson",
            "applicant_count": "1"
        },
        ...

This endpoint retrieves a list of jobs owned by teh logged in user.

HTTP Request

GET https://api.freelancerclub.net/jobs/my

Query Parameters

Parameter Default Description
offset (optional) 0 When paginating, sending the offset will return the rows from that position.
limit (optional) 20 The number of rows to return as a positive integer between 1 and 500.

Returns

Attribute Description
data An array containing the actual response elements, paginated by any request parameters.
total The total number of results available when not paginated
limit The limit that was used
offset The offset that was used

Add a file to a job

The below will add a file for a job

curl -X POST \
  http://api.freelancerclub.net/jobs/file \
    -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9...' \
    -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
    -F jobid=225 \
    -F 'file=@/var/www/supafi/pnfiles/contactpage/Webpage updates_contact form.pdf'

import requests

url = "http://api.freelancerclub.net/jobs/file"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"jobid\"\r\n\r\n225\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"file\"; filename=\"Webpage updates_contact form.pdf\"\r\nContent-Type: application/pdf\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9...",
        }
response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{

  "status": "200",
  "message": "File updated successfully",
  "filename": "6b6a9d5dc0531cd27c4d410b4ef9a4eb.pdf",
  "file_id": 49

}

If the input is incorrect you will receive error similar to the below

{
    "status": "403",
    "message": "Forbidden: You are not allowed to upload images to someone elses job. This has been logged."
}

You can add a file for the job using the following endpoint.

HTTP Request

POST https://api.freelancerclub.net/jobs/file

Query Parameters

Parameter Default Description
jobid (Required) The id of the job that you wish to add the file to.
file (none) File in format (gif,jpg,png,jpeg,pdf) and maximum file size of 8MB.

Rather than using the file you can pass through a base64 encoded image using the field base64. If no file is presented above, we will check for an base64 field instead.

Returns

A 200 status if successful. An error message if not under 400 or 404.

Delete a file from a job

The below will delete and image or video for a user

curl -X DELETE \
  http://api.freelancerclub.net/jobs/file/46 \
   -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.' \
    -H 'cache-control: no-cache'

import requests

url = "http://api.freelancerclub.net/jobs/file/46"
headers = {
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9...",
    'cache-control': "no-cache"
    }


response = requests.request("DELETE", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "status": "200",
    "message": "File removed successfully"
}

If there is an error you will receive a message like this:

{
    "status": "404",
    "message": "File not found"
}

You can delete an image or file for a job using the endpoint below passing in the .

HTTP Request

DELETE http://api.freelancerclub.netjobs/file/<file_id>

Query Parameters

There are no query parameters

Returns

A 200 status if successful. An error message if not under 400 or 404 or 403.

Applicants

Get all applicants for a job

The below returns the applicants for a job.

curl -X GET \
  http://api.freelancerclub.net/applicants/174 \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIU
  zUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZ
  lcmFyay5jby51ayIsImlhdCI6MTU0OTQ1NTAzOSwiZXhwIjoxNTUwMDU
  5ODM5fQ.02GDSJvuST6_TzfcVWDwNqsyjULOa4GZ42YF-UhGyz3gIA5A
  PN3RHck3S70gG
  4gKBoIxLvfkpNLQNs4VMdsz1Q' \
import requests

url = "http://api.freelancerclub.net/applicants/174"

headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUz
    UxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlc
    mFyay5jby51ayIsImlhdCI6MTU0OTQ1NTAzOSwiZXhwIjoxNTUwMDU5
    ODM5fQ.02GDSJvuST6_TzfcVWDwNqsyjULOa4GZ42YF-UhGyz3gIA
    5APN3RHck3S70gG4gKBoIxLvfkpNLQNs4VMdsz1Q",
    'content-type': "application/x-www-form-urlencoded"
    }

response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "meta": {
        "total": 1,
        "type": "new",
        "limit": 20,
        "offset": 0
    },
    "data": [
        {
            "application_id": "69",
            "user_id": "2",
            "notes": "",
            "quote": "50.00",
            "q1": "",
            "q2": "",
            "q3": "",
            "q4": "",
            "portfolio": "0",
            "twitter_followers": null,
            "facebook_likes": null,
            "youtube_subscribers": null,
            "display_name": "Test User",
            "slug": "mattdowling",
            "discipline": "I’M HIRING",
            "city": "California, United States",
            "website": "",
            "contact": "01904 290190",
            "facebook": "",
            "twitter": "",
            "pinterest": "",
            "instagram": "",
            "youtube": "",
            "tags": "Fashion, make up, beauty,wedding",
            "bio": "",
            "image": "5e8d65a6e3a292794199cea9008a340c.jpg",
            "account": "pro",
            "mentor": "1",
            "badge": "0",
            "group_id": "0",
            "testing": "dns",
            "rate_hourly": "35.00",
            "rate_day": "250.00",
            "mentorurl": "/register",
            "is_mentor": "0",
            "mentor_rate": null,
            "socialtotal": "0",
            "followers": "1",
            "likes": "5",
            "star_points": "0.000",
            "star_avg": "0.000",
            "reviews": "0",
            "image_count": "6",
            "rating": "6.000",
            "stars": "0.000",
            "reviewcount": "0",
            "last_seen": "2019-06-03 17:05:58",
            "images": [
                {
                    "id": "27",
                    "title": "Beautiful",
                    "description": "",
                    "public": "0",
                    "user_id": "2",
                    "filename": "420a57af6942f5b747655c77f2265b58.jpg",
                    "created_on": "2015-04-02 22:16:21",
                    "modified_on": "2018-07-04 12:15:07",
                    "views": "6",
                    "tags": ",Matt Nelson:1",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "1",
                    "width": "3582",
                    "height": "4800",
                    "image_tags": "Marek, hereareafew, dance",
                    "latitude": "0.00000",
                    "longitude": "0.00000",
                    "country": "",
                    "locationtype": "locality",
                    "city": "Holborn Station, Kingsway, London, UK",
                    "likescount": "1"
                },
                {
                    "id": "36",
                    "title": "fgdfg",
                    "description": "dfgdf",
                    "public": "1",
                    "user_id": "2",
                    "filename": "a86f5423446581ce7e66053a7534dd63.png",
                    "created_on": "2015-09-03 18:04:33",
                    "modified_on": "2018-12-07 18:25:46",
                    "views": "18",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "1",
                    "width": "1577",
                    "height": "932",
                    "image_tags": "Marek, hereareafew, dance",
                    "latitude": "0.00000",
                    "longitude": "0.00000",
                    "country": "",
                    "locationtype": "locality",
                    "city": "Holborn Station, Kingsway, London, UK",
                    "likescount": "1"
                },
                {
                    "id": "37",
                    "title": "asdsad",
                    "description": "asdasdsada",
                    "public": "1",
                    "user_id": "2",
                    "filename": "2a31dabc7de3c65b56a67629505ed7da.png",
                    "created_on": "2015-09-03 18:04:49",
                    "modified_on": "2018-12-07 18:25:46",
                    "views": "18",
                    "tags": "",
                    "type": "image",
                    "video_id": null,
                    "video_type": null,
                    "authorised": "1",
                    "width": "1204",
                    "height": "728",
                    "image_tags": "Marek, hereareafew, dance",
                    "latitude": "0.00000",
                    "longitude": "0.00000",
                    "country": "",
                    "locationtype": "locality",
                    "city": "Holborn Station, Kingsway, London, UK",
                    "likescount": "1"
                }
            ],
            "image_url": "https://dev.freelancerclub.net/images/profile/120/5e8d65a6e3a292794199cea9008a340c.jpg",
            "instagram_username": "",
            "youtube_username": "",
            "twitter_username": "",
            "pinterest_username": ""
        }
    ]
}

This endpoint retrieves a list of applications for a job

HTTP Request

GET https://api.freelancerclub.net/applicants/<job_id>

Query Parameters

Parameter Default Description
offset (optional) 0 When paginating, sending the offset will return the rows from that position.
limit (optional) 20 The number of rows to return as a positive integer between 1 and 500.
type (optional) all Filter the applicants by status type 'unsuccessful', 'successful', 'shortlist', & 'new'

Update the status of applications

The below returns the applicants for a job.

curl -X PUT \
  http://api.freelancerclub.net/applicants/174 \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciO
  iJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc
  29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTU0OTQ1NTAzOSwi
  ZXhwIjoxNTUwMDU5ODM5fQ.02GDSJvuST6_TzfcVWDwNqsyjULO
  a4GZ42YF-UhGyz3gIA5APN3RHck3S70gG4gKBoIxLvfkpNLQNs4VMdsz1Q' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'status=unsuccessful&ids=57%2C58'
import requests

url = "http://api.freelancerclub.net/applicants/174"

payload = "status=unsuccessful&ids=57%2C58"
headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIU
    zUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZl
    cmFyay5jby51ayIsImlhdCI6MTU0OTQ1NTAzOSwiZXhwIjoxNTUwMDU5
    ODM5fQ.02GDSJvuST6_TzfcVWDwNqsyjULOa4GZ42YF-UhGyz3gIA5AP
    N3RHck3S70gG4gKBoIxLvfkpNLQNs4VMdsz1Q",
    'content-type': "application/x-www-form-urlencoded",

    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "status": "200",
    "message": "Applicants Updated"
}

This updates the applicant's status. Multiple applications can be passed through. When giving someone the job (successful) you are required to pass a message through which will get emailed to the user(s).

HTTP Request

PUT https://api.freelancerclub.net/applicants/<job_id>

Query Parameters

Parameter Default Description
ids required A comma separated list of application ids (application_id from GET applicants)
status required The status type to update the applications to. 'unsuccessful', 'successful', 'shortlist', & 'new'
message required (if the status passed through is 'successful') The job owner's message to the applicants. This is emailed to them

Notifications

Get all notifications for user

The below returns the notifications for the current user.

curl -X GET \
  http://api.freelancer.localhost/notifications \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxNjgxMTEzOCwiZXhwIjoxNTE3NDE1OTM4fQ.Mg4n_4RSRnuCETSzwzw8yXceILGbpBZNBQZqQ_CNm4SuD1lKNpvRgk42bcGnO86no2oQRnyXHmRF_lPpK-l88A' \
  -H 'cache-control: no-cache' \

import requests

url = "http://api.freelancer.localhost/notifications"

headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxNjgxMTEzOCwiZXhwIjoxNTE3NDE1OTM4fQ.Mg4n_4RSRnuCETSzwzw8yXceILGbpBZNBQZqQ_CNm4SuD1lKNpvRgk42bcGnO86no2oQRnyXHmRF_lPpK-l88A",
    'cache-control': "no-cache",
    }

response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "meta": {
        "total": 18,
        "new": 3,
        "limit": 20,
        "offset": 0
    },
    "data": [
        {
            "id": "47",
            "user_id": "1",
            "source_user": "2",
            "source_module": "elearning",
            "link": "/resources/elearning/course/basic-html#project/2",
            "message": "has posted a discussion on one of your projects: &nbsp;<i>'fghfghgh'</i>",
            "notify": "1",
            "created_on": "2016-02-19 13:51:57",
            "modified_on": "2018-01-26 12:45:10",
            "noemail": "0",
            "display_name": "Test User",
            "slug": "mattdowling",
            "image": "3cfa348997f2b8e08f1432e54f1013b7.jpg",
            "image_url": "https://dev.freelancerclub.net/images/profile/120/3cfa348997f2b8e08f1432e54f1013b7.jpg"
        },
        {
           "id": "124",
           "user_id": "1",
           "source_user": "24",
           "source_module": "comment",
           "link": "/discover/freelancers/davidbradford/image/44/0#comment59",
           "message": "also commented on an image: &nbsp;<i>'Claire Simmons - That's great ...'</i>",
           "notify": "1",
           "created_on": "2018-02-16 18:20:31",
           "modified_on": "2018-05-02 15:16:57",
           "noemail": "0",
           "model_id": "44",
           "display_name": "test user",
           "slug": "testuser",
           "image": "6ff9c710de2ee0d859c5bbdb50505c5f.jpg",
           "image_url": "https://dev.freelancerclub.net/images/profile/120/6ff9c710de2ee0d859c5bbdb50505c5f.jpg",
           "target_image": [
               {
                   "id": "44",
                   "title": "4",
                   "description": "4",
                   "public": "1",
                   "user_id": "70",
                   "filename": "129addcfdc88cfc4719c97a86bf60cb0.png",
                   "created_on": "2016-05-11 13:44:59",
                   "modified_on": "2018-04-25 11:01:45",
                   "views": "14",
                   "tags": ",Matt Nelson:139,Matt Nelson:161,Matthew Nelson:1",
                   "type": "image",
                   "video_id": null,
                   "video_type": null,
                   "authorised": "1",
                   "width": "1204",
                   "height": "728",
                   "image_tags": "Marek, hereareafew, dance",
                   "latitude": "0.00000",
                   "longitude": "0.00000",
                   "country": "",
                   "locationtype": "locality",
                   "city": "Holborn Station, Kingsway, London, UK",
                   "img_thumb": "https://dev.freelancerclub.net/images/portfoliocrop/70/253/199/129addcfdc88cfc4719c97a86bf60cb0.png",
                   "img_full": "https://dev.freelancerclub.net/images/portfolio/70/775/129addcfdc88cfc4719c97a86bf60cb0.png"
               }
           ]
        },
        {
            "id": "87",
            "user_id": "1",
            "source_user": "1",
            "source_module": "jobs",
            "link": "/jobs/details/102",
            "message": "has invited you to apply for the job <a href='/jobs/details/102'>Photographer Needed</a>",
            "notify": "1",
            "created_on": "2017-08-16 16:41:19",
            "modified_on": "2018-05-02 15:16:57",
            "noemail": "0",
            "model_id": "102",
            "display_name": "Matttty Nelson",
            "slug": "mattnelson",
            "image": "463e7481a2273338e3128462eb96edea.png",
            "image_url": "https://dev.freelancerclub.net/images/profile/120/463e7481a2273338e3128462eb96edea.png",
            "target_job": {
                "id": "102",
                "title": "Photographer Needed",
                "description": "Test photography job.Test photography job.Test photography job.Test photography job.Test photography job.Test photography job.Test photography job.Test photography job.\n\nTest photography job.",
                "public": "1",
                "user_id": "1",
                "filename": null,
                "created_on": "2017-08-16 16:27:22",
                "modified_on": "2017-08-16 16:27:45",
                "expiry_date": "2018-08-31",
                "payment_status": "paid",
                "discipline": "Photographer",
                "price": "GBP250 - GBP500",
                "authorised": "1",
                "city": "United Kingdom",
                "cityid": "0",
                "deleted": "0",
                "duration": "Full String",
                "q1": "",
                "q2": "",
                "q3": "",
                "q4": "",
                "pagetitle": "",
                "pagedescription": "",
                "latitude": "55.37805",
                "longitude": "-3.43597",
                "country": "United Kingdom",
                "currency": "GBP",
                "notifications": "38",
                "locationtype": "country",
                "freeoverride": "0",
                "type": "normal",
                "dateto": "0000-00-00",
                "imagesused": "",
                "team_ids": "",
                "invite1": "",
                "invite2": "",
                "invite3": "",
                "invite4": "",
                "images": "",
                "dateset": "normal",
                "tags": null,
                "url": null,
                "featured": "0",
                "notifications_free": "0",
                "notifications_starter": "0",
                "notifications_pro": "0"
            }
        }
    ]
}

This endpoint retrieves a list of notifications from the system; the list can be filtered and is paginated by default. If the notification is about a Job or an Image then the related Image or Job is also returned under target_job OR target_image.

HTTP Request

GET https://api.freelancerclub.net/notifications

Query Parameters

Parameter Default Description
offset (optional) 0 When paginating, sending the offset will return the rows from that position.
limit (optional) 20 The number of rows to return as a positive integer between 1 and 500.

Returns

A dictionary with a 'notifications' property that contains an array of up to limit notifications. If no notifications are available the resulting data will be an empty array. This request should never return an error.

Attribute Description
data An array containing the actual response elements, paginated by any request parameters.
total The total number of results available when not paginated
limit The limit that was used
offset The offset that was used

Get a specific Notification

The below returns a specific Message based on the ID.

curl -X GET \
  http://api.freelancer.localhost/messages/<message_id> \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxNjgxMTEzOCwiZXhwIjoxNTE3NDE1OTM4fQ.Mg4n_4RSRnuCETSzwzw8yXceILGbpBZNBQZqQ_CNm4SuD1lKNpvRgk42bcGnO86no2oQRnyXHmRF_lPpK-l88A' \
  -H 'cache-control: no-cache' 
import requests

 url = "http://api.freelancer.localhost/messages/<message_id>"

 headers = {
     'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxNjgxMTEzOCwiZXhwIjoxNTE3NDE1OTM4fQ.Mg4n_4RSRnuCETSzwzw8yXceILGbpBZNBQZqQ_CNm4SuD1lKNpvRgk42bcGnO86no2oQRnyXHmRF_lPpK-l88A",
     'content-type': "application/x-www-form-urlencoded",
     'cache-control': "no-cache"
     }

 response = requests.request("GET", url, data=payload, headers=headers)

 print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "id": "81",
        "user_id": "1",
        "source_user": "1",
        "source_module": "comment",
        "link": "/discover/freelancers/mattnelson/image/30/0#comment33",
        "message": "has commented on one of your images: &nbsp;<i>'Nice Picture!!'</i>",
        "notify": "1",
        "created_on": "2017-04-12 17:10:56",
        "modified_on": "2018-02-05 20:10:07",
        "noemail": "0",
        "display_name": "Matttty Nelson",
        "slug": "mattnelson",
        "image": "896a72026dd7cd3968b6c8331057bd62.jpg",
        "image_url": "https://dev.freelancerclub.net/images/profile/120/896a72026dd7cd3968b6c8331057bd62.jpg"
    }
}

If the job doens't exist you will get a 404 status code and the following json

{
  "status": "404",
  "message": "Sorry that message was not found."
}

If the user does not have access to the message you will get a 403 status code and the following json

{
    "status": "403",
    "message": "You do not have access to this message"
}

This endpoint retrieves a specific message by the notification_id. There is no more information in this view than when viewing all notifications above.

HTTP Request

GET https://api.freelancerclub.net/notification/<notification_id>

Query Parameters

Parameter Default Description
message_id (required) Required The message_id of the message

Returns

A dictionary with information about the message.

Get a count of notifications

The below return a count of total and new notifications for the logged in user


curl -X GET \
  http://api.freelancerclub.net/notifications/count \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUzNTEwMTU5MiwiZXhwIjoxNTM1NzA2MzkyfQ.WJz_lY1QjD6Z27P6l6U2Mx30RbnRL-GD1rIaqIslU7lhyLE3jdPv0QJ8xS0110abo-Gd_tT-g5aBnbadnGjaFQ' \
  -H 'cache-control: no-cache'


import requests

url = "http://api.freelancerclub.net/notifications/count"

headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUzNTEwMTU5MiwiZXhwIjoxNTM1NzA2MzkyfQ.WJz_lY1QjD6Z27P6l6U2Mx30RbnRL-GD1rIaqIslU7lhyLE3jdPv0QJ8xS0110abo-Gd_tT-g5aBnbadnGjaFQ",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "new": 17,
        "total": 18
    }
}

If the user has no read or unread notifications it will return JSON as below

{
    "data": {
        "new": 0,
        "total": 0
    }
}

This endpoint retrieves a count of new & total notifications for the current logged in user. This request should never return an error.

HTTP Request

GET https://api.freelancerclub.net/notifications/count

Returns

A count of new and total notifications

Register a device (for Push)

The below returns the notifications for the current user.

curl -X POST \
http://api.freelancer.localhost/notifications/register \
-H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUyMjg0MzA1NCwiZXhwIjoxNTIzNDQ3ODU0fQ.v32ktASKRDNMqyiAtnAsH_Tu5o2xDEoTlijggsEUVgaq-HXMivAjoDACsvmZ3eJteZeavsGG_SKmDl-8pXRdVg' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'postman-token: 1629a236-029f-8cfe-1af2-d7e3b3a970e5' \
-d '{ "device_id":"8s4s5f1fd2f1w2v15d10v" }'

import requests

url = "http://api.freelancer.localhost/notifications/register"

payload = "{ \"device_id\":\"8s4s5f1fd2f1w2v15d10v\" }"
headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUyMjg0MzA1NCwiZXhwIjoxNTIzNDQ3ODU0fQ.v32ktASKRDNMqyiAtnAsH_Tu5o2xDEoTlijggsEUVgaq-HXMivAjoDACsvmZ3eJteZeavsGG_SKmDl-8pXRdVg",
    'content-type': "application/json",
    'cache-control': "no-cache",
    'postman-token': "6e1f4d7c-1d6b-12dc-1df9-b737b7a45825"
    }

response = requests.request("POST", url, data=payload, headers=headers)

The above command returns JSON structured like this:

{
 "status": "200",
 "message": "Registered Device"
}

To enable push notifications for a device, you will need to get the device ID. In OneSignal this is referred to as a 'player id'. You may register multiple devices per user. Ideally you would register the device on every login too as this will update the timestamp on the registration.

If two users are using the same device, then by registering the device ID on login we will know which user to activly target so we don't send the wrong messages to the wrong users.

HTTP Request

GET https://api.freelancerclub.net/notifications/register

Query Parameters

Parameter Default Description
device_id n/a The ID of the device.

Returns

A 400 status code if the input is incorrect. A 200 status code if successful.

Messages

Get all message for user

The below returns the messages for the current user.

curl -X GET \
  http://api.freelancer.localhost/messages \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxNjgxMTEzOCwiZXhwIjoxNTE3NDE1OTM4fQ.Mg4n_4RSRnuCETSzwzw8yXceILGbpBZNBQZqQ_CNm4SuD1lKNpvRgk42bcGnO86no2oQRnyXHmRF_lPpK-l88A' \
  -H 'cache-control: no-cache' \
import requests

url = "http://api.freelancer.localhost/messages"

headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxNjgxMTEzOCwiZXhwIjoxNTE3NDE1OTM4fQ.Mg4n_4RSRnuCETSzwzw8yXceILGbpBZNBQZqQ_CNm4SuD1lKNpvRgk42bcGnO86no2oQRnyXHmRF_lPpK-l88A",
    'cache-control': "no-cache",
    }

response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:


{
    "meta": {
        "total": 11,
        "limit": 7,
        "offset": 0,
        "unread": 3
    },
    "data": [
         {
            "id": "4",
            "created_by": "1",
            "created_on": "2016-03-30 14:42:10",
            "last_date": "2016-03-30 14:42:10",
            "source": "",
            "source_id": "0",
            "read": "1",
            "display_name": "Matthew Nelson",
            "image": "3cfa348997f2b8e08f1432e54f1013b7.jpg",
            "users": [
                {
                    "read": "0",
                    "display_name": "New Test User",
                    "other_id": "133",
                    "image": "82e507f89dc252f124be7ea0a0f3e065.jpg",
                    "img_full": "https://dev.freelancerclub.net/images/profile/120/82e507f89dc252f124be7ea0a0f3e065.jpg"
                }
            ],
            "lastmessage": "New test user message here.",
            "readall": false,
            "img_full": "https://dev.freelancerclub.net/images/profile/120/3cfa348997f2b8e08f1432e54f1013b7.jpg"
        },,...
  ]
}

This endpoint retrieves a list of message from the system; the list can be filtered and is paginated by default.

HTTP Request

GET https://api.freelancerclub.net/messages

Query Parameters

Parameter Default Description
offset (optional) 0 When paginating, sending the offset will return the rows from that position.
limit (optional) 20 The number of rows to return as a positive integer between 1 and 500.

Returns

A dictionary with a 'data' property that contains an array of up to limit messages. Each entry in the array is a separate message object. If no more message threads are available, the resulting data will be an empty array.

Attribute Description
data An array of message threads.
total The total number of results available when not paginated
limit The limit that was used
offset The offset that was used

For each message thread: --------- | ------- read | Has the current user read this message. readall | Has everyone in the thread read all the messages? source | May be set to 'job' source_id | If the source is set, then this is the ID of that source. e.g the ID of the job is the source is 'job' display_name | THe name of the user that created the thread. users | An array of other users in the thread. The 'other_id' is the users id. The read shows if they have read it yet or not. lastmessage | The last message added to the thread.

Get a specific Message

The below returns a specific Message based on the ID.

curl -X GET \
  http://api.freelancer.localhost/messages/<message_id> \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxNjgxMTEzOCwiZXhwIjoxNTE3NDE1OTM4fQ.Mg4n_4RSRnuCETSzwzw8yXceILGbpBZNBQZqQ_CNm4SuD1lKNpvRgk42bcGnO86no2oQRnyXHmRF_lPpK-l88A' \
  -H 'cache-control: no-cache' 
import requests

 url = "http://api.freelancer.localhost/messages/<message_id>"

 headers = {
     'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxNjgxMTEzOCwiZXhwIjoxNTE3NDE1OTM4fQ.Mg4n_4RSRnuCETSzwzw8yXceILGbpBZNBQZqQ_CNm4SuD1lKNpvRgk42bcGnO86no2oQRnyXHmRF_lPpK-l88A",
     'content-type': "application/x-www-form-urlencoded",
     'cache-control': "no-cache"
     }

 response = requests.request("GET", url, data=payload, headers=headers)

 print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "id": "88",
        "created_by": "1",
        "subject": "",
        "created_on": "2017-06-29 14:08:16",
        "last_date": "2018-02-05 18:40:00",
        "source": "job",
        "source_id": "0",
        "message_users": [
            {
                "id": "9",
                "message_id": "88",
                "user_id": "9",
                "read": "0",
                "delete": "0",
                "notify": "0",
                "role_id": "4",
                "email": "test2@silverark.co.uk",
                "display_name": "test2",
                "slug": "vcvxcwedasdacxz",
                "discipline": null,
                "city": null,
                "website": null,
                "contact": null,
                "facebook": null,
                "twitter": null,
                "pinterest": null,
                "instagram": null,
                "youtube": null,
                "tags": "Fashion, make up, beauty",
                "bio": null,
                "image": null,
                "account": "free",
                "renew": "0000-00-00 00:00:00",
                "mentor": "1",
                "badge": "0",
                "systemnotifications": "instant",
                "notificationsapplicants": "instant",
                "group_id": "0",
                "testing": "dns",
                "portfolios": "",
                "profile_complete": "1",
                "rate_hourly": null,
                "rate_day": null,
                "mentorurl": null,
                "profile_hidden": "0",
                "latitude": "0.00000",
                "longitude": "0.00000",
                "country": "Ireland",
                "hidetel": "0",
                "regaff": "0",
                "suspended": "0",
                "previous_account": "pro",
                "change_membership": "0000-00-00 00:00:00",
                "is_mentor": "1",
                "mentor_rate": null,
                "socialtotal": "0",
                "image_url": null
            }
        ],
        "message_items": [
            {
                "id": "22",
                "message_id": "88",
                "user_id": "1",
                "message": "<p>Test</p>",
                "created_on": "2017-06-29 14:08:16",
                "display_name": "Matttty Nelson",
                "image": "3cfa348997f2b8e08f1432e54f1013b7.jpg",
                "image_url": "https://dev.freelancerclub.net/images/profile/120/3cfa348997f2b8e08f1432e54f1013b7.jpg"
            },
            {
                "id": "326",
                "message_id": "88",
                "user_id": "1",
                "message": "THis is my moment. This is my message",
                "created_on": "2018-02-05 18:34:00",
                "display_name": "Matttty Nelson",
                "image": "3cfa348997f2b8e08f1432e54f1013b7.jpg",
                "image_url": "https://dev.freelancerclub.net/images/profile/120/3cfa348997f2b8e08f1432e54f1013b7.jpg"
            },
            {
                "id": "327",
                "message_id": "88",
                "user_id": "1",
                "message": "Here is a reply to your message.",
                "created_on": "2018-02-05 18:40:00",
                "display_name": "Matttty Nelson",
                "image": "3cfa348997f2b8e08f1432e54f1013b7.jpg",
                "image_url": "https://dev.freelancerclub.net/images/profile/120/3cfa348997f2b8e08f1432e54f1013b7.jpg"
            }
        ]
    }
}

If the job doens't exist you will get a 404 status code and the following json

{
  "status": "404",
  "message": "Sorry that message was not found."
}

If the user does not have access to the message you will get a 403 status code and the following json

{
    "status": "403",
    "message": "You do not have access to this message"
}

This endpoint retrieves a specific message by the message_id.

HTTP Request

GET https://api.freelancerclub.net/messages/<message_id>

Query Parameters

Parameter Default Description
message_id (required) Required The message_id of the message

Returns

A dictionary with information about the message.

Create a new Message Thread

Create a new message thread.

curl -X POST \
  http://api.freelancer.localhost/messages \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxNjgxMTEzOCwiZXhwIjoxNTE3NDE1OTM4fQ.Mg4n_4RSRnuCETSzwzw8yXceILGbpBZNBQZqQ_CNm4SuD1lKNpvRgk42bcGnO86no2oQRnyXHmRF_lPpK-l88A' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'message=test%20message&ids=1%2C2%2C3'
import requests

url = "http://api.freelancer.localhost/messages"

payload = "message=test%20messag&ids=1%2C2%2C3"
headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxNjgxMTEzOCwiZXhwIjoxNTE3NDE1OTM4fQ.Mg4n_4RSRnuCETSzwzw8yXceILGbpBZNBQZqQ_CNm4SuD1lKNpvRgk42bcGnO86no2oQRnyXHmRF_lPpK-l88A",
    'content-type': "application/x-www-form-urlencoded",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "status": "200",
        "message": "Message Thread Created",
        "message_id": 388
    }
}

If the input is incorrect you will receive error similar to the below

{
    "status": "400",
    "message": "Need at least one valid recipient."
}

If the user is blocked by or has blocked any of the recipients you will receive the error message below

{
    "status": "400",
    "message": "A user in the list cant be messaged due to a block"
}

You send a message using the endpoint below.

HTTP Request

POST https://api.freelancerclub.net/messages

Query Parameters

Parameter Default Description
ids required A comma separated list of recipient user_ids
message required The initial message in the new thread

Returns

A 200 status if successful with the new message thread ID. An error message if not under 400 or 404.

Delete a Message Thread

Delete a message thread.

curl -X DELETE \
  http://api.freelancer.localhost/messages/19 \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA' \
  -H 'Cache-Control: no-cache' 
import requests

url = "http://api.freelancer.localhost/messages/19"

payload = ""
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxODY4Nzc0NCwiZXhwIjoxNTE5MjkyNTQ0fQ.a_oj8fiEFyh27sAbuywMm0CvF5VVL4v9r5tXmk4-7q2g8a5lKTQMcEIekoL1cK3NQdTJpV5ZjTvju3F2P9OPLA",
    'Cache-Control': "no-cache",
    'Postman-Token': "dc3aac40-9a75-cd9a-f02a-cd15c72ed755"
    }

response = requests.request("DELETE", url, data=payload, headers=headers)


The above command returns JSON structured like this:

{
    "status": "200",
    "message": "The thread has been deleted"
}

If an error occurs you will receive something like this:

{
    "status": "403",
    "message": "You do not have access to this message"
}

You can delete a message thread using the below endpoint

HTTP Request

DELETE https://api.freelancerclub.net/messages/<message_id>

Query Parameters

Parameter Default Description
message_id required The message ID, passed through the URL

Returns

A 200 status if successful with the new message thread ID. An error message if not under 400 or 404.

Add a reply to a message thread

Add a reply to a message thread.

curl -X POST \
  http://api.freelancer.localhost/messages/88/reply \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxNzg0OTk2MSwiZXhwIjoxNTE4NDU0NzYxfQ.fNdXdvcQKu908Hpmh5b-ZRSTBOSedhNYAoJU8Ht_xF9PvV7U2QK5jPW-AbkfnMoCac0fdpaIG0yI84odNYZJ7w' \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -H 'postman-token: 1e0ca836-decc-07b6-eae2-04b84457cb5d' \
  -F 'message=Here is a reply to your message.'
import requests

url = "http://api.freelancer.localhost/messages/88/reply"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"message\"\r\n\r\nHere is a reply to your message.\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTUxNzg0OTk2MSwiZXhwIjoxNTE4NDU0NzYxfQ.fNdXdvcQKu908Hpmh5b-ZRSTBOSedhNYAoJU8Ht_xF9PvV7U2QK5jPW-AbkfnMoCac0fdpaIG0yI84odNYZJ7w",
    'cache-control': "no-cache",
    'postman-token': "349bada0-5430-5ed7-ed26-41af5bcfe533"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "status": "200",
    "message": "Reply added"
}

If the input is incorrect you will receive error similar to the below

{
    "status": "400",
    "message": "Please enter a message that is longer than 3 characters."
}

If the user is blocked by or has blocked any of users in the thread you will receive the error message below

{
    "status": "400",
    "message": "Can not post to thread as a blocked user exists"
}

You send a reply to a message thread using the endpoint below

HTTP Request

POST https://api.freelancerclub.net/messages/<message_id>/reply

Query Parameters

Parameter Default Description
message required The message to add in.

Returns

A 200 status if successful with the new message thread ID.

Create a new Job Message

Create a new message thread for a job.

curl -X POST \
  http://api.freelancerclub.net/messages/job/999 \
  -H ': ' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9... \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'cache-control: no-cache' \
  -F 'message=this is a message'
import requests

url = "http://api.freelancer.localhost/messages/job/999"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"message\"\r\n\r\nthis is a message\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9...",
    'Content-Type': "application/x-www-form-urlencoded",
    'cache-control': "no-cache",
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "status": "200",
        "message": "Job Message Thread Created",
        "message_id": 196
    }
}

If the input is incorrect you will receive error similar to the below

{
    "status": "404",
    "message": "Could not find that job"
}

If the user is blocked by or has blocked any of the recipients you will receive the error message below

{
    "status": "403",
    "message": "You cannot message this user"
}

You send a message for a job using the endpoint below.

HTTP Request

POST https://api.freelancerclub.net/messages/job/<jobId>

Query Parameters

Parameter Default Description
message required The initial message for the job

Returns

A 200 status if successful with the new message thread ID. An error message if not under 400, 403, or 404.

Push Notifications

The OneSignal SDK can be viwewed here https://documentation.onesignal.com/docs

Payloads

Push notification will contain a message and meta data describing what the notification is for so you can route it internally.

Job Alerts

Users can define their own job alerts using a location and a discipline. When a job is found for them a notification is sent with the following information.

Data type: job.alert job_id: 5

Content Job Alert

Messages

When a user has been included ina new message thred the following is sent

Data type: message.new message_id: 5421

Content New Message

If a reply is added to a thread, the following is sent if the mesasge has not already been read by the user and a delay of 5 minutes has passed.

Data type: message.reply message_id: 5421

Content New Reply

Skills

Get a list of skills

Get a list of skills

curl -X GET \
  http://api.freelancerclub.net/skills \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ' \
  -H 'Content-Type: application/x-www-form-urlencoded' \

import requests

url = "http://api.freelancerclub.net/skills"

payload = ""
headers = {
    'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9",
    'Content-Type': "application/x-www-form-urlencoded"


    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
     "meta": {
            "total": 4,
            "limit": 20,
            "offset": 0
        },
        "data": [
            {
                "id": "3",
                "skill": "Photoshop"
            },
            {
                "id": "4",
                "skill": "Illustrator"
            },
            {
                "id": "5",
                "skill": "Aftereffects"
            },
            {
                "id": "6",
                "skill": "Lightroom"
            }
        ]
}

This endpoint A list of skills from the skills table

HTTP Request

GET https://api.freelancerclub.net/skills/

Query Parameters

Parameter Default Description
offset (optional) 0 When paginating, sending the offset will return the rows from that position.
limit (optional) 20 The number of rows to return as a positive integer between 1 and 500.

Companies

Get a list of companies

curl -X GET \
  http://api.freelancerclub.net/companies \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NjIzODgyMiwiZXhwIjoxNDk2ODQzNjIyfQ.msRKLMMfuClYY9Vg9y3mSR4_xlQGsD14r1TWGHtjaDKvbzgyfSAMruTDj6P_MJVcZo69WjFqi7f-MT2nFFAaKQ' \


import requests

url = "http://api.freelancerclub.net/companies"
headers = {
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NjIzODgyMiwiZXhwIjoxNDk2ODQzNjIyfQ.msRKLMMfuClYY9Vg9y3mSR4_xlQGsD14r1TWGHtjaDKvbzgyfSAMruTDj6P_MJVcZo69WjFqi7f-MT2nFFAaKQ"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "meta": {
        "total": 28,
        "limit": "10",
        "offset": 0
    },
    "data": [
        {
            "id": "1",
            "user_id": "1",
            "compname": "Silverark IT Solutions",
            "compdescription": "We provide IT solutions from websites to file storage",
            "category": "computing-and-it",
            "website": "http://www.silverark.co.uk",
            "affiliate": "yes",
            "coupon": "yes",
            "exclusive": "yes",
            "couponcode": "SIL8745c",
            "coupondescription": "Get 10% of all hosting",
            "couponurl": "silverark.co.uk/voucher",
            "deleted": "0",
            "created_on": "2015-10-22 16:08:47",
            "modified_on": "2019-08-08 14:58:43",
            "featured": "0",
            "featureexpire": "2015-11-25 00:00:00",
            "coupondte": "0000-00-00 00:00:00",
            "couponexpire": "2020-11-09 00:00:00",
            "slug": "silverark",
            "industry": "",
            "city": "Leeds, UK",
            "latitude": "53.80076",
            "longitude": "-1.54908",
            "country": "United Kingdom",
            "tagline": "Always providing an awesome service",
            "logo": "https://dev.freelancerclub.net/images/companycrop/150/150/f1588204ce2f9ed8121fe9781345ae92.jpeg",
            "coverimage": "https://dev.freelancerclub.net/images/companycovercrop/1366/442/6ad32fd09bfdfa1decf58694dab10ef6.jpeg",
            "authorized": "1"
        },
        {
            "id": "8",
            "user_id": "169",
            "compname": "Boots",
            "compdescription": "Boots is a shop that sells stuff to the public",
            "category": "computing-and-it",
            "website": "http://boots.co.uk",
            "affiliate": "yes",
            "coupon": "yes",
            "exclusive": "no",
            "couponcode": "sdfsdf",
            "coupondescription": "sdfsdfdsf",
            "couponurl": "sdfsdfsdfs.com",
            "deleted": "0",
            "created_on": "2015-10-26 13:44:20",
            "modified_on": "2019-08-02 11:20:57",
            "featured": "1",
            "featureexpire": "2015-11-19 00:00:00",
            "coupondte": "0000-00-00 00:00:00",
            "couponexpire": "0000-00-00 00:00:00",
            "slug": "boots1",
            "industry": "",
            "city": "",
            "latitude": "0.00000",
            "longitude": "0.00000",
            "country": "",
            "tagline": "",
            "logo": "",
            "coverimage": "",
            "authorized": "1"
        }, ...
    ]
}

Or failure with a reason.

{
      "status": "400",
      "message": "The limit parameter should be a positive integer between 1 and 500"
}

HTTP Request

GET http://api.freelancerclub.net/companies

HTTP Parameters

Parameter Default Description
limit (optional) 20 The number of rows to return as a positive integer between 1 and 500.
offset (optional) 0 When paginating, sending the offset will return the rows from that position.
search (optional) null Pass through a search String for the company name (e.g. Silver)

An Example using Parameters

GET http://api.freelanceclub.net/companies/offset/10/limit/10

Get a company

curl -X GET \
  http://api.freelancerclub.net/companies/1 \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w' 

import requests

url = "http://api.freelancerclub.net/companies/1"

headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpZCI6IjEiLCJlbWFpbCI6Im1hdHQubmVsc29uQHNpbHZlcmFyay5jby51ayIsImlhdCI6MTQ5NzM0NTM3OCwiZXhwIjoxNDk3OTUwMTc4fQ.mZjBheDZkZGm8HEHiCzz93HoAmLTwOuL94IM5LwZWKpvasnLUP1LDOi1wSTaN4sAG4Ki9I8CmpU2N3VjODFk8w"
    }

response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "data": {
        "id": "1",
        "user_id": "1",
        "compname": "Silverark IT Solutions",
        "compdescription": "We provide IT solutions from websites to file storage",
        "category": "computing-and-it",
        "website": "http://www.silverark.co.uk",
        "affiliate": "yes",
        "coupon": "yes",
        "exclusive": "yes",
        "couponcode": "SIL8745c",
        "coupondescription": "Get 10% of all hosting",
        "couponurl": "silverark.co.uk/voucher",
        "deleted": "0",
        "created_on": "2015-10-22 16:08:47",
        "modified_on": "2019-08-08 14:58:43",
        "featured": "0",
        "featureexpire": "2015-11-25 00:00:00",
        "coupondte": "0000-00-00 00:00:00",
        "couponexpire": "2020-11-09 00:00:00",
        "slug": "silverark",
        "industry": "",
        "city": "Leeds, UK",
        "latitude": "53.80076",
        "longitude": "-1.54908",
        "country": "United Kingdom",
        "tagline": "Always providing an awesome service",
        "logo": "https://dev.freelancerclub.net/images/companycrop/150/150/f1588204ce2f9ed8121fe9781345ae92.jpeg",
        "coverimage": "https://dev.freelancerclub.net/images/companycovercrop/1366/442/6ad32fd09bfdfa1decf58694dab10ef6.jpeg",
        "authorized": "1"
    }
}

Or failure with a reason.

{
    "status": "404",
    "message": "Sorry that Company was not found."
}

Return company details from the company ID {company_id}.

HTTP Request

GET http://api.freelancerclub.net/companies/<company_id>

Query Parameters

Parameter Default Description
company_id (required) Required The company_id for the company