GET /profile/{id}

The Specifics

This endpoint will return either your full profile details when authenticated, or will look for a public profile for the given Id.

 

 

Request

Send this to us.

Name Type Description Example
id string An OPTIONAL Id in the URL to return the specific profile if public lucas@accredit.ly

Response

We send you a JSON body that looks like this:

Name Type Description Example
profile object The profile for the authenticated or requested account See examples below depending on Authentication Status
portfolios object The available portfolios for the authenticated or requested account See examples below depending on Authentication Status

Possible Responses

Can sometimes send you this:

Status Code Example
200 When Authenticated

If you request /profile as an authenticated user, the profile object returned will be far more complex and detailed than an unauthenticated request.

Please note, some of these fields are optional and may not be included if you have not entered the data.

{
  "profile": {
    "id": "lucas@accredit.ly",
    "name": "Lucas Moffitt",
    "mD5Hash": "5e7d254b6048c54f7ddb8d8423742007",
    "twitter": "@lucasmoffitt",
    "facebook": "https://www.facebook.com/lucasmoffitt",
    "strengths": [
      {
        "name": "Digital Accreditations"
      },
      {
        "name": "Product Development"
      }
    ],
    "verification": {
      "requested": "2018-02-10T21:37:42.9953649Z",
      "status": "pending",
      "actionDate": "2018-02-10T21:37:42.9953649Z"
    }
  },
  "portfolios": [
    {
      "title": "Pd 2018",
    ..........
      },
    }
  ]
}

 

200 NOT authenticated
{
  "profile": {
  "id": "lucas@accredit.ly",
    "name": "Lucas Moffitt",
    "mD5Hash": "5e7d254b6048c54f7ddb8d8423742007",
    "twitter": "@lucasmoffitt",
    "facebook": "https://www.facebook.com/lucasmoffitt"
  },
  "portfolios": [
    {
      "title": "Pd 2018",
    ..........
      },
    }
  ]
}

 

401 Unauthorized

If you fail to provide an Id in the url and the authorization header (or the authorization token is expired), the api will return a 401 status code.

404 Not Found

If you provide an Id of the profile to return and that profile does not exist, or you don’t have permission to access it, the api will return a status of 404.

Leave a Reply