Service Record Full (Create)

Creates a new service record and, optionally, its charge lines in a single call. The same rules the Service Import screen applies are enforced here.

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

{
  "Customer": "DAKTEST234",
  "ServiceLocation": "Main Plant",
  "EquipmentType": "30 Yard Open Top",
  "ServiceVendorName": "BEST BUY",
  "Schedule": "Weekly",
  "WeeklyInterval": 1,
  "Days": "M,R",
  "StartDate": "2026-09-01",
  "Service": "Empty & Return",
  "CommodityName": "#1 PREPARED (P)",
  "SiteReference": "30yd OT MSW",
  "ReasonCode": "NEWP",
  "Expenses": [
    {
      "ChargeDescription": "Monthly Service",
      "Vendor": "BEST BUY",
      "GLAccount": "TESTACC123",
      "ChargebackAccount": "Recycling Rebate",
      "ExpensePrice": 335.00,
      "ExpenseUOM": "FLAT",
      "ChargebackPrice": 420.00,
      "ChargebackUOM": "FLAT",
      "ApplyToService": "(ANY)",
      "Recurring": true
    }
  ],
  "ValidateOnly": false
}

Body Parameters

Parameter Description Required
Customer Customer Name or counterparty ID. REQUIRED
ServiceLocation Service location. Must belong to the Customer provided. REQUIRED
EquipmentType Equipment type name. REQUIRED
ServiceVendorName Hauler/Service Provider Name or counterparty ID. REQUIRED
Schedule Accepts On Call, Daily, Weekly or Monthly. REQUIRED
StartDate Schedule start date. REQUIRED
WeeklyInterval Number 1–25. IF WEEKLY
Days Comma separated day codes, no spaces. Accepts M, T, W, R, F, SA, SU. IF WEEKLY
DailyInterval Number 1–7. IF DAILY
TimesPerDay Number of services per day. IF DAILY
MonthlyInterval Number 1–6. IF MONTHLY
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
Department Department short name or ID. Defaults to the base department. OPTIONAL
Service Job type name, for example Empty & Return. OPTIONAL
CommodityName Commodity name or grade ID. OPTIONAL
SiteReference Site reference on the service record. OPTIONAL
EquipmentNo Equipment number. OPTIONAL
EquipmentCount Number of pieces of equipment. OPTIONAL
ExpirationDate Schedule end date. Leaving this out means the schedule does not expire. OPTIONAL
Instructions Dispatch instructions. OPTIONAL
RequestSentTo Email address the service request is sent to. OPTIONAL
WeightPerYard Weight per yard. OPTIONAL
PickupsPerMonth Expected pickups per month. OPTIONAL
TargetWeight Target weight. OPTIONAL
TargetWeightUOM Accepts LBS, KG, ST, MT, EA. OPTIONAL
CreateServiceJobs Generate service jobs from the schedule. Cannot be true when Schedule is On Call. OPTIONAL
Receiver Receiving account name or counterparty ID. OPTIONAL
DefaultRequestParty Default requested by party. OPTIONAL
BillingsheetNotes Notes shown on the billing sheet. OPTIONAL
UDF1 – UDF5 User defined fields 1 through 5. OPTIONAL
Expenses Array of charge lines. See Charge Line Fields below. OPTIONAL
ValidateOnly When true, the request is fully validated and any problems are returned, but nothing is saved. OPTIONAL

Charge Line Fields

Used by the Expenses array on both the create and update endpoints.

Field Description Required
ChargeDescription Description of the charge. REQUIRED
GLAccount Expense GL account number or name. Must be a Purchases, Expenses or Commission account. REQUIRED
ChargebackAccount Chargeback GL account number or name. Must be a Sales account. REQUIRED
Vendor Vendor Name or counterparty ID. Defaults to the service record's Service Vendor. OPTIONAL
ExpensePrice Expense price. OPTIONAL
ExpenseUOM Accepts FLAT, LBS, KG, ST, MT, EA, SERVICE. OPTIONAL
ChargebackPrice Price charged back to the customer. OPTIONAL
ChargebackUOM Same accepted values as ExpenseUOM. OPTIONAL
ApplyToService Job type this charge applies to, or (ANY) for all. OPTIONAL
Material Commodity name or grade ID. OPTIONAL
Taxable True or false. OPTIONAL
Recurring True or false. OPTIONAL
AdvanceBill True or false. OPTIONAL
ApplyFuelSurcharge True or false. OPTIONAL
IsTargetOverweightCharge True or false. OPTIONAL
BenchmarkWeight Benchmark weight. OPTIONAL
BenchmarkUOM Same accepted values as ExpenseUOM. OPTIONAL
ExpenseID Update only. Identifies an existing charge line to change or remove. OPTIONAL
IsDelete Update only. When true, removes the charge line identified by ExpenseID. OPTIONAL

Response Example

On success the new service record number is returned.

"104627"

If the request fails validation, the problems are returned together in a single message:

"ERRORS: [ServiceLocation]: Location does not match the Customer provided.
[Expenses row 1]: Invalid Chargeback Account (must be a SALES account)."
Note Send "ValidateOnly": true to check a payload before committing to it. The request is validated exactly as it would be on a real save, and returns VALID: no errors found. No changes were written. when it passes.

An active service record already using the same Customer, Service Location and Equipment Type is rejected as a duplicate, matching the warning shown by the Service Import screen.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.