MENU navbar-image

Introduction

Authenticating requests

This API is not authenticated.

Auth management

APIs for managing auth

Signup

Example request:
curl --request POST \
    "https://api.privet.gg/api/v1/auth/signup" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "email=email@email.com"\
    --form "password=password"\
    --form "phone=+79000000000"\
    --form "name=Ivan Ivanov"\
    --form "nickname=Ivan99"\
    --form "description=Cool user"\
    --form "role=2"\
    --form "price=2.99"\
    --form "category_ids[]=2"\
    --form "device_id=commodi"\
    --form "firebase_token=id"\
    --form "media=@/tmp/phpqpXfFL" 
const url = new URL(
    "https://api.privet.gg/api/v1/auth/signup"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('email', 'email@email.com');
body.append('password', 'password');
body.append('phone', '+79000000000');
body.append('name', 'Ivan Ivanov');
body.append('nickname', 'Ivan99');
body.append('description', 'Cool user');
body.append('role', '2');
body.append('price', '2.99');
body.append('category_ids[]', '2');
body.append('device_id', 'commodi');
body.append('firebase_token', 'id');
body.append('media', document.querySelector('input[name="media"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 894,
        "email": "19736701obruen@example.net",
        "phone": "(959) 585-8464",
        "name": "Muhammad Sporer",
        "nickname": "Brandt Herman",
        "description": null,
        "role": 2,
        "price": 10420718.8865,
        "invite": "JQSs1P0e",
        "media": [
            {
                "id": 257,
                "user_id": 895,
                "preview_url": "https://api.privet.gg/storage/media/preview/image.png",
                "path_url": "https://api.privet.gg/storage/media/image.png",
                "type": 2
            }
        ],
        "categories": [
            {
                "category": 2
            }
        ],
        "firebase_token": "bwWX4X7xHbxGgupqxoBHd88mfHMHJt31LsIynil2j4JtDADbJsaNT8otAIeFosQ6aathgNAvQ21jNWudSFUF4JsGUjiaGSEQooFGDLiQ2o70pYwBDl3ckVBEk5lgxzHB0CyKrWrQLypKnH9LmtHKSotO7QzmxPGZ",
        "updated_at": "2024-04-30T10:28:23.000000Z",
        "created_at": "2024-04-30T10:28:23.000000Z"
    },
    "token": "1|spByWaJSn4f3zS79ujVX5jYvsnj2CaPjziQmI9CKbc720ef9"
}
 

Example response (429, Validation Errors):


{
    "message": "The email field is required. (and 9 more errors)",
    "errors": {
        "email": [
            "The email field is required."
        ],
        "password": [
            "The password field is required."
        ],
        "password_confirmation": [
            "The password confirmation field is required."
        ],
        "phone": [
            "The phone field is required."
        ],
        "name": [
            "The name field is required."
        ],
        "nickname": [
            "The nickname field is required."
        ],
        "role": [
            "The role field is required."
        ],
        "price": [
            "The price field is required."
        ],
        "category_ids": [
            "The category ids field is required."
        ],
        "media": [
            "The media field is required."
        ]
    }
}
 

Request      

POST api/v1/auth/signup

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

email   string   

Email. Must be a valid email address. Example: email@email.com

password   string   

Password. Must be at least 6 characters. Example: password

phone   string  optional  

Phone. Must not be greater than 255 characters. Example: +79000000000

name   string  optional  

Name. Must not be greater than 255 characters. Example: Ivan Ivanov

nickname   string   

Nickname. Must not be greater than 255 characters. Example: Ivan99

description   string  optional  

Description. Example: Cool user

role   integer   

Role of user. Client is 1. Performer is 2. . Example: 2

Must be one of:
  • 1
  • 2
price   number  optional  

Price. Must be at least 0. Must not be greater than 999999999. Example: 2.99

category_ids   integer[]  optional  

Category Streamer is 1. Comedian is 2. .

Must be one of:
  • 1
  • 2
media   file   

Media. Must be a file. Must not be greater than 599999 kilobytes. Example: /tmp/phpqpXfFL

device_id   string  optional  

User device id. Example: commodi

firebase_token   string  optional  

Firebase token. Example: id

Login

Example request:
curl --request POST \
    "https://api.privet.gg/api/v1/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"email@email.com\",
    \"password\": \"password\",
    \"device_id\": \"ABCDEF12-34567890ABCDEF12\",
    \"firebase_token\": \"xxxyyy...\"
}"
const url = new URL(
    "https://api.privet.gg/api/v1/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "email@email.com",
    "password": "password",
    "device_id": "ABCDEF12-34567890ABCDEF12",
    "firebase_token": "xxxyyy..."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 896,
        "email": "42221792lurline.wilkinson@example.org",
        "phone": "773.883.6194",
        "name": "Betty Koss",
        "nickname": "Allen Roob",
        "description": null,
        "role": 2,
        "price": 579179.5239788,
        "invite": "N7LOjC0F",
        "media": [
            {
                "id": 258,
                "user_id": 897,
                "preview_url": "https://api.privet.gg/storage/media/preview/image.png",
                "path_url": "https://api.privet.gg/storage/media/image.png",
                "type": 2
            }
        ],
        "categories": [
            {
                "category": 2
            }
        ],
        "firebase_token": "igTnDMRUeqtZupf1FyG2LUC04NMfDJKBSnyjeqDJZhowU0aXylvCjvkLVXXgJqvKCbF9GP6M13QJu2TvY3lBkQ1gICUdE1ajnRaomMPuh7rapj6sICMu2pjSsJoyV2uK8cN0xYl7xzWGtMkFbNNfQ7oXLwgHO54m",
        "updated_at": "2024-04-30T10:28:24.000000Z",
        "created_at": "2024-04-30T10:28:24.000000Z"
    },
    "token": "1|spByWaJSn4f3zS79ujVX5jYvsnj2CaPjziQmI9CKbc720ef9"
}
 

