Overview

Our first Content API in the MENA Region composed of a series of Cloud Microservices, working interchangeably your SSO Account.
The goal is to take over the complex infrastructure, database, storage, and scalability requirements, and leave the frontend channels for you to work in hassle-free environment, with the power of content reuse and multi-language translations. The result is a significant time saving.

Cloud APPS

Your primary profile, where you create web/mobile Apps for your customers. Each App has its own Content and API, with app-specific users (useful to give access to your customers on content management only). In addition to your billing information and history.

Cloud CMS

Custom tool made specifically for end-users (your customers), designed based on common-sense usability rule, in order to lift any technical barriers between them and the system.

  • Media albums (single layer):
    • Multiple types (photo/audio/video/file).
    • Custom thumbnail cropping.
    • Custom default album thumbnail.
    • Custom tags/captions.
    • Linked photos to special albums.
    • Sortable albums/photos.
  • Special albums:
    • Scheduled display.
    • Sortable photos (except linked from albums).
  • Nested pages:
    • Unique page identifier.
    • Page models (default/product/event).
    • Cover photo per page.
    • Custom page models.
    • Custom page tags/summary.
    • Custom content layout.
    • Content blocks (rich text/media/tables/files/form).
    • Sortable pages (multi-level).
  • News feed:
    • Custom date.
    • Cover photo per page.
    • Custom news tags/summary.
    • Custom content layout.
    • Content blocks (rich text/media/tables/files/form).
    • Automated RSS feed.
  • Contacts:
    • Multiple contact emails.
    • Multiple locations on map.
  • Social links.
  • SEO keywords and description.
  • Site search (matches pages/news).
  • Site multi-language content.
  • Responsive design.
  • Automated backups.
  • JSON RESTful API.
Cloud API

This is what it's all about, the actual RESTful API you're going to use for building their web/mobile apps rapidly.

Furthermore, you won't have to worry about losing your content anymore, we protect your content and take a backup on regular basis.
Also you're going to benefit from our free updates, we always work on our CMS and our API to add new features matches the latest technologies.

The Basics

Service Architecture

We host our servers on the cloud, so you'll never have to worry about scalability or how many requests your app might require.
You'll use our one account given to you across all of our Cloud Services (APPS, CMS, and API) using SSO (Single-Sign On).
All uploads will be stored on and delivered from our Cloud Storage.

How it Works

Using our RESTful API is easy in 3 steps:

1. Create an App
  1. Login to your Account (if you don't have an account, request one now).
  2. Create App
    1. Enter App title.
    2. Select App default language.
    3. Optionally, you can set App domain and currency.
    4. Tip:

      In case you do not have a hosting account elsewhere, feel free to use our 100MB micro hosting for your App (included in your App subscription, no additional fees required).

  3. After successful App creation, you'll get the following:
    1. API Key: Primary access to our API (see Developer Access).
    2. API Secret: Secondary access to our API, used in combination with the Public Key.
    3. Public Key.

    Tip:

    In case your App does not live on a domain, send your API Secret encoded as base64 after being RSA encrypted with your Public Key using OAEP algorithm (see Authorized RSA Requests).

  4. Optionally, you can edit your created App to add the following:
    1. Allowed Hosts: comma-separated IP whitelist.
    2. App Specific Users: limited user accounts for the app (Manage Content only, API Access only, or both).
2. Post App Content
  1. Login to our CMS using either your Developer account or an App Specific User account as mentioned above.
  2. Select your App.
  3. Start creating content (pages, albums, news, and, contacts).
3. Get JSON API
  1. Login to our API Console using either your Developer account or an App Specific User account as mentioned above.
  2. Select your App.
  3. Select API Method (see API Reference).
  4. Make API Request.
  5. Review API Response JSON.

Developer Access

Making API Requests is fairly simple, yet you need to do it carefully, where our servers have strict access to each App in an effort to protect your customers' content.

Request Requiements
# Option Value Required Notes
1 Endpoint https://api.oggeh.com Yes
2 Method POST Yes
3 URL Parameter api_key=[APP_API_KEY] Yes
4 URL Parameter lang=[LANGUAGE_CODE] No Supported languages codes are: en, ar, fr, de, it, fa, ru
5 URL Parameter api_secret=[APP_API_SECRET] No Must be encoded as base64 after being RSA encrypted with your Public Key using OAEP algorithm.
6 Request Body [{"method":"[VALID_API_METHOD]"}] Yes Must be a JSON String, and contains at least one valid method (see API Reference).
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.pages"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en

Tip:

Request JSON body is composed of an Array, each element must have a valid method. This enables stacking multiple API Responses at once.

Authorized Requests

HTTP Origin

You need to include an Origin header matches your App domain.ltd

Request Example
curl -H "Origin: http://app.domain.ltd" -H "Content-Type: application/json" -X POST -d '[{"method":"get.app","select":"title"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en

IP Whitelist

Optionally, you can add one ot more IP address at your App allowed hosts, like your WAN address.

RSA

In case your App does not run on a web browser, you need to pass your App API Secret encoded as base64 after being RSA encrypted with your Public Key using OAEP algorithm.

Tip:

Encrypted RSA considered the only way to make API requests from mobile devices or any platform other than web browsers.
We have created an iOS Example on our Github repository, which covers RSA and Sandbox requests.

Code Example (might be in php, but it might help understanding the implementaion)
require_once 'Crypt/RSA.php';
$rsa = new Crypt_RSA();
// Load your App Public Key
$public_key = file_get_contents('/path/to/app_public_key.pem');
$rsa->loadKey(trim($public_key));
// Encrypt your App API Secret using OAEP algorithm
$rsa->setEncryptionMode(CRYPT_RSA_ENCRYPTION_OAEP);
$api_secret_encrypted = $rsa->encrypt('[APP_API_SECRET]');
// Encode the above encrypted API Secret using base64
$api_secret_encoded = base64_encode($api_secret_encrypted);
$body = '[{"method":"get.app","select":"title"}]';
$ch = curl_init();
// Pass the final encoded API Secret as a URL parameter to our endpoint, along with your App API Key
curl_setopt($ch, CURLOPT_URL, 'https://api.oggeh.com/?api_key=[APP_API_KEY]&api_secret='.$api_secret_encoded);
curl_setopt($ch, CURLOPT_USERAGENT, isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'OGGEH v1.0');
$headers = array(
    'Accept: application/json',
    'Content-Type: application/json',
    'Content-Length: '.strlen($body)
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 360);
$output = curl_exec($ch);

Sandbox

You might want to access your App content while not in production mode from your local environment, in order to do so, you need to include a SandBox custom header, which holds your App domain.ltd combined with your App API Key calculated as a Hash Message Authentication Code (HMAC + SHA512) using your App Sandbox Key as a shared secret.

Tip:

You will not be charged for your apps in development mode. Please do not use Sandbox headers in production mode to avoid blocking your App along with your Developer Account for violating our terms and conditions!

Code Example
$body = '[{"method":"get.app","select":"title"}]';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.oggeh.com/?api_key=[APP_API_KEY]');
curl_setopt($ch, CURLOPT_USERAGENT, isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'OGGEH v1.0');
$headers = array(
    'SandBox: '.hash_hmac('sha512', 'app.domain.ltd'.'[APP_API_KEY]', '[APP_SANDBOX_KEY]'),
    'Accept: application/json',
    'Content-Type: application/json',
    'Content-Length: '.strlen($body)
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 360);
$output = curl_exec($ch);

Tip:

Your Sandbox key expires in 7 days, you can generate a new key after that, but we strongly discourage such behavior to avoid flagging your App for abusing our service.

Client Libraries

For a quick demonstration of our API Usage, we've created a few client libraries that guides you throughout the Frontend implementation (we'll keep updating this section as long as we have to).

