Record Costs and Split Them Across Cost Centers

Record a cost on a record, and optionally split it across cost centers.

Example use case

You receive a bill for a Booth Service and want to record the total or divide it between cost centers.

What you'll end up with

A saved cost on the Booth Service, with an allocation if you choose to send one.

Before you start

Have a workspace API key and identify a Booth Service you can edit. If you want to split the cost, confirm the cost centers in that workspace.

Good to know

Amounts are in the workspace currency. Enter numbers without currency symbols.

At a glance

Time to try

About 10 minutes

Effect on your data

Updates records

Endpoints

2

The runnable request immediately replaces the Booth Service's saved cost and allocation.

How it works

  1. Choose an existing Booth Service and an amount in your workspace currency.
  2. Send the amount to replace the saved total and allocation.
  3. To split the total, look up a cost center and send the complete breakdown instead.

Record the amount and allocation

The runnable example saves a single total in Step 2. Steps 1 and 3 show how to split the total if you need an allocation.

Step 1: Find the cost center for a split

Read the workspace's cost centers and choose the one that should receive part of the cost.

Manual example. This request is separate from the runnable example below.

curl -X GET "https://api.exhibitday.com/v1/references/cost_centers" -H "Authorization: Bearer YOUR_API_KEY"

Example response

[
  {
    "id": 12345,
    "name": "Marketing"
  }
]

Check: Use the selected cost center's id from your workspace. Use null for any share marked Not Specified.

Step 2: Record a single amount

Send cost with an amount to set the Booth Service total in your workspace currency.

curl -X PATCH "https://api.exhibitday.com/v1/events/booth_services" -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" --data-binary "{\"id\":12345,\"cost\":{\"amount\":125.50}}"

Example response

{
  "status_code": 200,
  "status": "OK",
  "message": "Booth Service updated.",
  "errors": []
}

Check: A successful update confirms the request was saved. A single total goes under Not Specified where cost centers are supported.

Step 3: Replace the amount with a split

Send the complete breakdown so ExhibitDay records the amount assigned to each cost center.

Manual example. This request is separate from the runnable example below.

curl -X PATCH "https://api.exhibitday.com/v1/events/booth_services" -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" --data-binary "{\"id\":12345,\"cost\":{\"amount\":1000,\"cost_center_breakdown\":[{\"cost_center_id\":12345,\"charge\":600},{\"cost_center_id\":null,\"charge\":400}]}}"

Example response

{
  "status_code": 200,
  "status": "OK",
  "message": "Booth Service updated.",
  "errors": []
}

Check: The charges add to 1,000. If you supply amount, it must equal the sum after rounding to cents.

Choose how to send the cost

To do thisWhat to send
Set only the totalSend cost as a number or as an object with amount. Both put the total under Not Specified where cost centers are supported.
Split the totalSend the complete cost_center_breakdown. The API adds the charges. If you also send amount, it must match the sum after rounding to cents. Charges must be nonnegative, except on a Misc. credit (see below), and stay within the endpoint's limits.
Keep the saved costOmit cost on PATCH.
Clear the saved costUse 0 or an empty breakdown. JSON null clears the cost unless $ignore_params_with_empty_values=true tells the update to ignore it. Blank input follows the endpoint's empty-value rules.

Try it

Before running the example

VariableWhat to put in itRequired?
YOUR_API_KEYReplace this placeholder in the example with your workspace API key.Yes
idReplace 12345 in the request with the corresponding ID you can edit.Yes
costThe sample uses 125.50. Replace it with the amount you want to save.Yes

Then copy the complete request example below in your language and run it when you are ready to save the cost.

Complete request examples

Code Samples
curl -X PATCH "https://api.exhibitday.com/v1/events/booth_services" -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d "{\"id\":12345,\"cost\":{\"amount\":125.50}}"

Example response

{
  "status_code": 200,
  "status": "OK",
  "message": "Booth Service updated.",
  "errors": []
}
Note: This is the response after saving 125.50 in the workspace currency. Use your own Booth Service ID and amount when you run the request.

Things to keep in mind

  • Use cost on records that support it. For an Event's Booth Reservation, use booth_reservation_cost on the Event update. The older cost_booth_reservation is a read-only summary.
  • A readable zero returns a cost object with amount 0. Check the record when the API returns null before treating the amount as zero.
  • For Annual Miscellaneous Expenses, the breakdown applies to actual costs. The planned_amount is a separate budget estimate.
  • For Assets, send only an amount.
  • A Misc. Expense or Credit marked as a credit reads back with a negative amount and negative charges. Send either the positive values or the same negative values: both record the same credit. An expense refuses negative values.
  • You can send a cost back exactly as you read it. Each breakdown line's cost_center name is read-only: the API accepts it, ignores it and saves the line by its cost_center_id. If the name you send doesn't match that cost center's current name, the response carries a warning that explains what was saved.
  • If a breakdown names the same cost center more than once, its charges are combined into one share.
  • If you send older fields with cost, make sure both describe the same amount and allocation.
  • Update payment fields separately where supported. Adding an Invoice Attachment leaves the saved cost and payment status as they were.