Example response (401, Unauthorized):


{
    "status": "error",
    "message": "Unauthorized"
}
 

Example response (429, Validation Errors):


{
    "message": "The email field is required. (and 1 more error)",
    "errors": {
        "email": [
            "The email field is required."
        ],
        "password": [
            "The password field is required."
        ]
    }
}
 

Request      

POST api/v1/auth/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Email. Must be a valid email address. Example: email@email.com

password   string   

Password. Example: password

device_id   string  optional  

User device id. Example: ABCDEF12-34567890ABCDEF12

firebase_token   string  optional  

Firebase token. Example: xxxyyy...

Social Signup

Example request:
curl --request POST \
    "https://api.privet.gg/api/v1/auth/social/signup" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"vk1.a.Y3Yd1FxZELA-Yd2cwJRPSma8MM4v6d4fDbm4ZfbRkRXt44mKO4kxhX7iLluKATBmrwC30gjTdZ8ctfI9UYOTn6VKGBeHl-MWlINbhAxCGZth94OrIHbswFryJSDrE4_g_KsmnCaHiyPHlPOldlxzG4EV77dDp6Et7lxAnWn24_A_2Ose9vt8n7c4Iney-NPzrbpEYBvsb1soEIJuYGuEnw\",
    \"social_type\": 2,
    \"role\": 2,
    \"price\": 2.99,
    \"phone\": \"+79000000000\",
    \"email\": \"socialemail@email.com\"
}"
const url = new URL(
    "https://api.privet.gg/api/v1/auth/social/signup"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "vk1.a.Y3Yd1FxZELA-Yd2cwJRPSma8MM4v6d4fDbm4ZfbRkRXt44mKO4kxhX7iLluKATBmrwC30gjTdZ8ctfI9UYOTn6VKGBeHl-MWlINbhAxCGZth94OrIHbswFryJSDrE4_g_KsmnCaHiyPHlPOldlxzG4EV77dDp6Et7lxAnWn24_A_2Ose9vt8n7c4Iney-NPzrbpEYBvsb1soEIJuYGuEnw",
    "social_type": 2,
    "role": 2,
    "price": 2.99,
    "phone": "+79000000000",
    "email": "socialemail@email.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 898,
        "email": "64580623marina.denesik@example.com",
        "phone": "458-982-5557",
        "name": "Vesta Medhurst",
        "nickname": "Mrs. Loyce Romaguera",
        "description": null,
        "role": 1,
        "price": 341513749.1,
        "invite": "PSgPKMCr",
        "media": [
            {
                "id": 259,
                "user_id": 899,
                "preview_url": "https://api.privet.gg/storage/media/image.png",
                "path_url": "https://api.privet.gg/storage/media/image.png",
                "type": 1
            }
        ],
        "categories": [
            {
                "category": 1
            }
        ],
        "firebase_token": "gYofKyQLfdBpgC3bqvp0m7aMCuRi9Uh90nwMdXXhOXPhPGhLwrdNpul5zusoYf0fbe3BAK20pZZiKf8sQ7Q4FUK1O0gB5XmIwLaU97bJTjSBqQMq1cQqVfR0RqIVBZlCf0KaUHadlLi9MaG2VFhZ2ll5OioJo264",
        "updated_at": "2024-04-30T10:28:24.000000Z",
        "created_at": "2024-04-30T10:28:24.000000Z"
    },
    "token": "1|spByWaJSn4f3zS79ujVX5jYvsnj2CaPjziQmI9CKbc720ef9"
}
 

Example response (400, Invalid token):


{
    "status": "error",
    "message": "Invalid token"
}
 

Example response (400, User already exists):


{
    "status": "error",
    "message": "User already exists"
}
 

Example response (429, Validation Errors):


{
    "message": "The token field is required. (and 5 more errors)",
    "errors": {
        "token": [
            "The token field is required."
        ],
        "social_type": [
            "The social type field is required."
        ],
        "role": [
            "The role field is required."
        ],
        "price": [
            "The price field is required."
        ],
        "phone": [
            "The phone field is required."
        ],
        "email": [
            "The email field is required."
        ]
    }
}
 

Request      

POST api/v1/auth/social/signup

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

token   string   

Token of social network. Example: vk1.a.Y3Yd1FxZELA-Yd2cwJRPSma8MM4v6d4fDbm4ZfbRkRXt44mKO4kxhX7iLluKATBmrwC30gjTdZ8ctfI9UYOTn6VKGBeHl-MWlINbhAxCGZth94OrIHbswFryJSDrE4_g_KsmnCaHiyPHlPOldlxzG4EV77dDp6Et7lxAnWn24_A_2Ose9vt8n7c4Iney-NPzrbpEYBvsb1soEIJuYGuEnw

social_type   string   

Type of social network Google is 1. Vk is 2. . Example: 2

Must be one of:
  • 1
  • 2
role   integer   

Role of user. Client is 1. Performer is 2. . Example: 2

Must be one of:
  • 1
  • 2
price   number   

Price. Must be at least 0. Must not be greater than 999999999. Example: 2.99

phone   string   

Phone. Must not be greater than 255 characters. Example: +79000000000

email   string   

Email. Must be a valid email address. Example: socialemail@email.com

Social SignIn

