RFID Production API

Bridge between SoftServe Business Central & Next RFID Production Monitoring System. Manage bundle-wise details, SMV planning vs actual, and sync operations.

JWT Bearer Auth MySQL Backend RESTful / JSON IsSynced Flag
Authentication flow — Obtain access token via /token endpoint (password grant). Use Authorization: Bearer {token} for all RFID endpoints.
Change password: /api/SecurityHash/ChangePassword
All RFID endpoints require specific roles: Admin or User (see each endpoint). Token must be included in request header.
POST /api/RFID/PostBundleData Roles: Admin, User

Inserts bundle-wise production details into rfid_bundlewisedetails. Creates new record with IsSynced=0.

Request Body (application/json)
FieldTypeDescription
PONOstringPurchase order number
StylestringGarment style code
CutNostringCut number
BundleNointBundle identifier
GarmentTypestringTop / Bottom etc.
ColourstringColor code
SizestringSize variant
LayerstringLayer identifier
MarkerstringMarker code
ShadestringShade grade
BundleQtyintQuantity in bundle
ItemNostringItem number
DeliveryDatedateExpected delivery (YYYY-MM-DD)
TransactionDatedateTransaction date
StickerFromintStarting sticker range
StickerTointEnding sticker range
LotNostringLot number
OrderQtystringOrder quantity
DeliveryNostringDelivery number
Example Request
POST https://www.api-nextmfg.com/api/RFID/PostBundleData
Authorization: Bearer {access_token}
Content-Type: application/json
{
  "PONO": "NMLW039546",
  "Style": "NGH1007",
  "CutNo": "8954",
  "BundleNo": 304,
  "GarmentType": "Top",
  "Colour": "WHITE",
  "Size": "3MTH",
  "Layer": "B",
  "Marker": "L",
  "Shade": "A",
  "BundleQty": 30,
  "ItemNo": "12345",
  "DeliveryDate": "2024-01-09",
  "TransactionDate": "2023-12-21",
  "StickerFrom": 51,
  "StickerTo": 80,
  "LotNo": "LOT-A",
  "OrderQty": "500",
  "DeliveryNo": "DN001"
}
Response (200 OK): "Data saved successfully!"
POST /api/RFID/PostSynced Role: Admin

Updates the IsSynced flag to 1 for a specific bundle record identified by RecID (primary key). Used after successful external sync.

Request Body (raw string)
ParameterTypeDescription
recIDstring (JSON string body)Record ID (RecID) of bundle entry
POST https://www.api-nextmfg.com/api/RFID/PostSynced
Authorization: Bearer {admin_token}
Content-Type: application/json
"RFID-BUNDLE-1024"
Success: "Successfully marked as synced!"
POST /api/RFID/PostSMVData Roles: Admin, User

Store SMV (Standard Minute Value) planned vs actual for cutting, sewing, finishing, packing, etc.

Key SMV fields (subset)
FieldDescription
Style, Plant, Line, GarmentTypeProduction context
CuttingSMV_Plan, SewingSMV_Plan, ...Planned SMV values (decimal)
CuttingSMV_Actual, SewingSMV_Actual, ...Actual SMV recorded (decimal)
POST /api/RFID/PostSMVData
{
  "Style": "NGH1007",
  "Plant": "PlantA",
  "Line": "L2",
  "GarmentType": "Top",
  "CuttingSMV_Plan": 1.25,
  "SewingSMV_Plan": 4.5,
  "PackingSMV_Plan": 0.85,
  "CuttingSMV_Actual": 1.3,
  "SewingSMV_Actual": 4.45
  // ... other SMV fields optional but accepted
}
Response: "Data saved successfully!"
GET /api/RFID/GetAllBundleData Role: Admin

Retrieves all bundle records where IsSynced = 0 (pending sync). Ideal for data synchronization jobs.

Response Example
[
  {
    "RecID": "101",
    "PONO": "PO123",
    "Style": "STYLE-X",
    "BundleNo": 42,
    "GarmentType": "Shirt",
    "BundleQty": 150,
    "IsSynced": false,
    ...
  }
]

Returns 404 NotFound if no pending bundle entries.

GET /api/RFID/GetAllSMVData Role: Admin

Returns all SMV records (planned & actual metrics) for analysis and reporting.

Sample SMV object: { "Style":"NGH1007", "CuttingSMV_Plan":1.2, "SewingSMV_Actual":4.3, ... }
Example cURL
curl -X GET "https://www.api-nextmfg.com/api/RFID/GetAllSMVData" -H "Authorization: Bearer {token}"

Token endpoint

POST /token (x-www-form-urlencoded)
Body: grant_type=password&username=user&password=pass
Returns access_token, expires_in, token_type=bearer.

Change Password

POST /api/SecurityHash/ChangePassword (Bearer required)
Body: { "OldPassword": "...", "NewPassword": "...", "ConfirmPassword": "..." }

Base URL

https://www.api-nextmfg.com
All endpoints relative to this base.