FAQ

Frequently Asked Questions is a question and an answer - potentially illustrated by media (video or image)

FAQs are restricted by user type.

Get FAQs

curl "https://example.ziik.io/api/faq"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"
{
  "hits": [
    {
        "id": 1225,
        "content_type": "faq",
        "permissions": {
            "edit": true,
            "delete": true
        },
        "question": "This is a test faq",
        "answer": "This is the answer to the test faq",
        "categories": [{
            "id": 140,
            "name": "Technical",
            "url": "api/faq/categories/140"
        }, {
            "id": 142,
            "name": "Administration",
            "url": "api/faq/categories/142"
        }],
        "userTypes": [{
            "id": 129,
            "name": "Country-Partner",
            "url": "api/usertypes/129"
        }, {
            "id": 169,
            "name": "HQ-Development",
            "url": "api/usertypes/169"
        }],
        "files": [],
        "url": "api/faq/1225"
    }, {
        "id": 1224,
        "content_type": "faq",
        "permissions": {
            "edit": true,
            "delete": true
        },
        "question": "This is another test faq",
        "answer": "This is the answer to the other test faq",
        "categories": [{
            "id": 140,
            "name": "Technical",
            "url": "api/faq/categories/140"
        }, {
            "id": 142,
            "name": "Administration",
            "url": "api/faq/categories/142"
        }],
        "userTypes": [{
            "id": 129,
            "name": "Country-Partner",
            "url": "api/usertypes/129"
        }, {
            "id": 169,
            "name": "HQ-Development",
            "url": "api/usertypes/169"
        }],
        "files": [],
        "url": "api/faq/1224"
    }
  ],
  "meta": {
      "pagination": {
          "total": 315,
          "count": 50,
          "per_page": 50,
          "current_page": 2,
          "total_pages": 7,
          "links": []
      }
  }
}

This endpoint retrieves a list of FAQ.

HTTP Request

GET https://example.ziik.io/api/faq

Query Parameters

ParameterTypeDefaultDescription
categoryIntegerNULLIf set, only show faq from this category
pageInteger1Page number for pagination.
limitInteger50Number of records to return per page.

Get Single FAQ

curl "https://example.ziik.io/api/faq/1225"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"

The above command returns JSON structured like this:

  {
      "id": 1225,
      "content_type": "faq",
      "permissions": {
          "edit": true,
          "delete": true
      },
      "question": "This is a test faq",
      "answer": "This is the answer to the test faq",
      "categories": [{
          "id": 140,
          "name": "Technical",
          "url": "api/faq/categories/140"
      }, {
          "id": 142,
          "name": "Administration",
          "url": "api/faq/categories/142"
      }],
      "userTypes": [{
          "id": 129,
          "name": "Country-Partner",
          "url": "api/usertypes/129"
      }, {
          "id": 169,
          "name": "HQ-Development",
          "url": "api/usertypes/169"
      }],
      "files": [],
      "url": "api/faq/1225"
  }

This endpoint returns a single faq

HTTP Request

GET https://example.ziik.io/api/faq/ID

URL Parameters

ParameterTypeDescription
IDIntegerThe ID of the faq

Permissions Required

  • User's user type in FAQ's user types

Create FAQ

curl -i -X POST "https://example.ziik.io/api/faq"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"
  -d "{ [...] }"

The above command returns 201 Created with a location header for where to find the newly created faq

HTTP/1.0 201 Created
Location: https://example.ziik.io/api/faq/1234
{
    "message": "FAQ created"
}

This endpoint creates a new faq.

HTTP Request

POST https://example.ziik.io/api/faq

Request Parameters

ParameterTypeRequiredDescription
questionStringYesFAQ question.
answerStringNoAnswer to the FAQ.
categoriesArrayNoIDs of the faq categories
userTypesArrayNoIDs of the user types to post this FAQ to
filesArrayNoFile data for files to accompany the event. If provided, must be an array of arrays with the following values
- typeStringYesType of file - can be either 'upload', 'youtube' or 'vimeo'.
- nameStringYesFile name.
- dataStringYesIf type is 'upload' this must be the base64 encoded content of the file. Else it must be the Youtube/Vimeo embed URL.

Permissions Required

  • Write permission to FAQ

Edit FAQ

curl -i -X PATCH "https://example.ziik.io/api/faq/123"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"
  -d "{ [...] }"

The above command returns 204 No Content on successful update.

HTTP/1.0 204 No Content

This endpoint updates an existing faq.

HTTP Request

PATCH https://example.ziik.io/api/faq/ID

Request Parameters

ParameterTypeRequiredDescription
questionStringnoFAQ question.
answerStringNoAnswer to the FAQ.
categoriesArrayNoIDs of the faq categories
userTypesArrayNoIDs of the user types to post this FAQ to
filesArrayNoFile data for files to accompany the event. If provided, must be an array of arrays with the following values
- typeStringYesType of file - can be either 'upload', 'youtube' or 'vimeo'.
- nameStringYesFile name.
- dataStringYesIf type is 'upload' this must be the base64 encoded content of the file. Else it must be the Youtube/Vimeo embed URL.

Permissions Required

  • Administer FAQ permission

Delete FAQ

curl -i -X DELETE "https://example.ziik.io/api/faq/123"
  -H "Authorization: Bearer aaaaaa.bbbbbbb.ccccccc"

The above command returns a 204 No Content header on success:

HTTP/1.0 204 No Content

This endpoint deletes a FAQ.

HTTP Request

DELETE https://example.ziik.io/api/faq/ID

URL Parameters

ParameterTypeDescription
IDIntegerThe ID of the FAQ to delete

Permissions Required

  • Administer faq permission

Add Files To FAQ

curl -i -X POST "https://example.ziik.io/api/faq/files"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"
  -d "{ [...] }"

The above command returns 204 No Content on success

HTTP/1.0 204 No Content

This endpoint adds files to an existing FAQ.

HTTP Request

POST https://example.ziik.io/api/faq/files

Request Parameters

ParameterTypeDescription
idIntegerThe ID of the FAQ to add files to
filesArrayNo
- typeStringYes
- nameStringYes
- dataStringYes

Permissions Required

  • FAQ edit access

Delete File From FAQ

curl -i -X DELETE "https://example.ziik.io/api/faq/124/files/12345"
  -H "Authorization: Bearer aaaaaa.bbbbbbb.ccccccc"

The above command returns a 204 No Content header on success:

HTTP/1.0 204 No Content

This endpoint deletes a file from an FAQ.

HTTP Request

DELETE https://example.ziik.io/api/faq/<FaqID>/files/<FileID>

URL Parameters

ParameterTypeDescription
FaqIDIntegerThe ID of the FAQ
FileIDIntegerThe ID of the file to delete

Permissions Required

  • FAQ edit access