Follow our official Github repository for instant updates.

# Library Level Requirements Description
1 iOS Example Beginner Objective C Example iOS code for making OGGEH API Requests (covers RSA and Sandbox requests).
2 HTML Parser Beginner PHP Custom HTML tag for automating our Content Delivery API. Perfect for skills limited to HTML and CSS only.
3 Twig Extension Intermediate PHP Example implementation on top of Twig template engine, for more control over our API Response (conditional statements, loops, and custom functionality).
4 Vue.js Packagecoming soon Advanced JavaScript Example implementation using Vue.js (rising star javascript framework).

API Reference

This is what it's all about, you should be able to make API Requests at this point (see Developer Access).
Typical JSON Response consists of the following:

{
    "error": "",
    "stack": [
        {
            "error": "",
            "alias": "",
            "method": "",
            "output": []
        }
    ],
    "time": 0.0000
}

Since the request JSON body is already an Array (to enable stacking multiple API Responses at once), you'll get multiple responses for each request method, which is represented at the response attribute stack. Each response has a method attribute mapped to your original request, and an output attribute representing your actual response for that particular method.

Hint

Notice the alias attribute in response JSON, you can make use of this to mark each individual request method while you parse multiple responses.

Tip

You can review and test your app API Response using our API Console.

The following section represents all available API Methods:

Get App

Returns App configuration.

Parameters
# Name Default Value Required Description
1 method get.app Yes
2 select No comma-separated attributes to be filtered from the response output.
title app title
domain app domain.ltd
currency app currency
default_lang app default language code (supported languages codes are: en, ar, fr, de, it, fa, ru)
languages array of all additional app language codes (other than english)
meta object for app keywords and description
social object of all app social links (network name as key, and network url as value)
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.app","select":"title,domain,currency,default_lang,languages,meta,social"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "method": "get.app",
            "output": {
                "title": "",
                "domain": "",
                "currency": "",
                "default_lang": "",
                "languages": [],
                "meta": {
                    "keywords": "",
                    "description": ""
                },
                "social": {
                    "facebook": "https:\/\/facebook.com\/oggehllc",
                    ..
                }
            }
        }
    ],
    "time": 0.0000
}

Get Pages

Returns nested tree of App pages.

