Direct costs

Explore Direct Costs endpoints in Swagger.

Overview

Direct costs include:

  • Purchasing an item and paying it off at the point of the purchase
  • Receiving cash from a refunded item if the refund is made by the supplier
  • Withdrawing money from a bank account
  • Writing a cheque

From the Direct Costs endpoint you can:

Data model

Field

Type

Description

id

string

Identifier of the direct cost, unique for the company.

reference

string

User-friendly reference for the direct cost.

note

string

A note attached to the direct cost.

contactRef

Reference type

A customer or supplier associated with the direct cost.

issueDate

string
See Date

Date of the direct cost as recorded in the accounting platform.

currency

string
See currency

Currency of the direct cost.

currencyRate

decimal
See currency rate

Conversion rate between the currency of the direct costs and the base currency of the company.

lineItems

array

An array of directCostslineItems.

paymentAllocations

array

An array of paymentAllocations.

subTotal

decimal

The total amount of the direct costs, excluding any taxes.

taxAmount

decimal

The total amount of tax on the direct costs.

totalAmount

decimal

The amount of the direct costs, inclusive of tax.

modifiedDate

string
See date

Date the record was last updated in the Codat system.

sourceModifiedDate

string
See date

Date the record was last changed in the accounting system.

Direct costs line items

Field

Type

Description

description

string

Friendly name of the goods or services.

unitAmount

decimal

Price of each unit of goods or services.
Note: If the platform does not provide this information, the unit amount will be mapped to the total amount.

quantity

decimal

Number of units of goods or services received.

Note: If the platform does not provide this information, the quantity will be mapped as 1.

subTotal

decimal

Amount of the line, inclusive of discounts but exclusive of tax.

taxAmount

decimal

Amount of tax for the line.

totalAmount

decimal

Total amount of the line, including tax.

accountRef

Reference type

Reference to the account to which the line item is linked.

taxRateRef

Reference type

Reference to the tax rate to which the the line item is linked.

itemRef

Reference type

Reference to the product, service type, or inventory item to which the direct cost is linked.

trackingCategoryRefs

array

Collection of categories against which this direct cost is tracked.

Payment allocations

Field

Type

Description

payment

id

string

Identifier of the allocated payment.

note

string

Notes attached to the allocated payment.

reference

string

Reference to the allocated payment.

accountRef

Reference type

The account that the allocated payment is made from or to.

currency

See currency

Currency the payment has been made in.

currencyRate

decimal
See currency rate

Conversion rate between the currency of the allocated payment and the currency of the company.

paidOnDate

string
See date

The date the payment was paid.

totalAmount

decimal

Total amount that was paid.

allocation

currency

string
See currency

The currency of the transaction.

currencyRate

number
See currency rate

The conversion rate between the currency of the allocated payment and the currency of the transaction.

allocatedOnDate

string
See date

The date the payment was allocated.

totalAmount

decimal

The total amount that has been allocated.

Example data

[
    {
        "id": "310285b0-80b1-406e-9ea6-4f2987175255",
        "contactRef": {
            "id": "f559658a-68da-42b1-81ae-42a96b6c6953",
            "dataType": "suppliers"
        },
        "reference": "Refund",
        "issueDate": "2021-05-21T00:00:00",
        "currency": "GBP",
        "currencyRate": 1.0,
        "lineItems": [
            {
                "description": "Refund",
                "unitAmount": 4.17,
                "quantity": -1.00,
                "subTotal": -4.17,
                "taxAmount": -0.83,
                "totalAmount": -5.00,
                "accountRef": {
                    "id": "127f3b99-8dc2-4b7e-854c-91ef9bd2757b",
                    "name": "Purchases"
                },
                "taxRateRef": {
                    "id": "INPUT2"
                },
                "trackingCategoryRefs": [
                    {
                        "id": "9d8ad8f6-0d0f-41e0-8851-ef47e8b54ae6",
                        "name": "Eastside"
                    }
                ]
            }
        ],
        "paymentAllocations": [
            {
                "payment": {
                    "id": "310285b0-80b1-406e-9ea6-4f2987175255",
                    "accountRef": {
                        "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4",
                        "name": "Business Bank Account"
                    },
                    "currency": "GBP",
                    "currencyRate": 1.0,
                    "paidOnDate": "2021-05-21T00:00:00",
                    "totalAmount": -5.00
                },
                "allocation": {
                    "currency": "GBP",
                    "currencyRate": 1.0,
                    "allocatedOnDate": "2021-05-21T00:00:00",
                    "totalAmount": -5.00
                }
            }
        ],
        "subTotal": -4.17,
        "taxAmount": -0.83,
        "totalAmount": -5.00,
        "sourceModifiedDate": "2021-05-21T13:07:11.54"
    },
    {
        "id": "a9baa633-e3e9-41ef-b4aa-741de0720b02",
        "contactRef": {
            "id": "f559658a-68da-42b1-81ae-42a96b6c6953",
            "dataType": "suppliers"
        },
        "issueDate": "2021-05-10T00:00:00",
        "currency": "GBP",
        "currencyRate": 1.0,
        "lineItems": [
            {
                "description": "Expense",
                "accountRef": {
                    "id": "f96c9458-d724-47bf-8f74-a9d5726465ce",
                    "name": "General Expenses"
                },
                "taxRateRef": {
                    "id": "INPUT2"
                },
                "unitAmount": 57.92,
                "quantity": 1.00,
                "subTotal": 57.92,
                "taxAmount": 11.58,
                "totalAmount": 69.50,
                "trackingCategoryRefs": [
                    {
                        "id": "9d8ad8f6-0d0f-41e0-8851-ef47e8b54ae6",
                        "name": "Eastside"
                    }
                ]
            }
        ],
        "paymentAllocations": [
            {
                "payment": {
                    "id": "a9baa633-e3e9-41ef-b4aa-741de0720b02",
                    "accountRef": {
                        "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4",
                        "name": "Business Bank Account"
                    },
                    "currency": "GBP",
                    "currencyRate": 1.0,
                    "paidOnDate": "2021-05-10T00:00:00",
                    "totalAmount": 69.50
                },
                "allocation": {
                    "currency": "GBP",
                    "currencyRate": 1.0,
                    "allocatedOnDate": "2021-05-10T00:00:00",
                    "totalAmount": 69.50
                }
            }
        ],
        "subTotal": 57.92,
        "taxAmount": 11.58,
        "totalAmount": 69.50,
        "sourceModifiedDate": "2021-01-03T22:31:43.45"
    }
]

Did this page help you?