# Creating a new Project Accounting Records

Creates a single or multiple project accounting records.

This endpoint returns structured Project Accounting Records objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the project_accounting_records top-level JSON key.
Please see our Response Format section for more information.

Endpoint: POST /project_accounting_records
Version: 1.0.0

## Query parameters:

  - `include` (string)
    Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.
- external_references (ExternalReference) - Includes references to external integrations for this object.
- role (Role) - Includes the ID of the role associated with the record.
- story (Story) - Includes the ID of the task related to the record.
- user (User) - Includes the ID(s) of user(s) associated with the record
                    (e.g. who created the record, who the record was created for, etc.).
- workspace (Workspace) - Includes the ID of the project the record belongs to.

## Request fields (application/json):

  - `project_accounting_record` (object)
    A single project accounting record and its attributes.

  - `project_accounting_record.workspace_id` (integer, required)
    The ID of the project the record belongs to.

  - `project_accounting_record.start_date` (string, required)
    The date the accounting period begins,
        in ISO8601 format (e.g. 2014-06-25). The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `project_accounting_record.end_date` (string, required)
    The date the accounting period ends,
        in ISO8601 format (e.g. 2014-02-25). The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `project_accounting_record.currency` (string, required)
    The currency of the record. Valid values are
        [ISO codes of currencies supported by Kantata OX](https://mavenlink.zendesk.com/hc/en-us/articles/360041576473).

  - `project_accounting_record.type` (string)
    The type of project accounting record:
* Baseline
* Earned Value
* Earned Value Forecasting
* Forecasting
* Recognition (Default)

If not specified, a Recognition record is created by default.

Note: Make sure to include the spaces in Earned Value and Earned Value Forecasting
when making a request.

  - `project_accounting_record.amount` (number)
    The amount being calculated for baseline, forecasting,
        earned value, earned value forecasting, or revenue recognition within the specified accounting period,
        up to 2 decimal places (e.g. 575.75).
        Values can also be negative (e.g. -96.75).

  - `project_accounting_record.amount_to_date` (number)
    The total amount spent to date
        (for all accounting periods), up to 2 decimal places (e.g. 1252.33).
        Values can also be negative (e.g. -83.33).

  - `project_accounting_record.budget` (number)
    The budget of the project or task,
        up to 2 decimal places (e.g. 2457.52). Values can also be negative (e.g. -350.52).

  - `project_accounting_record.contract_date` (string)
    This can be a contract's start or end date in ISO8601 format,
        or any other date a user prefers. The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `project_accounting_record.cost` (number)
    The cost of the project or task within the specified accounting period,
        up to 2 decimal places (e.g. 3003.56). Values can also be negative (e.g. -350.72).

  - `project_accounting_record.cost_eac` (number)
    The
        [estimated cost](https://mavenlink.zendesk.com/hc/en-us/articles/360004619334-Project-Completion-Estimates)
        of the project or task when it is completed, up to 2 decimal places (e.g. 8326.55).
        Values can also be negative (e.g. -426.55).
        This updates during the course of a project or task, as costs are logged.

  - `project_accounting_record.description` (string)
    This can be a brief description of the record,
        or anything a user prefers.

  - `project_accounting_record.fees` (number)
    The fees from the specified accounting period,
        up to 2 decimal places (e.g. 324.53). Values can also be negative (e.g. -41.53).

  - `project_accounting_record.hours` (number)
    The [hours](https://mavenlink.zendesk.com/hc/en-us/articles/360059325413)
        spent within the specified accounting period, up to 2 decimal places (e.g. 23.25).
        Values can also be negative (e.g. -7.25).

  - `project_accounting_record.hours_eac` (number)
    The
        [estimated hours](https://mavenlink.zendesk.com/hc/en-us/articles/360004619334-Project-Completion-Estimates)
        for the project or task when it is completed, up to 2 decimal places (e.g. 82.25).
        Values can also be negative (e.g. -22.25).
        This updates during the course of a project or task, as hours are logged.

  - `project_accounting_record.hours_etc` (number)
    The
        [estimated hours](https://mavenlink.zendesk.com/hc/en-us/articles/360004619334-Project-Completion-Estimates)
        until completion (hours_eac - hours) of the project or task, up to two decimal places (e.g. 53.25).
        Values can also be negative (e.g. -10.25).

  - `project_accounting_record.total_estimated_hours` (number)
    The hours initially estimated for the project or task,
        up to 2 decimal places (e.g. 83.50). Values can also be negative (e.g. -12.25).
        This value does not change over the course of a project.

  - `project_accounting_record.total_hours_to_date` (number)
    The total hours logged to date for the project or task,
        up to 2 decimal places (e.g. 32.25). Values can also be negative (e.g. -5.75).

  - `project_accounting_record.labor_type` (string)
    The type of cost associated with the record.
        Valid values are Labor or Non-Labor.

  - `project_accounting_record.notes` (string)
    This can be any extra information to note about the record.

  - `project_accounting_record.percent_complete` (number)
    How much of the project or task is complete
        in decimal format, up to 2 places (e.g. 0.75). Values can also be negative (e.g. -.25).

  - `project_accounting_record.role_id` (integer)
    The ID of the role associated with the record.

  - `project_accounting_record.service_type` (string)
    This can be an organization-specific category of services
        that is related to the record (e.g. Branding, Campaigns, Photography, etc.).

  - `project_accounting_record.status` (string)
    The status of the record.
        Valid values: Draft, Pending Approval, Approved, Cancelled.

  - `project_accounting_record.story_id` (integer)
    The ID of the task related to the record.

  - `project_accounting_record.user_id` (integer)
    The ID of the user associated with the record
        (e.g. who created the record, who the record was created for, etc.).

  - `project_accounting_record.external_reference` (object)
    Typically populated programmatically by a third party system via an integration, this is an optional
object that holds data from an external system. It connects objects in an external system with objects in
Kantata OX (for example, to connect a Jira issue to a Kantata OX Project).

  - `project_accounting_record.external_reference.service_name` (string, required)
    The provider name of the integration. If you are adding multiple external references to the same object, the service_name must be unique.

  - `project_accounting_record.external_reference.service_model` (string, required)
    The object type of the external object this external reference belongs to.

  - `project_accounting_record.external_reference.service_model_ref` (string, required)
    The object ID of the external object this external reference belongs to.

  - `project_accounting_record.external_reference.status` (string)
    The status of the integration. Options are successful, pending,  or failed.

  - `project_accounting_record.external_reference.external_message` (string)
    The message on the external object.

  - `project_accounting_record.external_reference.external_link` (string)
    The link to the external object.

  - `project_accounting_record.external_reference.external_status` (string)
    The status of the external object in the external system.

  - `project_accounting_record.external_reference.locked` (boolean)
    Whether the subject is locked.

  - `project_accounting_records` (array)
    Multiple project accounting records and their attributes in an array.

  - `project_accounting_records.workspace_id` (integer, required)
    The ID of the project the record belongs to.

  - `project_accounting_records.start_date` (string, required)
    The date the accounting period begins,
        in ISO8601 format (e.g. 2014-06-25). The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `project_accounting_records.end_date` (string, required)
    The date the accounting period ends,
        in ISO8601 format (e.g. 2014-02-25). The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `project_accounting_records.currency` (string, required)
    The currency of the record. Valid values are
        [ISO codes of currencies supported by Kantata OX](https://mavenlink.zendesk.com/hc/en-us/articles/360041576473).

  - `project_accounting_records.type` (string)
    The type of project accounting record:
* Baseline
* Earned Value
* Earned Value Forecasting
* Forecasting
* Recognition (Default)

If not specified, a Recognition record is created by default.

Note: Make sure to include the spaces in Earned Value and Earned Value Forecasting
when making a request.

  - `project_accounting_records.amount` (number)
    The amount being calculated for baseline, forecasting,
        earned value, earned value forecasting, or revenue recognition within the specified accounting period,
        up to 2 decimal places (e.g. 575.75).
        Values can also be negative (e.g. -96.75).

  - `project_accounting_records.amount_to_date` (number)
    The total amount spent to date
        (for all accounting periods), up to 2 decimal places (e.g. 1252.33).
        Values can also be negative (e.g. -83.33).

  - `project_accounting_records.budget` (number)
    The budget of the project or task,
        up to 2 decimal places (e.g. 2457.52). Values can also be negative (e.g. -350.52).

  - `project_accounting_records.contract_date` (string)
    This can be a contract's start or end date in ISO8601 format,
        or any other date a user prefers. The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `project_accounting_records.cost` (number)
    The cost of the project or task within the specified accounting period,
        up to 2 decimal places (e.g. 3003.56). Values can also be negative (e.g. -350.72).

  - `project_accounting_records.cost_eac` (number)
    The
        [estimated cost](https://mavenlink.zendesk.com/hc/en-us/articles/360004619334-Project-Completion-Estimates)
        of the project or task when it is completed, up to 2 decimal places (e.g. 8326.55).
        Values can also be negative (e.g. -426.55).
        This updates during the course of a project or task, as costs are logged.

  - `project_accounting_records.description` (string)
    This can be a brief description of the record,
        or anything a user prefers.

  - `project_accounting_records.fees` (number)
    The fees from the specified accounting period,
        up to 2 decimal places (e.g. 324.53). Values can also be negative (e.g. -41.53).

  - `project_accounting_records.hours` (number)
    The [hours](https://mavenlink.zendesk.com/hc/en-us/articles/360059325413)
        spent within the specified accounting period, up to 2 decimal places (e.g. 23.25).
        Values can also be negative (e.g. -7.25).

  - `project_accounting_records.hours_eac` (number)
    The
        [estimated hours](https://mavenlink.zendesk.com/hc/en-us/articles/360004619334-Project-Completion-Estimates)
        for the project or task when it is completed, up to 2 decimal places (e.g. 82.25).
        Values can also be negative (e.g. -22.25).
        This updates during the course of a project or task, as hours are logged.

  - `project_accounting_records.hours_etc` (number)
    The
        [estimated hours](https://mavenlink.zendesk.com/hc/en-us/articles/360004619334-Project-Completion-Estimates)
        until completion (hours_eac - hours) of the project or task, up to two decimal places (e.g. 53.25).
        Values can also be negative (e.g. -10.25).

  - `project_accounting_records.total_estimated_hours` (number)
    The hours initially estimated for the project or task,
        up to 2 decimal places (e.g. 83.50). Values can also be negative (e.g. -12.25).
        This value does not change over the course of a project.

  - `project_accounting_records.total_hours_to_date` (number)
    The total hours logged to date for the project or task,
        up to 2 decimal places (e.g. 32.25). Values can also be negative (e.g. -5.75).

  - `project_accounting_records.labor_type` (string)
    The type of cost associated with the record.
        Valid values are Labor or Non-Labor.

  - `project_accounting_records.notes` (string)
    This can be any extra information to note about the record.

  - `project_accounting_records.percent_complete` (number)
    How much of the project or task is complete
        in decimal format, up to 2 places (e.g. 0.75). Values can also be negative (e.g. -.25).

  - `project_accounting_records.role_id` (integer)
    The ID of the role associated with the record.

  - `project_accounting_records.service_type` (string)
    This can be an organization-specific category of services
        that is related to the record (e.g. Branding, Campaigns, Photography, etc.).

  - `project_accounting_records.status` (string)
    The status of the record.
        Valid values: Draft, Pending Approval, Approved, Cancelled.

  - `project_accounting_records.story_id` (integer)
    The ID of the task related to the record.

  - `project_accounting_records.user_id` (integer)
    The ID of the user associated with the record
        (e.g. who created the record, who the record was created for, etc.).

  - `project_accounting_records.external_reference` (object)
    Typically populated programmatically by a third party system via an integration, this is an optional
object that holds data from an external system. It connects objects in an external system with objects in
Kantata OX (for example, to connect a Jira issue to a Kantata OX Project).

  - `project_accounting_records.external_reference.service_name` (string, required)
    The provider name of the integration. If you are adding multiple external references to the same object, the service_name must be unique.

  - `project_accounting_records.external_reference.service_model` (string, required)
    The object type of the external object this external reference belongs to.

  - `project_accounting_records.external_reference.service_model_ref` (string, required)
    The object ID of the external object this external reference belongs to.

  - `project_accounting_records.external_reference.status` (string)
    The status of the integration. Options are successful, pending,  or failed.

  - `project_accounting_records.external_reference.external_message` (string)
    The message on the external object.

  - `project_accounting_records.external_reference.external_link` (string)
    The link to the external object.

  - `project_accounting_records.external_reference.external_status` (string)
    The status of the external object in the external system.

  - `project_accounting_records.external_reference.locked` (boolean)
    Whether the subject is locked.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

  - `project_accounting_records` (object)

  - `external_references` (object)

  - `workspaces` (object)

  - `stories` (object)

  - `roles` (object)

  - `users` (object)

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)