Example request:
curl --request POST \
    "https://api.privet.gg/api/v1/auth/social/sign-in" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"vk1.a.Y3Yd1FxZELA-Yd2cwJRPSma8MM4v6d4fDbm4ZfbRkRXt44mKO4kxhX7iLluKATBmrwC30gjTdZ8ctfI9UYOTn6VKGBeHl-MWlINbhAxCGZth94OrIHbswFryJSDrE4_g_KsmnCaHiyPHlPOldlxzG4EV77dDp6Et7lxAnWn24_A_2Ose9vt8n7c4Iney-NPzrbpEYBvsb1soEIJuYGuEnw\",
    \"social_type\": 1
}"
const url = new URL(
    "https://api.privet.gg/api/v1/auth/social/sign-in"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "vk1.a.Y3Yd1FxZELA-Yd2cwJRPSma8MM4v6d4fDbm4ZfbRkRXt44mKO4kxhX7iLluKATBmrwC30gjTdZ8ctfI9UYOTn6VKGBeHl-MWlINbhAxCGZth94OrIHbswFryJSDrE4_g_KsmnCaHiyPHlPOldlxzG4EV77dDp6Et7lxAnWn24_A_2Ose9vt8n7c4Iney-NPzrbpEYBvsb1soEIJuYGuEnw",
    "social_type": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 900,
        "email": "22346913doris.carroll@example.net",
        "phone": "949-372-1368",
        "name": "Herta Hermiston",
        "nickname": "Trudie Reichel III",
        "description": null,
        "role": 1,
        "price": 500.47731617,
        "invite": "cPjob7KK",
        "media": [
            {
                "id": 260,
                "user_id": 901,
                "preview_url": "https://api.privet.gg/storage/media/image.png",
                "path_url": "https://api.privet.gg/storage/media/image.png",
                "type": 1
            }
        ],
        "categories": [
            {
                "category": 1
            }
        ],
        "firebase_token": "48Ln9FInkqoFmYriiItxr3dzdMfUKQY2wj7Ijw3l0TyABXEDZFgEt3JpeitpqOxaazSEz2X4TtNDqPX1BQPbSshk18zOWzToeZCO5MWXNUUEkEjdoSyXv6B4ZQZLfr01UYKDI3ZVYi8rCGj8Dgx6cligZH8Py1Fe",
        "updated_at": "2024-04-30T10:28:24.000000Z",
        "created_at": "2024-04-30T10:28:24.000000Z"
    },
    "token": "1|spByWaJSn4f3zS79ujVX5jYvsnj2CaPjziQmI9CKbc720ef9"
}
 

Example response (400, Invalid token):


{
    "status": "error",
    "message": "Invalid token"
}
 

Example response (400, User not exists):


{
    "status": "error",
    "message": "User not exists"
}
 

Example response (429, Validation Errors):


{
    "message": "The token field is required. (and 1 more error)",
    "errors": {
        "token": [
            "The token field is required."
        ],
        "social_type": [
            "The social type field is required."
        ]
    }
}
 

Request      

POST api/v1/auth/social/sign-in

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

token   string   

Token of social network. Example: vk1.a.Y3Yd1FxZELA-Yd2cwJRPSma8MM4v6d4fDbm4ZfbRkRXt44mKO4kxhX7iLluKATBmrwC30gjTdZ8ctfI9UYOTn6VKGBeHl-MWlINbhAxCGZth94OrIHbswFryJSDrE4_g_KsmnCaHiyPHlPOldlxzG4EV77dDp6Et7lxAnWn24_A_2Ose9vt8n7c4Iney-NPzrbpEYBvsb1soEIJuYGuEnw

social_type   string   

Type of social network Google is 1. Vk is 2. . Example: 1

Must be one of:
  • 1
  • 2

Social Connect

requires authentication

Example request:
curl --request POST \
    "https://api.privet.gg/api/v1/auth/social/connect" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"vk1.a.Y3Yd1FxZELA-Yd2cwJRPSma8MM4v6d4fDbm4ZfbRkRXt44mKO4kxhX7iLluKATBmrwC30gjTdZ8ctfI9UYOTn6VKGBeHl-MWlINbhAxCGZth94OrIHbswFryJSDrE4_g_KsmnCaHiyPHlPOldlxzG4EV77dDp6Et7lxAnWn24_A_2Ose9vt8n7c4Iney-NPzrbpEYBvsb1soEIJuYGuEnw\",
    \"social_type\": 2
}"
const url = new URL(
    "https://api.privet.gg/api/v1/auth/social/connect"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "vk1.a.Y3Yd1FxZELA-Yd2cwJRPSma8MM4v6d4fDbm4ZfbRkRXt44mKO4kxhX7iLluKATBmrwC30gjTdZ8ctfI9UYOTn6VKGBeHl-MWlINbhAxCGZth94OrIHbswFryJSDrE4_g_KsmnCaHiyPHlPOldlxzG4EV77dDp6Et7lxAnWn24_A_2Ose9vt8n7c4Iney-NPzrbpEYBvsb1soEIJuYGuEnw",
    "social_type": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, Updated):


{}
 

Example response (400, Invalid token):


{
    "status": "error",
    "message": "Invalid token"
}
 

Example response (400, User already exists):


{
    "status": "error",
    "message": "User already exists"
}
 

Example response (401, Unauthorized):


{
    "status": "error",
    "message": "Unauthorized"
}
 

Example response (429, Validation Errors):


{
    "message": "The token field is required. (and 1 more error)",
    "errors": {
        "token": [
            "The token field is required."
        ],
        "social_type": [
            "The social type field is required."
        ]
    }
}
 

Request      

POST api/v1/auth/social/connect

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

token   string   

Token of social network. Example: vk1.a.Y3Yd1FxZELA-Yd2cwJRPSma8MM4v6d4fDbm4ZfbRkRXt44mKO4kxhX7iLluKATBmrwC30gjTdZ8ctfI9UYOTn6VKGBeHl-MWlINbhAxCGZth94OrIHbswFryJSDrE4_g_KsmnCaHiyPHlPOldlxzG4EV77dDp6Et7lxAnWn24_A_2Ose9vt8n7c4Iney-NPzrbpEYBvsb1soEIJuYGuEnw

social_type   string   

Type of social network Google is 1. Vk is 2. . Example: 2

