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 "https://api.flavours.sa/dev/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/005522?text=excepturi",
    "name_en": "Ratke, Wyman and Wiza",
    "name_ar": "Ratke, Wyman and Wiza",
    "description_en": "Hic eius maiores fuga aut eum qui aliquid. Perspiciatis sint et magni illo. Omnis sit corporis a omnis ut sapiente impedit.",
    "description_ar": "Nostrum sint sit quaerat qui sit omnis consequuntur. Inventore accusamus nobis aut eaque aut.",
    "key": "RATKE_WYMAN_AND_WIZA",
    "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
}