Parameters
# Name Default Value Required Description
1 method get.pages Yes
2 start_key No unique page identifier.
3 limit 0 No
4 include_hidden false No
5 select No comma-separated attributes to be filtered from the response output.
key page unique identifier.
path chained page parents delimited with '/'.
subject page subject.
header page summary.
tags comma-separated keywords.
cover page cover photo.
photos array composed of all photos linked to page body.
audio array composed of all audio linked to page body.
videos array composed of all videos linked to page body.
files array composed of all files linked to page body.
blocks array of page grid blocks.
6 block_type No comma-separated types to be filtered from the blocks attribute above.
rte HTML string represents rich text block.
media array composed of linked media uploads block (photo, audio, and video).
files array composed of linked file uploads block.
table array composed of rows, each row is also an array composed of columns.
form array composed of public form fields block.
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.pages","start_key":"","limit":0,"include_hidden":false,"select":"key,path,subject,header,tags,cover,photos,audio,videos,files,blocks","block_type":"rte,media,table,files,form"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "method": "get.pages",
            "output": [
                {
                    "key": "",
                    "model": [
                        {
                            "name": "",
                            "label": "",
                            "value": ""
                        }
                    ],
                    "path": "",
                    "subject": "",
                    "header": "",
                    "tags": [],
                    "cover": {
                        "regular": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "original": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        }
                    },
                    "photos": [
                        {
                            "default": false,
                            "code": "",
                            "ext": "",
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ],
                    "audio": [
                        {
                            "code": "",
                            "ext": "mp3",
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "url": "",
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ],
                    "videos": [
                        {
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "url": "",
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ],
                    "files": [
                        {
                            "code": "",
                            "ext": "",
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "url": "",
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ],
                    "blocks": [
                        {
                            "type": "rte",
                            "col": 1,
                            "row": 1,
                            "size_x": 6,
                            "size_y": 1,
                            "html": ""
                        },
                        {
                            "type": "table",
                            "col": 1,
                            "row": 1,
                            "size_x": 6,
                            "size_y": 1,
                            "table": [
                                []
                            ]
                        },
                        {
                            "type": "media",
                            "col": 1,
                            "row": 1,
                            "size_x": 6,
                            "size_y": 1,
                            "media": [
                                {
                                    "id": 0,
                                    "type": "photo",
                                    "code": "",
                                    "ext": "",
                                    "tags": [],
                                    "caption": {
                                        "title": "",
                                        "description": ""
                                    },
                                    "thumbnail": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "regular": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "original": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    }
                                },
                                {
                                    "id": 0,
                                    "type": "audio",
                                    "code": "",
                                    "ext": "mp3",
                                    "tags": [],
                                    "caption": {
                                        "title": "",
                                        "description": ""
                                    },
                                    "thumbnail": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "regular": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "original": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "url": ""
                                },
                                {
                                    "id": 0,
                                    "type": "file",
                                    "code": "",
                                    "ext": "",
                                    "tags": [],
                                    "caption": {
                                        "title": "",
                                        "description": ""
                                    },
                                    "thumbnail": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "regular": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "original": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "url": ""
                                },
                                {
                                    "id": 0,
                                    "type": "video",
                                    "tags": [],
                                    "caption": {
                                        "title": "",
                                        "description": ""
                                    },
                                    "thumbnail": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "regular": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "original": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "url": ""
                                }
                            ]
                        },
                        {
                            "type": "form",
                            "col": 1,
                            "row": 1,
                            "size_x": 6,
                            "size_y": 1,
                            "token": "",
                            "form": [
                                {
                                    "label": "",
                                    "type": "header",
                                    "subtype": "h1"
                                },
                                {
                                    "label": "",
                                    "type": "paragraph",
                                    "subtype": "p"
                                },
                                {
                                    "type": "hr"
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "text",
                                    "subtype": "text",
                                    "required": false
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "textarea",
                                    "required": false
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "checkbox",
                                    "required": false,
                                    "toggle": false
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "checkbox-group",
                                    "required": false,
                                    "options": [
                                        {
                                            "label": "",
                                            "value": ""
                                        }
                                    ]
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "radio-group",
                                    "required": false,
                                    "options": [
                                        {
                                            "label": "",
                                            "value": ""
                                        }
                                    ]
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "select",
                                    "required": false,
                                    "multiple": false,
                                    "options": [
                                        {
                                            "label": "",
                                            "value": ""
                                        }
                                    ]
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "file",
                                    "required": false
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "date",
                                    "required": false
                                },
                            ]
                        }
                    ],
                    "childs": []
                }
            ]
        }
    ],
    "time": 0.0000
}

Get Pages Special

Returns a list of App special pages.