Must be one of:
  • 1
  • 2

Social Disconnect

requires authentication

Example request:
curl --request POST \
    "https://api.privet.gg/api/v1/auth/social/disconnect" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"social_type\": 2
}"
const url = new URL(
    "https://api.privet.gg/api/v1/auth/social/disconnect"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "social_type": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, Updated):


{}
 

Example response (401, Unauthorized):


{
    "status": "error",
    "message": "Unauthorized"
}
 

Example response (429, Validation Errors):


{
    "message": "The social type field is required.",
    "errors": {
        "social_type": [
            "The social type field is required."
        ]
    }
}
 

Request      

POST api/v1/auth/social/disconnect

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

social_type   string   

Type of social network Google is 1. Vk is 2. . Example: 2

Must be one of:
  • 1
  • 2

Endpoints

GET api/v1/push

Example request:
curl --request GET \
    --get "https://api.privet.gg/api/v1/push" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.privet.gg/api/v1/push"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
 

{
    "message": "Invalid service account: The file at '/home/admin/web/api.privet.gg/public_html/app/Http/Controllers/../../../storage/app/firebase_credentials.json' is not readable",
    "exception": "Kreait\\Firebase\\Exception\\InvalidArgumentException",
    "file": "/home/admin/web/api.privet.gg/public_html/vendor/kreait/firebase-php/src/Firebase/Factory.php",
    "line": 163,
    "trace": [
        {
            "file": "/home/admin/web/api.privet.gg/public_html/app/Http/Controllers/PushNotificationController.php",
            "line": 17,
            "function": "withServiceAccount",
            "class": "Kreait\\Firebase\\Factory",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php",
            "line": 54,
            "function": "sendPushNotification",
            "class": "App\\Http\\Controllers\\PushNotificationController",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php",
            "line": 43,
            "function": "callAction",
            "class": "Illuminate\\Routing\\Controller",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
            "line": 259,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\ControllerDispatcher",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
            "line": 205,
            "function": "runController",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 799,
            "function": "run",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 141,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 159,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 125,
            "function": "handleRequest",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 87,
            "function": "handleRequestUsingNamedLimiter",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/app/Http/Middleware/ForceJsonResponse.php",
            "line": 19,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "App\\Http\\Middleware\\ForceJsonResponse",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 116,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 798,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 777,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 741,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 730,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 141,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
            "line": 40,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
            "line": 99,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php",
            "line": 62,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\HandleCors",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php",
            "line": 39,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 116,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 299,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 287,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 92,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 45,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 209,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 124,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 71,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 49,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php",
            "line": 51,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Container/Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 211,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/symfony/console/Command/Command.php",
            "line": 326,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 180,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/symfony/console/Application.php",
            "line": 1081,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/symfony/console/Application.php",
            "line": 320,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/symfony/console/Application.php",
            "line": 174,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php",
            "line": 201,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/admin/web/api.privet.gg/public_html/artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/v1/push

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Order management

APIs for managing orders

Create order

requires authentication

Example request:
curl --request POST \
    "https://api.privet.gg/api/v1/order/create" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"performer_id\": 1,
    \"occasion_id\": 4,
    \"description\": \"Description of order\",
    \"date_till\": \"2023-10-02 12:36:51\"
}"
const url = new URL(
    "https://api.privet.gg/api/v1/order/create"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "performer_id": 1,
    "occasion_id": 4,
    "description": "Description of order",
    "date_till": "2023-10-02 12:36:51"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 129,
        "client_id": 912,
        "performer_id": 913,
        "occasion_id": 2,
        "description": "King said, for about the crumbs,' said the King and the whole thing very absurd, but they all spoke at once, while all the things between whiles.' 'Then you keep moving round, I suppose?' 'Yes,'.",
        "date_till": "0018-04-18 05:29:35",
        "status": 4,
        "cancel_text": "King, 'that saves a world of trouble, you know, upon the other end of the Lobster Quadrille?' the Gryphon replied very politely, 'for I can't get out of a water-well,' said the March Hare. 'It was.",
        "cancel_date": "0023-02-11 11:53:01",
        "rating_rate": 2,
        "rating_text": "Alice, as she passed; it was YOUR table,' said Alice; 'all I know who I am! But I'd better take him his fan and a fan! Quick, now!' And Alice was not much surprised at her as hard as she spoke.",
        "created_at": "2024-04-30T10:28:25.000000Z",
        "updated_at": "2024-04-30T10:28:25.000000Z"
    }
}
 

Example response (401, Unauthorized):


{
    "status": "error",
    "message": "Unauthorized"
}
 

Example response (429, Validation Errors):


{
    "message": "The performer id field is required. (and 2 more errors)",
    "errors": {
        "performer_id": [
            "The performer id field is required."
        ],
        "description": [
            "The description field is required."
        ],
        "date_till": [
            "The date till field is required."
        ]
    }
}
 

Request      

POST api/v1/order/create

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

performer_id   integer   

Id of performer. Example: 1

occasion_id   integer  optional  

Id of occasion Birthday is 1. Just is 2. Advice is 3. Congratulation is 4. . Example: 4

Must be one of:
  • 1
  • 2
  • 3
  • 4
description   string   

Description. Example: Description of order

date_till   string   

Date till. Must be a valid date. Must be a valid date in the format Y-m-d H:i:s. Example: 2023-10-02 12:36:51

Update order

requires authentication

Example request:
curl --request POST \
    "https://api.privet.gg/api/v1/order/update/96" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "status=2"\
    --form "rating_rate=5"\
    --form "rating_text=All right"\
    --form "media=@/tmp/phpmDkRJO" 
const url = new URL(
    "https://api.privet.gg/api/v1/order/update/96"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('status', '2');
body.append('rating_rate', '5');
body.append('rating_text', 'All right');
body.append('media', document.querySelector('input[name="media"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 130,
        "client_id": 914,
        "performer_id": 915,
        "occasion_id": 1,
        "description": "By the use of repeating all that green stuff be?' said Alice. 'Why?' 'IT DOES THE BOOTS AND SHOES.' the Gryphon went on in a twinkling! Half-past one, time for dinner!' ('I only wish they COULD! I'm.",
        "date_till": "0006-04-10 15:14:01",
        "status": 3,
        "cancel_text": "I wonder what Latitude was, or Longitude I've got to the Mock Turtle sighed deeply, and drew the back of one flapper across his eyes. 'I wasn't asleep,' he said in an offended tone, 'was, that the.",
        "cancel_date": "0015-06-09 22:28:52",
        "rating_rate": null,
        "rating_text": "Alice: 'I don't know what to do, and in THAT direction,' waving the other side of the wood--(she considered him to be a very good height indeed!' said Alice, as she could. The next witness was the.",
        "media": [
            {
                "id": 266,
                "user_id": 916,
                "preview_url": "https://api.privet.gg/storage/media/preview/image.png",
                "path_url": "https://api.privet.gg/storage/media/image.png",
                "type": 2
            }
        ],
        "created_at": "2024-04-30T10:28:25.000000Z",
        "updated_at": "2024-04-30T10:28:25.000000Z"
    }
}
 

Example response (401, Unauthorized):


{
    "status": "error",
    "message": "Unauthorized"
}
 

Example response (429, Validation Errors):


{
    "message": "The selected status is invalid. (and 1 more error)",
    "errors": {
        "status": [
            "The selected status is invalid."
        ],
        "rating_rate": [
            "The rating rate field must not be greater than 5."
        ]
    }
}
 

Request      

POST api/v1/order/update/{order_id}

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

order_id   integer   

The ID of the order. Example: 96

Body Parameters

status   integer  optional  

Status of order New is 1. Done is 2. Cancel is 3. DoneWithReview is 4. . Example: 2

Must be one of:
  • 1
  • 2
  • 3
  • 4
media   file  optional  

Media file. Must be a file. Must not be greater than 599999 kilobytes. Example: /tmp/phpmDkRJO

rating_rate   number  optional  

Rating of order in points. Must be at least 1. Must not be greater than 5. Example: 5

rating_text   string  optional  

Rating of order in text. Example: All right

View order

requires authentication

Example request:
curl --request GET \
    --get "https://api.privet.gg/api/v1/order/view/96" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.privet.gg/api/v1/order/view/96"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 131,
        "client_id": 917,
        "performer_id": 919,
        "occasion_id": 4,
        "description": "Dodo solemnly presented the thimble, saying 'We beg your pardon!' cried Alice hastily, afraid that it felt quite relieved to see what was on the floor, as it left no mark on the other bit. Her chin.",
        "date_till": "0031-08-30 02:55:22",
        "status": 4,
        "cancel_text": null,
        "cancel_date": "0009-05-30 21:50:08",
        "rating_rate": null,
        "rating_text": null,
        "media": [
            {
                "id": 269,
                "user_id": 921,
                "preview_url": "https://api.privet.gg/storage/media/preview/image.png",
                "path_url": "https://api.privet.gg/storage/media/image.png",
                "type": 2
            }
        ],
        "performer": {
            "id": 919,
            "email": "55041168mcglynn.shania@example.com",
            "phone": "+1 (502) 225-1180",
            "name": "Alysha Graham",
            "nickname": "Timmy Graham",
            "description": null,
            "role": 2,
            "price": 507.86,
            "invite": "S6BfIUsr",
            "media": [
                {
                    "id": 268,
                    "user_id": 920,
                    "preview_url": "https://api.privet.gg/storage/media/image.png",
                    "path_url": "https://api.privet.gg/storage/media/image.png",
                    "type": 1
                }
            ],
            "firebase_token": "rs7kfH2NWQziUCYUCxEuZYWwbhsF0eT9PCI58w7zK4xko3j5SQlSfAn5jt2MFRcAp80s7g3iDsV16x9Iz2vGpUlwP06oOE2JR7GVEakKSwvuoM0lTVPgN6CUg2BzkC1TjvJxxla91ommz4duHnrAgsU6XlybM0iN",
            "updated_at": "2024-04-30T10:28:25.000000Z",
            "created_at": "2024-04-30T10:28:25.000000Z"
        },
        "client": {
            "id": 917,
            "email": "52966141ray24@example.com",
            "phone": "+1-225-426-1899",
            "name": "Bettye Prosacco",
            "nickname": "Arnaldo Prohaska",
            "description": null,
            "role": 1,
            "price": 6305.19,
            "invite": "TRdZt0tB",
            "media": [
                {
                    "id": 267,
                    "user_id": 918,
                    "preview_url": "https://api.privet.gg/storage/media/preview/image.png",
                    "path_url": "https://api.privet.gg/storage/media/image.png",
                    "type": 2
                }
            ],
            "firebase_token": "oD85Qy4IWXk7TuTPYlu241YkahmaBba46dWpXjZ2ppYsgFuoM5rYH2AT7qaRuXbEoXsurpPNlGx0Il24CKDLrgiHpwqJ31jeEUAoh4smuFcT5di6M860REsX5gl5B1QKevN7DwKHYAPUsUICqBhklcT9WHcxY43N",
            "updated_at": "2024-04-30T10:28:25.000000Z",
            "created_at": "2024-04-30T10:28:25.000000Z"
        },
        "created_at": "2024-04-30T10:28:25.000000Z",
        "updated_at": "2024-04-30T10:28:25.000000Z"
    }
}
 

