Actions
roos-fs tasks #310
open(STORAGE) API for Warehouse Picker (Mobile App Integration)
Start date:
08/18/2025
Due date:
% Done:
0%
Estimated time:
16:00 h
Description
API Endpoints that needs to be created
Business Logic
- API must ensure a Monteur cannot select a spare part that belongs to a different customer.
- If a serial number does not match the assigned spare part → return 400 Bad Request with error message.
- When a service is completed → automatically update spare part’s status to Installed and link it to:
- Service
- Vehicle
- Localization
All API responses must return messages in English and German
Validate the solution with @vi.grishkova@gmail.com
Acceptance criterea:
- Mobile app can fetch spare parts per vehicle/customer via API.
- API validates spare part selection and serial number.
- API prevents assigning spare parts to the wrong customer/vehicle.
- When service = completed → spare part status is updated to Installed and linked with service/vehicle.
- All error/success messages available in English + German.
Updated by Vadim Pariev 7 months ago
- Assignee changed from Vitalii Shevchenko to Anton Obolientsev
Please Allign implimentation with @vitalii.shevchenko@matecube.dev
Updated by Alex Katasonov 7 months ago
- Assignee changed from Anton Obolientsev to Alex Katasonov
Updated by Alex Katasonov 7 months ago
- Status changed from In progress to In review
Updated by Alex Katasonov 7 months ago
- Status changed from In review to In progress
Updated by Vadim Pariev 7 months ago
- Assignee changed from Alex Katasonov to Max Zadorozhniy
Updated by Max Zadorozhniy 7 months ago
- Status changed from Open to In progress
Updated by Max Zadorozhniy 7 months ago
- Status changed from In progress to In review
Updated by Max Zadorozhniy 7 months ago
- Status changed from In review to In progress
Updated by Max Zadorozhniy 7 months ago
- Status changed from In progress to In review
Updated by Anton Obolientsev 7 months ago
- Status changed from In review to Open
Updated by Max Zadorozhniy 7 months ago
- Status changed from Open to In progress
Updated by Max Zadorozhniy 7 months ago
- Status changed from In progress to In review
Updated by Max Zadorozhniy 7 months ago
- Status changed from In review to In progress
Updated by Max Zadorozhniy 7 months ago
- Status changed from In progress to In review
Updated by Anton Obolientsev 7 months ago
- Status changed from In review to Deployed (QA)
Updated by Olena Tretjakova 7 months ago
Environment: Staging.
All acceptance criteria were implemented successfully, except for the German localization.
Preconditions:
- Create a new Customer. (Customer Name: OlenaTestAPI, Customer ID: 33).
- Create a new Vehicle that belongs to the Customer created in step 1.(VIN: OT111111111111111, ID: 26480).
- Create a new Task Template for the Customer in step 1. (Task Template Name: TestAPI, ID: 42702).
- Create a new Service for a vehicle in step 2. (Service Name: SeviceTestAPI, Task: TestAPI).
- Import spare parts. (Product, Serial Number, Customer ID:
TestAPI, SN0001, 33
TestAPI, SN0002, 33
TestAPI, SN0003, 33
TestAPI, SN0004, 33)
Steps to reproduce:
- Open Postman.
- Create endpoint:
- Metod Get
- URL: https://omspreview.roos-fs.com/api/v1/warehouse_parts
- Auth type: Bearer
- Headers: Access: application/json; Authorization: Bearer {{access_token}}
- Body: {
"q": {
"customer_id_eq": 33
}
}
- Send request.
- Response: 200 ok (ID spare parts: 302, 303, 304, 305).
response https://screenrec.com/share/QSfUcKm7gR
staging https://screenrec.com/share/8iATNnLoyW - Send reques without authentification token.
- Metod Get
- URL: https://omspreview.roos-fs.com/api/v1/warehouse_parts
- Headers: Access: application/json;
- Body: {
"q": {
"customer_id_eq": 33
}
}
The error message is returned.https://screenrec.com/share/pGuZr0mNyk
- Change and send request:
- Metod Get
- URL: https://omspreview.roos-fs.com/api/v1/warehouse_parts/302
- Auth type: Bearer
- Headers: Access: application/json; Authorization: Bearer {{access_token}}
- The response is 200 ok and json with information about the spare part with ID 302. https://screenrec.com/share/nbao8Wv4tX
- Change and send request:
- Metod Get
- URL: https://omspreview.roos-fs.com/api/v1/warehouse_parts/30200
- Auth type: Bearer
- Headers: Access: application/json; Authorization: Bearer {{access_token}}
(this spare part ID does not exist in system).
- The response is 404 'Not found'. https://screenrec.com/share/x1rL2qVTCe
- Send reques:
- Metod Get
- URL: https://omspreview.roos-fs.com/api/v1/warehouse_parts/30200
- Headers: Access: application/json;
The error message is returned.https://screenrec.com/share/UIYRw0Xgoi
- Complet the service with the spare part 303.
- Send request:
- Metod Get
- URL: https://omspreview.roos-fs.com/api/v1/warehouse_parts/303
- Auth type: Bearer
- Headers: Access: application/json; Authorization: Bearer {{access_token}}
- The response is 200 ok and json with information about the spare part with ID 303. https://screenrec.com/share/XqzUscx6lM
In staging: https://screenrec.com/share/XxEZa4q7Tj - Import spare parts. (Product, Serial Number, Customer ID: TestAPI, SN0002, 33). The status spare part with ID 303 change from 'Installed' to 'In stok'.
- Send request:
- Metod Get
- URL: https://omspreview.roos-fs.com/api/v1/warehouse_parts/303
- Auth type: Bearer
- Headers: Access: application/json; Authorization: Bearer {{access_token}}
- The response is 200 ok and json with information a
https://screenrec.com/share/6L0cJHIqnl
The information about Location, Service and Vehicle is absent.
In staging https://screenrec.com/share/s01CPzrYGJ - Send the request
- Metod Get
- URL: https://omspreview.roos-fs.com/api/v1/warehouse_parts/303
- Auth type: Bearer
- Headers: Access: application/json; Authorization: Bearer {{access_token}}; Accept-Language: de.
- Send request.
The API responses does not support German localization.
https://screenrec.com/share/YC0z1FWRMh
Expected Result:
- The API endpoint that gets spare parts by Customer ID contains only the spare parts that belong to that customer.
- The API endpoint that get a spare part by its ID:
- When the serial number exists in the system → the response code is 200 OK.
- When the serial number does not exist in the system → the response code is 400 Bad Request.
- When the service using the specific spare part is completed, the API response must contain:
Service ID, Vehicle ID, Location ID, and the status Installed. - When the spare part status changes from "installed" to "in stock", the response of the GET request by ID contains: location_id: null, service_id: null, and vehicle_id: null.
-
- The response message must be available in English and German.
Actual Result:
- The API request get spare parts by Customer ID return spare parts only that Customer.
- The API Reques get spare part by ID:
- Return 200 ok, if this ID exsists in system;
- Return 400 Bad Request, unless that spare part exists in system;
- Return in response Service ID, Vehicle ID, Location ID, if the the status that spare part is Installed.
- Return in response location_id: null, service_id: null, and vehicle_id: null, if the the status that spare part canges from 'Installed' to 'In stok'.
- These endpoinds do not nave implimentation of localisation.
Updated by Vadim Pariev 6 months ago
- Status changed from Ready for Deployment (prod) to Closed
Actions