Festivalcadeau.com API Documentation

This API endpoint is used for user authentication in the Festivalcadeau.com system. It requires basic authentication with the user's email and password, and will return an API key if the authentication is successful.

Authentication

This endpoint requires basic authentication using the user's email address and password. The email address and password are provided by Festivalcadeau.com.

Endpoint URL

Live

https://business.festivalcadeau.com/api/endpoint/v1/authenticate/

Sandbox

https://business.festivalcadeautestsite.nl/api/endpoint/v1/authenticate/

Response

If the authentication is successful, the endpoint will return a JSON response with an apikey property, which contains the user's API key.

{
    "apikey": "9REP0TLNHhpkhlR3SREukTO3pCgXnTsyrCVyXBzuS3WUjlHApgxqVIHaVxp0"
}

If the authentication fails, the endpoint will return a 401 Unauthorized response.

Example Usage

Here is an example of how to use this endpoint with PHP and cURL:

<?php

$url = 'https://business.festivalcadeau.com/api/endpoint/v1/authenticate/';
$username = 'user-email';
$password = 'user-password';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");

$result = curl_exec($ch);

if (curl_errno($ch)) {
    echo 'Error: ' . curl_error($ch);
} else {
    echo $result;
}

curl_close($ch);

API Reference

Authentication POST /api/endpoint/v1/authenticate/

This endpoint is used to authenticate a user and retrieve an API key.

Request

  • email (required, string) - The user's email address.
  • password (required, string) - The user's password.

Response

  • 200 OK - The user was successfully authenticated. Returns a JSON response with an apikey property, which contains the user's API key.
  • 401 Unauthorized - The authentication failed. Returns an error message.

Sample Request

POST /api/endpoint/v1/authenticate/ HTTP/1.1
Host: business.festivalcadeau.com
Authorization: Basic
Content-Type: application/json

{
    "email": "user-email",
    "password": "user-password"
}

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "apikey": "9REP0TLNHhpkhlR3SREukTO3pCgXnTsyrCVyXBzuS3WUjlHApgxqVIHaVxp0"
}