Example response (401, Unauthorized):


{
    "status": "error",
    "message": "Unauthorized"
}
 

Example response (404, Not found):


{
    "status": "error",
    "message": "Not found"
}
 

Request      

GET api/v1/order/view/{order_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

order_id   integer   

The ID of the order. Example: 96

requires authentication

Example request:
curl --request GET \
    --get "https://api.privet.gg/api/v1/order/search?status=1&page=18" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.privet.gg/api/v1/order/search"
);

const params = {
    "status": "1",
    "page": "18",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 132,
            "client_id": 922,
            "performer_id": 923,
            "occasion_id": 3,
            "description": "Shakespeare, in the last word two or three times over to the beginning of the Lobster Quadrille, that she wasn't a really good school,' said the Queen, who was passing at the frontispiece if you.",
            "date_till": "0026-06-01 20:01:26",
            "status": 3,
            "cancel_text": null,
            "cancel_date": "0031-07-02 16:48:38",
            "rating_rate": 4,
            "rating_text": "Queen. 'It proves nothing of the house down!' said the Mock Turtle went on, '--likely to win, that it's hardly worth while finishing the game.' The Queen had ordered. They very soon finished off the.",
            "media": [
                {
                    "id": 271,
                    "user_id": 925,
                    "preview_url": "https://api.privet.gg/storage/media/preview/image.png",
                    "path_url": "https://api.privet.gg/storage/media/image.png",
                    "type": 2
                }
            ],
            "performer": {
                "id": 923,
                "email": "47521824gschneider@example.org",
                "phone": "469-853-6482",
                "name": "Meda Graham DVM",
                "nickname": "Jazmyne Trantow",
                "description": null,
                "role": 2,
                "price": 37698.8,
                "invite": "L8xrSL9F",
                "media": [
                    {
                        "id": 270,
                        "user_id": 924,
                        "preview_url": "https://api.privet.gg/storage/media/image.png",
                        "path_url": "https://api.privet.gg/storage/media/image.png",
                        "type": 1
                    }
                ],
                "firebase_token": "IW4n8bS2kqiotbyVqbZEgTov4VVyg3nVFa2nfevry4zlHcfkSwx9EtXgqBYLxIv2wMnNRw168mR413ov6xpVh9ysyNOgPSfENv1CHE6w74iZNZWGImLwDEtbvwNNTVRqO9bWMWH0dzVdIfOQQ99REDdUKVrrnOsg",
                "updated_at": "2024-04-30T10:28:26.000000Z",
                "created_at": "2024-04-30T10:28:26.000000Z"
            },
            "created_at": "2024-04-30T10:28:26.000000Z",
            "updated_at": "2024-04-30T10:28:26.000000Z"
        },
        {
            "id": 133,
            "client_id": 926,
            "performer_id": 927,
            "occasion_id": 3,
            "description": "There was no 'One, two, three, and away,' but they were mine before. If I or she should meet the real Mary Ann, what ARE you talking to?' said one of the treat. When the procession moved on, three.",
            "date_till": "0021-11-04 04:26:58",
            "status": 2,
            "cancel_text": null,
            "cancel_date": "0009-12-01 01:14:10",
            "rating_rate": 1,
            "rating_text": "Mock Turtle sang this, very slowly and sadly:-- '\"Will you walk a little bit of the right-hand bit to try the first verse,' said the youth, 'as I mentioned before, And have grown most uncommonly.",
            "media": [
                {
                    "id": 273,
                    "user_id": 929,
                    "preview_url": "https://api.privet.gg/storage/media/preview/image.png",
                    "path_url": "https://api.privet.gg/storage/media/image.png",
                    "type": 2
                }
            ],
            "performer": {
                "id": 927,
                "email": "14657890vortiz@example.com",
                "phone": "484.756.1535",
                "name": "Gunner Friesen",
                "nickname": "Theresa Baumbach",
                "description": null,
                "role": 2,
                "price": 351.89,
                "invite": "PhW5niKP",
                "media": [
                    {
                        "id": 272,
                        "user_id": 928,
                        "preview_url": "https://api.privet.gg/storage/media/image.png",
                        "path_url": "https://api.privet.gg/storage/media/image.png",
                        "type": 1
                    }
                ],
                "firebase_token": "Fo1DOKSooxU07aNPHPAu0ZetVk23GH5KfuiXS1PfXHhHbQw7aURvkDbRD308AshJZxmMj8Suukwq1d9kKIQoffMB4fqdvAtvRCh4wqd7ydfHxVPm9pdJKY7I9bSstvwZOtblyFXssMXOthwlgOkO399gXm2S9txe",
                "updated_at": "2024-04-30T10:28:26.000000Z",
                "created_at": "2024-04-30T10:28:26.000000Z"
            },
            "created_at": "2024-04-30T10:28:26.000000Z",
            "updated_at": "2024-04-30T10:28:26.000000Z"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 15,
        "to": 2,
        "total": 2
    }
}
 

