Flavours API
Assistance

Create Assistance

POST
/api/v2/assistances

Create a new assistance request 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

name*string

Contact person name. Must not be greater than 255 characters.

phone_prefix*number

Phone number prefix (country code). Must match an existing stored value.

phone_number*number

Phone number. Must be at least 8.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.flavours.sa/dev/api/v2/assistances" \  -H "X-API-Version: 2.3.0" \  -H "Content-Type: application/json" \  -d '{    "name": "John Doe",    "phone_prefix": 966,    "phone_number": 512345678  }'
{
  "meta": {
    "code": 200,
    "status": "success",
    "message": "Thank you! Our team will reach out soon"
  },
  "data": {
    "id": "b20a25cf-b82b-4001-b91b-edbd176c62e8",
    "name": "Aric Macejkovic Sr.",
    "phone_prefix": "973",
    "phone_number": "9312250898",
    "is_contacted": false,
    "contacted_by": null,
    "contacted_at": null,
    "created_at": 1787446681317,
    "updated_at": 1787446681317,
    "responder": null
  }
}
{
  "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
}