Parameters
# Name Default Value Required Description
1 method get.pages.special Yes
2 start_key No unique page identifier.
3 include_hidden false No
4 select No comma-separated attributes to be filtered from the response output.
key page unique identifier.
path chained page parents delimited with '/'.
subject page subject.
header page summary.
tags comma-separated keywords.
cover page cover photo.
photos array composed of all photos linked to page body.
audio array composed of all audio linked to page body.
videos array composed of all videos linked to page body.
files array composed of all files linked to page body.
blocks array of page grid blocks.
5 block_type No comma-separated types to be filtered from the blocks attribute above.
rte HTML string represents rich text block.
media array composed of linked media uploads block (photo, audio, and video).
files array composed of linked file uploads block.
table array composed of rows, each row is also an array composed of columns.
form array composed of public form fields block.
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.pages.special","start_key":"","include_hidden":false,"select":"key,path,subject,header,tags,cover,photos,audio,videos,files,blocks","block_type":"rte,media,table,files,form"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "method": "get.pages.special",
            "output": [
                {
                    "key": "",
                    "model": [
                        {
                            "name": "",
                            "label": "",
                            "value": ""
                        }
                    ],
                    "path": "",
                    "subject": "",
                    "header": "",
                    "tags": [],
                    "cover": {
                        "regular": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "original": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        }
                    },
                    "photos": [
                        {
                            "default": false,
                            "code": "",
                            "ext": "",
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ],
                    "audio": [
                        {
                            "code": "",
                            "ext": "mp3",
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "url": "",
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ],
                    "videos": [
                        {
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "url": "",
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ],
                    "files": [
                        {
                            "code": "",
                            "ext": "",
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "url": "",
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ],
                    "blocks": [
                        {
                            "type": "rte",
                            "col": 1,
                            "row": 1,
                            "size_x": 6,
                            "size_y": 1,
                            "html": ""
                        },
                        {
                            "type": "table",
                            "col": 1,
                            "row": 1,
                            "size_x": 6,
                            "size_y": 1,
                            "table": [
                                []
                            ]
                        },
                        {
                            "type": "media",
                            "col": 1,
                            "row": 1,
                            "size_x": 6,
                            "size_y": 1,
                            "media": [
                                {
                                    "id": 0,
                                    "type": "photo",
                                    "code": "",
                                    "ext": "",
                                    "tags": [],
                                    "caption": {
                                        "title": "",
                                        "description": ""
                                    },
                                    "thumbnail": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "regular": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "original": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    }
                                },
                                {
                                    "id": 0,
                                    "type": "audio",
                                    "code": "",
                                    "ext": "mp3",
                                    "tags": [],
                                    "caption": {
                                        "title": "",
                                        "description": ""
                                    },
                                    "thumbnail": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "regular": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "original": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "url": ""
                                },
                                {
                                    "id": 0,
                                    "type": "file",
                                    "code": "",
                                    "ext": "",
                                    "tags": [],
                                    "caption": {
                                        "title": "",
                                        "description": ""
                                    },
                                    "thumbnail": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "regular": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "original": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "url": ""
                                },
                                {
                                    "id": 0,
                                    "type": "video",
                                    "tags": [],
                                    "caption": {
                                        "title": "",
                                        "description": ""
                                    },
                                    "thumbnail": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "regular": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "original": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "url": ""
                                }
                            ]
                        },
                        {
                            "type": "form",
                            "col": 1,
                            "row": 1,
                            "size_x": 6,
                            "size_y": 1,
                            "token": "",
                            "form": [
                                {
                                    "label": "",
                                    "type": "header",
                                    "subtype": "h1"
                                },
                                {
                                    "label": "",
                                    "type": "paragraph",
                                    "subtype": "p"
                                },
                                {
                                    "type": "hr"
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "text",
                                    "subtype": "text",
                                    "required": false
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "textarea",
                                    "required": false
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "checkbox",
                                    "required": false,
                                    "toggle": false
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "checkbox-group",
                                    "required": false,
                                    "options": [
                                        {
                                            "label": "",
                                            "value": ""
                                        }
                                    ]
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "radio-group",
                                    "required": false,
                                    "options": [
                                        {
                                            "label": "",
                                            "value": ""
                                        }
                                    ]
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "select",
                                    "required": false,
                                    "multiple": false,
                                    "options": [
                                        {
                                            "label": "",
                                            "value": ""
                                        }
                                    ]
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "file",
                                    "required": false
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "date",
                                    "required": false
                                },
                            ]
                        }
                    ]
                }
            ]
        }
    ],
    "time": 0.0000
}

Get Page

Returns single page.