Example response (401, Unauthorized):


{
    "status": "error",
    "message": "Unauthorized"
}
 

User management

APIs for managing users

Get user by invite

Example request:
curl --request POST \
    "https://api.privet.gg/api/v1/user/get-by-invite" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"invite\": \"daSdiOdU\"
}"
const url = new URL(
    "https://api.privet.gg/api/v1/user/get-by-invite"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "invite": "daSdiOdU"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 902,
        "email": "4865991alexandrine.langosh@example.net",
        "phone": "(760) 418-4380",
        "name": "Garret Bradtke",
        "nickname": "Orval VonRueden",
        "description": null,
        "role": 1,
        "price": 100019050.1,
        "invite": "slbejqKV",
        "media": [
            {
                "id": 261,
                "user_id": 903,
                "preview_url": "https://api.privet.gg/storage/media/preview/image.png",
                "path_url": "https://api.privet.gg/storage/media/image.png",
                "type": 2
            }
        ],
        "categories": [
            {
                "category": 1
            }
        ],
        "firebase_token": "uFPpebxSbK0NY9Xhh68QCoDWLOitkBUyCHI1iKkBQVpS2yDmKNfCgawJDpaPKEZsQr3rMLYvARjuCwiCxUgAmCxFw27Yr7LahJKtdAfM3toiILlojuJAWg0GAWlAOfC5qcFyS0UjsmrjoJWBtYwJWtw4MkhlB4C1",
        "updated_at": "2024-04-30T10:28:24.000000Z",
        "created_at": "2024-04-30T10:28:24.000000Z"
    },
    "token": "1|spByWaJSn4f3zS79ujVX5jYvsnj2CaPjziQmI9CKbc720ef9"
}
 

