Skip to main content
POST
/
coa
/
api
/
cost-allocations
Create Cost Allocation
curl --request POST \
  --url https://api.meetcampfire.com/coa/api/cost-allocations \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "lines": [
    {
      "allocation": 123,
      "percentage": 0,
      "account": 123,
      "department": 123
    }
  ],
  "name": "<string>",
  "number": "<string>",
  "account": 123
}'
{
  "id": 123,
  "lines": [
    {
      "id": 123,
      "account_name": "<string>",
      "department_name": "<string>",
      "tags": [
        {
          "id": 123,
          "group_name": "<string>",
          "parent_name": "<string>",
          "parent": 123,
          "is_deleted": false,
          "deleted_at": "2023-11-07T05:31:56Z",
          "name": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "last_modified_at": "2023-11-07T05:31:56Z",
          "customer": 123,
          "group": 123
        }
      ],
      "percentage": 0,
      "created_at": "2023-11-07T05:31:56Z",
      "last_modified_at": "2023-11-07T05:31:56Z",
      "customer": 123,
      "account": 123,
      "department": 123
    }
  ],
  "line_count": 123,
  "is_deleted": false,
  "deleted_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "number": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "last_modified_at": "2023-11-07T05:31:56Z",
  "customer": 123,
  "account": 123
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Body

lines
object[]
required
name
string
required
Maximum length: 250
number
string | null
Maximum length: 120
account
integer | null

Response

201 - application/json
id
integer
required
lines
object[]
required
line_count
integer
required
is_deleted
boolean
default:false
required
deleted_at
string<date-time> | null
required
name
string
required
Maximum length: 250
created_at
string<date-time>
required
last_modified_at
string<date-time>
required
customer
integer
required
number
string | null
Maximum length: 120
account
integer | null
I