Modern Treasury LineItem API
The LineItem API from Modern Treasury — 2 operation(s) for lineitem.
The LineItem API from Modern Treasury — 2 operation(s) for lineitem.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/modern-treasury-lineitem-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Modern Treasury AccountCapability Line Item API
version: v1
contact:
name: Modern Treasury Engineering Team
url: https://moderntreasury.com
description: The Modern Treasury REST API. Please see https://docs.moderntreasury.com for more details.
servers:
- url: http://localhost:3000
- url: https://app.moderntreasury.com
tags:
- name: LineItem
paths:
/api/{itemizable_type}/{itemizable_id}/line_items:
get:
summary: list line items
tags:
- LineItem
description: Get a list of line items
operationId: listLineItems
security:
- basic_auth: []
parameters:
- name: itemizable_id
in: path
schema:
type: string
description: The ID of the payment order or expected payment.
required: true
- name: itemizable_type
in: path
schema:
type: string
enum:
- expected_payments
- payment_orders
description: One of `payment_orders` or `expected_payments`.
required: true
- name: after_cursor
in: query
schema:
type:
- string
- 'null'
required: false
- name: per_page
in: query
schema:
type: integer
required: false
responses:
'200':
description: successful
headers:
X-After-Cursor:
schema:
type:
- string
- 'null'
required: false
description: The cursor for the next page. Including this in a call as `after_cursor` will return the next page.
X-Per-Page:
schema:
type:
- integer
- 'null'
description: The current `per_page`.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/line_item'
/api/{itemizable_type}/{itemizable_id}/line_items/{id}:
get:
summary: get line item
tags:
- LineItem
description: Get a single line item
operationId: getLineItem
security:
- basic_auth: []
parameters:
- name: itemizable_id
in: path
schema:
type: string
description: The ID of the payment order or expected payment.
required: true
- name: itemizable_type
in: path
schema:
type: string
enum:
- expected_payments
- payment_orders
description: One of `payment_orders` or `expected_payments`.
required: true
- name: id
in: path
schema:
type: string
description: The ID of the line item.
required: true
responses:
'200':
description: successful
content:
application/json:
schema:
$ref: '#/components/schemas/line_item'
patch:
summary: update line item
tags:
- LineItem
operationId: updateLineItem
security:
- basic_auth: []
parameters:
- name: itemizable_id
in: path
schema:
type: string
description: The ID of the payment order or expected payment.
required: true
- name: itemizable_type
in: path
schema:
type: string
enum:
- expected_payments
- payment_orders
description: One of `payment_orders` or `expected_payments`.
required: true
- name: id
in: path
schema:
type: string
description: The ID of the line item.
required: true
responses:
'200':
description: successful
content:
application/json:
schema:
$ref: '#/components/schemas/line_item'
'422':
description: unsuccessful
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/line_item_update_request'
components:
schemas:
accounting:
type: object
deprecated: true
properties:
account_id:
type:
- string
- 'null'
format: uuid
deprecated: true
description: The ID of one of your accounting categories. Note that these will only be accessible if your accounting system has been connected.
class_id:
type:
- string
- 'null'
format: uuid
deprecated: true
description: The ID of one of the class objects in your accounting system. Class objects track segments of your business independent of client or project. Note that these will only be accessible if your accounting system has been connected.
error_message:
type: object
properties:
errors:
type: object
properties:
code:
type: string
enum:
- parameter_invalid
- parameter_missing
- resource_not_found
- not_found
- forbidden
- invalid_ip
- invalid_key
- header_invalid
- expired_key
- conflict
- too_many_requests
message:
type: string
parameter:
type: string
required:
- errors
line_item:
type: object
properties:
id:
type: string
format: uuid
object:
type: string
live_mode:
type: boolean
description: This field will be true if this object exists in the live environment or false if it exists in the test environment.
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
itemizable_id:
type: string
format: uuid
description: The ID of the payment order or expected payment.
itemizable_type:
type: string
enum:
- ExpectedPayment
- PaymentOrder
description: One of `payment_orders` or `expected_payments`.
amount:
type: integer
description: Value in specified currency's smallest unit. e.g. $10 would be represented as 1000.
description:
type:
- string
- 'null'
description: A free-form description of the line item.
metadata:
type: object
description: Additional data represented as key-value pairs. Both the key and value must be strings.
additionalProperties:
type: string
example:
key: value
foo: bar
modern: treasury
accounting:
$ref: '#/components/schemas/accounting'
accounting_category_id:
type:
- string
- 'null'
format: uuid
deprecated: true
description: The ID of one of your accounting categories. Note that these will only be accessible if your accounting system has been connected.
accounting_ledger_class_id:
type:
- string
- 'null'
format: uuid
deprecated: true
description: The ID of one of the class objects in your accounting system. Class objects track segments of your business independent of client or project. Note that these will only be accessible if your accounting system has been connected.
additionalProperties: false
minProperties: 13
required:
- id
- object
- live_mode
- created_at
- updated_at
- itemizable_id
- itemizable_type
- amount
- description
- metadata
- accounting
- accounting_category_id
- accounting_ledger_class_id
line_item_update_request:
type: object
properties:
metadata:
type: object
description: Additional data represented as key-value pairs. Both the key and value must be strings.
additionalProperties:
type: string
example:
key: value
foo: bar
modern: treasury
securitySchemes:
basic_auth:
type: http
scheme: basic