PreBill.Add
Adds a pre-bill charge line to a specific photocopy stop. Rows are stored in CWorkOrderPreBill.
Try it in Swagger
Endpoint
- Method:
POST
- Route:
PreBill/{workOrder}/{facilityLineItem}
- Authentication:
Authorize
Request Schema
| Header |
Required |
Notes |
X-Api-Key |
Required when tenant is not resolved by subdomain |
Resolves the tenant/customer database. |
Authorization: Bearer {token} |
Required for authorized endpoints |
Get a token from Auth/Token, Session/Create, or Employee/SignIn. |
Route Parameters
| Field |
Type |
Required |
Notes |
workOrder |
string |
Yes |
Photocopy work order. |
facilityLineItem |
int |
Yes |
Stop identifier (CWorkOrderFacility.LineItem). |
JSON Body
Body type: PreBillRequestDto
| Field |
Type |
Required |
Max Length |
Notes |
title |
string |
Yes |
100 |
Charge description. |
incomeAccountCode |
string |
Yes |
7 |
Income account / GL code from IncomeAccount. |
serverCode |
string |
Yes |
12 |
Employee code from Employee/GetAll. |
flatAmount |
decimal |
No |
|
Flat charge amount. Defaults to 0. |
flatRate |
decimal |
No |
|
Per-unit rate. Defaults to 0. |
units |
decimal |
No |
|
Number of units. Must be zero or greater. Defaults to 0. |
totalAmount |
decimal |
No |
|
Stored total. When omitted, calculated as flatAmount + (flatRate * units). |
taxable |
bool |
No |
|
Defaults to false. |
noCharge |
bool |
No |
|
Defaults to false. |
billType |
string |
Yes |
|
One of none, pages, xrays, witnessFee, serviceFee, checkCharge, feesAdvanced, extra1, extra2, extra3. |
Request Sample
{
"title": "Bate Stamping",
"incomeAccountCode": "4000050",
"serverCode": "NCUR",
"flatAmount": 0.00,
"flatRate": 0.02,
"units": 5,
"totalAmount": 0.10,
"taxable": true,
"noCharge": false,
"billType": "pages"
}
Expected Response Schema
Status Codes
| Status |
Notes |
200 OK |
Returned by the controller for this operation. |
400 Bad Request |
Missing fields, unknown income account, unknown employee, or invalid bill type. Returns a ProblemDetails with errorCode ValidationError. |
404 Not Found |
The work order or stop does not exist. Returns a ProblemDetails with errorCode NotFound. |
Success Body
Response type: PreBillCreatedDto
| Field |
Type |
Notes |
lineItem |
int |
Created pre-bill identifier (CWorkOrderPreBill.LineItem). Use this for edit or delete. |
workOrder |
string |
Work order stored on the record. |
facilityLineItem |
int |
Stop / facility line item. |
Response Sample
{
"lineItem": 771,
"workOrder": "646982",
"facilityLineItem": 2646058
}
Error Body
{
"title": "Validation failed.",
"status": 400,
"detail": "Invalid request data.",
"errorCode": "ValidationError"
}
{
"title": "Resource not found.",
"status": 404,
"detail": "Work order or stop not found.",
"errorCode": "NotFound"
}