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). The phone_prefix of an existing record in the countries table.

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 "http://localhost:8000/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": "b821568f-11c7-493c-b95b-0b1d9c8bec67",
    "name": "Adam Homenick",
    "phone_prefix": "90",
    "phone_number": "6117483469",
    "is_contacted": false,
    "contacted_by": null,
    "contacted_at": null,
    "created_at": 1782824831971,
    "updated_at": 1782824831971,
    "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
}