Sales Operations API Testing
API-NGSO-001: Synchronization (Pre Journey)
1
POST /api/sync/data
Request Body
1
2
3
4
5
{
"salesRepId": "SR-001",
"deviceId": "DEVICE-ANDROID-789",
"lastSyncTime": "2026-06-29T10:00:00"
}
Expected Response
1
2
3
4
5
6
{
"success": true,
"syncedModules": ["outlet", "product", "stock", "creditLimit"],
"recordsUpdated": 245,
"message": "Synchronization completed successfully"
}
API-NGSO-002: Create Pre Order (In Store)
1
POST /api/preorder/create
Request Body
1
2
3
4
5
6
7
8
9
10
11
12
{
"visitId": "VISIT-20260630-045",
"outletId": "OUTLET-DEMO-01",
"items": [
{
"productCode": "PROD-001",
"quantity": 10
}
],
"paymentMethod": "CREDIT",
"totalAmount": 7500000
}
Expected Response
1
2
3
4
5
6
{
"success": true,
"preorderId": "PO-20260630-089",
"status": "SUBMITTED",
"message": "Preorder created successfully"
}
API-NGSO-003: Payment Collection
1
POST /api/payment/collection
Request Body
1
2
3
4
5
6
7
{
"visitId": "VISIT-20260630-045",
"outletId": "OUTLET-DEMO-01",
"amount": 5000000,
"paymentMethod": "CASH",
"reference": "PO-20260630-089"
}
Expected Response
1
2
3
4
5
6
{
"success": true,
"paymentId": "PAY-20260630-112",
"status": "RECORDED",
"creditLimitUpdated": true
}
API-NGSO-004: Stock Movement
1
POST /api/stock/movement
Request Body
1
2
3
4
5
6
7
{
"visitId": "VISIT-20260630-045",
"productCode": "PROD-001",
"fromLocation": "MOBILE-WAREHOUSE",
"toLocation": "OUTLET-DEMO-01",
"quantity": 10
}
Expected Response
1
2
3
4
5
{
"success": true,
"message": "Stock movement recorded",
"updatedStock": 45
}
API-NGSO-005: Final Synchronization (Post Journey)
1
POST /api/sync/final
Request Body
1
2
3
4
{
"visitId": "VISIT-20260630-045",
"salesRepId": "SR-001"
}
Expected Response
1
2
3
4
5
{
"success": true,
"syncedData": ["preorder", "payment", "stock", "visit"],
"message": "Final synchronization completed. All data consistent in back office."
}
API Testing Coverage Recommendation
| No | Scenario | Endpoint | Method | Focus |
|---|---|---|---|---|
| 1 | Initial Sync | /api/sync/data | POST | Master data update |
| 2 | Pre Order Creation | /api/preorder/create | POST | Pricing & order |
| 3 | Payment Collection | /api/payment/collection | POST | Credit impact |
| 4 | Stock Movement | /api/stock/movement | POST | Inventory |
| 5 | Final Sync | /api/sync/final | POST | Data consistency |