Flavours API
Application

Create Application

POST
/api/v2/applications

Create a new application with the provided data.

AuthorizationBearer <token>

You can retrieve your token by logging in.

In: header

Header Parameters

X-API-Version*string

API contract version to target. See the Changelog for what changed in each version.

Default"2.0.0"
Value in"2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"

Request Body

application/json

logo_img*string

Application logo image file. Must be a valid URL.

name_en*string

English name of the application.

name_ar?|

Arabic name of the application.

description_en?|

English description of the application.

description_ar?|

Arabic description of the application.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:8000/api/v2/applications" \  -H "X-API-Version: 2.3.0" \  -H "Content-Type: application/json" \  -d '{    "logo_img": "https://example.com/logo.png",    "name_en": "Flavours Payment"  }'
{
  "meta": {
    "code": 200,
    "status": "success",
    "message": "Create Success"
  },
  "data": {
    "logo_img": "https://via.placeholder.com/640x480.png/001177?text=omnis",
    "name_en": "Dare Group",
    "name_ar": "Dare Group",
    "description_en": "Accusantium ab veniam dolorum ab autem. Est perspiciatis quia dolor incidunt soluta. Eligendi quis sed magni accusamus sit pariatur.",
    "description_ar": "Necessitatibus atque saepe et sed quo qui. Tempora quibusdam rerum consequatur ipsam.",
    "key": "DARE_GROUP",
    "order": 11
  }
}
{
  "meta": {
    "code": 401,
    "status": "error",
    "message": "Unauthenticated."
  },
  "data": null
}
{
  "meta": {
    "code": 403,
    "status": "error",
    "message": "Unauthorized."
  },
  "data": null
}
{
  "meta": {
    "code": 404,
    "status": "error",
    "message": "Resource not found."
  },
  "data": null
}
{
  "meta": {
    "code": 500,
    "status": "error",
    "message": "Internal server error."
  },
  "data": null
}