|
The POST method will be used to add a Part to an existing Repair Order. This includes the ability to add Fluid Management to an RO, for the purpose of integrating with Fluid Management systems.
POST Method
https://api.karmak.io/api/unity/{version}/unityapi/service/repairorder/fluids
Restrictions
- Repair Order must be a valid, open repair order
- Status must = Open, or a status linked to Open (as shown in SVO92200 Repair Order Status Maintenance)
- R/O must exist in the branch that was passed in the API request
- Repair Order Task must be a valid, open repair order task
- Task must = Open, or a status linked to Open (as shown in SVO92210 Repair Task Status)
- Task must exist on the R/O that was passed in the API request
- Part must be valid, active part number
- Supplier must be valid supplier; part number must exist in that Supplier
- Part must exist in the branch that was passed in the API request
- The following part types are not allowed
- Part Type = Exchange
- Part Type = Core
- Kit Type = Kit
- Kit Type = Assembly
- Serial Stock Type = Point-of-Sale/Stocking not allowed.
- If a part with an invalid part type is passed, a message will be returned stating that the part type is not allowed
- The requested quantity will be pulled from inventory when added to the R/O, and written to Parts Transaction (set application = R/O Detail Parts)
- The part will be priced at the customer’s calculated price
- If Override Price is passed in, use override price
- If User Permissions do not permit override price, customer’s calculated price will be used, and a message will be returned that price override was not allowed
- If Override Price is passed in, use override price
- The Action Flag on the R/O will default to Sale.
- If the part requested contains insufficient quantity to fill the requested quantity, set action to Sale - Force Fill
- If no Inside Salesperson is passed in, default to user associated with API user
- If Inside Salesperson is passed, it must be a valid Fusion user
- Technician is not required, but if passed must be a valid Fusion technician number
API Fields
JSON API Field | Description | Data Type | Required? | Field Length/Format | Fusion Default (will use if not passed in) |
---|---|---|---|---|---|
Branch | Branch associated with Repair Order to which parts will be added PLEASE NOTE This is the BranchCode | string | Required | ||
RepairOrder | Repair Order number to which parts will be added | int | Required | ||
Task | Task on Repair Order to which parts will be added | short | Required | ||
PartNumber | Part number being added to the Repair Order | string | Required | Up to 50 alphanumeric characters | |
Supplier | Supplier of part number being added to the Repair Order | string | Required | ||
Quantity | Quantity dispensed from the machine; can be whole number or decimal, not to exceed tenths place (ex: 7.4) | decimal | Required | Up to 10 numeric characters | |
Rounding | Determines how the Quantity should be rounded U = Always round up to nearest whole number (default) D = Always round down to nearest whole number (truncate partial quantity passed; ie, 7.4 becomes 7) | string | Up to 1 alpha character; will default to U if no character is passed | U - always round up to nearest whole number | |
OverridePrice | Will override the customer’s calculated price. If Fusion user permissions do not permit override price, customer’s calculated price will be used. | decimal | Up to 10 numeric digits | ||
InsideSalesperson | Salesperson for the repair order | string | Up to 50 alphanumeric characters | Will default to user associated with API user | |
TechnicianNumber | Technician requesting the part for the repair order | integer | Up to 10 numeric characters |
Sample POST Request
[
{
"Branch" : "01",
"RepairOrder": 190657,
"Task" : 1,
"PartNumber": "2174733676",
"Supplier" : "LAR",
"Rounding" : "D",
"OverridePrice": 19.99,
"Quantity": "3.9"
},
{
"Branch" : "JBE1",
"RepairOrder": 528,
"Task" : 1,
"PartNumber": "1029-1",
"Supplier" : "AA-1",
"Rounding" : "D",
"Quantity": "2.5"
},
{
"Branch" : "JBE1",
"RepairOrder": 528,
"Task" : 1,
"PartNumber": "1029-1",
"Supplier" : "AA-1",
"Rounding" : "D",
"Quantity": "1.3"
}
]
Response Code (200 OK)
[
{
"SystemId": "34069",
"Branch": "01",
"RepairOrder": 190657,
"Task": 1,
"FillingBranch": "01",
"Supplier": "LAR",
"PartNumber": "2174733676",
"Status": "Success",
"Message": "Selected Override Price of 19.99 is outside the maximum price change percentage allowed. Part 2174733676."
},
{
"SystemId": "34070",
"Branch": "JBE1",
"RepairOrder": 528,
"Task": 1,
"FillingBranch": "JBE1",
"Supplier": "AA-1",
"PartNumber": "1029-1",
"Status": "Success",
"Message": ""
},
{
"SystemId": "34071",
"Branch": "JBE1",
"RepairOrder": 528,
"Task": 1,
"FillingBranch": "JBE1",
"Supplier": "AA-1",
"PartNumber": "1029-1",
"Status": "Success",
"Message": ""
}
]