import { APIResource } from "../core/resource.js"; import * as BusinessPartnersAPI from "./business-partners.js"; import * as WorkersAPI from "./workers.js"; import { APIPromise } from "../core/api-promise.js"; import { PageCursorURL, PagePromise } from "../core/pagination.js"; import { type Uploadable } from "../core/uploads.js"; import { RequestOptions } from "../internal/request-options.js"; /** * Finance card transactions (posted charges) and authorizations (pending holds) */ export declare class CardTransactions extends APIResource { /** * A list of card transactions. * * - Requires: `Spend Management Platform API` * - Filterable fields: `worker_id`, `entity_id`, `vendor_id`, `transaction_date`, * `transaction_type`, `card_id` * - Expandable fields: `worker`, `vendor` * - Sortable fields: `id`, `created_at`, `updated_at`, `transaction_date` * * @example HTTP * Representative request and response shapes. * ``` * GET /card-transactions/?filter=filter&expand=expand&order_by=order_by&limit=50&cursor=cursor HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "__meta": { * "redacted_fields": [ * { * "name": "date_of_birth", * "reason": "Insufficient entitlements" * } * ] * }, * "results": [ * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "worker_id": "string", * "worker": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "user_id": "string", * "user": {}, * "is_manager": "string", * "manager_id": "string", * "manager": {}, * "legal_entity_id": "string", * "legal_entity": {}, * "country": "AF", * "start_date": "string", * "end_date": "string", * "number": "string", * "work_email": "string", * "personal_email": "string", * "status": "INIT", * "location": {}, * "employment_type_id": "string", * "employment_type": {}, * "gender": "MALE", * "date_of_birth": "string", * "race": "BLACK", * "ethnicity": "HISPANIC_OR_LATINO", * "citizenship": "AF", * "compensation_id": "string", * "compensation": {}, * "overtime_exemption": "EXEMPT", * "department_id": "string", * "department": {}, * "teams_id": [], * "teams": [], * "title": "string", * "title_effective_date": "string", * "level_id": "string", * "level": {}, * "job_function_id": "string", * "job_function": {}, * "termination_details": {}, * "pay_schedule_id": "string", * "work_schedule": {}, * "compensation_grade": {}, * "original_start_date": "string", * "custom_fields": [], * "country_fields": {}, * "business_partners_id": [], * "business_partners": [] * }, * "company_amount": { * "currency_type": "string", * "value": "string" * }, * "merchant_amount": { * "currency_type": "string", * "value": "string" * }, * "accounting_date": "string", * "gl_sync_state": "NOT_FINALIZED", * "approval_status": "DRAFT", * "entity_id": "string", * "vendor": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string", * "logo": "string", * "is_archived": "string" * }, * "gl_vendor": { * "id": "string", * "name": "string", * "gl_vendor_id": "string" * }, * "memo": "string", * "attachments": [ * {} * ], * "line_items": [ * {} * ], * "vendor_id": "string", * "transaction_date": "string", * "receipts": [ * {} * ], * "transaction_type": "CARD_TRANSACTION", * "authorization_state": "PENDING", * "card_id": "string" * } * ], * "next_link": "string" * } * ``` */ list(query?: CardTransactionListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Retrieve a specific card transaction. Expandable fields: `worker`, `vendor`. * * @example HTTP * Representative request and response shapes. * ``` * GET /card-transactions/{id}/?expand=expand HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "__meta": { * "redacted_fields": [ * {} * ] * } * } * ``` */ retrieve(id: string, query?: CardTransactionRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; /** * Replace a card transaction's line items. Supplying `line_items` replaces the * entire list: unlisted lines are deleted, omitted or null optional fields on * supplied lines are cleared. `amount` and `tax_amount` are decimal strings in the * merchant currency; GET responses return them as Currency objects. Line item * `amount` values must sum to the transaction's merchant amount. * * @example HTTP * Representative request and response shapes. * ``` * PATCH /card-transactions/{id}/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: application/json * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * {} * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "worker_id": "string", * "worker": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "user_id": "string", * "user": { * "id": "string", * "created_at": "string", * "updated_at": "string" * }, * "is_manager": false, * "manager_id": "string", * "manager": { * "id": "string", * "created_at": "string", * "updated_at": "string" * }, * "legal_entity_id": "string", * "legal_entity": { * "id": "string", * "created_at": "string", * "updated_at": "string" * }, * "country": "AF", * "start_date": "string", * "end_date": "string", * "number": 0, * "work_email": "string", * "personal_email": "string", * "status": "INIT", * "location": { * "type": "REMOTE", * "work_location_id": "string" * }, * "employment_type_id": "string", * "employment_type": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "label": "string" * }, * "gender": "MALE", * "date_of_birth": "string", * "race": "BLACK", * "ethnicity": "HISPANIC_OR_LATINO", * "citizenship": "AF", * "compensation_id": "string", * "compensation": { * "id": "string", * "created_at": "string", * "updated_at": "string" * }, * "overtime_exemption": "EXEMPT", * "department_id": "string", * "department": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string" * }, * "teams_id": [ * "string" * ] * }, * "company_amount": { * "currency_type": "string", * "value": 0 * }, * "merchant_amount": { * "currency_type": "string", * "value": 0 * }, * "accounting_date": "string", * "gl_sync_state": "NOT_FINALIZED", * "approval_status": "DRAFT", * "entity_id": "string", * "vendor": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string", * "logo": "string", * "is_archived": false * }, * "gl_vendor": { * "id": "string", * "name": "string", * "gl_vendor_id": "string" * }, * "memo": "string", * "attachments": [ * { * "url": "string", * "file_name": "string", * "uploaded_at": "string", * "uploaded_by_id": "string" * } * ], * "line_items": [ * { * "gl_customer": "string", * "gl_billable": "BILLABLE", * "dimension_choices": {}, * "memo": "string", * "gl_amortization_template": { * "gl_object_id": "string", * "accounting_integration_id": "string", * "name": "string", * "gl_object_type": "GL_AMORTIZATION_TEMPLATE" * }, * "amortized": false, * "start_date": "string", * "end_date": "string", * "prepaid_account": { * "account_id": "string", * "name": "string", * "code": "string", * "type": "RECEIVABLE", * "required_custom_dimensions": [], * "requires_department": "string", * "requires_work_location": "string" * }, * "gl_amortization_schedule": { * "gl_object_id": "string", * "accounting_integration_id": "string", * "name": "string", * "gl_object_type": "GL_AMORTIZATION_TEMPLATE", * "start_date": "string", * "end_date": "string", * "total_amount": "string", * "total_amortized_amount": "string", * "amortization_period": "string", * "status": "NOT_STARTED" * }, * "gl_tax_code": "string", * "id": "string", * "category_id": "string", * "category_name": "string", * "amount": { * "currency_type": "string", * "value": "string" * }, * "tax_amount": { * "currency_type": "string", * "value": "string" * } * } * ], * "vendor_id": "string", * "transaction_date": "string", * "receipts": [ * { * "url": "string", * "preview_url": "string", * "file_name": "string", * "content_type": "string" * } * ], * "transaction_type": "CARD_TRANSACTION", * "authorization_state": "PENDING", * "card_id": "string" * } * ``` */ update(id: string, body?: CardTransactionUpdateParams | null | undefined, options?: RequestOptions): APIPromise; /** * Send the receipt file as `multipart/form-data` in a `file` field. It is stored * and attached in a single request. * * When the company has multiple receipts per transaction enabled, the file is * appended to the existing receipts, up to 5 per transaction. Otherwise it * replaces the existing receipt. Declined authorizations cannot be changed. Once a * charge posts, its authorization is replaced by a card transaction and returns * 404, so upload to the card transaction instead. * * With multiple receipts enabled, uploading identical file contents again returns * the current transaction without storing another file or using another receipt * slot, even at the limit. This applies to files previously attached by this API; * older receipts without a content hash are not deduplicated. Otherwise, uploading * a file replaces the existing receipt. * * The receipt is attached without scanning or populating transaction fields from * its contents. As with an in-app upload, Rippling stops marking the transaction * as missing a receipt. Returns the updated card transaction in the same shape as * `GET /card-transactions/{id}/`, with the new receipt in `receipts`. * * @example HTTP * Representative request and response shapes. * ``` * POST /card-transactions/{id}/receipts/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: multipart/form-data * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "worker_id": "string", * "worker": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "user_id": "string", * "user": { * "id": "string", * "created_at": "string", * "updated_at": "string" * }, * "is_manager": false, * "manager_id": "string", * "manager": { * "id": "string", * "created_at": "string", * "updated_at": "string" * }, * "legal_entity_id": "string", * "legal_entity": { * "id": "string", * "created_at": "string", * "updated_at": "string" * }, * "country": "AF", * "start_date": "string", * "end_date": "string", * "number": 0, * "work_email": "string", * "personal_email": "string", * "status": "INIT", * "location": { * "type": "REMOTE", * "work_location_id": "string" * }, * "employment_type_id": "string", * "employment_type": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "label": "string" * }, * "gender": "MALE", * "date_of_birth": "string", * "race": "BLACK", * "ethnicity": "HISPANIC_OR_LATINO", * "citizenship": "AF", * "compensation_id": "string", * "compensation": { * "id": "string", * "created_at": "string", * "updated_at": "string" * }, * "overtime_exemption": "EXEMPT", * "department_id": "string", * "department": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string" * }, * "teams_id": [ * "string" * ] * }, * "company_amount": { * "currency_type": "string", * "value": 0 * }, * "merchant_amount": { * "currency_type": "string", * "value": 0 * }, * "accounting_date": "string", * "gl_sync_state": "NOT_FINALIZED", * "approval_status": "DRAFT", * "entity_id": "string", * "vendor": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string", * "logo": "string", * "is_archived": false * }, * "gl_vendor": { * "id": "string", * "name": "string", * "gl_vendor_id": "string" * }, * "memo": "string", * "attachments": [ * { * "url": "string", * "file_name": "string", * "uploaded_at": "string", * "uploaded_by_id": "string" * } * ], * "line_items": [ * { * "gl_customer": "string", * "gl_billable": "BILLABLE", * "dimension_choices": {}, * "memo": "string", * "gl_amortization_template": { * "gl_object_id": "string", * "accounting_integration_id": "string", * "name": "string", * "gl_object_type": "GL_AMORTIZATION_TEMPLATE" * }, * "amortized": false, * "start_date": "string", * "end_date": "string", * "prepaid_account": { * "account_id": "string", * "name": "string", * "code": "string", * "type": "RECEIVABLE", * "required_custom_dimensions": [], * "requires_department": "string", * "requires_work_location": "string" * }, * "gl_amortization_schedule": { * "gl_object_id": "string", * "accounting_integration_id": "string", * "name": "string", * "gl_object_type": "GL_AMORTIZATION_TEMPLATE", * "start_date": "string", * "end_date": "string", * "total_amount": "string", * "total_amortized_amount": "string", * "amortization_period": "string", * "status": "NOT_STARTED" * }, * "gl_tax_code": "string", * "id": "string", * "category_id": "string", * "category_name": "string", * "amount": { * "currency_type": "string", * "value": "string" * }, * "tax_amount": { * "currency_type": "string", * "value": "string" * } * } * ], * "vendor_id": "string", * "transaction_date": "string", * "receipts": [ * { * "url": "string", * "preview_url": "string", * "file_name": "string", * "content_type": "string" * } * ], * "transaction_type": "CARD_TRANSACTION", * "authorization_state": "PENDING", * "card_id": "string" * } * ``` */ uploadReceipt(id: string, body: CardTransactionUploadReceiptParams, options?: RequestOptions): APIPromise; } export type CardTransactionListResponsesPageCursorURL = PageCursorURL; /** * A Finance card transaction or authorization the caller can see. * * An authorization is a pending hold the card network places at the time of purchase. A card transaction * is the posted charge. List returns both; retrieve returns one by ID. A transaction the * caller cannot see returns 404, the same as one that does not exist. * PATCH `/card-transactions/{id}/` accepts only `line_items` and replaces the entire list. * Request `amount` and `tax_amount` are decimal strings (for example `"75.00"`), not Currency * objects. GET responses return those fields as Currency objects (`currency_type` + `value`). * The sum of request `amount` values must equal the transaction's merchant amount. */ export interface CardTransactionListResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Date the transaction is booked in the accounting system, as an ISO 8601 date * (YYYY-MM-DD). */ accounting_date?: string; /** * Approval status of the transaction. `DRAFT`: not submitted for approval. * `PENDING`: awaiting required information or submission before approval. * `REQUESTED`: submitted and awaiting approval. `APPROVED`: approved. `REJECTED`: * rejected. `FINALIZED`: finalized for payment. `ACTIONED`: payment or * reimbursement completed. `CANCELLED`: cancelled. `FAILED`: payment failed. Null * for card authorizations. */ approval_status?: 'DRAFT' | 'PENDING' | 'REQUESTED' | 'APPROVED' | 'REJECTED' | 'FINALIZED' | 'ACTIONED' | 'CANCELLED' | 'FAILED'; /** * Other attached files, including filenames and recorded upload metadata. */ attachments?: Array; /** * State of the card authorization. `PENDING`: an active hold awaiting completion. * `CLOSED`: the authorization was declined, or it completed and was replaced by a * posted card transaction. `REVERSED`: the authorization was reversed and the hold * released. `EXPIRED`: the hold expired without completion. Null for posted card * transactions. */ authorization_state?: 'PENDING' | 'CLOSED' | 'REVERSED' | 'EXPIRED'; /** * ID of the Finance card used. No public API is currently available to retrieve * this card. */ card_id?: string; /** * Amount in the company's headquarters currency. The `value` is a decimal string. */ company_amount?: CardTransactionListResponse.CompanyAmount; /** * ID of the legal entity the transaction belongs to. Use it with * `/company-legal-entities/{id}/`. */ entity_id?: string; /** * State of the sync to the accounting system. `NOT_FINALIZED`: not ready for * accounting review. `FOR_REVIEW`: ready for accounting review. `PENDING_SYNC`: * sync is in progress. `SYNCED`: synced to the accounting system. `ERROR`: sync * failed. `DO_NOT_SYNC`: marked to be excluded from sync. `EXPORTED`: exported for * accounting. `NOT_SYNCABLE`: this record cannot be synced. `AUTO_SYNC`: ready to * be synced automatically. Null when no sync state is set. */ gl_sync_state?: 'NOT_FINALIZED' | 'FOR_REVIEW' | 'PENDING_SYNC' | 'SYNCED' | 'ERROR' | 'DO_NOT_SYNC' | 'EXPORTED' | 'NOT_SYNCABLE' | 'AUTO_SYNC'; /** * Vendor in the connected accounting system. */ gl_vendor?: CardTransactionListResponse.GlVendor; /** * Category splits of the transaction amount. Updates replace the entire list. */ line_items?: Array; /** * Memo entered on the transaction. */ memo?: string; /** * Amount charged by the merchant, in the merchant currency. The `value` is a * decimal string. */ merchant_amount?: CardTransactionListResponse.MerchantAmount; /** * Receipt files attached to the transaction, in display order, up to 5. Empty when * there are none. Null when the caller cannot read the transaction's receipts. */ receipts?: Array | null; /** * When the purchase or authorization happened, as an ISO 8601 date-time in UTC. */ transaction_date?: string; /** * `CARD_TRANSACTION`: a posted card charge. `CARD_AUTHORIZATION`: a hold placed by * the card network before the charge posts. */ transaction_type?: 'CARD_TRANSACTION' | 'CARD_AUTHORIZATION'; /** * Vendor details. Expand with `card-transactions.read` and `finance-vendors.read`. * * Expandable field */ vendor?: CardTransactionListResponse.Vendor; /** * ID of the Finance vendor. Use it with `/finance-vendors/{id}/`. */ vendor_id?: string; /** * Worker details. Expand with `card-transactions.read` and `workers.read`. * * Expandable field */ worker?: WorkersAPI.Worker; /** * ID of the worker who made the transaction. Use it with `/workers/{id}/`. */ worker_id?: string; } export declare namespace CardTransactionListResponse { /** * A Finance transaction attachment with recorded upload details. */ interface Attachment { /** * URL for accessing the file. */ url: string; /** * Original file name, when recorded. */ file_name?: string; /** * When the attachment was uploaded, as an ISO 8601 date-time in UTC, when * recorded. */ uploaded_at?: string; /** * ID of the worker who uploaded the attachment. Use it with `/workers/{id}/`. */ uploaded_by_id?: string; } /** * Amount in the company's headquarters currency. The `value` is a decimal string. */ interface CompanyAmount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } /** * Vendor in the connected accounting system. */ interface GlVendor { /** * ID of the accounting vendor in Rippling. */ id?: string; /** * ID of the vendor in the accounting system. */ gl_vendor_id?: string; /** * Name of the vendor in the accounting system. */ name?: string; } interface LineItem { /** * Unique identifier of this line item. Null for older line items that have not * been assigned one yet. */ id?: string; /** * Whether this line is amortized. */ amortized?: boolean; /** * Amount of this split, in the merchant currency. The `value` is a decimal string. */ amount?: LineItem.Amount; /** * ID of the Finance category assigned to this split. Use it with * `/finance-categories/{id}/`. The category name is in `category_name`. */ category_id?: string; /** * Name of the finance category. */ category_name?: string; /** * Selected dimension values, keyed by dimension ID. `DEPARTMENT` and * `WORK_LOCATION` are the built-in keys. Get custom dimension IDs from * `/job-dimensions/` and `/job-dimensions/{id}/`. Each choice `value` is a job * code ID from `/job-codes/` and `/job-codes/{id}/`. */ dimension_choices?: { [key: string]: LineItem.DimensionChoices; }; /** * End of the amortization period (YYYY-MM-DD). */ end_date?: string; /** * ERP amortization schedule associated with this line. */ gl_amortization_schedule?: LineItem.GlAmortizationSchedule; /** * ERP amortization template for this line. */ gl_amortization_template?: LineItem.GlAmortizationTemplate; /** * Whether this split is billed to `gl_customer` in the accounting system. * `BILLABLE` means it is billed, `NOT_BILLABLE` means it is not. Null when not * set. */ gl_billable?: 'BILLABLE' | 'NOT_BILLABLE'; /** * ID of the customer record in the connected accounting integration. No public * Rippling API is currently available to retrieve this accounting customer. */ gl_customer?: string; /** * Rippling ID of the accounting tax code. No public Rippling API is currently * available to retrieve this accounting tax code. */ gl_tax_code?: string; /** * Memo entered on this split. */ memo?: string; /** * Prepaid asset account for Rippling-managed amortization. */ prepaid_account?: LineItem.PrepaidAccount; /** * Start of the amortization period (YYYY-MM-DD). */ start_date?: string; /** * Total tax amount for this line in the merchant currency. */ tax_amount?: LineItem.TaxAmount; } namespace LineItem { /** * Amount of this split, in the merchant currency. The `value` is a decimal string. */ interface Amount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } interface DimensionChoices { /** * Name of the dimension, such as Department. */ dimension_name?: string; /** * Display name of the selected dimension value. */ label?: string; /** * ID of the selected value. For `DEPARTMENT` use `/departments/{id}/`, for * `WORK_LOCATION` use `/work-locations/{id}/`, and for a custom job dimension use * `/job-codes/{id}/`. */ value?: string; } /** * ERP amortization schedule associated with this line. */ interface GlAmortizationSchedule { /** * Rippling ID of the accounting integration that owns this object. No public * Rippling API is currently available to retrieve this accounting integration. */ accounting_integration_id?: string; /** * Number of amortization periods. */ amortization_period?: number; /** * End of the ERP amortization schedule as an ISO 8601 timestamp (for example, * 2026-12-31T00:00:00). May omit a timezone offset; an omitted offset does not * indicate UTC. Null when not set. */ end_date?: string; /** * Object ID in the connected accounting system. */ gl_object_id?: string; /** * Type of object in the connected accounting system: GL_AMORTIZATION_TEMPLATE * defines amortization rules; GL_AMORTIZATION_SCHEDULE tracks amortization; * GL_AMORTIZATION_SCHEDULE_RECURRENCE is a schedule entry; GL_ACCOUNT is a general * ledger account; GL_JOURNAL_ENTRY is a journal entry; GL_POSTING_PERIOD is an * accounting period; GL_VENDOR, GL_CUSTOMER, and GL_EMPLOYEE identify a vendor, * customer, and employee respectively; GL_SUBSIDIARY identifies a subsidiary. Null * when not set. */ gl_object_type?: 'GL_AMORTIZATION_TEMPLATE' | 'GL_AMORTIZATION_SCHEDULE' | 'GL_AMORTIZATION_SCHEDULE_RECURRENCE' | 'GL_ACCOUNT' | 'GL_JOURNAL_ENTRY' | 'GL_POSTING_PERIOD' | 'GL_VENDOR' | 'GL_CUSTOMER' | 'GL_EMPLOYEE' | 'GL_SUBSIDIARY'; /** * Accounting object name. */ name?: string; /** * Start of the ERP amortization schedule as an ISO 8601 timestamp (for example, * 2026-01-01T00:00:00). May omit a timezone offset; an omitted offset does not * indicate UTC. Null when not set. */ start_date?: string; /** * ERP amortization schedule status: NOT_STARTED means amortization has not begun; * IN_PROGRESS means amortization is underway; COMPLETED means amortization is * complete; ON_HOLD means amortization is paused. Null when not set. */ status?: 'NOT_STARTED' | 'IN_PROGRESS' | 'COMPLETED' | 'ON_HOLD'; /** * Amount already amortized as reported by the ERP, in the same currency as * total_amount. No currency conversion is applied; the schedule currency code is * not available in this response. */ total_amortized_amount?: number; /** * Total schedule amount as reported by the ERP, without currency conversion. The * schedule currency code is not available in this response. */ total_amount?: number; } /** * ERP amortization template for this line. */ interface GlAmortizationTemplate { /** * Rippling ID of the accounting integration that owns this object. No public * Rippling API is currently available to retrieve this accounting integration. */ accounting_integration_id?: string; /** * Object ID in the connected accounting system. */ gl_object_id?: string; /** * Type of object in the connected accounting system: GL_AMORTIZATION_TEMPLATE * defines amortization rules; GL_AMORTIZATION_SCHEDULE tracks amortization; * GL_AMORTIZATION_SCHEDULE_RECURRENCE is a schedule entry; GL_ACCOUNT is a general * ledger account; GL_JOURNAL_ENTRY is a journal entry; GL_POSTING_PERIOD is an * accounting period; GL_VENDOR, GL_CUSTOMER, and GL_EMPLOYEE identify a vendor, * customer, and employee respectively; GL_SUBSIDIARY identifies a subsidiary. Null * when not set. */ gl_object_type?: 'GL_AMORTIZATION_TEMPLATE' | 'GL_AMORTIZATION_SCHEDULE' | 'GL_AMORTIZATION_SCHEDULE_RECURRENCE' | 'GL_ACCOUNT' | 'GL_JOURNAL_ENTRY' | 'GL_POSTING_PERIOD' | 'GL_VENDOR' | 'GL_CUSTOMER' | 'GL_EMPLOYEE' | 'GL_SUBSIDIARY'; /** * Accounting object name. */ name?: string; } /** * Prepaid asset account for Rippling-managed amortization. */ interface PrepaidAccount { /** * Account ID in the connected accounting system. */ account_id?: string; /** * Account code. */ code?: string; /** * Account name. */ name?: string; /** * IDs of custom dimensions required by this account. */ required_custom_dimensions?: Array; /** * Whether this account requires a department. */ requires_department?: boolean; /** * Whether this account requires a work location. */ requires_work_location?: boolean; /** * Accounting account type: RECEIVABLE for accounts receivable, PAYABLE for * accounts payable, EXPENSE for expense accounts, or BANK for bank accounts. Null * when not set. */ type?: 'RECEIVABLE' | 'PAYABLE' | 'EXPENSE' | 'BANK'; } /** * Total tax amount for this line in the merchant currency. */ interface TaxAmount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } } /** * Amount charged by the merchant, in the merchant currency. The `value` is a * decimal string. */ interface MerchantAmount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } /** * A receipt file attached to a card transaction. */ interface Receipt { /** * URL of the original receipt file, such as the uploaded PDF. The link is signed * and expires, so fetch the transaction again for a current link instead of * storing it. */ url: string; /** * MIME type of the receipt file, such as `application/pdf`. Null when it cannot be * determined. */ content_type?: string | null; /** * Name of the receipt file. Null when it was not recorded. */ file_name?: string | null; /** * URL of an image preview of the receipt. Null when the receipt is itself an image * or no preview is available. Like `url`, the link is signed and expires. */ preview_url?: string | null; } /** * Vendor details. Expand with `card-transactions.read` and `finance-vendors.read`. * * Expandable field */ interface Vendor { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Whether the vendor is archived. Archived vendors remain available for historical * references. */ is_archived?: boolean; /** * URL of the vendor's logo. Null when no logo is available. */ logo?: string; /** * Canonical name of the Finance vendor. Name eq, ne, and in filters also match * alternate names. */ name?: string; } } /** * Meta information for the response. */ export interface CardTransactionRetrieveResponse extends BusinessPartnersAPI.Meta { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Date the transaction is booked in the accounting system, as an ISO 8601 date * (YYYY-MM-DD). */ accounting_date?: string; /** * Approval status of the transaction. `DRAFT`: not submitted for approval. * `PENDING`: awaiting required information or submission before approval. * `REQUESTED`: submitted and awaiting approval. `APPROVED`: approved. `REJECTED`: * rejected. `FINALIZED`: finalized for payment. `ACTIONED`: payment or * reimbursement completed. `CANCELLED`: cancelled. `FAILED`: payment failed. Null * for card authorizations. */ approval_status?: 'DRAFT' | 'PENDING' | 'REQUESTED' | 'APPROVED' | 'REJECTED' | 'FINALIZED' | 'ACTIONED' | 'CANCELLED' | 'FAILED'; /** * Other attached files, including filenames and recorded upload metadata. */ attachments?: Array; /** * State of the card authorization. `PENDING`: an active hold awaiting completion. * `CLOSED`: the authorization was declined, or it completed and was replaced by a * posted card transaction. `REVERSED`: the authorization was reversed and the hold * released. `EXPIRED`: the hold expired without completion. Null for posted card * transactions. */ authorization_state?: 'PENDING' | 'CLOSED' | 'REVERSED' | 'EXPIRED'; /** * ID of the Finance card used. No public API is currently available to retrieve * this card. */ card_id?: string; /** * Amount in the company's headquarters currency. The `value` is a decimal string. */ company_amount?: CardTransactionRetrieveResponse.CompanyAmount; /** * ID of the legal entity the transaction belongs to. Use it with * `/company-legal-entities/{id}/`. */ entity_id?: string; /** * State of the sync to the accounting system. `NOT_FINALIZED`: not ready for * accounting review. `FOR_REVIEW`: ready for accounting review. `PENDING_SYNC`: * sync is in progress. `SYNCED`: synced to the accounting system. `ERROR`: sync * failed. `DO_NOT_SYNC`: marked to be excluded from sync. `EXPORTED`: exported for * accounting. `NOT_SYNCABLE`: this record cannot be synced. `AUTO_SYNC`: ready to * be synced automatically. Null when no sync state is set. */ gl_sync_state?: 'NOT_FINALIZED' | 'FOR_REVIEW' | 'PENDING_SYNC' | 'SYNCED' | 'ERROR' | 'DO_NOT_SYNC' | 'EXPORTED' | 'NOT_SYNCABLE' | 'AUTO_SYNC'; /** * Vendor in the connected accounting system. */ gl_vendor?: CardTransactionRetrieveResponse.GlVendor; /** * Category splits of the transaction amount. Updates replace the entire list. */ line_items?: Array; /** * Memo entered on the transaction. */ memo?: string; /** * Amount charged by the merchant, in the merchant currency. The `value` is a * decimal string. */ merchant_amount?: CardTransactionRetrieveResponse.MerchantAmount; /** * Receipt files attached to the transaction, in display order, up to 5. Empty when * there are none. Null when the caller cannot read the transaction's receipts. */ receipts?: Array | null; /** * When the purchase or authorization happened, as an ISO 8601 date-time in UTC. */ transaction_date?: string; /** * `CARD_TRANSACTION`: a posted card charge. `CARD_AUTHORIZATION`: a hold placed by * the card network before the charge posts. */ transaction_type?: 'CARD_TRANSACTION' | 'CARD_AUTHORIZATION'; /** * Vendor details. Expand with `card-transactions.read` and `finance-vendors.read`. * * Expandable field */ vendor?: CardTransactionRetrieveResponse.Vendor; /** * ID of the Finance vendor. Use it with `/finance-vendors/{id}/`. */ vendor_id?: string; /** * Worker details. Expand with `card-transactions.read` and `workers.read`. * * Expandable field */ worker?: WorkersAPI.Worker; /** * ID of the worker who made the transaction. Use it with `/workers/{id}/`. */ worker_id?: string; } export declare namespace CardTransactionRetrieveResponse { /** * A Finance transaction attachment with recorded upload details. */ interface Attachment { /** * URL for accessing the file. */ url: string; /** * Original file name, when recorded. */ file_name?: string; /** * When the attachment was uploaded, as an ISO 8601 date-time in UTC, when * recorded. */ uploaded_at?: string; /** * ID of the worker who uploaded the attachment. Use it with `/workers/{id}/`. */ uploaded_by_id?: string; } /** * Amount in the company's headquarters currency. The `value` is a decimal string. */ interface CompanyAmount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } /** * Vendor in the connected accounting system. */ interface GlVendor { /** * ID of the accounting vendor in Rippling. */ id?: string; /** * ID of the vendor in the accounting system. */ gl_vendor_id?: string; /** * Name of the vendor in the accounting system. */ name?: string; } interface LineItem { /** * Unique identifier of this line item. Null for older line items that have not * been assigned one yet. */ id?: string; /** * Whether this line is amortized. */ amortized?: boolean; /** * Amount of this split, in the merchant currency. The `value` is a decimal string. */ amount?: LineItem.Amount; /** * ID of the Finance category assigned to this split. Use it with * `/finance-categories/{id}/`. The category name is in `category_name`. */ category_id?: string; /** * Name of the finance category. */ category_name?: string; /** * Selected dimension values, keyed by dimension ID. `DEPARTMENT` and * `WORK_LOCATION` are the built-in keys. Get custom dimension IDs from * `/job-dimensions/` and `/job-dimensions/{id}/`. Each choice `value` is a job * code ID from `/job-codes/` and `/job-codes/{id}/`. */ dimension_choices?: { [key: string]: LineItem.DimensionChoices; }; /** * End of the amortization period (YYYY-MM-DD). */ end_date?: string; /** * ERP amortization schedule associated with this line. */ gl_amortization_schedule?: LineItem.GlAmortizationSchedule; /** * ERP amortization template for this line. */ gl_amortization_template?: LineItem.GlAmortizationTemplate; /** * Whether this split is billed to `gl_customer` in the accounting system. * `BILLABLE` means it is billed, `NOT_BILLABLE` means it is not. Null when not * set. */ gl_billable?: 'BILLABLE' | 'NOT_BILLABLE'; /** * ID of the customer record in the connected accounting integration. No public * Rippling API is currently available to retrieve this accounting customer. */ gl_customer?: string; /** * Rippling ID of the accounting tax code. No public Rippling API is currently * available to retrieve this accounting tax code. */ gl_tax_code?: string; /** * Memo entered on this split. */ memo?: string; /** * Prepaid asset account for Rippling-managed amortization. */ prepaid_account?: LineItem.PrepaidAccount; /** * Start of the amortization period (YYYY-MM-DD). */ start_date?: string; /** * Total tax amount for this line in the merchant currency. */ tax_amount?: LineItem.TaxAmount; } namespace LineItem { /** * Amount of this split, in the merchant currency. The `value` is a decimal string. */ interface Amount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } interface DimensionChoices { /** * Name of the dimension, such as Department. */ dimension_name?: string; /** * Display name of the selected dimension value. */ label?: string; /** * ID of the selected value. For `DEPARTMENT` use `/departments/{id}/`, for * `WORK_LOCATION` use `/work-locations/{id}/`, and for a custom job dimension use * `/job-codes/{id}/`. */ value?: string; } /** * ERP amortization schedule associated with this line. */ interface GlAmortizationSchedule { /** * Rippling ID of the accounting integration that owns this object. No public * Rippling API is currently available to retrieve this accounting integration. */ accounting_integration_id?: string; /** * Number of amortization periods. */ amortization_period?: number; /** * End of the ERP amortization schedule as an ISO 8601 timestamp (for example, * 2026-12-31T00:00:00). May omit a timezone offset; an omitted offset does not * indicate UTC. Null when not set. */ end_date?: string; /** * Object ID in the connected accounting system. */ gl_object_id?: string; /** * Type of object in the connected accounting system: GL_AMORTIZATION_TEMPLATE * defines amortization rules; GL_AMORTIZATION_SCHEDULE tracks amortization; * GL_AMORTIZATION_SCHEDULE_RECURRENCE is a schedule entry; GL_ACCOUNT is a general * ledger account; GL_JOURNAL_ENTRY is a journal entry; GL_POSTING_PERIOD is an * accounting period; GL_VENDOR, GL_CUSTOMER, and GL_EMPLOYEE identify a vendor, * customer, and employee respectively; GL_SUBSIDIARY identifies a subsidiary. Null * when not set. */ gl_object_type?: 'GL_AMORTIZATION_TEMPLATE' | 'GL_AMORTIZATION_SCHEDULE' | 'GL_AMORTIZATION_SCHEDULE_RECURRENCE' | 'GL_ACCOUNT' | 'GL_JOURNAL_ENTRY' | 'GL_POSTING_PERIOD' | 'GL_VENDOR' | 'GL_CUSTOMER' | 'GL_EMPLOYEE' | 'GL_SUBSIDIARY'; /** * Accounting object name. */ name?: string; /** * Start of the ERP amortization schedule as an ISO 8601 timestamp (for example, * 2026-01-01T00:00:00). May omit a timezone offset; an omitted offset does not * indicate UTC. Null when not set. */ start_date?: string; /** * ERP amortization schedule status: NOT_STARTED means amortization has not begun; * IN_PROGRESS means amortization is underway; COMPLETED means amortization is * complete; ON_HOLD means amortization is paused. Null when not set. */ status?: 'NOT_STARTED' | 'IN_PROGRESS' | 'COMPLETED' | 'ON_HOLD'; /** * Amount already amortized as reported by the ERP, in the same currency as * total_amount. No currency conversion is applied; the schedule currency code is * not available in this response. */ total_amortized_amount?: number; /** * Total schedule amount as reported by the ERP, without currency conversion. The * schedule currency code is not available in this response. */ total_amount?: number; } /** * ERP amortization template for this line. */ interface GlAmortizationTemplate { /** * Rippling ID of the accounting integration that owns this object. No public * Rippling API is currently available to retrieve this accounting integration. */ accounting_integration_id?: string; /** * Object ID in the connected accounting system. */ gl_object_id?: string; /** * Type of object in the connected accounting system: GL_AMORTIZATION_TEMPLATE * defines amortization rules; GL_AMORTIZATION_SCHEDULE tracks amortization; * GL_AMORTIZATION_SCHEDULE_RECURRENCE is a schedule entry; GL_ACCOUNT is a general * ledger account; GL_JOURNAL_ENTRY is a journal entry; GL_POSTING_PERIOD is an * accounting period; GL_VENDOR, GL_CUSTOMER, and GL_EMPLOYEE identify a vendor, * customer, and employee respectively; GL_SUBSIDIARY identifies a subsidiary. Null * when not set. */ gl_object_type?: 'GL_AMORTIZATION_TEMPLATE' | 'GL_AMORTIZATION_SCHEDULE' | 'GL_AMORTIZATION_SCHEDULE_RECURRENCE' | 'GL_ACCOUNT' | 'GL_JOURNAL_ENTRY' | 'GL_POSTING_PERIOD' | 'GL_VENDOR' | 'GL_CUSTOMER' | 'GL_EMPLOYEE' | 'GL_SUBSIDIARY'; /** * Accounting object name. */ name?: string; } /** * Prepaid asset account for Rippling-managed amortization. */ interface PrepaidAccount { /** * Account ID in the connected accounting system. */ account_id?: string; /** * Account code. */ code?: string; /** * Account name. */ name?: string; /** * IDs of custom dimensions required by this account. */ required_custom_dimensions?: Array; /** * Whether this account requires a department. */ requires_department?: boolean; /** * Whether this account requires a work location. */ requires_work_location?: boolean; /** * Accounting account type: RECEIVABLE for accounts receivable, PAYABLE for * accounts payable, EXPENSE for expense accounts, or BANK for bank accounts. Null * when not set. */ type?: 'RECEIVABLE' | 'PAYABLE' | 'EXPENSE' | 'BANK'; } /** * Total tax amount for this line in the merchant currency. */ interface TaxAmount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } } /** * Amount charged by the merchant, in the merchant currency. The `value` is a * decimal string. */ interface MerchantAmount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } /** * A receipt file attached to a card transaction. */ interface Receipt { /** * URL of the original receipt file, such as the uploaded PDF. The link is signed * and expires, so fetch the transaction again for a current link instead of * storing it. */ url: string; /** * MIME type of the receipt file, such as `application/pdf`. Null when it cannot be * determined. */ content_type?: string | null; /** * Name of the receipt file. Null when it was not recorded. */ file_name?: string | null; /** * URL of an image preview of the receipt. Null when the receipt is itself an image * or no preview is available. Like `url`, the link is signed and expires. */ preview_url?: string | null; } /** * Vendor details. Expand with `card-transactions.read` and `finance-vendors.read`. * * Expandable field */ interface Vendor { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Whether the vendor is archived. Archived vendors remain available for historical * references. */ is_archived?: boolean; /** * URL of the vendor's logo. Null when no logo is available. */ logo?: string; /** * Canonical name of the Finance vendor. Name eq, ne, and in filters also match * alternate names. */ name?: string; } } /** * A Finance card transaction or authorization the caller can see. * * An authorization is a pending hold the card network places at the time of purchase. A card transaction * is the posted charge. List returns both; retrieve returns one by ID. A transaction the * caller cannot see returns 404, the same as one that does not exist. * PATCH `/card-transactions/{id}/` accepts only `line_items` and replaces the entire list. * Request `amount` and `tax_amount` are decimal strings (for example `"75.00"`), not Currency * objects. GET responses return those fields as Currency objects (`currency_type` + `value`). * The sum of request `amount` values must equal the transaction's merchant amount. */ export interface CardTransactionUpdateResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Date the transaction is booked in the accounting system, as an ISO 8601 date * (YYYY-MM-DD). */ accounting_date?: string; /** * Approval status of the transaction. `DRAFT`: not submitted for approval. * `PENDING`: awaiting required information or submission before approval. * `REQUESTED`: submitted and awaiting approval. `APPROVED`: approved. `REJECTED`: * rejected. `FINALIZED`: finalized for payment. `ACTIONED`: payment or * reimbursement completed. `CANCELLED`: cancelled. `FAILED`: payment failed. Null * for card authorizations. */ approval_status?: 'DRAFT' | 'PENDING' | 'REQUESTED' | 'APPROVED' | 'REJECTED' | 'FINALIZED' | 'ACTIONED' | 'CANCELLED' | 'FAILED'; /** * Other attached files, including filenames and recorded upload metadata. */ attachments?: Array; /** * State of the card authorization. `PENDING`: an active hold awaiting completion. * `CLOSED`: the authorization was declined, or it completed and was replaced by a * posted card transaction. `REVERSED`: the authorization was reversed and the hold * released. `EXPIRED`: the hold expired without completion. Null for posted card * transactions. */ authorization_state?: 'PENDING' | 'CLOSED' | 'REVERSED' | 'EXPIRED'; /** * ID of the Finance card used. No public API is currently available to retrieve * this card. */ card_id?: string; /** * Amount in the company's headquarters currency. The `value` is a decimal string. */ company_amount?: CardTransactionUpdateResponse.CompanyAmount; /** * ID of the legal entity the transaction belongs to. Use it with * `/company-legal-entities/{id}/`. */ entity_id?: string; /** * State of the sync to the accounting system. `NOT_FINALIZED`: not ready for * accounting review. `FOR_REVIEW`: ready for accounting review. `PENDING_SYNC`: * sync is in progress. `SYNCED`: synced to the accounting system. `ERROR`: sync * failed. `DO_NOT_SYNC`: marked to be excluded from sync. `EXPORTED`: exported for * accounting. `NOT_SYNCABLE`: this record cannot be synced. `AUTO_SYNC`: ready to * be synced automatically. Null when no sync state is set. */ gl_sync_state?: 'NOT_FINALIZED' | 'FOR_REVIEW' | 'PENDING_SYNC' | 'SYNCED' | 'ERROR' | 'DO_NOT_SYNC' | 'EXPORTED' | 'NOT_SYNCABLE' | 'AUTO_SYNC'; /** * Vendor in the connected accounting system. */ gl_vendor?: CardTransactionUpdateResponse.GlVendor; /** * Category splits of the transaction amount. Updates replace the entire list. */ line_items?: Array; /** * Memo entered on the transaction. */ memo?: string; /** * Amount charged by the merchant, in the merchant currency. The `value` is a * decimal string. */ merchant_amount?: CardTransactionUpdateResponse.MerchantAmount; /** * Receipt files attached to the transaction, in display order, up to 5. Empty when * there are none. Null when the caller cannot read the transaction's receipts. */ receipts?: Array | null; /** * When the purchase or authorization happened, as an ISO 8601 date-time in UTC. */ transaction_date?: string; /** * `CARD_TRANSACTION`: a posted card charge. `CARD_AUTHORIZATION`: a hold placed by * the card network before the charge posts. */ transaction_type?: 'CARD_TRANSACTION' | 'CARD_AUTHORIZATION'; /** * Vendor details. Expand with `card-transactions.read` and `finance-vendors.read`. * * Expandable field */ vendor?: CardTransactionUpdateResponse.Vendor; /** * ID of the Finance vendor. Use it with `/finance-vendors/{id}/`. */ vendor_id?: string; /** * Worker details. Expand with `card-transactions.read` and `workers.read`. * * Expandable field */ worker?: WorkersAPI.Worker; /** * ID of the worker who made the transaction. Use it with `/workers/{id}/`. */ worker_id?: string; } export declare namespace CardTransactionUpdateResponse { /** * A Finance transaction attachment with recorded upload details. */ interface Attachment { /** * URL for accessing the file. */ url: string; /** * Original file name, when recorded. */ file_name?: string; /** * When the attachment was uploaded, as an ISO 8601 date-time in UTC, when * recorded. */ uploaded_at?: string; /** * ID of the worker who uploaded the attachment. Use it with `/workers/{id}/`. */ uploaded_by_id?: string; } /** * Amount in the company's headquarters currency. The `value` is a decimal string. */ interface CompanyAmount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } /** * Vendor in the connected accounting system. */ interface GlVendor { /** * ID of the accounting vendor in Rippling. */ id?: string; /** * ID of the vendor in the accounting system. */ gl_vendor_id?: string; /** * Name of the vendor in the accounting system. */ name?: string; } interface LineItem { /** * Unique identifier of this line item. Null for older line items that have not * been assigned one yet. */ id?: string; /** * Whether this line is amortized. */ amortized?: boolean; /** * Amount of this split, in the merchant currency. The `value` is a decimal string. */ amount?: LineItem.Amount; /** * ID of the Finance category assigned to this split. Use it with * `/finance-categories/{id}/`. The category name is in `category_name`. */ category_id?: string; /** * Name of the finance category. */ category_name?: string; /** * Selected dimension values, keyed by dimension ID. `DEPARTMENT` and * `WORK_LOCATION` are the built-in keys. Get custom dimension IDs from * `/job-dimensions/` and `/job-dimensions/{id}/`. Each choice `value` is a job * code ID from `/job-codes/` and `/job-codes/{id}/`. */ dimension_choices?: { [key: string]: LineItem.DimensionChoices; }; /** * End of the amortization period (YYYY-MM-DD). */ end_date?: string; /** * ERP amortization schedule associated with this line. */ gl_amortization_schedule?: LineItem.GlAmortizationSchedule; /** * ERP amortization template for this line. */ gl_amortization_template?: LineItem.GlAmortizationTemplate; /** * Whether this split is billed to `gl_customer` in the accounting system. * `BILLABLE` means it is billed, `NOT_BILLABLE` means it is not. Null when not * set. */ gl_billable?: 'BILLABLE' | 'NOT_BILLABLE'; /** * ID of the customer record in the connected accounting integration. No public * Rippling API is currently available to retrieve this accounting customer. */ gl_customer?: string; /** * Rippling ID of the accounting tax code. No public Rippling API is currently * available to retrieve this accounting tax code. */ gl_tax_code?: string; /** * Memo entered on this split. */ memo?: string; /** * Prepaid asset account for Rippling-managed amortization. */ prepaid_account?: LineItem.PrepaidAccount; /** * Start of the amortization period (YYYY-MM-DD). */ start_date?: string; /** * Total tax amount for this line in the merchant currency. */ tax_amount?: LineItem.TaxAmount; } namespace LineItem { /** * Amount of this split, in the merchant currency. The `value` is a decimal string. */ interface Amount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } interface DimensionChoices { /** * Name of the dimension, such as Department. */ dimension_name?: string; /** * Display name of the selected dimension value. */ label?: string; /** * ID of the selected value. For `DEPARTMENT` use `/departments/{id}/`, for * `WORK_LOCATION` use `/work-locations/{id}/`, and for a custom job dimension use * `/job-codes/{id}/`. */ value?: string; } /** * ERP amortization schedule associated with this line. */ interface GlAmortizationSchedule { /** * Rippling ID of the accounting integration that owns this object. No public * Rippling API is currently available to retrieve this accounting integration. */ accounting_integration_id?: string; /** * Number of amortization periods. */ amortization_period?: number; /** * End of the ERP amortization schedule as an ISO 8601 timestamp (for example, * 2026-12-31T00:00:00). May omit a timezone offset; an omitted offset does not * indicate UTC. Null when not set. */ end_date?: string; /** * Object ID in the connected accounting system. */ gl_object_id?: string; /** * Type of object in the connected accounting system: GL_AMORTIZATION_TEMPLATE * defines amortization rules; GL_AMORTIZATION_SCHEDULE tracks amortization; * GL_AMORTIZATION_SCHEDULE_RECURRENCE is a schedule entry; GL_ACCOUNT is a general * ledger account; GL_JOURNAL_ENTRY is a journal entry; GL_POSTING_PERIOD is an * accounting period; GL_VENDOR, GL_CUSTOMER, and GL_EMPLOYEE identify a vendor, * customer, and employee respectively; GL_SUBSIDIARY identifies a subsidiary. Null * when not set. */ gl_object_type?: 'GL_AMORTIZATION_TEMPLATE' | 'GL_AMORTIZATION_SCHEDULE' | 'GL_AMORTIZATION_SCHEDULE_RECURRENCE' | 'GL_ACCOUNT' | 'GL_JOURNAL_ENTRY' | 'GL_POSTING_PERIOD' | 'GL_VENDOR' | 'GL_CUSTOMER' | 'GL_EMPLOYEE' | 'GL_SUBSIDIARY'; /** * Accounting object name. */ name?: string; /** * Start of the ERP amortization schedule as an ISO 8601 timestamp (for example, * 2026-01-01T00:00:00). May omit a timezone offset; an omitted offset does not * indicate UTC. Null when not set. */ start_date?: string; /** * ERP amortization schedule status: NOT_STARTED means amortization has not begun; * IN_PROGRESS means amortization is underway; COMPLETED means amortization is * complete; ON_HOLD means amortization is paused. Null when not set. */ status?: 'NOT_STARTED' | 'IN_PROGRESS' | 'COMPLETED' | 'ON_HOLD'; /** * Amount already amortized as reported by the ERP, in the same currency as * total_amount. No currency conversion is applied; the schedule currency code is * not available in this response. */ total_amortized_amount?: number; /** * Total schedule amount as reported by the ERP, without currency conversion. The * schedule currency code is not available in this response. */ total_amount?: number; } /** * ERP amortization template for this line. */ interface GlAmortizationTemplate { /** * Rippling ID of the accounting integration that owns this object. No public * Rippling API is currently available to retrieve this accounting integration. */ accounting_integration_id?: string; /** * Object ID in the connected accounting system. */ gl_object_id?: string; /** * Type of object in the connected accounting system: GL_AMORTIZATION_TEMPLATE * defines amortization rules; GL_AMORTIZATION_SCHEDULE tracks amortization; * GL_AMORTIZATION_SCHEDULE_RECURRENCE is a schedule entry; GL_ACCOUNT is a general * ledger account; GL_JOURNAL_ENTRY is a journal entry; GL_POSTING_PERIOD is an * accounting period; GL_VENDOR, GL_CUSTOMER, and GL_EMPLOYEE identify a vendor, * customer, and employee respectively; GL_SUBSIDIARY identifies a subsidiary. Null * when not set. */ gl_object_type?: 'GL_AMORTIZATION_TEMPLATE' | 'GL_AMORTIZATION_SCHEDULE' | 'GL_AMORTIZATION_SCHEDULE_RECURRENCE' | 'GL_ACCOUNT' | 'GL_JOURNAL_ENTRY' | 'GL_POSTING_PERIOD' | 'GL_VENDOR' | 'GL_CUSTOMER' | 'GL_EMPLOYEE' | 'GL_SUBSIDIARY'; /** * Accounting object name. */ name?: string; } /** * Prepaid asset account for Rippling-managed amortization. */ interface PrepaidAccount { /** * Account ID in the connected accounting system. */ account_id?: string; /** * Account code. */ code?: string; /** * Account name. */ name?: string; /** * IDs of custom dimensions required by this account. */ required_custom_dimensions?: Array; /** * Whether this account requires a department. */ requires_department?: boolean; /** * Whether this account requires a work location. */ requires_work_location?: boolean; /** * Accounting account type: RECEIVABLE for accounts receivable, PAYABLE for * accounts payable, EXPENSE for expense accounts, or BANK for bank accounts. Null * when not set. */ type?: 'RECEIVABLE' | 'PAYABLE' | 'EXPENSE' | 'BANK'; } /** * Total tax amount for this line in the merchant currency. */ interface TaxAmount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } } /** * Amount charged by the merchant, in the merchant currency. The `value` is a * decimal string. */ interface MerchantAmount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } /** * A receipt file attached to a card transaction. */ interface Receipt { /** * URL of the original receipt file, such as the uploaded PDF. The link is signed * and expires, so fetch the transaction again for a current link instead of * storing it. */ url: string; /** * MIME type of the receipt file, such as `application/pdf`. Null when it cannot be * determined. */ content_type?: string | null; /** * Name of the receipt file. Null when it was not recorded. */ file_name?: string | null; /** * URL of an image preview of the receipt. Null when the receipt is itself an image * or no preview is available. Like `url`, the link is signed and expires. */ preview_url?: string | null; } /** * Vendor details. Expand with `card-transactions.read` and `finance-vendors.read`. * * Expandable field */ interface Vendor { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Whether the vendor is archived. Archived vendors remain available for historical * references. */ is_archived?: boolean; /** * URL of the vendor's logo. Null when no logo is available. */ logo?: string; /** * Canonical name of the Finance vendor. Name eq, ne, and in filters also match * alternate names. */ name?: string; } } /** * A Finance card transaction or authorization the caller can see. * * An authorization is a pending hold the card network places at the time of purchase. A card transaction * is the posted charge. List returns both; retrieve returns one by ID. A transaction the * caller cannot see returns 404, the same as one that does not exist. * PATCH `/card-transactions/{id}/` accepts only `line_items` and replaces the entire list. * Request `amount` and `tax_amount` are decimal strings (for example `"75.00"`), not Currency * objects. GET responses return those fields as Currency objects (`currency_type` + `value`). * The sum of request `amount` values must equal the transaction's merchant amount. */ export interface CardTransactionUploadReceiptResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Date the transaction is booked in the accounting system, as an ISO 8601 date * (YYYY-MM-DD). */ accounting_date?: string; /** * Approval status of the transaction. `DRAFT`: not submitted for approval. * `PENDING`: awaiting required information or submission before approval. * `REQUESTED`: submitted and awaiting approval. `APPROVED`: approved. `REJECTED`: * rejected. `FINALIZED`: finalized for payment. `ACTIONED`: payment or * reimbursement completed. `CANCELLED`: cancelled. `FAILED`: payment failed. Null * for card authorizations. */ approval_status?: 'DRAFT' | 'PENDING' | 'REQUESTED' | 'APPROVED' | 'REJECTED' | 'FINALIZED' | 'ACTIONED' | 'CANCELLED' | 'FAILED'; /** * Other attached files, including filenames and recorded upload metadata. */ attachments?: Array; /** * State of the card authorization. `PENDING`: an active hold awaiting completion. * `CLOSED`: the authorization was declined, or it completed and was replaced by a * posted card transaction. `REVERSED`: the authorization was reversed and the hold * released. `EXPIRED`: the hold expired without completion. Null for posted card * transactions. */ authorization_state?: 'PENDING' | 'CLOSED' | 'REVERSED' | 'EXPIRED'; /** * ID of the Finance card used. No public API is currently available to retrieve * this card. */ card_id?: string; /** * Amount in the company's headquarters currency. The `value` is a decimal string. */ company_amount?: CardTransactionUploadReceiptResponse.CompanyAmount; /** * ID of the legal entity the transaction belongs to. Use it with * `/company-legal-entities/{id}/`. */ entity_id?: string; /** * State of the sync to the accounting system. `NOT_FINALIZED`: not ready for * accounting review. `FOR_REVIEW`: ready for accounting review. `PENDING_SYNC`: * sync is in progress. `SYNCED`: synced to the accounting system. `ERROR`: sync * failed. `DO_NOT_SYNC`: marked to be excluded from sync. `EXPORTED`: exported for * accounting. `NOT_SYNCABLE`: this record cannot be synced. `AUTO_SYNC`: ready to * be synced automatically. Null when no sync state is set. */ gl_sync_state?: 'NOT_FINALIZED' | 'FOR_REVIEW' | 'PENDING_SYNC' | 'SYNCED' | 'ERROR' | 'DO_NOT_SYNC' | 'EXPORTED' | 'NOT_SYNCABLE' | 'AUTO_SYNC'; /** * Vendor in the connected accounting system. */ gl_vendor?: CardTransactionUploadReceiptResponse.GlVendor; /** * Category splits of the transaction amount. Updates replace the entire list. */ line_items?: Array; /** * Memo entered on the transaction. */ memo?: string; /** * Amount charged by the merchant, in the merchant currency. The `value` is a * decimal string. */ merchant_amount?: CardTransactionUploadReceiptResponse.MerchantAmount; /** * Receipt files attached to the transaction, in display order, up to 5. Empty when * there are none. Null when the caller cannot read the transaction's receipts. */ receipts?: Array | null; /** * When the purchase or authorization happened, as an ISO 8601 date-time in UTC. */ transaction_date?: string; /** * `CARD_TRANSACTION`: a posted card charge. `CARD_AUTHORIZATION`: a hold placed by * the card network before the charge posts. */ transaction_type?: 'CARD_TRANSACTION' | 'CARD_AUTHORIZATION'; /** * Vendor details. Expand with `card-transactions.read` and `finance-vendors.read`. * * Expandable field */ vendor?: CardTransactionUploadReceiptResponse.Vendor; /** * ID of the Finance vendor. Use it with `/finance-vendors/{id}/`. */ vendor_id?: string; /** * Worker details. Expand with `card-transactions.read` and `workers.read`. * * Expandable field */ worker?: WorkersAPI.Worker; /** * ID of the worker who made the transaction. Use it with `/workers/{id}/`. */ worker_id?: string; } export declare namespace CardTransactionUploadReceiptResponse { /** * A Finance transaction attachment with recorded upload details. */ interface Attachment { /** * URL for accessing the file. */ url: string; /** * Original file name, when recorded. */ file_name?: string; /** * When the attachment was uploaded, as an ISO 8601 date-time in UTC, when * recorded. */ uploaded_at?: string; /** * ID of the worker who uploaded the attachment. Use it with `/workers/{id}/`. */ uploaded_by_id?: string; } /** * Amount in the company's headquarters currency. The `value` is a decimal string. */ interface CompanyAmount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } /** * Vendor in the connected accounting system. */ interface GlVendor { /** * ID of the accounting vendor in Rippling. */ id?: string; /** * ID of the vendor in the accounting system. */ gl_vendor_id?: string; /** * Name of the vendor in the accounting system. */ name?: string; } interface LineItem { /** * Unique identifier of this line item. Null for older line items that have not * been assigned one yet. */ id?: string; /** * Whether this line is amortized. */ amortized?: boolean; /** * Amount of this split, in the merchant currency. The `value` is a decimal string. */ amount?: LineItem.Amount; /** * ID of the Finance category assigned to this split. Use it with * `/finance-categories/{id}/`. The category name is in `category_name`. */ category_id?: string; /** * Name of the finance category. */ category_name?: string; /** * Selected dimension values, keyed by dimension ID. `DEPARTMENT` and * `WORK_LOCATION` are the built-in keys. Get custom dimension IDs from * `/job-dimensions/` and `/job-dimensions/{id}/`. Each choice `value` is a job * code ID from `/job-codes/` and `/job-codes/{id}/`. */ dimension_choices?: { [key: string]: LineItem.DimensionChoices; }; /** * End of the amortization period (YYYY-MM-DD). */ end_date?: string; /** * ERP amortization schedule associated with this line. */ gl_amortization_schedule?: LineItem.GlAmortizationSchedule; /** * ERP amortization template for this line. */ gl_amortization_template?: LineItem.GlAmortizationTemplate; /** * Whether this split is billed to `gl_customer` in the accounting system. * `BILLABLE` means it is billed, `NOT_BILLABLE` means it is not. Null when not * set. */ gl_billable?: 'BILLABLE' | 'NOT_BILLABLE'; /** * ID of the customer record in the connected accounting integration. No public * Rippling API is currently available to retrieve this accounting customer. */ gl_customer?: string; /** * Rippling ID of the accounting tax code. No public Rippling API is currently * available to retrieve this accounting tax code. */ gl_tax_code?: string; /** * Memo entered on this split. */ memo?: string; /** * Prepaid asset account for Rippling-managed amortization. */ prepaid_account?: LineItem.PrepaidAccount; /** * Start of the amortization period (YYYY-MM-DD). */ start_date?: string; /** * Total tax amount for this line in the merchant currency. */ tax_amount?: LineItem.TaxAmount; } namespace LineItem { /** * Amount of this split, in the merchant currency. The `value` is a decimal string. */ interface Amount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } interface DimensionChoices { /** * Name of the dimension, such as Department. */ dimension_name?: string; /** * Display name of the selected dimension value. */ label?: string; /** * ID of the selected value. For `DEPARTMENT` use `/departments/{id}/`, for * `WORK_LOCATION` use `/work-locations/{id}/`, and for a custom job dimension use * `/job-codes/{id}/`. */ value?: string; } /** * ERP amortization schedule associated with this line. */ interface GlAmortizationSchedule { /** * Rippling ID of the accounting integration that owns this object. No public * Rippling API is currently available to retrieve this accounting integration. */ accounting_integration_id?: string; /** * Number of amortization periods. */ amortization_period?: number; /** * End of the ERP amortization schedule as an ISO 8601 timestamp (for example, * 2026-12-31T00:00:00). May omit a timezone offset; an omitted offset does not * indicate UTC. Null when not set. */ end_date?: string; /** * Object ID in the connected accounting system. */ gl_object_id?: string; /** * Type of object in the connected accounting system: GL_AMORTIZATION_TEMPLATE * defines amortization rules; GL_AMORTIZATION_SCHEDULE tracks amortization; * GL_AMORTIZATION_SCHEDULE_RECURRENCE is a schedule entry; GL_ACCOUNT is a general * ledger account; GL_JOURNAL_ENTRY is a journal entry; GL_POSTING_PERIOD is an * accounting period; GL_VENDOR, GL_CUSTOMER, and GL_EMPLOYEE identify a vendor, * customer, and employee respectively; GL_SUBSIDIARY identifies a subsidiary. Null * when not set. */ gl_object_type?: 'GL_AMORTIZATION_TEMPLATE' | 'GL_AMORTIZATION_SCHEDULE' | 'GL_AMORTIZATION_SCHEDULE_RECURRENCE' | 'GL_ACCOUNT' | 'GL_JOURNAL_ENTRY' | 'GL_POSTING_PERIOD' | 'GL_VENDOR' | 'GL_CUSTOMER' | 'GL_EMPLOYEE' | 'GL_SUBSIDIARY'; /** * Accounting object name. */ name?: string; /** * Start of the ERP amortization schedule as an ISO 8601 timestamp (for example, * 2026-01-01T00:00:00). May omit a timezone offset; an omitted offset does not * indicate UTC. Null when not set. */ start_date?: string; /** * ERP amortization schedule status: NOT_STARTED means amortization has not begun; * IN_PROGRESS means amortization is underway; COMPLETED means amortization is * complete; ON_HOLD means amortization is paused. Null when not set. */ status?: 'NOT_STARTED' | 'IN_PROGRESS' | 'COMPLETED' | 'ON_HOLD'; /** * Amount already amortized as reported by the ERP, in the same currency as * total_amount. No currency conversion is applied; the schedule currency code is * not available in this response. */ total_amortized_amount?: number; /** * Total schedule amount as reported by the ERP, without currency conversion. The * schedule currency code is not available in this response. */ total_amount?: number; } /** * ERP amortization template for this line. */ interface GlAmortizationTemplate { /** * Rippling ID of the accounting integration that owns this object. No public * Rippling API is currently available to retrieve this accounting integration. */ accounting_integration_id?: string; /** * Object ID in the connected accounting system. */ gl_object_id?: string; /** * Type of object in the connected accounting system: GL_AMORTIZATION_TEMPLATE * defines amortization rules; GL_AMORTIZATION_SCHEDULE tracks amortization; * GL_AMORTIZATION_SCHEDULE_RECURRENCE is a schedule entry; GL_ACCOUNT is a general * ledger account; GL_JOURNAL_ENTRY is a journal entry; GL_POSTING_PERIOD is an * accounting period; GL_VENDOR, GL_CUSTOMER, and GL_EMPLOYEE identify a vendor, * customer, and employee respectively; GL_SUBSIDIARY identifies a subsidiary. Null * when not set. */ gl_object_type?: 'GL_AMORTIZATION_TEMPLATE' | 'GL_AMORTIZATION_SCHEDULE' | 'GL_AMORTIZATION_SCHEDULE_RECURRENCE' | 'GL_ACCOUNT' | 'GL_JOURNAL_ENTRY' | 'GL_POSTING_PERIOD' | 'GL_VENDOR' | 'GL_CUSTOMER' | 'GL_EMPLOYEE' | 'GL_SUBSIDIARY'; /** * Accounting object name. */ name?: string; } /** * Prepaid asset account for Rippling-managed amortization. */ interface PrepaidAccount { /** * Account ID in the connected accounting system. */ account_id?: string; /** * Account code. */ code?: string; /** * Account name. */ name?: string; /** * IDs of custom dimensions required by this account. */ required_custom_dimensions?: Array; /** * Whether this account requires a department. */ requires_department?: boolean; /** * Whether this account requires a work location. */ requires_work_location?: boolean; /** * Accounting account type: RECEIVABLE for accounts receivable, PAYABLE for * accounts payable, EXPENSE for expense accounts, or BANK for bank accounts. Null * when not set. */ type?: 'RECEIVABLE' | 'PAYABLE' | 'EXPENSE' | 'BANK'; } /** * Total tax amount for this line in the merchant currency. */ interface TaxAmount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } } /** * Amount charged by the merchant, in the merchant currency. The `value` is a * decimal string. */ interface MerchantAmount { /** * The currency type, ex: USD, EUR, etc. */ currency_type?: string; /** * The decimal amount for the currency. */ value?: number; } /** * A receipt file attached to a card transaction. */ interface Receipt { /** * URL of the original receipt file, such as the uploaded PDF. The link is signed * and expires, so fetch the transaction again for a current link instead of * storing it. */ url: string; /** * MIME type of the receipt file, such as `application/pdf`. Null when it cannot be * determined. */ content_type?: string | null; /** * Name of the receipt file. Null when it was not recorded. */ file_name?: string | null; /** * URL of an image preview of the receipt. Null when the receipt is itself an image * or no preview is available. Like `url`, the link is signed and expires. */ preview_url?: string | null; } /** * Vendor details. Expand with `card-transactions.read` and `finance-vendors.read`. * * Expandable field */ interface Vendor { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Whether the vendor is archived. Archived vendors remain available for historical * references. */ is_archived?: boolean; /** * URL of the vendor's logo. Null when no logo is available. */ logo?: string; /** * Canonical name of the Finance vendor. Name eq, ne, and in filters also match * alternate names. */ name?: string; } } export interface CardTransactionListParams { cursor?: string; expand?: string; filter?: string; /** * The maximum number of results to return. Defaults to 50. Maximum is 100. */ limit?: number; order_by?: string; } export interface CardTransactionRetrieveParams { expand?: string; } export interface CardTransactionUpdateParams { /** * Category splits of the transaction amount. Updates replace the entire list. * `amount` and `tax_amount` are decimal strings in the merchant currency. The sum * of `amount` values must match the transaction's merchant amount. */ line_items?: Array; } export declare namespace CardTransactionUpdateParams { /** * PATCH body for a line item. `amount` and `tax_amount` are decimal strings, not * Currency objects. */ interface LineItem { /** * Amount of this split, in the merchant currency, as a decimal string. */ amount: string; /** * ID of the Finance category assigned to this split. Use it with * `/finance-categories/{id}/`. */ category_id: string; /** * Optional. Omit to create a new line. Replacing `line_items` assigns new IDs; a * supplied `id` is not preserved. */ id?: string; /** * Whether this line is amortized. */ amortized?: boolean; /** * Selected dimension values, keyed by dimension ID. `DEPARTMENT` and * `WORK_LOCATION` are the built-in keys. Get custom dimension IDs from * `/job-dimensions/` and `/job-dimensions/{id}/`. Each value is an ID: * `/departments/{id}/` for `DEPARTMENT`, `/work-locations/{id}/` for * `WORK_LOCATION`, and `/job-codes/{id}/` for a custom job dimension. */ dimension_choices?: { [key: string]: string; }; /** * End of the amortization period (YYYY-MM-DD). */ end_date?: string; /** * ERP amortization template for this line. */ gl_amortization_template?: LineItem.GlAmortizationTemplate; /** * Whether this split is billed to `gl_customer` in the accounting system. * `BILLABLE` means it is billed, `NOT_BILLABLE` means it is not. Null when not * set. */ gl_billable?: 'BILLABLE' | 'NOT_BILLABLE'; /** * ID of the customer record in the connected accounting integration. No public * Rippling API is currently available to retrieve this accounting customer. */ gl_customer?: string; /** * Rippling ID of the accounting tax code. No public Rippling API is currently * available to retrieve this accounting tax code. */ gl_tax_code?: string; /** * Memo entered on this split. */ memo?: string; /** * Prepaid asset account for Rippling-managed amortization. */ prepaid_account?: LineItem.PrepaidAccount; /** * Start of the amortization period (YYYY-MM-DD). */ start_date?: string; /** * Total tax amount for this line in the merchant currency, as a decimal string. */ tax_amount?: string; } namespace LineItem { /** * ERP amortization template for this line. */ interface GlAmortizationTemplate { /** * Rippling ID of the accounting integration that owns this template. No public * Rippling API is currently available to retrieve this accounting integration. */ accounting_integration_id?: string; /** * Object ID of the amortization template in the connected accounting system. */ gl_object_id?: string; /** * Amortization template name. */ name?: string; } /** * Prepaid asset account for Rippling-managed amortization. */ interface PrepaidAccount { /** * Account ID in the connected accounting system. */ account_id?: string; /** * Account name. */ name?: string; /** * Accounting account type: RECEIVABLE for accounts receivable, PAYABLE for * accounts payable, EXPENSE for expense accounts, or BANK for bank accounts. Null * when not set. */ type?: 'RECEIVABLE' | 'PAYABLE' | 'EXPENSE' | 'BANK'; } } } export interface CardTransactionUploadReceiptParams { /** * The receipt file: PDF, JPEG, PNG, or BMP, up to 10 MB. The type is detected from * the file's contents. */ file: Uploadable; } export declare namespace CardTransactions { export { type CardTransactionListResponse as CardTransactionListResponse, type CardTransactionRetrieveResponse as CardTransactionRetrieveResponse, type CardTransactionUpdateResponse as CardTransactionUpdateResponse, type CardTransactionUploadReceiptResponse as CardTransactionUploadReceiptResponse, type CardTransactionListResponsesPageCursorURL as CardTransactionListResponsesPageCursorURL, type CardTransactionListParams as CardTransactionListParams, type CardTransactionRetrieveParams as CardTransactionRetrieveParams, type CardTransactionUpdateParams as CardTransactionUpdateParams, type CardTransactionUploadReceiptParams as CardTransactionUploadReceiptParams, }; } //# sourceMappingURL=card-transactions.d.ts.map