{
"info": {
"_postman_id": "2241a1ef-edc2-47ff-bafb-11827e16525d",
"name": "Brokers",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "14898820"
},
"item": [
{
"name": "Auth",
"item": [
{
"name": "Send auth code",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"phone\": \"79279279278\"\n}"
},
"url": {
"raw": "{{baseApi}}/auth/send-code",
"host": [
"{{baseApi}}"
],
"path": [
"auth",
"send-code"
]
}
},
"response": []
},
{
"name": "Login",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var data = JSON.parse(responseBody);",
"pm.collectionVariables.set(\"accessToken\", data.data.accessToken);"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"phone\": \"79279279278\",\n\t\"code\": \"1111\",\n\t\"deviceType\": \"web\",\n\t\"deviceId\": \"deviceId\"\n}"
},
"url": {
"raw": "{{baseApi}}/auth/login",
"host": [
"{{baseApi}}"
],
"path": [
"auth",
"login"
]
}
},
"response": []
},
{
"name": "Logout",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Bearer {{accessToken}}",
"type": "text"
}
],
"body": {
"mode": "formdata",
"formdata": []
},
"url": {
"raw": "{{baseApi}}/auth/logout",
"host": [
"{{baseApi}}"
],
"path": [
"auth",
"logout"
]
}
},
"response": []
}
]
},
{
"name": "User",
"item": [
{
"name": "Profile",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Authorization",
"value": "Bearer {{accessToken}}",
"type": "text"
}
],
"url": {
"raw": "{{baseApi}}/user/profile",
"host": [
"{{baseApi}}"
],
"path": [
"user",
"profile"
]
}
},
"response": []
},
{
"name": "Update",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Authorization",
"value": "Bearer {{accessToken}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"email\": \"user@email.ru\"\n}"
},
"url": {
"raw": "{{baseApi}}/user/update",
"host": [
"{{baseApi}}"
],
"path": [
"user",
"update"
]
}
},
"response": []
},
{
"name": "Policies",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Authorization",
"value": "Bearer {{accessToken}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseApi}}/user/policies",
"host": [
"{{baseApi}}"
],
"path": [
"user",
"policies"
]
}
},
"response": []
},
{
"name": "Save Push Token",
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Bearer {{accessToken}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"token\": \"push_token\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseApi}}/user/save-push-token",
"host": [
"{{baseApi}}"
],
"path": [
"user",
"save-push-token"
]
}
},
"response": []
},
{
"name": "Send Test Push",
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Bearer {{accessToken}}",
"type": "text"
}
],
"url": {
"raw": "{{baseApi}}/user/send-test-push",
"host": [
"{{baseApi}}"
],
"path": [
"user",
"send-test-push"
]
}
},
"response": []
},
{
"name": "Delete Account",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{baseApi}}/user/delete-account",
"host": [
"{{baseApi}}"
],
"path": [
"user",
"delete-account"
]
}
},
"response": []
},
{
"name": "Expired policies",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{accessToken}}",
"type": "text"
}
],
"url": {
"raw": "{{baseApi}}/user/policies/expired",
"host": [
"{{baseApi}}"
],
"path": [
"user",
"policies",
"expired"
]
}
},
"response": []
}
]
},
{
"name": "Main",
"item": [
{
"name": "Index",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Authorization",
"value": "Bearer {{accessToken}}",
"type": "text"
}
],
"url": {
"raw": "{{baseApi}}/main",
"host": [
"{{baseApi}}"
],
"path": [
"main"
]
}
},
"response": []
}
]
},
{
"name": "Faq",
"item": [
{
"name": "Index",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Authorization",
"value": "Bearer {{accessToken}}",
"type": "text"
}
],
"url": {
"raw": "{{baseApi}}/faq?limit=100&offset=0",
"host": [
"{{baseApi}}"
],
"path": [
"faq"
],
"query": [
{
"key": "limit",
"value": "100"
},
{
"key": "offset",
"value": "0"
}
]
}
},
"response": []
},
{
"name": "View",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Authorization",
"value": "Bearer {{accessToken}}",
"type": "text"
}
],
"url": {
"raw": "{{baseApi}}/faq/:id",
"host": [
"{{baseApi}}"
],
"path": [
"faq",
":id"
],
"variable": [
{
"key": "id"
}
]
}
},
"response": []
}
]
},
{
"name": "Server",
"item": [
{
"name": "User",
"item": [
{
"name": "Create",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Authorization",
"value": "Bearer SPjjAPJpoopjsdgklghuiwefgsdbLDKFNSLndjklNLND",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"id_userAMO\": \"amo_user_id\",\n\t\"phone\": \"79379379379\",\n\t\"firstname\": \"firstname\",\n\t\"secondname\": \"secondname\",\n\t\"patronymic\": \"patronymic\",\n\t\"brand_title\": \"brand_title\",\n\t\"brand_id\": \"1\",\n\t\"card_code\": \"card_code_123\",\n\t\"policy_company\": \"Company\",\n \"policy_created_at\": \"2022-01-12\",\n\t\"policy_expired\": \"2022-07-30\",\n\t\"policy_url\": \"url\",\n\t\"policy_type\": \"mini-ОСАГО\",\n\t\"policy_object\": \"Octavia\",\n\t\"amo_id\": \"user654\"\n}"
},
"url": {
"raw": "{{baseApi}}/server/user",
"host": [
"{{baseApi}}"
],
"path": [
"server",
"user"
]
}
},
"response": []
},
{
"name": "Update",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Authorization",
"value": "Bearer SPjjAPJpoopjsdgklghuiwefgsdbLDKFNSLndjklNLND",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"id_userAMO\": \"amo_user_id\",\n\t\"phone\": \"79379379379\",\n\t\"firstname\": \"firstname\",\n\t\"secondname\": \"secondname\",\n\t\"patronymic\": \"patronymic\",\n\t\"brand_title\": \"brand_title\",\n\t\"brand_id\": \"1\",\n\t\"card_code\": \"card_code_123\",\n\t\"policies\": [\n\t\t{\n\t\t\t\"policy_company\": \"Company\",\n \"policy_created_at\": \"2022-01-12\",\n\t\t\t\"policy_expired\": \"2022-07-30\",\n\t\t\t\"policy_url\": \"url\",\n\t\t\t\"policy_type\": \"mini-ОСАГО\",\n\t\t\t\"policy_object\": \"Octavia\",\n\t\t\t\"amo_id\": \"user654\"\n\t\t},\n\t\t{\n\t\t\t\"policy_company\": \"Company\",\n \"policy_created_at\": \"2022-01-12\",\n\t\t\t\"policy_expired\": \"2022-07-30\",\n\t\t\t\"policy_url\": \"url\",\n\t\t\t\"policy_type\": \"mini-ОСАГО\",\n\t\t\t\"policy_object\": \"Octavia\",\n\t\t\t\"amo_id\": \"user654\"\n\t\t}\n\t]\n}"
},
"url": {
"raw": "{{baseApi}}/server/user",
"host": [
"{{baseApi}}"
],
"path": [
"server",
"user"
]
}
},
"response": []
}
]
}
]
},
{
"name": "Mortgage",
"item": [
{
"name": "Get online form",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{accessToken}}",
"type": "text"
}
],
"url": {
"raw": "{{baseApi}}/mortgage-online",
"host": [
"{{baseApi}}"
],
"path": [
"mortgage-online"
]
}
},
"response": []
}
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
"pm.request.headers.add({key: 'app-version', value: '1.0'})",
"pm.request.headers.add({key: 'app-platform', value: 'android'})"
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "baseApi",
"value": "http://brokers.local/api"
},
{
"key": "token",
"value": "65DMmBQEjTTjcMW4sFFXQW9oLeaAcqsVy4GyPx9zCmiN45zNf5ivDneVi65RvaoH"
},
{
"key": "accessToken",
"value": ""
}
]
}