Parameters
# Name Default Value Required Description
1 method get.page Yes
2 key Yes page unique identifier.
3 select No comma-separated attributes to be filtered from the response output.
key page unique identifier.
path chained page parents delimited with '/'.
subject page subject.
header page summary.
tags comma-separated keywords.
cover page cover photo.
photos array composed of all photos linked to page body.
audio array composed of all audio linked to page body.
videos array composed of all videos linked to page body.
files array composed of all files linked to page body.
blocks array of page grid blocks.
4 block_type No comma-separated types to be filtered from the blocks attribute above.
rte HTML string represents rich text block.
media array composed of linked media uploads block (photo, audio, and video).
files array composed of linked file uploads block.
table array composed of rows, each row is also an array composed of columns.
form array composed of public form fields block.
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.page","key":"[PAGE_UNIQUE_IDENTIFIER]","select":"key,path,subject,header,tags,cover,photos,audio,videos,files,blocks","block_type":"rte,media,table,files,form"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "method": "get.page",
            "output": {
                "key": "",
                "model": [
                    {
                        "name": "",
                        "label": "",
                        "value": ""
                    }
                ],
                "path": "",
                "subject": "",
                "header": "",
                "tags": [],
                "cover": {
                    "regular": {
                        "width": 0,
                        "height": 0,
                        "url": ""
                    },
                    "original": {
                        "width": 0,
                        "height": 0,
                        "url": ""
                    }
                },
                "photos": [
                    {
                        "default": false,
                        "code": "",
                        "ext": "",
                        "tags": [],
                        "caption": {
                            "title": "",
                            "description": ""
                        },
                        "thumbnail": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "regular": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "original": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        }
                    }
                ],
                "audio": [
                    {
                        "code": "",
                        "ext": "mp3",
                        "tags": [],
                        "caption": {
                            "title": "",
                            "description": ""
                        },
                        "url": "",
                        "thumbnail": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "regular": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "original": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        }
                    }
                ],
                "videos": [
                    {
                        "tags": [],
                        "caption": {
                            "title": "",
                            "description": ""
                        },
                        "url": "",
                        "thumbnail": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "regular": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "original": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        }
                    }
                ],
                "files": [
                    {
                        "code": "",
                        "ext": "",
                        "tags": [],
                        "caption": {
                            "title": "",
                            "description": ""
                        },
                        "url": "",
                        "thumbnail": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "regular": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "original": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        }
                    }
                ],
                "blocks": [
                    {
                        "type": "rte",
                        "col": 1,
                        "row": 1,
                        "size_x": 6,
                        "size_y": 1,
                        "html": ""
                    },
                    {
                        "type": "table",
                        "col": 1,
                        "row": 1,
                        "size_x": 6,
                        "size_y": 1,
                        "table": [
                            []
                        ]
                    },
                    {
                        "type": "media",
                        "col": 1,
                        "row": 1,
                        "size_x": 6,
                        "size_y": 1,
                        "media": [
                            {
                                "id": 0,
                                "type": "photo",
                                "code": "",
                                "ext": "",
                                "tags": [],
                                "caption": {
                                    "title": "",
                                    "description": ""
                                },
                                "thumbnail": {
                                    "width": 0,
                                    "height": 0,
                                    "url": ""
                                },
                                "regular": {
                                    "width": 0,
                                    "height": 0,
                                    "url": ""
                                },
                                "original": {
                                    "width": 0,
                                    "height": 0,
                                    "url": ""
                                }
                            },
                            {
                                "id": 0,
                                "type": "audio",
                                "code": "",
                                "ext": "mp3",
                                "tags": [],
                                "caption": {
                                    "title": "",
                                    "description": ""
                                },
                                "thumbnail": {
                                    "width": 0,
                                    "height": 0,
                                    "url": ""
                                },
                                "regular": {
                                    "width": 0,
                                    "height": 0,
                                    "url": ""
                                },
                                "original": {
                                    "width": 0,
                                    "height": 0,
                                    "url": ""
                                },
                                "url": ""
                            },
                            {
                                "id": 0,
                                "type": "file",
                                "code": "",
                                "ext": "",
                                "tags": [],
                                "caption": {
                                    "title": "",
                                    "description": ""
                                },
                                "thumbnail": {
                                    "width": 0,
                                    "height": 0,
                                    "url": ""
                                },
                                "regular": {
                                    "width": 0,
                                    "height": 0,
                                    "url": ""
                                },
                                "original": {
                                    "width": 0,
                                    "height": 0,
                                    "url": ""
                                },
                                "url": ""
                            },
                            {
                                "id": 0,
                                "type": "video",
                                "tags": [],
                                "caption": {
                                    "title": "",
                                    "description": ""
                                },
                                "thumbnail": {
                                    "width": 0,
                                    "height": 0,
                                    "url": ""
                                },
                                "regular": {
                                    "width": 0,
                                    "height": 0,
                                    "url": ""
                                },
                                "original": {
                                    "width": 0,
                                    "height": 0,
                                    "url": ""
                                },
                                "url": ""
                            }
                        ]
                    },
                    {
                        "type": "form",
                        "col": 1,
                        "row": 1,
                        "size_x": 6,
                        "size_y": 1,
                        "token": "",
                        "form": [
                            {
                                "label": "",
                                "type": "header",
                                "subtype": "h1"
                            },
                            {
                                "label": "",
                                "type": "paragraph",
                                "subtype": "p"
                            },
                            {
                                "type": "hr"
                            },
                            {
                                "name": "",
                                "label": "",
                                "type": "text",
                                "subtype": "text",
                                "required": false
                            },
                            {
                                "name": "",
                                "label": "",
                                "type": "textarea",
                                "required": false
                            },
                            {
                                "name": "",
                                "label": "",
                                "type": "checkbox",
                                "required": false,
                                "toggle": false
                            },
                            {
                                "name": "",
                                "label": "",
                                "type": "checkbox-group",
                                "required": false,
                                "options": [
                                    {
                                        "label": "",
                                        "value": ""
                                    }
                                ]
                            },
                            {
                                "name": "",
                                "label": "",
                                "type": "radio-group",
                                "required": false,
                                "options": [
                                    {
                                        "label": "",
                                        "value": ""
                                    }
                                ]
                            },
                            {
                                "name": "",
                                "label": "",
                                "type": "select",
                                "required": false,
                                "multiple": false,
                                "options": [
                                    {
                                        "label": "",
                                        "value": ""
                                    }
                                ]
                            },
                            {
                                "name": "",
                                "label": "",
                                "type": "file",
                                "required": false
                            },
                            {
                                "name": "",
                                "label": "",
                                "type": "date",
                                "required": false
                            },
                        ]
                    }
                ]
            }
        }
    ],
    "time": 0.0000
}

Post Page Form

Submit form fields for a single page.

Parameters
# Name Default Value Required Description
1 method post.page.form Yes
2 key Yes page unique identifier.
3 token Yes unique form token (see Get Form Token).
4 field_namen Yes your should repeat this parameter n times for each form field name (previously received by a single page).
Request Example
curl -H "Content-Type: application/x-www-form-urlencoded" -X POST https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en&method=post.page.form&key=[PAGE_UNIQUE_IDENTIFIER]&token=[UNIQUE_FORM_TOKEN]&field-name-1=&field-name-2=
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "output": "Thank you!"
        }
    ],
    "time": 0.023131132125854
}

Tip:

The system sends an email notification to your Account email address each time you receive a new submission. Additionally, your customer will be able to view all requests using our CMS.

Buy Product

Update stock for a single product page.

