POST
/
activitycodes
Create an activity code
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,
  "taxZeroRated": false,
  "taxOutOfScope": 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' 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 tax inclusive, otherwise tax exclusive. Only applicable in AU and UK regions.

Tax inclusive means: Amount exc. tax = Amount - Tax, Amount inc. tax = Amount.

Tax exclusive means: Amount exc. tax = Amount, Amount inc. tax = Amount + Tax.

Example:

false

taxExempt
boolean

True if the activity is exempt from tax.

This field is mutually exclusive with TaxZeroRated and TaxOutOfScope.

Example:

false

taxZeroRated
boolean

True if the activity is zero-rated for tax purposes. Only supported in UK regions.

This field is mutually exclusive with TaxOutOfScope and TaxExempt.

Example:

false

taxOutOfScope
boolean

True if the activity is out of scope for tax purposes. Only supported in UK regions.

This field is mutually exclusive with TaxZeroRated and TaxExempt.

Example:

false

Response

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