Intro & Authentication

The API uses a Bearer token, with your own unique API key, to authenticate all requests.

All data is returned as JSON, with the appropriate HTTP headers depending on if your request was successful or not (200, 404, 401, 429).

All requests are to be made in the following format:

curl -X GET/POST https://www.api.socialvaluecompany.com/api/{endpoint} -H "Authorization: Bearer {token}"
Endpoints
/sign-in - Checks user credentials

Example request:

curl -X POST https://www.api.socialvaluecompany.com/api/sign-in -H "Authorization: Bearer {token}"

POST Fields:

email, password

Example response:

{
    "status": "Success",
    "accountID": "94",
    "firstname": "Chris",
    "lastname": "Morgan3",
    "email": "chris@socialvaluecompany.com",
    "hasXO": "0",
    "expiryXO": null,
    "companyID": "56",
    "type": "a",
    "profileImage": "https:\/\/app.socialvaluecompany.com\/assets\/cdn\/profileImg\/2023-02-07\/Screenshot 2023-01-23 at 16.07.31.png-234fe05ec7707f2ef81c71e1521318c4.png"
}
/change-password - Changes a users password

Example request:

curl -X POST https://www.api.socialvaluecompany.com/api/change-password -H "Authorization: Bearer {token}"

POST Fields:

email, id (account ID), password

Example response:

{
    "status": "Success"
}
/edit-profile - Edits a users profile

Example request:

curl -X POST https://www.api.socialvaluecompany.com/api/edit-profile -H "Authorization: Bearer {token}"

POST Fields:

email, id (account ID), firstname, lastname

Example response:

{
    "status": "Success"
}
/get-company - Gets the details of a company

Example request:

curl -X GET https://www.api.socialvaluecompany.com/api/get-company?id=1 -H "Authorization: Bearer {token}"

GET Fields:

id

Example response:

{
    "status": "Success",
    "title": "Demo Account",
    "website": null,
            "wellbeingScore": "0",
            "sustainabilityScore": "0",
            "diversityScore": "0",
            "overallScore": "0",
    "logoImage": "https:\/\/app.socialvaluecompany.com\/assets\/cdn\/companies\/2023-02-07\/278973944_113879264636504_7277420130338101193_n.jpeg-fa711c456370749ac428f7d8a3db84f5.jpeg"
}
/get-article-categories - Lists all article categories

Example request:

curl -X GET https://www.api.socialvaluecompany.com/api/get-article-categories -H "Authorization: Bearer {token}"

Example response:

[{
    "id": "30",
    "title": "Mental Health",
    "parentCategoryID": "28"
}, {
    "id": "5",
    "title": "Wealth Management",
    "parentCategoryID": "4"
}...]
/get-articles - Gets articles for a comma separated list of category IDs

Example request:

curl -X GET https://www.api.socialvaluecompany.com/api/get-articles?ids=46,13 -H "Authorization: Bearer {token}"

GET Fields:

ids

Example response:

[{
    "id": "245",
    "title": "Creating an inclusive workplace for the LGBTQ+ community: gender identity and transgender etiquette",
    "slug": "creating-an-inclusive-workplace-for-the-lgbtq-community-gender-identity-and-transgender-etiquette",
    "datePosted": "2023-01-15 00:00:00",
    "html": "We found that society is pretty accepting of LGBTQ+ adults. According to this study:",
    "featuredImage": "https:\/\/app.socialvaluecompany.com\/assets\/cdn\/blog\/2022-09-12\/inclusive-lgbtq.jpg-5bda65811d2c4401c785f701a9519bc4.jpg"
}, {
    "id": "237",
    "title": "Disability Etiquette Within The Workplace",
    "slug": "disability-etiquette-within-the-workplace",
    "datePosted": "2023-01-15 00:00:00",
    "html": "Disability etiquette in the workplace is an integral aspect of Diversity, Equity and Inclusion (DEI) in the workplace. This is in line with the clamour for business leaders and executives to adopt DEI strategies",
    "featuredImage": "https:\/\/app.socialvaluecompany.com\/assets\/cdn\/blog\/2022-09-13\/disability-work.jpg-c84cb29e9dee8ad1ee9984ab26393066.jpg"
}...]
/get-article - Gets data for a single given article

Example request:

curl -X GET https://www.api.socialvaluecompany.com/api/get-article?id=245 -H "Authorization: Bearer {token}"

GET Fields:

id

Example response:

[{
    "id": "245",
    "title": "Creating an inclusive workplace for the LGBTQ+ community: gender identity and transgender etiquette",
    "slug": "creating-an-inclusive-workplace-for-the-lgbtq-community-gender-identity-and-transgender-etiquette",
    "datePosted": "2023-01-15 00:00:00",
    "html": "We found that society is pretty accepting of LGBTQ+ adults. According to this study:",
    "featuredImage": "https:\/\/app.socialvaluecompany.com\/assets\/cdn\/blog\/2022-09-12\/inclusive-lgbtq.jpg-5bda65811d2c4401c785f701a9519bc4.jpg"
}]
/get-helpline-categories - Gets category list for helplines/support services

Example request:

curl -X GET https://www.api.socialvaluecompany.com/api/get-helpline-categories -H "Authorization: Bearer {token}"

Example response:

[{
    "id": "3",
    "title": "Addiction"
}, {
    "id": "4",
    "title": "Animal Welfare"
}...]
/get-helplines - Lists helplines for a specific category

Example request:

curl -X GET https://www.api.socialvaluecompany.com/api/get-helplines?category=1 -H "Authorization: Bearer {token}"

GET Fields:

category

Example response:

[{
    "id": "48",
    "title": "Alzheimer's Society",
    "phone": "0333 150 3456",
    "website": "https:\/\/www.alzheimers.org.uk\/",
    "description": "We are Alzheimer\u2019s Society. We're a vital source of support and a powerful force for change for everyone affected by dementia."
}, {
    "id": "80",
    "title": "British Heart Foundation ",
    "phone": "0300 330 3322",
    "website": "https:\/\/www.bhf.org.uk\/",
    "description": ""
}...]
/get-insurances - Lists all insurance types we offer

Example request:

curl -X GET https://www.api.socialvaluecompany.com/api/get-insurances -H "Authorization: Bearer {token}"

Example response:

[{
    "id": "2",
    "title": "Car",
    "fontAwesomeIcon": "",
    "link": "https:\/\/www.quotezone.co.uk\/SetAffiliate.php?aid=T8N3L2-001&type=car"
}, {
    "id": "9",
    "title": "Energy",
    "fontAwesomeIcon": "",
    "link": "https:\/\/www.quotezone.co.uk\/SetAffiliate.php?aid=H2V6X9-008&type=energy"
}...]
/get-fundraising-ideas - Lists all fundraising ideas

Example request:

curl -X GET https://www.api.socialvaluecompany.com/api/get-fundraising-ideas -H "Authorization: Bearer {token}"

Example response:

[{
    "id": "50",
    "title": " Hold a car wash ",
    "description": "This is another classic fundraiser that is perfect for warmer months. Car washes are typically easy to organize and can be a lot of fun. Be sure to promote your event in advance so that people will know when and where to find you. "
}, {
    "id": "3",
    "title": "Afternoon tea",
    "description": "Organise an afternoon tea with colleagues, friends, and family with all the proceeds going to charity"
}...]
/get-affirmation - Pulls random daily affirmation

Example request:

curl -X GET https://www.api.socialvaluecompany.com/api/get-affirmation -H "Authorization: Bearer {token}"

Example response:

[{
    "id": "28",
    "text": "I am enough and will always be enough."
}]
/get-video-categories - Lists all video categories

Example request:

curl -X GET https://www.api.socialvaluecompany.com/api/get-video-categories -H "Authorization: Bearer {token}"

Example response:

[{
    "id": "67",
    "title": "20 Minute Fitness Videos",
    "parentCategoryID": "62"
}, {
    "id": "87",
    "title": "Admin Support",
    "parentCategoryID": "0"
}...]
/get-videos - Gets videos for a comma separated list of category IDs

Example request:

curl -X GET https://www.api.socialvaluecompany.com/api/get-videos?ids=62,72 -H "Authorization: Bearer {token}"

GET Fields:

ids

Example response:

[{
    "id": "38",
    "title": "Biceps Curls ",
    "categoryID": "62",
    "museVideoID": "9pNxJ36"
}, {
    "id": "37",
    "title": "High Knee Pulls",
    "categoryID": "62",
    "museVideoID": "QnA5vbH"
}...]
/get-games - Gets all games

Example request:

curl -X GET https://www.api.socialvaluecompany.com/api/get-games -H "Authorization: Bearer {token}"

Example response:

[{"id":"1","title":"Alpha Memory Game","image":"https:\/\/i.gyazo.com\/f92975002eeec53adeb95311127db699.png","embedURL":"https:\/\/app.socialvaluecompany.com\/assets\/games\/Alpha Memory Game\/index.html"}...]