The Cost Center Allocation object
Attributes
Unique identifier for the object.
ISO 8601 timestamp of when the object was created.
ISO 8601 timestamp of when the object was last updated.
Default: draft
{
"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"
} /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
The identifier of the cost center allocation to retrieve.
Returns
Returns the cost center allocation object if a valid identifier was provided.
curl https://api.overplane.dev/api/accounts/cost-center-allocation/cost-center-allocation_abc123 \
-H "Authorization: Bearer sk_test_..." {
"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"
} /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
Maximum number of objects to return. Default: 20.
Number of objects to skip for pagination. Default: 0.
Returns
A paginated list of cost center allocation objects.
curl https://api.overplane.dev/api/accounts/cost-center-allocation \
-H "Authorization: Bearer sk_test_..." {
"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
} /api/accounts/cost-center-allocation Create a cost center allocation
Creates a new cost center allocation object.
Body parameters
Default: draft
Returns
Returns the newly created cost center allocation object if the call succeeded.
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"}' {
"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"
} /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
The identifier of the cost center allocation to update.
Body parameters
Default: draft
Returns
Returns the updated cost center allocation object.
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"}' {
"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"
} /api/accounts/cost-center-allocation/{id} Delete a cost center allocation
Permanently deletes a cost center allocation. This cannot be undone.
Path parameters
The identifier of the cost center allocation to delete.
Returns
Returns a confirmation that the cost center allocation has been deleted.
curl https://api.overplane.dev/api/accounts/cost-center-allocation/cost-center-allocation_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "cost-center-allocation_abc123",
"deleted": true
} /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
The identifier of the cost center allocation to act on.
Returns
Returns the cost center allocation object with updated status.
curl https://api.overplane.dev/api/accounts/cost-center-allocation/cost-center-allocation_abc123/submit \
-H "Authorization: Bearer sk_test_..." \
-X POST {
"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"
} /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
The identifier of the cost center allocation to act on.
Returns
Returns the cost center allocation object with updated status.
curl https://api.overplane.dev/api/accounts/cost-center-allocation/cost-center-allocation_abc123/cancel \
-H "Authorization: Bearer sk_test_..." \
-X POST {
"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
Endpoints
/api/accounts/cost-center-allocation-percentage?parent_id={id} /api/accounts/cost-center-allocation-percentage /api/accounts/cost-center-allocation-percentage/{id} /api/accounts/cost-center-allocation-percentage/{id} /api/accounts/cost-center-allocation-percentage/reorder {
"id": "cost-center-allocation-percentage_abc123",
"idx": 1,
"cost_center_allocation_id": "cost_center_allocation_id_example",
"cost_center": "cost_center_example",
"percentage": 0
}