Parameters
# Name Default Value Required Description
1 method buy.product Yes
2 key Yes page unique identifier.
3 quantity Yes number of items to remove from page stock.
4 extrasn No your might repeat this parameter n times for each form additional paramater you want to store with each order (key/value pairs).
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"buy.product","key":"[PAGE_UNIQUE_IDENTIFIER]","quantity":1,"key-1":"value1","key-2":"value2"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "output": "Thank you!"
        }
    ],
    "time": 0.023131132125854
}

Tip:

The system sends an email notification to your Account email address each time you receive a product order. Additionally, your customer will be able to view all requests using our CMS.

Book Event

Update tickets for a single event page.

Parameters
# Name Default Value Required Description
1 method book.event Yes
2 key Yes page unique identifier.
3 quantity Yes number of items to remove from page tickets.
4 extrasn No your might repeat this parameter n times for each form additional paramater you want to store with each booking (key/value pairs).
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"book.event","key":"[PAGE_UNIQUE_IDENTIFIER]","quantity":1,"key-1":"value1","key-2":"value2"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "output": "Thank you!"
        }
    ],
    "time": 0.023131132125854
}

Tip:

The system sends an email notification to your Account email address each time you receive an event booking. Additionally, your customer will be able to view all requests using our CMS.

Get Albums

Returns a list of App albums.

Parameters
# Name Default Value Required Description
1 method get.albums Yes
2 media_type No comma-separated types to be filtered from the response output.
photo filter by photo albums
audio filter by audio albums
video filter by video albums
file filter by file albums
3 start 0 No
4 limit 0 No
5 include_hidden false No
6 select No comma-separated attributes to be filtered from the response output.
id album numeric id
media album media type (photo, audio, video, and file)
label album string label
cover album cover photo
linked_key page unique identifier linked to album
items array composed of album items
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.albums","media_type":"photo,audio,video,file","start":0,"limit":0,"include_hidden":false,"select":"id,media,label,cover,linked_key,items"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "method": "get.albums",
            "output": [
                {
                    "id": 0,
                    "media": "photo",
                    "label": "",
                    "cover": {
                        "regular": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "original": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        }
                    },
                    "linked_key": "",
                    "items": [
                        {
                            "code": "",
                            "ext": "",
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ]
                },
                {
                    "id": 0,
                    "media": "audio",
                    "label": "",
                    "cover": {
                        "regular": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "original": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        }
                    },
                    "linked_key": "",
                    "items": [
                        {
                            "cover_code": "",
                            "cover_ext": "",
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "url": ""
                        }
                    ]
                },
                {
                    "id": 0,
                    "media": "video",
                    "label": "",
                    "cover": {
                        "regular": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "original": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        }
                    },
                    "linked_key": "",
                    "items": [
                        {
                            "cover_code": "",
                            "cover_ext": "",
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "url": ""
                        }
                    ]
                },
                {
                    "id": 0,
                    "media": "file",
                    "label": "",
                    "cover": {
                        "regular": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "original": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        }
                    },
                    "linked_key": "",
                    "items": [
                        {
                            "cover_code": "",
                            "cover_ext": "",
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "url": ""
                        }
                    ]
                }
            ]
        }
    ],
    "time": 0.0000
}

Get Albums Schedule

Returns a list of photos in scheduled albums.

Parameters
# Name Default Value Required Description
1 method get.albums.schedule Yes
2 start_date No string date 'Y-m-d'
3 limit 0 No
4 include_hidden false No
5 active_only false No
6 select No comma-separated attributes to be filtered from the response output.
album_label album string label
caption object of photo title and description
tags comma-separated keywords
code photo file name
ext photo file extension
thumbnail object of cropped photo width, height, and url
regular object of resized photo width, height, and url
original object of actual photo width, height, and url
schedule object of scheduled date/time (date_time: 'Y-m-d H:i:s', timestamp: UNIX_TIMESTAMP)
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.albums.schedule","start_date":"","limit":0,"include_hidden":false,"active_only":false,"select":"album_label,caption,tags,code,ext,thumbnail,regular,original,schedule"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "method": "get.albums.schedule",
            "output": [
                {
                    "album_label": "",
                    "caption": {
                        "title": "",
                        "description": ""
                    },
                    "tags": [],
                    "code": "",
                    "ext": "",
                    "thumbnail": {
                        "width": 0,
                        "height": 0,
                        "url": ""
                    },
                    "regular": {
                        "width": 0,
                        "height": 0,
                        "url": ""
                    },
                    "original": {
                        "width": 0,
                        "height": 0,
                        "url": ""
                    },
                    "schedule": {
                        "date_time": "",
                        "timestamp": 0
                    }
                }
            ]
        }
    ],
    "time": 0.0000
}

Get Album

Returns a single album.

