POST /profile/portfolio/{id}/security

The Specifics

The privacy of your portfolio can be changed by posting new details to the profile security endpoint.

Request

Send this to us.

Name Type Description Example
isPublic string
keys file

Request Example

{
  "isPublic": true,
  "keys": [
    {
      "id": "1aec901f-2ef7-4e7b-901b-7c686b58bef3",
      "value": "8c9f131b",
      "label": "Default Sharing Url",
      "enabled": true
    }
  ]
}

 

DELETE /profile/portfolio/{id}

The Specifics

Delete a portfolio you have previously created

Request

Send this to us.

Name Type Description Example
id guid The Id of the portfolio you wish to delete c5c6ab0c-c45a-4d6b-b41b-0e6ca32a1206

Possible Responses

Can sometimes send you this:

Status Code Example
400 Bad Request

If you don’t submit a valid GUID for the id, the api will return a status code of 400 for the bad request.

200 Deleted

The portfolio was deleted

PUT /profile/portfolio/{id}/{accreditationId}

The Specifics

This allows you to attach an accreditation you have been issued, to a portfolio you have created.

Request

Send this to us.

Name Type Description Example
id guid The Id of the portoflio you want to add the accreditation too
accreditationId string The Id of the accreditation you have been issued that should be attached to the accreditation

Possible Responses

Can sometimes send you this:

Status Code Example
400 Bad Request

If you don’t provide a valid GUID / UUID for the Id of the portfolio, the api will return a status code of 400

401 Unauthorized

If you aren’t the owner of the portfolio you’re trying to update, or you’re not the recipient of the accreditation, the api will return a status code of 401.

200 Ok

Once the accreditation has been attached to the portfolio, the whole portfolio object will be returned.

{
  "id": "1baaf6e4-5288-4b62-9bf5-0942d94ddbdb",
  "ownerId": "lucas@accredit.ly"
  "title": "Sample Portfolio",
  "details": "This is just a sample portfolio for the documentation website",
  "insights": {
    "pendingUpdate": true
  },
  "accreditations": [
    {
      "classification": "theoretical",
      "title": Example Accreditation",
      "details": " Just some details of this accreditation",
      "issueReceipt": {
        "issuerId": "lucas@accredit.ly",
        "issueDate": "2018-03-10T23:32:07.5792301Z"
      },
      "state": "issued",
      "ownerId": "lucas@accredit.ly",
      "id": "41382fba-d8a3-429a-8f14-2ee7ae645c93"
    }
  ],
  "security": {
    "keys": [
      {
        "id": "1aec901f-2ef7-4e7b-901b-7c686b58bef3",
        "value": "8c9f131b",
        "label": "Default Sharing Url",
        "enabled": true
      }
    ]
  }
}

 

POST /profile/portfolio

The Specifics

Update or create a portfolio.

 

Note: If you want to add an accreditation to the portfolio you need to use the other endpoints

Request

Send this to us.

Name Type Description Example
id guid If the Id field is not supplied, this will create a new portfolio 1baaf6e4-5288-4b62-9bf5-0942d94ddbdb
title string Title of the portfolio Professional Development 2018
details string Details of the portfolio This is just a sample portfolio for the documentation website

Request Example

{
  "id": "1baaf6e4-5288-4b62-9bf5-0942d94ddbdb",
  "title": "Sample Portfolio",
  "details": "This is just a sample portfolio for the documentation website",
}

 

Possible Responses

Can sometimes send you this:

Status Code Example
400 Bad Request

The title of the portfolio is required. if you don’t provide it the api will return a status code of 400.

200 Ok

The api will return the full details of the portfolio after it has been updated or created.

 

{
  "id": "1baaf6e4-5288-4b62-9bf5-0942d94ddbdb",
  "ownerId": "lucas@accredit.ly",
  "title": "Sample Portfolio",
  "details": "This is just a sample portfolio for the documentation website",
  "security": {
    "keys": [
      {
        "id": "1aec901f-2ef7-4e7b-901b-7c686b58bef3",
        "value": "8c9f131b",
        "label": "Default Sharing Url",
        "enabled": true
      }
    ]
  }
}

 

GET /profile/portfolio/{id}

The Specifics

