POST
/
activitycodes
curl --request POST \
  --url https://api.smokeball.com/activitycodes \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json-patch+json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "updatedByUserId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
  "type": 0,
  "description": "Review contract",
  "code": "RC",
  "isBillable": false,
  "rateType": 0,
  "rate": 23.21,
  "quantity": 0.6,
  "taxInclusive": false,
  "taxExempt": false
}'
{
  "id": "<string>",
  "href": "<string>",
  "relation": "<string>",
  "method": "GET"
}

Authorizations

x-api-key
string
header
required
Authorization
string
header
required

Body

updatedByUserId
string | null

Unique identifier of the user updating the activity.

This field is reserved for server-to-server operations.

Example:

"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8"

type
enum<integer>

Type of the activity.

Possible values: Fixed = '0', Time = '1', Expense = '2'

Available options:
0,
1,
2
Example:

0

description
string | null

Description of the activity.

Example:

"Review contract"

code
string | null

Code of the activity. Cannot be longer than 20 characters.

Example:

"RC"

isBillable
boolean

True if the activity is billable.

Example:

false

rateType
enum<integer>

The activity rate type.

Possible values: UseDefaultStaffRate = '0', OverrideRateForAllStaff = '1', OverrideRatePerStaff = '2'

Available options:
0,
1,
2
Example:

0

rate
number | null

Rate of the activity in dollars.

If set, rateType must be OverrideRateForAllStaff

Example:

23.21

quantity
number | null

Quantity of the activity. This is the default value used when creating an expense or time-based fee.

For type 'Expense', this field represents the quantity of the expense in units. For type 'Time', this field represents the duration of in minutes, divided by 100, e.g. for 1 hour duration, quantity is 0.6, which is 60 minutes divided by 100.

Applies only for 'Time' and 'Expense' types. Not applicable for activity type 'Fixed'.

Example:

0.6

taxInclusive
boolean

If true, the amount is GST inclusive, otherwise GST exclusive. Only applicable in AU.

GST inclusive means: Amount exc. GST = Amount - GST, Amount inc. GST = Amount.

GST exclusive means: Amount exc. GST = Amount, Amount inc. GST = Amount + GST.

Example:

false

taxExempt
boolean

Sets tax rate to 0 for the entry (e.g. expense).

Example:

false

Response

202
application/json
When request is accepted. Returns a hypermedia 'Link' object of the activity code to be created.
id
string | null
href
string | null
relation
string | null
method
string | null
default:GET