The Cost Center Allocation object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

status string

Default: draft

main_cost_center string required
valid_from string required
company string required
The Cost Center Allocation object
{
  "id": "cost-center-allocation_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "main_cost_center": "main_cost_center_example",
  "valid_from": "valid_from_example",
  "company": "Example Corp"
}
GET /api/accounts/cost-center-allocation/{id}

Retrieve a cost center allocation

Retrieves the details of an existing cost center allocation. Supply the unique cost center allocation ID that was returned from a previous request.

Path parameters

id string required

The identifier of the cost center allocation to retrieve.

Returns

Returns the cost center allocation object if a valid identifier was provided.

GET /api/accounts/cost-center-allocation/{id}
curl https://api.overplane.dev/api/accounts/cost-center-allocation/cost-center-allocation_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "cost-center-allocation_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "main_cost_center": "main_cost_center_example",
  "valid_from": "valid_from_example",
  "company": "Example Corp"
}
GET /api/accounts/cost-center-allocation

List all cost center allocations

Returns a list of cost center allocations. The results are sorted by creation date, with the most recently created appearing first.

Query parameters

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of cost center allocation objects.

GET /api/accounts/cost-center-allocation
curl https://api.overplane.dev/api/accounts/cost-center-allocation \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "cost-center-allocation_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "status": "draft",
      "main_cost_center": "main_cost_center_example",
      "valid_from": "valid_from_example",
      "company": "Example Corp"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/cost-center-allocation

Create a cost center allocation

Creates a new cost center allocation object.

Body parameters

status string

Default: draft

main_cost_center string required
valid_from string required
company string required

Returns

Returns the newly created cost center allocation object if the call succeeded.

POST /api/accounts/cost-center-allocation
curl https://api.overplane.dev/api/accounts/cost-center-allocation \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"main_cost_center":"main_cost_center_example","valid_from":"valid_from_example","company":"Example Corp"}'
Response
{
  "id": "cost-center-allocation_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "main_cost_center": "main_cost_center_example",
  "valid_from": "valid_from_example",
  "company": "Example Corp"
}
PATCH /api/accounts/cost-center-allocation/{id}

Update a cost center allocation

Updates the specified cost center allocation by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the cost center allocation to update.

Body parameters

status string

Default: draft

main_cost_center string
valid_from string
company string

Returns

Returns the updated cost center allocation object.

PATCH /api/accounts/cost-center-allocation/{id}
curl https://api.overplane.dev/api/accounts/cost-center-allocation/cost-center-allocation_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"status":"draft","main_cost_center":"main_cost_center_example"}'
Response
{
  "id": "cost-center-allocation_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "main_cost_center": "main_cost_center_example",
  "valid_from": "valid_from_example",
  "company": "Example Corp"
}
DELETE /api/accounts/cost-center-allocation/{id}

Delete a cost center allocation

Permanently deletes a cost center allocation. This cannot be undone.

Path parameters

id string required

The identifier of the cost center allocation to delete.

Returns

Returns a confirmation that the cost center allocation has been deleted.

DELETE /api/accounts/cost-center-allocation/{id}
curl https://api.overplane.dev/api/accounts/cost-center-allocation/cost-center-allocation_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "cost-center-allocation_abc123",
  "deleted": true
}
POST /api/accounts/cost-center-allocation/{id}/submit

Submit a cost center allocation

Submits a draft cost center allocation, transitioning its status from draft to submitted.

Path parameters

id string required

The identifier of the cost center allocation to act on.

Returns

Returns the cost center allocation object with updated status.

POST /api/accounts/cost-center-allocation/{id}/submit
curl https://api.overplane.dev/api/accounts/cost-center-allocation/cost-center-allocation_abc123/submit \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "cost-center-allocation_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "main_cost_center": "main_cost_center_example",
  "valid_from": "valid_from_example",
  "company": "Example Corp"
}
POST /api/accounts/cost-center-allocation/{id}/cancel

Cancel a cost center allocation

Cancels a submitted cost center allocation, transitioning its status to cancelled.

Path parameters

id string required

The identifier of the cost center allocation to act on.

Returns

Returns the cost center allocation object with updated status.

POST /api/accounts/cost-center-allocation/{id}/cancel
curl https://api.overplane.dev/api/accounts/cost-center-allocation/cost-center-allocation_abc123/cancel \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "cost-center-allocation_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "main_cost_center": "main_cost_center_example",
  "valid_from": "valid_from_example",
  "company": "Example Corp"
}

Line items

Child objects that belong to this cost center allocation. These are accessed via the parent's ID.

Cost Center Allocation Percentage

Attributes

idx integer
cost_center_allocation_id string required
cost_center string required
percentage number required

Endpoints

GET /api/accounts/cost-center-allocation-percentage?parent_id={id}
POST /api/accounts/cost-center-allocation-percentage
PATCH /api/accounts/cost-center-allocation-percentage/{id}
DELETE /api/accounts/cost-center-allocation-percentage/{id}
POST /api/accounts/cost-center-allocation-percentage/reorder
Cost Center Allocation Percentage object
{
  "id": "cost-center-allocation-percentage_abc123",
  "idx": 1,
  "cost_center_allocation_id": "cost_center_allocation_id_example",
  "cost_center": "cost_center_example",
  "percentage": 0
}