Return your specific portfolio by the given portfolio id

Response

We send you a JSON body that looks like this:

Name Type Description Example
title string Title of the portfolio Professional Developmen 2018
details string The details of the portfolio
insights object Insights that have been generated for the portfolio See Example in Response Status Below
accreditations list List of accreditation summaries that are attached to the portfolio See Example in Response Status Below
security object The security settings of the portfolio See Example in Response Status Below

Possible Responses

Can sometimes send you this:

Status Code Example
200 Ok

Returns the given portfolio.

{
  "id": "c5c6ab0c-c45a-4d6b-b41b-0e6ca32a1206",
  "title": "PD 2018",
  "details": "This is a collection of all PD activities completed in 2018",
  "insights": {
    "lastUpdated": "2018-04-08T20:31:14.6844741Z",
    "analysis": {
      "start-end-dates": {
        "data": {
          "Start": "2018-04-08T20:31:14.4368567Z"
        },
        "context": [
          {
            "title": "Assessing Pupils’ Progress",
            "id": "b643e69f-dc3b-4a28-bd33-a4802e5f0708"
          },
          {
            "title": "SMARTboard demonstration",
            "id": "ac730d23-2905-4312-aecf-09d3127a53e7"
          },
          {
            "title": "Spiritual Reflection Workshop",
            "id": "45534e1d-0a1e-47b1-9001-ac3d9bccb092"
          }
        ],
        "key": "start-end-dates"
      },
      "language": {
        "data": {
          "Name": "English",
          "Iso6391Name": "en"
        },
        "context": [
          {
            "Name": "English",
            "Iso6391Name": "en"
          }
        ],
        "key": "language"
      }
  },
  "accreditations": [
    {
      "classification": "theoretical",
      "title": "Assessing Pupils’ Progress",
      "details": "This accreditation covers successful completion of the in school professional development session "Assessing Pupil's Progress"",
      "issueReceipt": {
        "issuerId": "issuer@accredit.ly",
        "issueDate": "2018-04-08T19:45:36.5539562Z"
      },
      "state": "issued",
      "ownerId": "recipient@accredit.ly",
      "id": "b643e69f-dc3b-4a28-bd33-a4802e5f0708"
    },
    {
      "classification": "practical",
      "title": "SMARTboard demonstration",
      "details": "This accreditation covers successful completion of the in school professional development session "SMARTboard demonstration"",
      "issueReceipt": {
        "issuerId": "issuer@accredit.ly",
        "issueDate": "2018-04-08T19:48:59.0029687Z"
      },
      "state": "issued",
      "ownerId": "recipient@accredit.ly",
      "id": "ac730d23-2905-4312-aecf-09d3127a53e7"
    }  ],
  "security": {
    "keys": [
      {
        "id": "37e2604f-c2a9-4a14-b8f7-ba7e8d3c3ecb",
        "value": "2a585a61",
        "label": "Default Sharing Url",
        "enabled": true
      }
    ]
  }
}

 

404 Not Found

The API couldn’t return that portfolio because it doesn’t exist or you don’t have permissions to access it.

POST /profile

The Specifics

Update your profile details.

Please note: Once you verify your identity (PUT /profile/verify), you will no longer be able to make changes to your Name.

 

Request

Send this to us.

Name Type Description Example
isPublic bool Is this profile public or private? true
name string Your name Lucas Moffitt
tag string a <140 character description of who you are. Microsoft Office Training Provider
url string an optional link to yours or your company's website, must be HTTPS https://www.ATrainingProvider.com
twitter string an optional link to yours or you company's twitter profile https://www.twitter.com/lucasmoffitt
facebook string an optional link to yours or your copmany's facebook profile https://www.facebook.com/lucasmoffitt

Request Example

{
  "name": "Lucas Moffitt",
  "isPublic": true,
  "url": "https://www.lucasmoffitt.com",
  "tag": "ex-teacher, hobby dev, global education product solutions.",
  "twitter": "@lucasmoffitt",
  "facebook": "https://www.facebook.com/lucasmoffitt"
}

 

Possible Responses

Can sometimes send you this:

Status Code Example
200 Profile Updated

Once the profile has been updated the whole profile object will be returned again. The full result details can be seen on GET /account/profile.