Parameters
# Name Default Value Required Description
1 method get.album Yes
2 id/label Yes either use album numeric id or album string label (see Get Albums)
3 start 0 No
4 limit 0 No
5 include_hidden false No
6 select No comma-separated attributes to be filtered from the response output.
caption object of media item title and description
tags comma-separated keywords
code media item file name (does not apply for videos)
ext media item file extension (does not apply for videos)
cover_code media item cover file name (applies for audio, videos, and files)
cover_ext media item cover file extension (applies for audio, videos, and files)
thumbnail object of cropped photo/cover width, height, and url
regular object of resized photo/cover width, height, and url
original object of actual photo/cover width, height, and url
url object of media item url (applies for audio, videos, and files)
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.album","id":0,"label":"[ALBUM_LABEL]","start":0,"limit":0,"include_hidden":false,"select":"caption,tags,code,ext,cover_code,cover_ext,thumbnail,regular,original,url"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "method": "get.album",
            "output": [
                {
                    "media": "photos",
                    "items": [
                        {
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "tags": [],
                            "code": "",
                            "ext": "",
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ]
                },
                {
                    "media": "audio",
                    "items": [
                        {
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "tags": [],
                            "code": "",
                            "ext": "mp3",
                            "url": "",
                            "cover_code": "",
                            "cover_ext": "",
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ]
                },
                {
                    "media": "videos",
                    "items": [
                        {
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "tags": [],
                            "url": "",
                            "cover_code": "",
                            "cover_ext": "",
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ]
                },
                {
                    "media": "files",
                    "items": [
                        {
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "tags": [],
                            "code": "",
                            "ext": "",
                            "url": "",
                            "cover_code": "",
                            "cover_ext": "",
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ]
                }
            ]
        }
    ],
    "time": 0.0000
}

Get News

Returns a list of App news posts.

Parameters
# Name Default Value Required Description
1 method get.news Yes
2 start_date No string date 'Y-m-d'
3 limit 0 No
4 include_hidden false No
5 select No comma-separated attributes to be filtered from the response output.
date news post date 'Y-m-d'.
time news post time 'H:i:s'.
timestamp news post unix timestamp.
subject page subject.
header page summary.
tags comma-separated keywords.
cover page cover photo.
photos array composed of all photos linked to page body.
audio array composed of all audio linked to page body.
videos array composed of all videos linked to page body.
files array composed of all files linked to page body.
blocks array of page grid blocks.
6 block_type No comma-separated types to be filtered from the blocks attribute above.
rte HTML string represents rich text block.
media array composed of linked media uploads block (photo, audio, and video).
files array composed of linked file uploads block.
table array composed of rows, each row is also an array composed of columns.
form array composed of public form fields block.
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.news","start_date":"","limit":0,"include_hidden":false,"select":"date,time,timestamp,subject,header,tags,cover,photos,audio,videos,files,blocks","block_type":"rte,media,table,files,form"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "method": "get.news",
            "output": [
                {
                    "date": "",
                    "time": "",
                    "timestamp": 0,
                    "subject": "",
                    "header": "",
                    "tags": [],
                    "cover": {
                        "regular": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        },
                        "original": {
                            "width": 0,
                            "height": 0,
                            "url": ""
                        }
                    },
                    "photos": [
                        {
                            "default": false,
                            "code": "",
                            "ext": "",
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ],
                    "audio": [
                        {
                            "code": "",
                            "ext": "mp3",
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "url": "",
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ],
                    "videos": [
                        {
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "url": "",
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ],
                    "files": [
                        {
                            "code": "",
                            "ext": "",
                            "tags": [],
                            "caption": {
                                "title": "",
                                "description": ""
                            },
                            "url": "",
                            "thumbnail": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "regular": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            },
                            "original": {
                                "width": 0,
                                "height": 0,
                                "url": ""
                            }
                        }
                    ],
                    "blocks": [
                        {
                            "type": "rte",
                            "col": 1,
                            "row": 1,
                            "size_x": 6,
                            "size_y": 1,
                            "html": ""
                        },
                        {
                            "type": "table",
                            "col": 1,
                            "row": 1,
                            "size_x": 6,
                            "size_y": 1,
                            "table": [
                                []
                            ]
                        },
                        {
                            "type": "media",
                            "col": 1,
                            "row": 1,
                            "size_x": 6,
                            "size_y": 1,
                            "media": [
                                {
                                    "id": 0,
                                    "type": "photo",
                                    "code": "",
                                    "ext": "",
                                    "tags": [],
                                    "caption": {
                                        "title": "",
                                        "description": ""
                                    },
                                    "thumbnail": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "regular": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "original": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    }
                                },
                                {
                                    "id": 0,
                                    "type": "audio",
                                    "code": "",
                                    "ext": "mp3",
                                    "tags": [],
                                    "caption": {
                                        "title": "",
                                        "description": ""
                                    },
                                    "thumbnail": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "regular": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "original": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "url": ""
                                },
                                {
                                    "id": 0,
                                    "type": "file",
                                    "code": "",
                                    "ext": "",
                                    "tags": [],
                                    "caption": {
                                        "title": "",
                                        "description": ""
                                    },
                                    "thumbnail": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "regular": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "original": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "url": ""
                                },
                                {
                                    "id": 0,
                                    "type": "video",
                                    "tags": [],
                                    "caption": {
                                        "title": "",
                                        "description": ""
                                    },
                                    "thumbnail": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "regular": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "original": {
                                        "width": 0,
                                        "height": 0,
                                        "url": ""
                                    },
                                    "url": ""
                                }
                            ]
                        },
                        {
                            "type": "form",
                            "col": 1,
                            "row": 1,
                            "size_x": 6,
                            "size_y": 1,
                            "token": "",
                            "form": [
                                {
                                    "label": "",
                                    "type": "header",
                                    "subtype": "h1"
                                },
                                {
                                    "label": "",
                                    "type": "paragraph",
                                    "subtype": "p"
                                },
                                {
                                    "type": "hr"
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "text",
                                    "subtype": "text",
                                    "required": false
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "textarea",
                                    "required": false
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "checkbox",
                                    "required": false,
                                    "toggle": false
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "checkbox-group",
                                    "required": false,
                                    "options": [
                                        {
                                            "label": "",
                                            "value": ""
                                        }
                                    ]
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "radio-group",
                                    "required": false,
                                    "options": [
                                        {
                                            "label": "",
                                            "value": ""
                                        }
                                    ]
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "select",
                                    "required": false,
                                    "multiple": false,
                                    "options": [
                                        {
                                            "label": "",
                                            "value": ""
                                        }
                                    ]
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "file",
                                    "required": false
                                },
                                {
                                    "name": "",
                                    "label": "",
                                    "type": "date",
                                    "required": false
                                },
                            ]
                        }
                    ]
                }
            ]
        }
    ],
    "time": 0.0000
}