Example response (404, User not found):


{
    "status": "error",
    "message": "User not found"
}
 

Example response (429, Validation Errors):


{
    "message": "The invite field is required.",
    "errors": {
        "invite": [
            "The invite field is required."
        ]
    }
}
 

Request      

POST api/v1/user/get-by-invite

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

invite   string   

Invite of user. Must be 8 characters. Example: daSdiOdU

Check is free email

Example request:
curl --request POST \
    "https://api.privet.gg/api/v1/user/check-free" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"email@email.com\"
}"
const url = new URL(
    "https://api.privet.gg/api/v1/user/check-free"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "email@email.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Result true):


{
    "free": true
}
 

Example response (200, Result false):


{
    "free": false
}
 

Example response (429, Validation Errors):


{
    "message": "The email field is required.",
    "errors": {
        "email": [
            "The email field is required."
        ]
    }
}
 

Request      

POST api/v1/user/check-free

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Email. Must be a valid email address. Example: email@email.com

Update user

requires authentication

Example request:
curl --request POST \
    "https://api.privet.gg/api/v1/user/update" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "email=email@email.com"\
    --form "password=password"\
    --form "password_confirmation=password"\
    --form "phone=+79000000000"\
    --form "name=Ivan Ivanov"\
    --form "nickname=Ivan99"\
    --form "description=Cool user"\
    --form "role=1"\
    --form "price=2.99"\
    --form "firebase_token=eHWhVTRATZ-EZ-JBaD2Huf:APA91bFlzBIssyo-tn7QsYTnRxSlUV3EZrnrdI02-b3gcWcFf8LpBykjt4WCLnDcoIIY4MJU3SybtUSRAKupzkSbZEf9A3THtA6KO9AbskZPu3NKpoohLhxNi0ywg5Z5kwT7kauhMeNK"\
    --form "category_ids[]=1"\
    --form "media=@/tmp/php69x2hF" 
const url = new URL(
    "https://api.privet.gg/api/v1/user/update"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('email', 'email@email.com');
body.append('password', 'password');
body.append('password_confirmation', 'password');
body.append('phone', '+79000000000');
body.append('name', 'Ivan Ivanov');
body.append('nickname', 'Ivan99');
body.append('description', 'Cool user');
body.append('role', '1');
body.append('price', '2.99');
body.append('firebase_token', 'eHWhVTRATZ-EZ-JBaD2Huf:APA91bFlzBIssyo-tn7QsYTnRxSlUV3EZrnrdI02-b3gcWcFf8LpBykjt4WCLnDcoIIY4MJU3SybtUSRAKupzkSbZEf9A3THtA6KO9AbskZPu3NKpoohLhxNi0ywg5Z5kwT7kauhMeNK');
body.append('category_ids[]', '1');
body.append('media', document.querySelector('input[name="media"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 904,
        "email": "5674269jordan57@example.org",
        "phone": "+1-929-956-7742",
        "name": "Mrs. Hosea Haag",
        "nickname": "Hulda Torp",
        "description": null,
        "role": 2,
        "price": 4,
        "invite": "Cw1WHTlB",
        "media": [
            {
                "id": 262,
                "user_id": 905,
                "preview_url": "https://api.privet.gg/storage/media/image.png",
                "path_url": "https://api.privet.gg/storage/media/image.png",
                "type": 1
            }
        ],
        "categories": [
            {
                "category": 1
            }
        ],
        "firebase_token": "x3yQzbKtsNjr23X51rX7aR01M8IhVSTOF86YSjjXXWIgXCRrO1noLhv9zTjZxedpHXH0YcOheCujjK82BkyXOBOYjzV7ZshhAoPAzw6ukzpVo7Z2P6nF2paxaDnopLEpxCyp2EE5HimA1JrhHcFujAYV66a7Ot2g",
        "updated_at": "2024-04-30T10:28:25.000000Z",
        "created_at": "2024-04-30T10:28:25.000000Z"
    }
}
 

Example response (201, Updated):


{
    "status": "error",
    "message": "Updated"
}
 

Example response (401, Unauthorized):


{
    "status": "error",
    "message": "Unauthorized"
}
 

Example response (429, Validation Errors):


{
    "message": "The email has already been taken.",
    "errors": {
        "email": [
            "The email has already been taken."
        ]
    }
}
 

Request      

POST api/v1/user/update

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

email   string  optional  

Email. Must be a valid email address. Example: email@email.com

password   string  optional  

Password. Must be at least 6 characters. Example: password

password_confirmation   string  optional  

Password confirmation. The value and password must match. Must be at least 6 characters. Example: password

phone   string  optional  

Phone. Must not be greater than 255 characters. Example: +79000000000

name   string  optional  

Name. Must not be greater than 255 characters. Example: Ivan Ivanov

nickname   string  optional  

Nickname. Must not be greater than 255 characters. Example: Ivan99

description   string  optional  

Description. Example: Cool user

role   integer  optional  

Role of user. Client is 1. Performer is 2. . Example: 1

Must be one of:
  • 1
  • 2
price   number  optional  

Price. Must be at least 0. Must not be greater than 999999999. Example: 2.99

firebase_token   string  optional  

Firebase token. Example: eHWhVTRATZ-EZ-JBaD2Huf:APA91bFlzBIssyo-tn7QsYTnRxSlUV3EZrnrdI02-b3gcWcFf8LpBykjt4WCLnDcoIIY4MJU3SybtUSRAKupzkSbZEf9A3THtA6KO9AbskZPu3NKpoohLhxNi0ywg5Z5kwT7kauhMeNK

category_ids   integer[]  optional  

Category Streamer is 1. Comedian is 2. .

Must be one of:
  • 1
  • 2
media   file  optional  

Media. Must be a file. Must not be greater than 599999 kilobytes. Example: /tmp/php69x2hF

requires authentication

Example request:
curl --request GET \
    --get "https://api.privet.gg/api/v1/user/search?category_id=2&text=some+text&role=2&page=14" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.privet.gg/api/v1/user/search"
);

const params = {
    "category_id": "2",
    "text": "some text",
    "role": "2",
    "page": "14",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 906,
            "email": "45948921obergnaum@example.net",
            "phone": "(283) 628-7324",
            "name": "Helmer Fisher",
            "nickname": "Lila Dach",
            "description": null,
            "role": 2,
            "price": 550,
            "invite": "rS7B7iMx",
            "media": [
                {
                    "id": 263,
                    "user_id": 907,
                    "preview_url": "https://api.privet.gg/storage/media/image.png",
                    "path_url": "https://api.privet.gg/storage/media/image.png",
                    "type": 1
                }
            ],
            "categories": [
                {
                    "category": 1
                }
            ],
            "firebase_token": "AgIVT2ZgjKKnRWrHayLX6h56YFCEfTzNNaucE9iBad6yPsjDGG806xmceGbrhP0g8iYX2PO2u8zXmX97dRJNQl9CJdXtvIaFgRJwP6GjE0vrxJQ3EoGiSnSWPiTp2Rav9XjL4LWrIb9WQTdsduCnhiipyv4qTboK",
            "updated_at": "2024-04-30T10:28:25.000000Z",
            "created_at": "2024-04-30T10:28:25.000000Z"
        },
        {
            "id": 908,
            "email": "17473670carmen08@example.net",
            "phone": "(859) 913-9729",
            "name": "Mr. Sid King Jr.",
            "nickname": "Dessie Abernathy",
            "description": null,
            "role": 2,
            "price": 1583.4121506,
            "invite": "muCXFLyy",
            "media": [
                {
                    "id": 264,
                    "user_id": 909,
                    "preview_url": "https://api.privet.gg/storage/media/preview/image.png",
                    "path_url": "https://api.privet.gg/storage/media/image.png",
                    "type": 2
                }
            ],
            "categories": [
                {
                    "category": 2
                }
            ],
            "firebase_token": "SWq2I1rBwvGyeQlB6zvHXpS8HwFsWkTwEI1uW7j5pjNJFzgKDEdTGC3jumjYqEfIcYsJBDBNi2EpRNCItUu3bRrpSoHdSEfIMgJ4raCIzd9x0t9dbh2XfGZVf8ZuWs24jJp3aIl2qMMhKIQGKs3HagzJuNQGlvEe",
            "updated_at": "2024-04-30T10:28:25.000000Z",
            "created_at": "2024-04-30T10:28:25.000000Z"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 15,
        "to": 2,
        "total": 2
    }
}
 

