# Get started

# URL

Use the following URL to send your requests:

https://api.business.scholarshipowl.com

# Authorization

To get access to the API you need to sign up and create an API key under Profile. The API Key can be used for API authorization. Theres are several ways of authorization, we suggest using HTTP header.

# HTTP Header auth

You can append SCHOLARSHIP-APP-API-Key to the request to get access.

SCHOLARSHIP-APP-API-Key: 19ea607ec1612750ec08bc195e44e3a7ef0437e0

# HTTP Param auth

You can append api_token param to query string of the request.

?api_token=19ea607ec1612750ec08bc195e44e3a7ef0437e0

# Testing authorization

To make a quick test you can fetch a current authenticated user by creating a request for fetching. See user entity to get more details.

GET /api/user/me

{
    "data": {
        "type": "user",
        "id": "89328",
        "attributes": {
            "name": "Your Name",
            "email": "me@email.com",
            "picture": "https://example.com/avatar.jpg"
        },
        "links": {
            "self": "/user/56"
        }
    }
}

# Relationships

Instances may have relationships that can be fetched by adding include=relation1,relation2 parameter to the request. Please read JSON:API relationships documentation. You will see available relationships for an entity in entitie's description.

You may request that a user specifies organisation(s) that he/she belongs to by adding a query string ?include=organisations – it will return additional information about user organisation(s).

GET /api/user/me?include=organisations

{
    "data": {
        "type": "user",
        "id": "89328",
        "attributes": {
            "name": "Your Name",
            "email": "me@email.com",
            "picture": "https://example.com/avatar.jpg"
        },
        "links": {
            "self": "/user/89328"
        },
        "relationships": {
            "organisations": {
                "links": {
                    "self": "/user/89328/relationships/organisations",
                    "related": "/user/89328/organisations"
                },
                "data": [
                    {
                        "type": "organisation",
                        "id": "1"
                    },
                ]
            }
        }
    },
    "included": [
        {
            "type": "organisation",
            "id": "1",
            "attributes": {
                "name": "Test name",
                "businessName": "Test LTD",
                "city": "New Yourk",
                "address": "",
                "address2": "",
                "zip": "",
                "website": "http://test.com",
                "phone": "",
                "email": "test@example.com"
            },
            "links": {
                "self": "/organisation/1"
            }
        },
    ]
}

# Pagination

We follow JSON:API standard for pagination; please read JSON:API documentation. You can add pagination for collections by adding ?page[number]=1&page[size]=100 to the request.