Get Contacts

Returns a list of App contacts.

Parameters
# Name Default Value Required Description
1 method get.contacts Yes
2 start 0 No
3 limit 0 No
4 select No comma-separated attributes to be filtered from the response output.
name contact name.
email contact email.
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.contacts","start":0,"limit":0,"select":"name,email"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "method": "get.contacts",
            "output": [
                {
                    "name": "",
                    "email": ""
                }
            ]
        }
    ],
    "time": 0.0000
}

Get Contact

Returns a single contacts.

Parameters
# Name Default Value Required Description
1 method get.contact Yes
2 email Yes valid email address
3 select No comma-separated attributes to be filtered from the response output.
name contact name.
email contact email.
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.contact","email":"","select":"name,email"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "method": "get.contact",
            "output": {
                "name": "",
                "email": ""
            }
        }
    ],
    "time": 0.0000
}

Post Contact Form

Submit contact form fields.

Parameters
# Name Default Value Required Description
1 method post.contact.form Yes
2 key contact Yes must use contact as a default value.
3 token Yes unique form token (see Get Form Token).
4 field_namen Yes your should repeat this parameter n times for each form field name (like name, phone, subject, and message, .. etc).
Request Example
curl -H "Content-Type: application/x-www-form-urlencoded" -X POST https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en&method=post.contact.form&key=contact&token=[UNIQUE_FORM_TOKEN]&field-name-1=&field-name-2=
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "output": "Thank you!"
        }
    ],
    "time": 0.023131132125854
}

Get Locations

Returns a list of App locations.

Parameters
# Name Default Value Required Description
1 method get.locations Yes
2 start 0 No
3 limit 0 No
4 select No comma-separated attributes to be filtered from the response output.
address location string address.
latitude location numeric latitude.
longitude location numeric longitude.
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.locations","start":0,"limit":0,"select":"address,latitude,longitude"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "method": "get.locations",
            "output": [
                {
                    "address": "",
                    "latitude": 00.0000,
                    "longitude": 00.0000
                }
            ]
        }
    ],
    "time": 0.0000
}

Get Location

Returns a single location.

Parameters
# Name Default Value Required Description
1 method get.location Yes
2 latitude Yes valid numeric latitude.
3 longitude Yes valid numeric longitude.
4 select No comma-separated attributes to be filtered from the response output.
address location string address.
latitude location numeric latitude.
longitude location numeric longitude.
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.location","latitude":00.0000,"longitude":00.0000,"select":"address,latitude,longitude"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "method": "get.location",
            "output": {
                "address": "",
                "latitude": 00.0000,
                "longitude": 00.0000
            }
        }
    ],
    "time": 0.0000
}

Get Search Results

Returns a list of models (page, album, news, contact, and location) matching search keyword.

Parameters
# Name Default Value Required Description
1 method get.search.results Yes
2 keyword Yes string search keyword
3 start 0 No
4 limit 0 No
5 target No comma-separated targets for the response output.
pages search in pages.
news search in news posts.
albums search in albums.
contacts search in contacts.
locations search in locations.
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.search.results","keyword":"","start":0,"limit":0,"target":"pages,news,albums,contacts,locations"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "method": "get.search.results",
            "output": [
                {
                    "target": "pages",
                    "items": [
                        {
                            "key": "",
                            "subject": "",
                            "header": ""
                        }
                    ]
                },
                {
                    "target": "news",
                    "items": [
                        {
                            "timestamp": 0,
                            "subject": "",
                            "header": ""
                        }
                    ]
                },
                {
                    "target": "albums",
                    "items": [
                        {
                            "id": 0,
                            "label": ""
                        }
                    ]
                },
                {
                    "target": "contacts",
                    "items": [
                        {
                            "name": "",
                            "email": ""
                        }
                    ]
                }
            ]
        }
    ],
    "time": 0.0000
}

Hint:

We store all emails encrypted in your App database, yet our API Response decrypts your app emails on the fly.

Get Form Token

Returns a string token required to submit form fields.

Parameters
# Name Default Value Required Description
1 method get.form.token Yes
2 key Yes unique form idetifier.
Request Example
curl -H "Content-Type: application/json" -X POST -d '[{"method":"get.form.token","key":"[UNIQUE_FORM_IDENTIFIER]"}]' https://api.oggeh.com/?api_key=[APP_API_KEY]&lang=en
Response Example
{
    "error": "",
    "stack": [
        {
            "error": "",
            "method": "get.form.token",
            "output": "YOUR_TOKEN"
        }
    ],
    "time": 0.0000
}