Example response (401, Unauthorized):


{
    "status": "error",
    "message": "Unauthorized"
}
 

View user

requires authentication

Example request:
curl --request GET \
    --get "https://api.privet.gg/api/v1/user/view/135" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.privet.gg/api/v1/user/view/135"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 910,
        "email": "98660706turcotte.bobbie@example.org",
        "phone": "+1 (248) 502-3268",
        "name": "Louvenia Wunsch",
        "nickname": "Ms. Annamae Graham",
        "description": null,
        "role": 1,
        "price": 357699.9977698,
        "invite": "Y7WAHrEw",
        "media": [
            {
                "id": 265,
                "user_id": 911,
                "preview_url": "https://api.privet.gg/storage/media/image.png",
                "path_url": "https://api.privet.gg/storage/media/image.png",
                "type": 1
            }
        ],
        "categories": [
            {
                "category": 2
            }
        ],
        "firebase_token": "xmeaFVBzIAtbocQeSpgj0FXlo6vy7uxFKYqWDFOLrQxc4RmpD0CmXeR4JSoP4q1WoeDHYrnJTY63y5TMIAC4zQTmMYQeans0M5VXsQAOaJfgwrJU9Ah9htDet4CjJ7NSDvzQoqEPSG9SPm0RIzEhrvml1BEZH4P3",
        "updated_at": "2024-04-30T10:28:25.000000Z",
        "created_at": "2024-04-30T10:28:25.000000Z"
    }
}
 

Example response (401, Unauthorized):


{
    "status": "error",
    "message": "Unauthorized"
}
 

Example response (404, Not found):


{
    "status": "error",
    "message": "Not found"
}
 

Request      

GET api/v1/user/view/{user_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user_id   integer   

The ID of the user. Example: 135

Update Firebase token

requires authentication

Example request:
curl --request POST \
    "https://api.privet.gg/api/v1/user/add-firebase-token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"firebase_token\": \"XXXAAA.....\"
}"
const url = new URL(
    "https://api.privet.gg/api/v1/user/add-firebase-token"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "firebase_token": "XXXAAA....."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, Token Updated):


{
    "status": "success"
}
 

Example response (401, Unauthorized):


{
    "status": "error",
    "message": "Unauthorized"
}
 

Example response (422, Validation Errors):


{
    "message": "The firebase token field is required."
}
 

Request      

POST api/v1/user/add-firebase-token

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

firebase_token   string   

Device firebase token. Example: XXXAAA.....