Service Record Full (Update)

Pushes changes to an existing service record and its charge lines. Only the fields you send are changed — anything left out is left exactly as it is.

Authentication

All three endpoints authenticate the same way as the rest of the cieTrade.net API. Every request needs both of the following:

  • An authorized UserID, passed as a query string parameter on the request URL — this is the user's cieTrade.net login email.
  • A Bearer Token in the Authorization header of your tool or code call. The token is found under Settings → Integration → Api Token.

The user must have Can Access cieTrade API checked under Settings → Users & Roles, and must have an email address on their user record — the create and update endpoints record that user against every change they make.

Note On the two write endpoints, UserID stays on the query string. Everything else is sent in the JSON request body.

Request Example

{
  "ServiceID": 813,
  "ServiceVendorName": "BEST BUY",
  "SiteReference": "30yd OT MSW",
  "ExpirationDate": "2026-12-31",
  "ReasonCode": "LCB",
  "Expenses": [
    { "ExpenseID": 502, "ExpensePrice": 125.50, "ChargebackPrice": 175.00 },
    { "ExpenseID": 503, "ChargeDescription": "Monthly Service Fee" },
    { "ExpenseID": 597, "IsDelete": true }
  ],
  "ValidateOnly": false
}

Body Parameters

Parameter Description Required
ServiceID The Service ID of the record being updated. REQUIRED
ReasonCode Reason code name. Required when the Reason Code workflow is enabled for your database. IF ENABLED
ReasonDescription Free text description accompanying the reason code. OPTIONAL
ServiceVendorName Hauler/Service Provider Name or counterparty ID. OPTIONAL
CommodityName Commodity name or grade ID. OPTIONAL
SiteReference Site reference on the service record. OPTIONAL
EquipmentNo Equipment number. OPTIONAL
Schedule Accepts On Call, Daily, Weekly or Monthly. Sending this re-validates the whole schedule. OPTIONAL
WeeklyInterval Number 1–25. OPTIONAL
Days Comma separated day codes, no spaces. Accepts M, T, W, R, F, SA, SU. OPTIONAL
DailyInterval Number 1–7. OPTIONAL
TimesPerDay Number of services per day. OPTIONAL
MonthlyInterval Number 1–6. OPTIONAL
ExpirationDate Schedule end date. OPTIONAL
ClearExpirationDate Set to true to remove the end date entirely, so the schedule no longer expires. OPTIONAL
UDF1 – UDF5 User defined fields 1 through 5. OPTIONAL
Expenses Array of charge lines to add, change or remove. See Charge Line Fields. OPTIONAL
ValidateOnly When true, the request is fully validated and any problems are returned, but nothing is saved. OPTIONAL

Changing Charge Lines

Charge lines are identified by ExpenseID, which is returned by Service Records (Full) as expense_id. What happens to a line depends on what you send:

Sent Result
ExpenseID, no IsDelete Changes only the fields included on that line. Fields left out keep their current values.
ExpenseID with IsDelete: true Removes that charge line from the service record.
No ExpenseID Adds a new charge line. Description, GL Account and Chargeback Account are all required.

Response Example

On success the Service ID that was updated is returned.

"813"
Note Charge lines you do not mention are left untouched. There is no need to resend the full set of lines in order to change one of them.

An ExpenseID that belongs to a different service record is rejected, so a mistaken ID cannot alter another record's charges.

A request for a Service ID that does not exist returns ERRORS: [ServiceID]: Service record ... was not found.

Related: Service-Records and Service-Record Expenses cover the original read-only endpoints. See Getting Started for API tokens and user permissions.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.