---
title: "Create card transaction line"
method: POST
path: "/v1/card-transactions/{transactionId}/lines"
tags: ["v1 - Card Transactions"]
---

# Create card transaction line

`POST /v1/card-transactions/{transactionId}/lines`

## Request

- Base URL: `https://light.inc` (the document declares no server; this is the origin it was published from)
- URL: `https://light.inc/v1/card-transactions/{transactionId}/lines`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer

Adds a line to a card transaction

## Path parameters

- `transactionId` string, uuid, required

## Request body

- ExternalCreateCardTransactionLineRequestV1Model
  - `accountId` string, uuid, nullable: ID of the ledger account to book this line against.
  - `taxCodeId` string, uuid, nullable: ID of the tax code to apply to this line. The line's tax is calculated from it.
  - `costCenterId` string, uuid, nullable: ID of the cost center.
  - `amount` integer, nullable: Gross line amount in minor units (e.g. cents), including tax. Positive; the line takes the card transaction's direction.
  - `description` string, nullable: Description of this line.
  - `customProperties` ExternalSetCustomPropertyRequestV1Model[], nullable: Custom properties to set on this line.
    - `groupId` string, uuid: ID of the custom property group.
    - `valueIds` string[]: IDs of the selected custom property values. It behaves as a PUT operation, so if empty the existing ones will be effectively deleted.
    - `inlineValues` string[], nullable: Inline custom property values (used for TEXT/NUMERIC/DATE/etc. groups). It behaves as a PUT operation, so if empty or null the existing ones will be effectively deleted.
  - `amortizationTemplateId` string, uuid, nullable: ID of the amortization template to apply to this line.
  - `amortizationStartDate` string, date, nullable: Start date for amortization of this line.
  - `amortizationEndDate` string, date, nullable: End date for amortization of this line.

## Response `default`

default response

- ExternalCardTransactionLineV1Model
  - `id` string, uuid
  - `transactionId` string, uuid
  - `companyId` string, uuid
  - `accountId` string, uuid
  - `taxCodeId` string, uuid
  - `costCenterId` string, uuid
  - `amount` integer
  - `netAmount` integer
  - `taxAmount` integer
  - `description` string
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `customProperties` ExternalCustomPropertyV1Model[]
    - `groupId` string, uuid: ID of the custom property group
    - `groupInternalName` string: Internal name of the custom property group
    - `values` ExternalCustomPropertyValueV1Model[]: List of values. Note that this will be a single value unless the group input type supports multiple values
      - `id` string, uuid: Unique identifier for the object
      - `groupId` string, uuid: ID of the custom property group
      - `groupInternalName` string: Internal name of the custom property group
      - `companyId` string, uuid: ID of the company
      - `internalName` string: Internal name of the custom property value
      - `label` string: Label of the custom property value
      - `context` string, nullable: Context/description of the custom property value
      - `createdAt` string, date-time: Timestamp when the custom property value was created
      - `updatedAt` string, date-time: Timestamp when the custom property value was last updated
  - `amortizationTemplateId` string, uuid
  - `amortizationStartDate` string, date
  - `amortizationEndDate` string, date

---

[API](https://skmtc.dev/light/apis/light-api.md) - [All operations](https://skmtc.dev/light/apis/light-api/llms.txt) - [OpenAPI document](https://skmtc.dev/light/apis/light-api/revisions/84f51306f648?raw)
