Show Navigation

API Documentation

Full Credport Integration

Display the badge

The display of the badge is very straightforward. We offer an optimized, super small snippet of code that allows a small and very fleixble badge to be displayed on profile pages. You can configure certain parameters using the window.credport object. Here is the code:

What the badge does is try to fetch the user, specified by the user hash inside window.credport. If none-available it will display the buttontext, although this behavior can be modified to for example hide the badge completely. If available, the badge will be rendered into the element with the id "#credport-button" (although this will be customizable). The badge will offer the user to view the full profile in a popup. See the badge in action here: http://credport-demo.herokuapp.com/users/1

window.credport Options:
  • window.credport.user

    Hash, specifying how to find the user. That can be the plain email (email), the md5 hash of the email (md5_email) or the uid of Facebook, Twitter or Linkedin (or any other network we will support)

  • window.credport.buttontext

    String, will be the text that will be rendered, either while loading the user, or in the absence of him/her.

    Default: "We have partnered with Credport to help you build a portable trustworthy profile. Credport increases your chance of a transaction (like a good eBay rating) and lets you bring your reputation anywhere"

  • window.credport.baseUrl

    String, specifying the base URL of where to ask, use this to point to our staging environment at https://credport-staging.herokuapp.com

    Default: "https://www.credport.org"

  • window.credport.locale

    String, specifying the language to be used. English (en) and German (de) are currently supported.

    Default: "en"

Full API

If you want full control, you might want to take a look at our awesome full API. We use the exact same API to power our frontend profile, so you can decide what information is most relevant to your marketplace. We offer our API cross-origin via JSONP to allow you to make calls from within your site.

Finding an User

You can identify an user just like above by various identifying information on our /api/v1/users/:user_id endpoint.

Examples:

Getting User Information

We currently return full data, but expect this to be protected on user request very soon. As you can see from the links hash of the /api/v1/users/:user_id endpoint, you can access the subresources like education/work/verifications/identities/stats/commonconnections/commoninterests/reviews. You can also use the include parameter to avoid multiple calls.

Examples:

Posting an Identity

Posting an Identity to Credport has to benefits: 1. It increases your brand awareness by allowing the user to show that he is on your platform. 2. Increases the trustworthiness of the user, which benefits everyone. Posting an identity is easy. A simple POST request to our endpoint "/api/v1/users/:user_id/identities". See an example request: http://hackst.com/#M7y1L

Request Parameters:
  • uid: The unique identifier on your platform.
  • context_name: The unique identifier for the context of the Identity. We will allow our partners to create/customize their contexts for maximum impact.
  • name: The name to displayed in e.g. Common Connection situations
  • url: The url to the profile/identity on your platform
  • image: An image representing the identity
  • subtitle: The text to displayed on Credports Verification pane as the second line
Response:
  • 201: Identity successfuly posted.
  • 200: Nothing went wrong, identity most likely already there.
  • 406: Identity could not be created. An Error hash gets returned (typical Rails format)
Notes:
  • We currently do not authenticate the requests, but for obvious reasons we will once we are live. Expect to ali your API key as a parameter

Posting a Review

Posting a Review to Credport has to benefits: 1. It increases your brand awareness by allowing the user to show that he is on your platform. 2. Increases the trustworthiness of the user, which benefits everyone. Posting a review is easy. A simple POST request to our endpoint "/api/v1/users/:user_id/reviews". See an example request: http://hackst.com/#3ZLpe

Request Parameters:
    Params for the identity from/to:
  • from[uid]: The unique identifier on your platform.
  • from[context_name]: The unique identifier for the context of the Identity. We will allow our partners to create/customize their contexts for maximum impact.
  • from[name]: The name to displayed in e.g. Common Connection situations
  • from[url]: The url to the profile/identity on your platform
  • from[image]: An image representing the identity
  • from[subtitle]: The text to displayed on Credports Verification pane as the second line
  • Params for the connection itself
  • connection[context_name]: The unique identifier for the context of this type of connection. We will allow our partners to create/customize their contexts for maximum impact.
  • connection[properties][text]: For reviews to be displayed on Credport, the connection context must implement our text-protocol, which currently requires a string to be set on the key 'text'
Response:
  • 201: Review successfuly posted.
  • 200: Review likely to be there already.
  • 406: Review could not be created. An Error hash gets returned (typical Rails format)
Notes:
  • We currently do not authenticate the requests, but for obvious reasons we will once we are live. Expect to all your API key as a parameter