conductor-node 12.0.0-beta.2 → 12.0.0-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/CHANGELOG.md +223 -0
  2. package/README.md +1 -1
  3. package/core.js +2 -1
  4. package/core.js.map +1 -1
  5. package/core.mjs +2 -1
  6. package/core.mjs.map +1 -1
  7. package/index.d.mts +4 -4
  8. package/index.d.ts +4 -4
  9. package/index.d.ts.map +1 -1
  10. package/index.js.map +1 -1
  11. package/index.mjs.map +1 -1
  12. package/package.json +8 -29
  13. package/pagination.js +1 -1
  14. package/pagination.js.map +1 -1
  15. package/pagination.mjs +1 -1
  16. package/pagination.mjs.map +1 -1
  17. package/resources/auth-sessions.d.ts +12 -16
  18. package/resources/auth-sessions.d.ts.map +1 -1
  19. package/resources/auth-sessions.js +3 -9
  20. package/resources/auth-sessions.js.map +1 -1
  21. package/resources/auth-sessions.mjs +3 -9
  22. package/resources/auth-sessions.mjs.map +1 -1
  23. package/resources/end-users.d.ts +20 -32
  24. package/resources/end-users.d.ts.map +1 -1
  25. package/resources/end-users.js +4 -12
  26. package/resources/end-users.js.map +1 -1
  27. package/resources/end-users.mjs +4 -12
  28. package/resources/end-users.mjs.map +1 -1
  29. package/resources/index.d.ts +2 -2
  30. package/resources/index.d.ts.map +1 -1
  31. package/resources/index.js.map +1 -1
  32. package/resources/index.mjs.map +1 -1
  33. package/resources/qbd/bill-check-payments.d.ts +4 -4
  34. package/resources/qbd/bill-credit-card-payments.d.ts +4 -4
  35. package/resources/qbd/bills.d.ts +7 -8
  36. package/resources/qbd/bills.d.ts.map +1 -1
  37. package/resources/qbd/bills.js.map +1 -1
  38. package/resources/qbd/bills.mjs.map +1 -1
  39. package/resources/qbd/checks.d.ts +4 -4
  40. package/resources/qbd/company.d.ts +354 -0
  41. package/resources/qbd/company.d.ts.map +1 -0
  42. package/resources/qbd/company.js +22 -0
  43. package/resources/qbd/company.js.map +1 -0
  44. package/resources/qbd/company.mjs +18 -0
  45. package/resources/qbd/company.mjs.map +1 -0
  46. package/resources/qbd/credit-card-charges.d.ts +4 -4
  47. package/resources/qbd/credit-card-credits.d.ts +4 -4
  48. package/resources/qbd/credit-memos.d.ts +4 -4
  49. package/resources/qbd/customers.d.ts +2 -2
  50. package/resources/qbd/customers.d.ts.map +1 -1
  51. package/resources/qbd/employees.d.ts +89 -36
  52. package/resources/qbd/employees.d.ts.map +1 -1
  53. package/resources/qbd/employees.js.map +1 -1
  54. package/resources/qbd/employees.mjs.map +1 -1
  55. package/resources/qbd/estimates.d.ts +4 -4
  56. package/resources/qbd/index.d.ts +7 -1
  57. package/resources/qbd/index.d.ts.map +1 -1
  58. package/resources/qbd/index.js +17 -2
  59. package/resources/qbd/index.js.map +1 -1
  60. package/resources/qbd/index.mjs +6 -0
  61. package/resources/qbd/index.mjs.map +1 -1
  62. package/resources/qbd/inventory-adjustments.d.ts +4 -4
  63. package/resources/qbd/inventory-assembly-items.d.ts +1 -1
  64. package/resources/qbd/inventory-assembly-items.d.ts.map +1 -1
  65. package/resources/qbd/inventory-items.d.ts +1 -1
  66. package/resources/qbd/inventory-items.d.ts.map +1 -1
  67. package/resources/qbd/invoices.d.ts +4 -4
  68. package/resources/qbd/item-receipts.d.ts +2336 -0
  69. package/resources/qbd/item-receipts.d.ts.map +1 -0
  70. package/resources/qbd/item-receipts.js +69 -0
  71. package/resources/qbd/item-receipts.js.map +1 -0
  72. package/resources/qbd/item-receipts.mjs +64 -0
  73. package/resources/qbd/item-receipts.mjs.map +1 -0
  74. package/resources/qbd/journal-entries.d.ts +4 -4
  75. package/resources/qbd/preferences.d.ts +591 -0
  76. package/resources/qbd/preferences.d.ts.map +1 -0
  77. package/resources/qbd/preferences.js +21 -0
  78. package/resources/qbd/preferences.js.map +1 -0
  79. package/resources/qbd/preferences.mjs +17 -0
  80. package/resources/qbd/preferences.mjs.map +1 -0
  81. package/resources/qbd/price-levels.d.ts +454 -0
  82. package/resources/qbd/price-levels.d.ts.map +1 -0
  83. package/resources/qbd/price-levels.js +54 -0
  84. package/resources/qbd/price-levels.js.map +1 -0
  85. package/resources/qbd/price-levels.mjs +50 -0
  86. package/resources/qbd/price-levels.mjs.map +1 -0
  87. package/resources/qbd/purchase-orders.d.ts +4 -4
  88. package/resources/qbd/qbd.d.ts +52 -0
  89. package/resources/qbd/qbd.d.ts.map +1 -1
  90. package/resources/qbd/qbd.js +40 -0
  91. package/resources/qbd/qbd.js.map +1 -1
  92. package/resources/qbd/qbd.mjs +40 -0
  93. package/resources/qbd/qbd.mjs.map +1 -1
  94. package/resources/qbd/receive-payments.d.ts +4 -4
  95. package/resources/qbd/sales-orders.d.ts +4 -4
  96. package/resources/qbd/sales-receipts.d.ts +4 -4
  97. package/resources/qbd/time-tracking-activities.d.ts +485 -0
  98. package/resources/qbd/time-tracking-activities.d.ts.map +1 -0
  99. package/resources/qbd/time-tracking-activities.js +66 -0
  100. package/resources/qbd/time-tracking-activities.js.map +1 -0
  101. package/resources/qbd/time-tracking-activities.mjs +61 -0
  102. package/resources/qbd/time-tracking-activities.mjs.map +1 -0
  103. package/resources/qbd/transactions.d.ts +310 -0
  104. package/resources/qbd/transactions.d.ts.map +1 -0
  105. package/resources/qbd/transactions.js +40 -0
  106. package/resources/qbd/transactions.js.map +1 -0
  107. package/resources/qbd/transactions.mjs +35 -0
  108. package/resources/qbd/transactions.mjs.map +1 -0
  109. package/resources/qbd/transfers.d.ts +4 -4
  110. package/resources/qbd/vendor-credits.d.ts +4 -4
  111. package/resources/qbd/vendors.d.ts +6 -6
  112. package/resources/qbd/vendors.d.ts.map +1 -1
  113. package/resources/qbd.d.ts +2 -0
  114. package/resources/qbd.d.ts.map +1 -0
  115. package/resources/qbd.js +19 -0
  116. package/resources/qbd.js.map +1 -0
  117. package/resources/qbd.mjs +3 -0
  118. package/resources/qbd.mjs.map +1 -0
  119. package/resources.d.ts +2 -0
  120. package/resources.d.ts.map +1 -0
  121. package/resources.js +18 -0
  122. package/resources.js.map +1 -0
  123. package/resources.mjs +2 -0
  124. package/resources.mjs.map +1 -0
  125. package/src/core.ts +3 -3
  126. package/src/index.ts +6 -4
  127. package/src/pagination.ts +1 -1
  128. package/src/resources/auth-sessions.ts +12 -19
  129. package/src/resources/end-users.ts +19 -40
  130. package/src/resources/index.ts +1 -2
  131. package/src/resources/qbd/bill-check-payments.ts +4 -4
  132. package/src/resources/qbd/bill-credit-card-payments.ts +4 -4
  133. package/src/resources/qbd/bills.ts +7 -8
  134. package/src/resources/qbd/checks.ts +4 -4
  135. package/src/resources/qbd/company.ts +466 -0
  136. package/src/resources/qbd/credit-card-charges.ts +4 -4
  137. package/src/resources/qbd/credit-card-credits.ts +4 -4
  138. package/src/resources/qbd/credit-memos.ts +4 -4
  139. package/src/resources/qbd/customers.ts +2 -2
  140. package/src/resources/qbd/employees.ts +90 -36
  141. package/src/resources/qbd/estimates.ts +4 -4
  142. package/src/resources/qbd/index.ts +41 -1
  143. package/src/resources/qbd/inventory-adjustments.ts +4 -4
  144. package/src/resources/qbd/inventory-assembly-items.ts +1 -1
  145. package/src/resources/qbd/inventory-items.ts +1 -1
  146. package/src/resources/qbd/invoices.ts +4 -4
  147. package/src/resources/qbd/item-receipts.ts +2783 -0
  148. package/src/resources/qbd/journal-entries.ts +4 -4
  149. package/src/resources/qbd/preferences.ts +684 -0
  150. package/src/resources/qbd/price-levels.ts +561 -0
  151. package/src/resources/qbd/purchase-orders.ts +4 -4
  152. package/src/resources/qbd/qbd.ts +156 -0
  153. package/src/resources/qbd/receive-payments.ts +4 -4
  154. package/src/resources/qbd/sales-orders.ts +4 -4
  155. package/src/resources/qbd/sales-receipts.ts +4 -4
  156. package/src/resources/qbd/time-tracking-activities.ts +615 -0
  157. package/src/resources/qbd/transactions.ts +439 -0
  158. package/src/resources/qbd/transfers.ts +4 -4
  159. package/src/resources/qbd/vendor-credits.ts +4 -4
  160. package/src/resources/qbd/vendors.ts +6 -6
  161. package/src/resources/qbd.ts +3 -0
  162. package/src/resources.ts +1 -0
  163. package/src/version.ts +1 -1
  164. package/version.d.ts +1 -1
  165. package/version.d.ts.map +1 -1
  166. package/version.js +1 -1
  167. package/version.js.map +1 -1
  168. package/version.mjs +1 -1
  169. package/version.mjs.map +1 -1
@@ -0,0 +1,2783 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+ import { CursorPage, type CursorPageParams } from '../../pagination';
6
+
7
+ export class ItemReceipts extends APIResource {
8
+ /**
9
+ * Creates a new item receipt.
10
+ */
11
+ create(params: ItemReceiptCreateParams, options?: Core.RequestOptions): Core.APIPromise<ItemReceipt> {
12
+ const { conductorEndUserId, ...body } = params;
13
+ return this._client.post('/quickbooks-desktop/item-receipts', {
14
+ body,
15
+ ...options,
16
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
17
+ });
18
+ }
19
+
20
+ /**
21
+ * Retrieves an item receipt by ID.
22
+ */
23
+ retrieve(
24
+ id: string,
25
+ params: ItemReceiptRetrieveParams,
26
+ options?: Core.RequestOptions,
27
+ ): Core.APIPromise<ItemReceipt> {
28
+ const { conductorEndUserId } = params;
29
+ return this._client.get(`/quickbooks-desktop/item-receipts/${id}`, {
30
+ ...options,
31
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
32
+ });
33
+ }
34
+
35
+ /**
36
+ * Updates an existing item receipt.
37
+ */
38
+ update(
39
+ id: string,
40
+ params: ItemReceiptUpdateParams,
41
+ options?: Core.RequestOptions,
42
+ ): Core.APIPromise<ItemReceipt> {
43
+ const { conductorEndUserId, ...body } = params;
44
+ return this._client.post(`/quickbooks-desktop/item-receipts/${id}`, {
45
+ body,
46
+ ...options,
47
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
48
+ });
49
+ }
50
+
51
+ /**
52
+ * Returns a list of item receipts. Use the `cursor` parameter to paginate through
53
+ * the results.
54
+ */
55
+ list(
56
+ params: ItemReceiptListParams,
57
+ options?: Core.RequestOptions,
58
+ ): Core.PagePromise<ItemReceiptsCursorPage, ItemReceipt> {
59
+ const { conductorEndUserId, ...query } = params;
60
+ return this._client.getAPIList('/quickbooks-desktop/item-receipts', ItemReceiptsCursorPage, {
61
+ query,
62
+ ...options,
63
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
64
+ });
65
+ }
66
+
67
+ /**
68
+ * Permanently deletes a an item receipt. The deletion will fail if the item
69
+ * receipt is currently in use or has any linked transactions that are in use.
70
+ */
71
+ delete(
72
+ id: string,
73
+ params: ItemReceiptDeleteParams,
74
+ options?: Core.RequestOptions,
75
+ ): Core.APIPromise<ItemReceiptDeleteResponse> {
76
+ const { conductorEndUserId } = params;
77
+ return this._client.delete(`/quickbooks-desktop/item-receipts/${id}`, {
78
+ ...options,
79
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
80
+ });
81
+ }
82
+ }
83
+
84
+ export class ItemReceiptsCursorPage extends CursorPage<ItemReceipt> {}
85
+
86
+ export interface ItemReceipt {
87
+ /**
88
+ * The unique identifier assigned by QuickBooks to this item receipt. This ID is
89
+ * unique across all transaction types.
90
+ */
91
+ id: string;
92
+
93
+ /**
94
+ * The date and time when this item receipt was created, in ISO 8601 format
95
+ * (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
96
+ * in QuickBooks.
97
+ */
98
+ createdAt: string;
99
+
100
+ /**
101
+ * The item receipt's currency. For built-in currencies, the name and code are
102
+ * standard international values. For user-defined currencies, all values are
103
+ * editable.
104
+ */
105
+ currency: ItemReceipt.Currency | null;
106
+
107
+ /**
108
+ * The custom fields for the item receipt object, added as user-defined data
109
+ * extensions, not included in the standard QuickBooks object.
110
+ */
111
+ customFields: Array<ItemReceipt.CustomField>;
112
+
113
+ /**
114
+ * The market exchange rate between this item receipt's currency and the home
115
+ * currency in QuickBooks at the time of this transaction. Represented as a decimal
116
+ * value (e.g., 1.2345 for 1 EUR = 1.2345 USD if USD is the home currency).
117
+ */
118
+ exchangeRate: number | null;
119
+
120
+ /**
121
+ * The item receipt's expense lines, each representing one line in this expense.
122
+ */
123
+ expenseLines: Array<ItemReceipt.ExpenseLine>;
124
+
125
+ /**
126
+ * A globally unique identifier (GUID) you, the developer, can provide for tracking
127
+ * this object in your external system. This field is immutable and can only be set
128
+ * during object creation.
129
+ */
130
+ externalId: string | null;
131
+
132
+ /**
133
+ * The item receipt's item group lines, each representing a predefined set of items
134
+ * bundled together because they are commonly purchased together or grouped for
135
+ * faster entry.
136
+ */
137
+ itemLineGroups: Array<ItemReceipt.ItemLineGroup>;
138
+
139
+ /**
140
+ * The item receipt's item lines, each representing the purchase of a specific item
141
+ * or service.
142
+ */
143
+ itemLines: Array<ItemReceipt.ItemLine>;
144
+
145
+ /**
146
+ * The liability account used to track the amount owed for this item receipt.
147
+ */
148
+ liabilityAccount: ItemReceipt.LiabilityAccount;
149
+
150
+ /**
151
+ * The item receipt's linked transactions, such as payments applied, credits used,
152
+ * or associated purchase orders.
153
+ *
154
+ * **IMPORTANT**: You must specify the parameter `includeLinkedTransactions` when
155
+ * fetching a list of item receipts to receive this field because it is not
156
+ * returned by default.
157
+ */
158
+ linkedTransactions: Array<ItemReceipt.LinkedTransaction>;
159
+
160
+ /**
161
+ * A memo or note for this item receipt.
162
+ */
163
+ memo: string | null;
164
+
165
+ /**
166
+ * The type of object. This value is always `"qbd_item_receipt"`.
167
+ */
168
+ objectType: 'qbd_item_receipt';
169
+
170
+ /**
171
+ * The Accounts-Payable (A/P) account to which this item receipt is assigned, used
172
+ * to track the amount owed. If not specified, QuickBooks Desktop will use its
173
+ * default A/P account.
174
+ *
175
+ * **IMPORTANT**: If this item receipt is linked to other transactions, this A/P
176
+ * account must match the `payablesAccount` used in those other transactions.
177
+ */
178
+ payablesAccount: ItemReceipt.PayablesAccount | null;
179
+
180
+ /**
181
+ * The case-sensitive user-defined reference number for this item receipt, which
182
+ * can be used to identify the transaction in QuickBooks. This value is not
183
+ * required to be unique and can be arbitrarily changed by the QuickBooks user.
184
+ */
185
+ refNumber: string | null;
186
+
187
+ /**
188
+ * The current QuickBooks-assigned revision number of this item receipt object,
189
+ * which changes each time the object is modified. When updating this object, you
190
+ * must provide the most recent `revisionNumber` to ensure you're working with the
191
+ * latest data; otherwise, the update will return an error.
192
+ */
193
+ revisionNumber: string;
194
+
195
+ /**
196
+ * The sales-tax code for this item receipt, determining whether it is taxable or
197
+ * non-taxable. If set, this overrides any sales-tax codes defined on the vendor.
198
+ * This can be overridden on the item receipt's individual lines.
199
+ *
200
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
201
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
202
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
203
+ * non-taxable code to all sales.
204
+ */
205
+ salesTaxCode: ItemReceipt.SalesTaxCode | null;
206
+
207
+ /**
208
+ * The total monetary amount of this item receipt, equivalent to the sum of the
209
+ * amounts in `expenseLines`, `itemLines`, and `itemGroupLines`, represented as a
210
+ * decimal string.
211
+ */
212
+ totalAmount: string;
213
+
214
+ /**
215
+ * The total monetary amount of this item receipt converted to the home currency of
216
+ * the QuickBooks company file. Represented as a decimal string.
217
+ */
218
+ totalAmountInHomeCurrency: string | null;
219
+
220
+ /**
221
+ * The date of this item receipt, in ISO 8601 format (YYYY-MM-DD).
222
+ */
223
+ transactionDate: string;
224
+
225
+ /**
226
+ * The date and time when this item receipt was last updated, in ISO 8601 format
227
+ * (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
228
+ * in QuickBooks.
229
+ */
230
+ updatedAt: string;
231
+
232
+ /**
233
+ * The vendor who sent this item receipt for goods or services purchased.
234
+ */
235
+ vendor: ItemReceipt.Vendor;
236
+ }
237
+
238
+ export namespace ItemReceipt {
239
+ /**
240
+ * The item receipt's currency. For built-in currencies, the name and code are
241
+ * standard international values. For user-defined currencies, all values are
242
+ * editable.
243
+ */
244
+ export interface Currency {
245
+ /**
246
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
247
+ * across all objects of the same type, but not across different QuickBooks object
248
+ * types.
249
+ */
250
+ id: string | null;
251
+
252
+ /**
253
+ * The fully-qualified unique name for this object, formed by combining the names
254
+ * of its parent objects with its own `name`, separated by colons. Not
255
+ * case-sensitive.
256
+ */
257
+ fullName: string | null;
258
+ }
259
+
260
+ export interface CustomField {
261
+ /**
262
+ * The name of the custom field, unique for the specified `ownerId`. For public
263
+ * custom fields, this name is visible as a label in the QuickBooks UI.
264
+ */
265
+ name: string;
266
+
267
+ /**
268
+ * The identifier of the owner of the custom field, which QuickBooks internally
269
+ * calls a "data extension". For public custom fields visible in the UI, such as
270
+ * those added by the QuickBooks user, this is always "0". For private custom
271
+ * fields that are only visible to the application that created them, this is a
272
+ * valid GUID identifying the owning application. Internally, Conductor always
273
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
274
+ * objects.
275
+ */
276
+ ownerId: string;
277
+
278
+ /**
279
+ * The data type of this custom field.
280
+ */
281
+ type:
282
+ | 'amount_type'
283
+ | 'date_time_type'
284
+ | 'integer_type'
285
+ | 'percent_type'
286
+ | 'price_type'
287
+ | 'quantity_type'
288
+ | 'string_1024_type'
289
+ | 'string_255_type';
290
+
291
+ /**
292
+ * The value of this custom field. The maximum length depends on the field's data
293
+ * type.
294
+ */
295
+ value: string;
296
+ }
297
+
298
+ export interface ExpenseLine {
299
+ /**
300
+ * The unique identifier assigned by QuickBooks to this expense line. This ID is
301
+ * unique across all transaction line types.
302
+ */
303
+ id: string;
304
+
305
+ /**
306
+ * The expense account being debited (increased) for this expense line. The
307
+ * corresponding account being credited is usually a liability account (e.g.,
308
+ * Accounts-Payable) or an asset account (e.g., Cash), depending on the transaction
309
+ * type.
310
+ */
311
+ account: ExpenseLine.Account | null;
312
+
313
+ /**
314
+ * The monetary amount of this expense line, represented as a decimal string.
315
+ */
316
+ amount: string | null;
317
+
318
+ /**
319
+ * The billing status of this expense line.
320
+ */
321
+ billingStatus: 'billable' | 'has_been_billed' | 'not_billable' | null;
322
+
323
+ /**
324
+ * The expense line's class. Classes can be used to categorize objects into
325
+ * meaningful segments, such as department, location, or type of work. In
326
+ * QuickBooks, class tracking is off by default. If a class is specified for the
327
+ * entire parent transaction, it is automatically applied to all expense lines
328
+ * unless overridden here, at the transaction line level.
329
+ */
330
+ class: ExpenseLine.Class | null;
331
+
332
+ /**
333
+ * The custom fields for the expense line object, added as user-defined data
334
+ * extensions, not included in the standard QuickBooks object.
335
+ */
336
+ customFields: Array<ExpenseLine.CustomField>;
337
+
338
+ /**
339
+ * A memo or note for this expense line.
340
+ */
341
+ memo: string | null;
342
+
343
+ /**
344
+ * The type of object. This value is always `"qbd_expense_line"`.
345
+ */
346
+ objectType: 'qbd_expense_line';
347
+
348
+ /**
349
+ * If `account` refers to an Accounts-Payable (A/P) account, `payee` refers to the
350
+ * expense's vendor (not the customer). If `account` refers to any other type of
351
+ * account, `payee` refers to the expense's customer (not the vendor).
352
+ */
353
+ payee: ExpenseLine.Payee | null;
354
+
355
+ /**
356
+ * The expense line's sales representative. Sales representatives can be employees,
357
+ * vendors, or other names in QuickBooks.
358
+ */
359
+ salesRepresentative: ExpenseLine.SalesRepresentative | null;
360
+
361
+ /**
362
+ * The sales-tax code for this expense line, determining whether it is taxable or
363
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
364
+ * transaction or the associated item.
365
+ *
366
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
367
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
368
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
369
+ * non-taxable code to all sales.
370
+ */
371
+ salesTaxCode: ExpenseLine.SalesTaxCode | null;
372
+ }
373
+
374
+ export namespace ExpenseLine {
375
+ /**
376
+ * The expense account being debited (increased) for this expense line. The
377
+ * corresponding account being credited is usually a liability account (e.g.,
378
+ * Accounts-Payable) or an asset account (e.g., Cash), depending on the transaction
379
+ * type.
380
+ */
381
+ export interface Account {
382
+ /**
383
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
384
+ * across all objects of the same type, but not across different QuickBooks object
385
+ * types.
386
+ */
387
+ id: string | null;
388
+
389
+ /**
390
+ * The fully-qualified unique name for this object, formed by combining the names
391
+ * of its parent objects with its own `name`, separated by colons. Not
392
+ * case-sensitive.
393
+ */
394
+ fullName: string | null;
395
+ }
396
+
397
+ /**
398
+ * The expense line's class. Classes can be used to categorize objects into
399
+ * meaningful segments, such as department, location, or type of work. In
400
+ * QuickBooks, class tracking is off by default. If a class is specified for the
401
+ * entire parent transaction, it is automatically applied to all expense lines
402
+ * unless overridden here, at the transaction line level.
403
+ */
404
+ export interface Class {
405
+ /**
406
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
407
+ * across all objects of the same type, but not across different QuickBooks object
408
+ * types.
409
+ */
410
+ id: string | null;
411
+
412
+ /**
413
+ * The fully-qualified unique name for this object, formed by combining the names
414
+ * of its parent objects with its own `name`, separated by colons. Not
415
+ * case-sensitive.
416
+ */
417
+ fullName: string | null;
418
+ }
419
+
420
+ export interface CustomField {
421
+ /**
422
+ * The name of the custom field, unique for the specified `ownerId`. For public
423
+ * custom fields, this name is visible as a label in the QuickBooks UI.
424
+ */
425
+ name: string;
426
+
427
+ /**
428
+ * The identifier of the owner of the custom field, which QuickBooks internally
429
+ * calls a "data extension". For public custom fields visible in the UI, such as
430
+ * those added by the QuickBooks user, this is always "0". For private custom
431
+ * fields that are only visible to the application that created them, this is a
432
+ * valid GUID identifying the owning application. Internally, Conductor always
433
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
434
+ * objects.
435
+ */
436
+ ownerId: string;
437
+
438
+ /**
439
+ * The data type of this custom field.
440
+ */
441
+ type:
442
+ | 'amount_type'
443
+ | 'date_time_type'
444
+ | 'integer_type'
445
+ | 'percent_type'
446
+ | 'price_type'
447
+ | 'quantity_type'
448
+ | 'string_1024_type'
449
+ | 'string_255_type';
450
+
451
+ /**
452
+ * The value of this custom field. The maximum length depends on the field's data
453
+ * type.
454
+ */
455
+ value: string;
456
+ }
457
+
458
+ /**
459
+ * If `account` refers to an Accounts-Payable (A/P) account, `payee` refers to the
460
+ * expense's vendor (not the customer). If `account` refers to any other type of
461
+ * account, `payee` refers to the expense's customer (not the vendor).
462
+ */
463
+ export interface Payee {
464
+ /**
465
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
466
+ * across all objects of the same type, but not across different QuickBooks object
467
+ * types.
468
+ */
469
+ id: string | null;
470
+
471
+ /**
472
+ * The fully-qualified unique name for this object, formed by combining the names
473
+ * of its parent objects with its own `name`, separated by colons. Not
474
+ * case-sensitive.
475
+ */
476
+ fullName: string | null;
477
+ }
478
+
479
+ /**
480
+ * The expense line's sales representative. Sales representatives can be employees,
481
+ * vendors, or other names in QuickBooks.
482
+ */
483
+ export interface SalesRepresentative {
484
+ /**
485
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
486
+ * across all objects of the same type, but not across different QuickBooks object
487
+ * types.
488
+ */
489
+ id: string | null;
490
+
491
+ /**
492
+ * The fully-qualified unique name for this object, formed by combining the names
493
+ * of its parent objects with its own `name`, separated by colons. Not
494
+ * case-sensitive.
495
+ */
496
+ fullName: string | null;
497
+ }
498
+
499
+ /**
500
+ * The sales-tax code for this expense line, determining whether it is taxable or
501
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
502
+ * transaction or the associated item.
503
+ *
504
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
505
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
506
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
507
+ * non-taxable code to all sales.
508
+ */
509
+ export interface SalesTaxCode {
510
+ /**
511
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
512
+ * across all objects of the same type, but not across different QuickBooks object
513
+ * types.
514
+ */
515
+ id: string | null;
516
+
517
+ /**
518
+ * The fully-qualified unique name for this object, formed by combining the names
519
+ * of its parent objects with its own `name`, separated by colons. Not
520
+ * case-sensitive.
521
+ */
522
+ fullName: string | null;
523
+ }
524
+ }
525
+
526
+ export interface ItemLineGroup {
527
+ /**
528
+ * The unique identifier assigned by QuickBooks to this item line group. This ID is
529
+ * unique across all transaction line types.
530
+ */
531
+ id: string;
532
+
533
+ /**
534
+ * The custom fields for the item line group object, added as user-defined data
535
+ * extensions, not included in the standard QuickBooks object.
536
+ */
537
+ customFields: Array<ItemLineGroup.CustomField>;
538
+
539
+ /**
540
+ * A description of this item line group.
541
+ */
542
+ description: string | null;
543
+
544
+ /**
545
+ * The item line group's item group, representing a predefined set of items bundled
546
+ * because they are commonly purchased together or grouped for faster entry.
547
+ */
548
+ itemGroup: ItemLineGroup.ItemGroup;
549
+
550
+ /**
551
+ * The item line group's item lines, each representing the purchase of a specific
552
+ * item or service.
553
+ */
554
+ itemLines: Array<ItemLineGroup.ItemLine>;
555
+
556
+ /**
557
+ * The type of object. This value is always `"qbd_item_line_group"`.
558
+ */
559
+ objectType: 'qbd_item_line_group';
560
+
561
+ /**
562
+ * Specifies an alternative unit-of-measure set when updating this item line
563
+ * group's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to
564
+ * select units from a different set than the item's default unit-of-measure set,
565
+ * which remains unchanged on the item itself. The override applies only to this
566
+ * specific line. For example, you can sell an item typically measured in volume
567
+ * units using weight units in a specific transaction by specifying a different
568
+ * unit-of-measure set with this field.
569
+ */
570
+ overrideUnitOfMeasureSet: ItemLineGroup.OverrideUnitOfMeasureSet | null;
571
+
572
+ /**
573
+ * The quantity of the item group associated with this item line group. This field
574
+ * cannot be cleared.
575
+ *
576
+ * **NOTE**: Do not use this field if the associated item group is a discount item
577
+ * group.
578
+ */
579
+ quantity: number | null;
580
+
581
+ /**
582
+ * The total monetary amount of this item line group, equivalent to the sum of the
583
+ * amounts in `lines`, represented as a decimal string.
584
+ */
585
+ totalAmount: string;
586
+
587
+ /**
588
+ * The unit-of-measure used for the `quantity` in this item line group. Must be a
589
+ * valid unit within the item's available units of measure.
590
+ */
591
+ unitOfMeasure: string | null;
592
+ }
593
+
594
+ export namespace ItemLineGroup {
595
+ export interface CustomField {
596
+ /**
597
+ * The name of the custom field, unique for the specified `ownerId`. For public
598
+ * custom fields, this name is visible as a label in the QuickBooks UI.
599
+ */
600
+ name: string;
601
+
602
+ /**
603
+ * The identifier of the owner of the custom field, which QuickBooks internally
604
+ * calls a "data extension". For public custom fields visible in the UI, such as
605
+ * those added by the QuickBooks user, this is always "0". For private custom
606
+ * fields that are only visible to the application that created them, this is a
607
+ * valid GUID identifying the owning application. Internally, Conductor always
608
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
609
+ * objects.
610
+ */
611
+ ownerId: string;
612
+
613
+ /**
614
+ * The data type of this custom field.
615
+ */
616
+ type:
617
+ | 'amount_type'
618
+ | 'date_time_type'
619
+ | 'integer_type'
620
+ | 'percent_type'
621
+ | 'price_type'
622
+ | 'quantity_type'
623
+ | 'string_1024_type'
624
+ | 'string_255_type';
625
+
626
+ /**
627
+ * The value of this custom field. The maximum length depends on the field's data
628
+ * type.
629
+ */
630
+ value: string;
631
+ }
632
+
633
+ /**
634
+ * The item line group's item group, representing a predefined set of items bundled
635
+ * because they are commonly purchased together or grouped for faster entry.
636
+ */
637
+ export interface ItemGroup {
638
+ /**
639
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
640
+ * across all objects of the same type, but not across different QuickBooks object
641
+ * types.
642
+ */
643
+ id: string | null;
644
+
645
+ /**
646
+ * The fully-qualified unique name for this object, formed by combining the names
647
+ * of its parent objects with its own `name`, separated by colons. Not
648
+ * case-sensitive.
649
+ */
650
+ fullName: string | null;
651
+ }
652
+
653
+ export interface ItemLine {
654
+ /**
655
+ * The unique identifier assigned by QuickBooks to this item line. This ID is
656
+ * unique across all transaction line types.
657
+ */
658
+ id: string;
659
+
660
+ /**
661
+ * The monetary amount of this item line, represented as a decimal string. If both
662
+ * `quantity` and `cost` are specified but not `amount`, QuickBooks will use them
663
+ * to calculate `amount`. If `amount`, `cost`, and `quantity` are all unspecified,
664
+ * then QuickBooks will calculate `amount` based on a `quantity` of `1` and the
665
+ * suggested `cost`. This field cannot be cleared.
666
+ */
667
+ amount: string | null;
668
+
669
+ /**
670
+ * The billing status of this item line.
671
+ */
672
+ billingStatus: 'billable' | 'has_been_billed' | 'not_billable' | null;
673
+
674
+ /**
675
+ * The item line's class. Classes can be used to categorize objects into meaningful
676
+ * segments, such as department, location, or type of work. In QuickBooks, class
677
+ * tracking is off by default. If a class is specified for the entire parent
678
+ * transaction, it is automatically applied to all item lines unless overridden
679
+ * here, at the transaction line level.
680
+ */
681
+ class: ItemLine.Class | null;
682
+
683
+ /**
684
+ * The cost of this item line, represented as a decimal string. If both `quantity`
685
+ * and `amount` are specified but not `cost`, QuickBooks will use them to calculate
686
+ * `cost`.
687
+ */
688
+ cost: string | null;
689
+
690
+ /**
691
+ * The customer or customer-job associated with this item line.
692
+ */
693
+ customer: ItemLine.Customer | null;
694
+
695
+ /**
696
+ * The custom fields for the item line object, added as user-defined data
697
+ * extensions, not included in the standard QuickBooks object.
698
+ */
699
+ customFields: Array<ItemLine.CustomField>;
700
+
701
+ /**
702
+ * A description of this item line.
703
+ */
704
+ description: string | null;
705
+
706
+ /**
707
+ * The expiration date for the serial number or lot number of the item associated
708
+ * with this item line, in ISO 8601 format (YYYY-MM-DD). This is particularly
709
+ * relevant for perishable or time-sensitive inventory items. Note that this field
710
+ * is only supported on QuickBooks Desktop 2023 or later.
711
+ */
712
+ expirationDate: string | null;
713
+
714
+ /**
715
+ * The site location where inventory for the item associated with this item line is
716
+ * stored.
717
+ */
718
+ inventorySite: ItemLine.InventorySite | null;
719
+
720
+ /**
721
+ * The specific location (e.g., bin or shelf) within the inventory site where the
722
+ * item associated with this item line is stored.
723
+ */
724
+ inventorySiteLocation: ItemLine.InventorySiteLocation | null;
725
+
726
+ /**
727
+ * The item associated with this item line. This can refer to any good or service
728
+ * that the business buys or sells, including item types such as a service item,
729
+ * inventory item, or special calculation item like a discount item or sales-tax
730
+ * item.
731
+ */
732
+ item: ItemLine.Item | null;
733
+
734
+ /**
735
+ * The lot number of the item associated with this item line. Used for tracking
736
+ * groups of inventory items that are purchased or manufactured together.
737
+ */
738
+ lotNumber: string | null;
739
+
740
+ /**
741
+ * The type of object. This value is always `"qbd_item_line"`.
742
+ */
743
+ objectType: 'qbd_item_line';
744
+
745
+ /**
746
+ * Specifies an alternative unit-of-measure set when updating this item line's
747
+ * `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to select
748
+ * units from a different set than the item's default unit-of-measure set, which
749
+ * remains unchanged on the item itself. The override applies only to this specific
750
+ * line. For example, you can sell an item typically measured in volume units using
751
+ * weight units in a specific transaction by specifying a different unit-of-measure
752
+ * set with this field.
753
+ */
754
+ overrideUnitOfMeasureSet: ItemLine.OverrideUnitOfMeasureSet | null;
755
+
756
+ /**
757
+ * The quantity of the item associated with this item line. This field cannot be
758
+ * cleared.
759
+ *
760
+ * **NOTE**: Do not use this field if the associated item is a discount item.
761
+ */
762
+ quantity: number | null;
763
+
764
+ /**
765
+ * The item line's sales representative. Sales representatives can be employees,
766
+ * vendors, or other names in QuickBooks.
767
+ */
768
+ salesRepresentative: ItemLine.SalesRepresentative | null;
769
+
770
+ /**
771
+ * The sales-tax code for this item line, determining whether it is taxable or
772
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
773
+ * transaction or the associated item.
774
+ *
775
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
776
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
777
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
778
+ * non-taxable code to all sales.
779
+ */
780
+ salesTaxCode: ItemLine.SalesTaxCode | null;
781
+
782
+ /**
783
+ * The serial number of the item associated with this item line. This is used for
784
+ * tracking individual units of serialized inventory items.
785
+ */
786
+ serialNumber: string | null;
787
+
788
+ /**
789
+ * The unit-of-measure used for the `quantity` in this item line. Must be a valid
790
+ * unit within the item's available units of measure.
791
+ */
792
+ unitOfMeasure: string | null;
793
+ }
794
+
795
+ export namespace ItemLine {
796
+ /**
797
+ * The item line's class. Classes can be used to categorize objects into meaningful
798
+ * segments, such as department, location, or type of work. In QuickBooks, class
799
+ * tracking is off by default. If a class is specified for the entire parent
800
+ * transaction, it is automatically applied to all item lines unless overridden
801
+ * here, at the transaction line level.
802
+ */
803
+ export interface Class {
804
+ /**
805
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
806
+ * across all objects of the same type, but not across different QuickBooks object
807
+ * types.
808
+ */
809
+ id: string | null;
810
+
811
+ /**
812
+ * The fully-qualified unique name for this object, formed by combining the names
813
+ * of its parent objects with its own `name`, separated by colons. Not
814
+ * case-sensitive.
815
+ */
816
+ fullName: string | null;
817
+ }
818
+
819
+ /**
820
+ * The customer or customer-job associated with this item line.
821
+ */
822
+ export interface Customer {
823
+ /**
824
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
825
+ * across all objects of the same type, but not across different QuickBooks object
826
+ * types.
827
+ */
828
+ id: string | null;
829
+
830
+ /**
831
+ * The fully-qualified unique name for this object, formed by combining the names
832
+ * of its parent objects with its own `name`, separated by colons. Not
833
+ * case-sensitive.
834
+ */
835
+ fullName: string | null;
836
+ }
837
+
838
+ export interface CustomField {
839
+ /**
840
+ * The name of the custom field, unique for the specified `ownerId`. For public
841
+ * custom fields, this name is visible as a label in the QuickBooks UI.
842
+ */
843
+ name: string;
844
+
845
+ /**
846
+ * The identifier of the owner of the custom field, which QuickBooks internally
847
+ * calls a "data extension". For public custom fields visible in the UI, such as
848
+ * those added by the QuickBooks user, this is always "0". For private custom
849
+ * fields that are only visible to the application that created them, this is a
850
+ * valid GUID identifying the owning application. Internally, Conductor always
851
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
852
+ * objects.
853
+ */
854
+ ownerId: string;
855
+
856
+ /**
857
+ * The data type of this custom field.
858
+ */
859
+ type:
860
+ | 'amount_type'
861
+ | 'date_time_type'
862
+ | 'integer_type'
863
+ | 'percent_type'
864
+ | 'price_type'
865
+ | 'quantity_type'
866
+ | 'string_1024_type'
867
+ | 'string_255_type';
868
+
869
+ /**
870
+ * The value of this custom field. The maximum length depends on the field's data
871
+ * type.
872
+ */
873
+ value: string;
874
+ }
875
+
876
+ /**
877
+ * The site location where inventory for the item associated with this item line is
878
+ * stored.
879
+ */
880
+ export interface InventorySite {
881
+ /**
882
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
883
+ * across all objects of the same type, but not across different QuickBooks object
884
+ * types.
885
+ */
886
+ id: string | null;
887
+
888
+ /**
889
+ * The fully-qualified unique name for this object, formed by combining the names
890
+ * of its parent objects with its own `name`, separated by colons. Not
891
+ * case-sensitive.
892
+ */
893
+ fullName: string | null;
894
+ }
895
+
896
+ /**
897
+ * The specific location (e.g., bin or shelf) within the inventory site where the
898
+ * item associated with this item line is stored.
899
+ */
900
+ export interface InventorySiteLocation {
901
+ /**
902
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
903
+ * across all objects of the same type, but not across different QuickBooks object
904
+ * types.
905
+ */
906
+ id: string | null;
907
+
908
+ /**
909
+ * The fully-qualified unique name for this object, formed by combining the names
910
+ * of its parent objects with its own `name`, separated by colons. Not
911
+ * case-sensitive.
912
+ */
913
+ fullName: string | null;
914
+ }
915
+
916
+ /**
917
+ * The item associated with this item line. This can refer to any good or service
918
+ * that the business buys or sells, including item types such as a service item,
919
+ * inventory item, or special calculation item like a discount item or sales-tax
920
+ * item.
921
+ */
922
+ export interface Item {
923
+ /**
924
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
925
+ * across all objects of the same type, but not across different QuickBooks object
926
+ * types.
927
+ */
928
+ id: string | null;
929
+
930
+ /**
931
+ * The fully-qualified unique name for this object, formed by combining the names
932
+ * of its parent objects with its own `name`, separated by colons. Not
933
+ * case-sensitive.
934
+ */
935
+ fullName: string | null;
936
+ }
937
+
938
+ /**
939
+ * Specifies an alternative unit-of-measure set when updating this item line's
940
+ * `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to select
941
+ * units from a different set than the item's default unit-of-measure set, which
942
+ * remains unchanged on the item itself. The override applies only to this specific
943
+ * line. For example, you can sell an item typically measured in volume units using
944
+ * weight units in a specific transaction by specifying a different unit-of-measure
945
+ * set with this field.
946
+ */
947
+ export interface OverrideUnitOfMeasureSet {
948
+ /**
949
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
950
+ * across all objects of the same type, but not across different QuickBooks object
951
+ * types.
952
+ */
953
+ id: string | null;
954
+
955
+ /**
956
+ * The fully-qualified unique name for this object, formed by combining the names
957
+ * of its parent objects with its own `name`, separated by colons. Not
958
+ * case-sensitive.
959
+ */
960
+ fullName: string | null;
961
+ }
962
+
963
+ /**
964
+ * The item line's sales representative. Sales representatives can be employees,
965
+ * vendors, or other names in QuickBooks.
966
+ */
967
+ export interface SalesRepresentative {
968
+ /**
969
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
970
+ * across all objects of the same type, but not across different QuickBooks object
971
+ * types.
972
+ */
973
+ id: string | null;
974
+
975
+ /**
976
+ * The fully-qualified unique name for this object, formed by combining the names
977
+ * of its parent objects with its own `name`, separated by colons. Not
978
+ * case-sensitive.
979
+ */
980
+ fullName: string | null;
981
+ }
982
+
983
+ /**
984
+ * The sales-tax code for this item line, determining whether it is taxable or
985
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
986
+ * transaction or the associated item.
987
+ *
988
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
989
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
990
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
991
+ * non-taxable code to all sales.
992
+ */
993
+ export interface SalesTaxCode {
994
+ /**
995
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
996
+ * across all objects of the same type, but not across different QuickBooks object
997
+ * types.
998
+ */
999
+ id: string | null;
1000
+
1001
+ /**
1002
+ * The fully-qualified unique name for this object, formed by combining the names
1003
+ * of its parent objects with its own `name`, separated by colons. Not
1004
+ * case-sensitive.
1005
+ */
1006
+ fullName: string | null;
1007
+ }
1008
+ }
1009
+
1010
+ /**
1011
+ * Specifies an alternative unit-of-measure set when updating this item line
1012
+ * group's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to
1013
+ * select units from a different set than the item's default unit-of-measure set,
1014
+ * which remains unchanged on the item itself. The override applies only to this
1015
+ * specific line. For example, you can sell an item typically measured in volume
1016
+ * units using weight units in a specific transaction by specifying a different
1017
+ * unit-of-measure set with this field.
1018
+ */
1019
+ export interface OverrideUnitOfMeasureSet {
1020
+ /**
1021
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1022
+ * across all objects of the same type, but not across different QuickBooks object
1023
+ * types.
1024
+ */
1025
+ id: string | null;
1026
+
1027
+ /**
1028
+ * The fully-qualified unique name for this object, formed by combining the names
1029
+ * of its parent objects with its own `name`, separated by colons. Not
1030
+ * case-sensitive.
1031
+ */
1032
+ fullName: string | null;
1033
+ }
1034
+ }
1035
+
1036
+ export interface ItemLine {
1037
+ /**
1038
+ * The unique identifier assigned by QuickBooks to this item line. This ID is
1039
+ * unique across all transaction line types.
1040
+ */
1041
+ id: string;
1042
+
1043
+ /**
1044
+ * The monetary amount of this item line, represented as a decimal string. If both
1045
+ * `quantity` and `cost` are specified but not `amount`, QuickBooks will use them
1046
+ * to calculate `amount`. If `amount`, `cost`, and `quantity` are all unspecified,
1047
+ * then QuickBooks will calculate `amount` based on a `quantity` of `1` and the
1048
+ * suggested `cost`. This field cannot be cleared.
1049
+ */
1050
+ amount: string | null;
1051
+
1052
+ /**
1053
+ * The billing status of this item line.
1054
+ */
1055
+ billingStatus: 'billable' | 'has_been_billed' | 'not_billable' | null;
1056
+
1057
+ /**
1058
+ * The item line's class. Classes can be used to categorize objects into meaningful
1059
+ * segments, such as department, location, or type of work. In QuickBooks, class
1060
+ * tracking is off by default. If a class is specified for the entire parent
1061
+ * transaction, it is automatically applied to all item lines unless overridden
1062
+ * here, at the transaction line level.
1063
+ */
1064
+ class: ItemLine.Class | null;
1065
+
1066
+ /**
1067
+ * The cost of this item line, represented as a decimal string. If both `quantity`
1068
+ * and `amount` are specified but not `cost`, QuickBooks will use them to calculate
1069
+ * `cost`.
1070
+ */
1071
+ cost: string | null;
1072
+
1073
+ /**
1074
+ * The customer or customer-job associated with this item line.
1075
+ */
1076
+ customer: ItemLine.Customer | null;
1077
+
1078
+ /**
1079
+ * The custom fields for the item line object, added as user-defined data
1080
+ * extensions, not included in the standard QuickBooks object.
1081
+ */
1082
+ customFields: Array<ItemLine.CustomField>;
1083
+
1084
+ /**
1085
+ * A description of this item line.
1086
+ */
1087
+ description: string | null;
1088
+
1089
+ /**
1090
+ * The expiration date for the serial number or lot number of the item associated
1091
+ * with this item line, in ISO 8601 format (YYYY-MM-DD). This is particularly
1092
+ * relevant for perishable or time-sensitive inventory items. Note that this field
1093
+ * is only supported on QuickBooks Desktop 2023 or later.
1094
+ */
1095
+ expirationDate: string | null;
1096
+
1097
+ /**
1098
+ * The site location where inventory for the item associated with this item line is
1099
+ * stored.
1100
+ */
1101
+ inventorySite: ItemLine.InventorySite | null;
1102
+
1103
+ /**
1104
+ * The specific location (e.g., bin or shelf) within the inventory site where the
1105
+ * item associated with this item line is stored.
1106
+ */
1107
+ inventorySiteLocation: ItemLine.InventorySiteLocation | null;
1108
+
1109
+ /**
1110
+ * The item associated with this item line. This can refer to any good or service
1111
+ * that the business buys or sells, including item types such as a service item,
1112
+ * inventory item, or special calculation item like a discount item or sales-tax
1113
+ * item.
1114
+ */
1115
+ item: ItemLine.Item | null;
1116
+
1117
+ /**
1118
+ * The lot number of the item associated with this item line. Used for tracking
1119
+ * groups of inventory items that are purchased or manufactured together.
1120
+ */
1121
+ lotNumber: string | null;
1122
+
1123
+ /**
1124
+ * The type of object. This value is always `"qbd_item_line"`.
1125
+ */
1126
+ objectType: 'qbd_item_line';
1127
+
1128
+ /**
1129
+ * Specifies an alternative unit-of-measure set when updating this item line's
1130
+ * `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to select
1131
+ * units from a different set than the item's default unit-of-measure set, which
1132
+ * remains unchanged on the item itself. The override applies only to this specific
1133
+ * line. For example, you can sell an item typically measured in volume units using
1134
+ * weight units in a specific transaction by specifying a different unit-of-measure
1135
+ * set with this field.
1136
+ */
1137
+ overrideUnitOfMeasureSet: ItemLine.OverrideUnitOfMeasureSet | null;
1138
+
1139
+ /**
1140
+ * The quantity of the item associated with this item line. This field cannot be
1141
+ * cleared.
1142
+ *
1143
+ * **NOTE**: Do not use this field if the associated item is a discount item.
1144
+ */
1145
+ quantity: number | null;
1146
+
1147
+ /**
1148
+ * The item line's sales representative. Sales representatives can be employees,
1149
+ * vendors, or other names in QuickBooks.
1150
+ */
1151
+ salesRepresentative: ItemLine.SalesRepresentative | null;
1152
+
1153
+ /**
1154
+ * The sales-tax code for this item line, determining whether it is taxable or
1155
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
1156
+ * transaction or the associated item.
1157
+ *
1158
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1159
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1160
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1161
+ * non-taxable code to all sales.
1162
+ */
1163
+ salesTaxCode: ItemLine.SalesTaxCode | null;
1164
+
1165
+ /**
1166
+ * The serial number of the item associated with this item line. This is used for
1167
+ * tracking individual units of serialized inventory items.
1168
+ */
1169
+ serialNumber: string | null;
1170
+
1171
+ /**
1172
+ * The unit-of-measure used for the `quantity` in this item line. Must be a valid
1173
+ * unit within the item's available units of measure.
1174
+ */
1175
+ unitOfMeasure: string | null;
1176
+ }
1177
+
1178
+ export namespace ItemLine {
1179
+ /**
1180
+ * The item line's class. Classes can be used to categorize objects into meaningful
1181
+ * segments, such as department, location, or type of work. In QuickBooks, class
1182
+ * tracking is off by default. If a class is specified for the entire parent
1183
+ * transaction, it is automatically applied to all item lines unless overridden
1184
+ * here, at the transaction line level.
1185
+ */
1186
+ export interface Class {
1187
+ /**
1188
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1189
+ * across all objects of the same type, but not across different QuickBooks object
1190
+ * types.
1191
+ */
1192
+ id: string | null;
1193
+
1194
+ /**
1195
+ * The fully-qualified unique name for this object, formed by combining the names
1196
+ * of its parent objects with its own `name`, separated by colons. Not
1197
+ * case-sensitive.
1198
+ */
1199
+ fullName: string | null;
1200
+ }
1201
+
1202
+ /**
1203
+ * The customer or customer-job associated with this item line.
1204
+ */
1205
+ export interface Customer {
1206
+ /**
1207
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1208
+ * across all objects of the same type, but not across different QuickBooks object
1209
+ * types.
1210
+ */
1211
+ id: string | null;
1212
+
1213
+ /**
1214
+ * The fully-qualified unique name for this object, formed by combining the names
1215
+ * of its parent objects with its own `name`, separated by colons. Not
1216
+ * case-sensitive.
1217
+ */
1218
+ fullName: string | null;
1219
+ }
1220
+
1221
+ export interface CustomField {
1222
+ /**
1223
+ * The name of the custom field, unique for the specified `ownerId`. For public
1224
+ * custom fields, this name is visible as a label in the QuickBooks UI.
1225
+ */
1226
+ name: string;
1227
+
1228
+ /**
1229
+ * The identifier of the owner of the custom field, which QuickBooks internally
1230
+ * calls a "data extension". For public custom fields visible in the UI, such as
1231
+ * those added by the QuickBooks user, this is always "0". For private custom
1232
+ * fields that are only visible to the application that created them, this is a
1233
+ * valid GUID identifying the owning application. Internally, Conductor always
1234
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
1235
+ * objects.
1236
+ */
1237
+ ownerId: string;
1238
+
1239
+ /**
1240
+ * The data type of this custom field.
1241
+ */
1242
+ type:
1243
+ | 'amount_type'
1244
+ | 'date_time_type'
1245
+ | 'integer_type'
1246
+ | 'percent_type'
1247
+ | 'price_type'
1248
+ | 'quantity_type'
1249
+ | 'string_1024_type'
1250
+ | 'string_255_type';
1251
+
1252
+ /**
1253
+ * The value of this custom field. The maximum length depends on the field's data
1254
+ * type.
1255
+ */
1256
+ value: string;
1257
+ }
1258
+
1259
+ /**
1260
+ * The site location where inventory for the item associated with this item line is
1261
+ * stored.
1262
+ */
1263
+ export interface InventorySite {
1264
+ /**
1265
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1266
+ * across all objects of the same type, but not across different QuickBooks object
1267
+ * types.
1268
+ */
1269
+ id: string | null;
1270
+
1271
+ /**
1272
+ * The fully-qualified unique name for this object, formed by combining the names
1273
+ * of its parent objects with its own `name`, separated by colons. Not
1274
+ * case-sensitive.
1275
+ */
1276
+ fullName: string | null;
1277
+ }
1278
+
1279
+ /**
1280
+ * The specific location (e.g., bin or shelf) within the inventory site where the
1281
+ * item associated with this item line is stored.
1282
+ */
1283
+ export interface InventorySiteLocation {
1284
+ /**
1285
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1286
+ * across all objects of the same type, but not across different QuickBooks object
1287
+ * types.
1288
+ */
1289
+ id: string | null;
1290
+
1291
+ /**
1292
+ * The fully-qualified unique name for this object, formed by combining the names
1293
+ * of its parent objects with its own `name`, separated by colons. Not
1294
+ * case-sensitive.
1295
+ */
1296
+ fullName: string | null;
1297
+ }
1298
+
1299
+ /**
1300
+ * The item associated with this item line. This can refer to any good or service
1301
+ * that the business buys or sells, including item types such as a service item,
1302
+ * inventory item, or special calculation item like a discount item or sales-tax
1303
+ * item.
1304
+ */
1305
+ export interface Item {
1306
+ /**
1307
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1308
+ * across all objects of the same type, but not across different QuickBooks object
1309
+ * types.
1310
+ */
1311
+ id: string | null;
1312
+
1313
+ /**
1314
+ * The fully-qualified unique name for this object, formed by combining the names
1315
+ * of its parent objects with its own `name`, separated by colons. Not
1316
+ * case-sensitive.
1317
+ */
1318
+ fullName: string | null;
1319
+ }
1320
+
1321
+ /**
1322
+ * Specifies an alternative unit-of-measure set when updating this item line's
1323
+ * `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to select
1324
+ * units from a different set than the item's default unit-of-measure set, which
1325
+ * remains unchanged on the item itself. The override applies only to this specific
1326
+ * line. For example, you can sell an item typically measured in volume units using
1327
+ * weight units in a specific transaction by specifying a different unit-of-measure
1328
+ * set with this field.
1329
+ */
1330
+ export interface OverrideUnitOfMeasureSet {
1331
+ /**
1332
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1333
+ * across all objects of the same type, but not across different QuickBooks object
1334
+ * types.
1335
+ */
1336
+ id: string | null;
1337
+
1338
+ /**
1339
+ * The fully-qualified unique name for this object, formed by combining the names
1340
+ * of its parent objects with its own `name`, separated by colons. Not
1341
+ * case-sensitive.
1342
+ */
1343
+ fullName: string | null;
1344
+ }
1345
+
1346
+ /**
1347
+ * The item line's sales representative. Sales representatives can be employees,
1348
+ * vendors, or other names in QuickBooks.
1349
+ */
1350
+ export interface SalesRepresentative {
1351
+ /**
1352
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1353
+ * across all objects of the same type, but not across different QuickBooks object
1354
+ * types.
1355
+ */
1356
+ id: string | null;
1357
+
1358
+ /**
1359
+ * The fully-qualified unique name for this object, formed by combining the names
1360
+ * of its parent objects with its own `name`, separated by colons. Not
1361
+ * case-sensitive.
1362
+ */
1363
+ fullName: string | null;
1364
+ }
1365
+
1366
+ /**
1367
+ * The sales-tax code for this item line, determining whether it is taxable or
1368
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
1369
+ * transaction or the associated item.
1370
+ *
1371
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1372
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1373
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1374
+ * non-taxable code to all sales.
1375
+ */
1376
+ export interface SalesTaxCode {
1377
+ /**
1378
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1379
+ * across all objects of the same type, but not across different QuickBooks object
1380
+ * types.
1381
+ */
1382
+ id: string | null;
1383
+
1384
+ /**
1385
+ * The fully-qualified unique name for this object, formed by combining the names
1386
+ * of its parent objects with its own `name`, separated by colons. Not
1387
+ * case-sensitive.
1388
+ */
1389
+ fullName: string | null;
1390
+ }
1391
+ }
1392
+
1393
+ /**
1394
+ * The liability account used to track the amount owed for this item receipt.
1395
+ */
1396
+ export interface LiabilityAccount {
1397
+ /**
1398
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1399
+ * across all objects of the same type, but not across different QuickBooks object
1400
+ * types.
1401
+ */
1402
+ id: string | null;
1403
+
1404
+ /**
1405
+ * The fully-qualified unique name for this object, formed by combining the names
1406
+ * of its parent objects with its own `name`, separated by colons. Not
1407
+ * case-sensitive.
1408
+ */
1409
+ fullName: string | null;
1410
+ }
1411
+
1412
+ export interface LinkedTransaction {
1413
+ /**
1414
+ * The unique identifier assigned by QuickBooks to this linked transaction. This ID
1415
+ * is unique across all transaction types.
1416
+ */
1417
+ id: string;
1418
+
1419
+ /**
1420
+ * The monetary amount of this linked transaction, represented as a decimal string.
1421
+ */
1422
+ amount: string | null;
1423
+
1424
+ /**
1425
+ * Indicates the nature of the link between the transactions: `amount` denotes an
1426
+ * amount-based link (e.g., an invoice linked to a payment), and `quantity` denotes
1427
+ * a quantity-based link (e.g., an invoice created from a sales order based on the
1428
+ * quantity of items received).
1429
+ */
1430
+ linkType: 'amount' | 'quantity' | null;
1431
+
1432
+ /**
1433
+ * The type of object. This value is always `"qbd_linked_transaction"`.
1434
+ */
1435
+ objectType: 'qbd_linked_transaction';
1436
+
1437
+ /**
1438
+ * The case-sensitive user-defined reference number for this linked transaction,
1439
+ * which can be used to identify the transaction in QuickBooks. This value is not
1440
+ * required to be unique and can be arbitrarily changed by the QuickBooks user.
1441
+ */
1442
+ refNumber: string | null;
1443
+
1444
+ /**
1445
+ * The date of this linked transaction, in ISO 8601 format (YYYY-MM-DD).
1446
+ */
1447
+ transactionDate: string;
1448
+
1449
+ /**
1450
+ * The type of transaction for this linked transaction.
1451
+ */
1452
+ transactionType:
1453
+ | 'ar_refund_credit_card'
1454
+ | 'bill'
1455
+ | 'bill_payment_check'
1456
+ | 'bill_payment_credit_card'
1457
+ | 'build_assembly'
1458
+ | 'charge'
1459
+ | 'check'
1460
+ | 'credit_card_charge'
1461
+ | 'credit_card_credit'
1462
+ | 'credit_memo'
1463
+ | 'deposit'
1464
+ | 'estimate'
1465
+ | 'inventory_adjustment'
1466
+ | 'invoice'
1467
+ | 'item_receipt'
1468
+ | 'journal_entry'
1469
+ | 'liability_adjustment'
1470
+ | 'paycheck'
1471
+ | 'payroll_liability_check'
1472
+ | 'purchase_order'
1473
+ | 'receive_payment'
1474
+ | 'sales_order'
1475
+ | 'sales_receipt'
1476
+ | 'sales_tax_payment_check'
1477
+ | 'transfer'
1478
+ | 'vendor_credit'
1479
+ | 'ytd_adjustment';
1480
+ }
1481
+
1482
+ /**
1483
+ * The Accounts-Payable (A/P) account to which this item receipt is assigned, used
1484
+ * to track the amount owed. If not specified, QuickBooks Desktop will use its
1485
+ * default A/P account.
1486
+ *
1487
+ * **IMPORTANT**: If this item receipt is linked to other transactions, this A/P
1488
+ * account must match the `payablesAccount` used in those other transactions.
1489
+ */
1490
+ export interface PayablesAccount {
1491
+ /**
1492
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1493
+ * across all objects of the same type, but not across different QuickBooks object
1494
+ * types.
1495
+ */
1496
+ id: string | null;
1497
+
1498
+ /**
1499
+ * The fully-qualified unique name for this object, formed by combining the names
1500
+ * of its parent objects with its own `name`, separated by colons. Not
1501
+ * case-sensitive.
1502
+ */
1503
+ fullName: string | null;
1504
+ }
1505
+
1506
+ /**
1507
+ * The sales-tax code for this item receipt, determining whether it is taxable or
1508
+ * non-taxable. If set, this overrides any sales-tax codes defined on the vendor.
1509
+ * This can be overridden on the item receipt's individual lines.
1510
+ *
1511
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1512
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1513
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1514
+ * non-taxable code to all sales.
1515
+ */
1516
+ export interface SalesTaxCode {
1517
+ /**
1518
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1519
+ * across all objects of the same type, but not across different QuickBooks object
1520
+ * types.
1521
+ */
1522
+ id: string | null;
1523
+
1524
+ /**
1525
+ * The fully-qualified unique name for this object, formed by combining the names
1526
+ * of its parent objects with its own `name`, separated by colons. Not
1527
+ * case-sensitive.
1528
+ */
1529
+ fullName: string | null;
1530
+ }
1531
+
1532
+ /**
1533
+ * The vendor who sent this item receipt for goods or services purchased.
1534
+ */
1535
+ export interface Vendor {
1536
+ /**
1537
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1538
+ * across all objects of the same type, but not across different QuickBooks object
1539
+ * types.
1540
+ */
1541
+ id: string | null;
1542
+
1543
+ /**
1544
+ * The fully-qualified unique name for this object, formed by combining the names
1545
+ * of its parent objects with its own `name`, separated by colons. Not
1546
+ * case-sensitive.
1547
+ */
1548
+ fullName: string | null;
1549
+ }
1550
+ }
1551
+
1552
+ export interface ItemReceiptDeleteResponse {
1553
+ /**
1554
+ * The QuickBooks-assigned unique identifier of the deleted item receipt.
1555
+ */
1556
+ id: string;
1557
+
1558
+ /**
1559
+ * Indicates whether the item receipt was deleted.
1560
+ */
1561
+ deleted: boolean;
1562
+
1563
+ /**
1564
+ * The type of object. This value is always `"qbd_item_receipt"`.
1565
+ */
1566
+ objectType: 'qbd_item_receipt';
1567
+
1568
+ /**
1569
+ * The case-sensitive user-defined reference number of the deleted item receipt.
1570
+ */
1571
+ refNumber: string | null;
1572
+ }
1573
+
1574
+ export interface ItemReceiptCreateParams {
1575
+ /**
1576
+ * Body param: The date of this item receipt, in ISO 8601 format (YYYY-MM-DD).
1577
+ */
1578
+ transactionDate: string;
1579
+
1580
+ /**
1581
+ * Body param: The vendor who sent this item receipt for goods or services
1582
+ * purchased.
1583
+ */
1584
+ vendorId: string;
1585
+
1586
+ /**
1587
+ * Header param: The ID of the EndUser to receive this request (e.g.,
1588
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
1589
+ */
1590
+ conductorEndUserId: string;
1591
+
1592
+ /**
1593
+ * Body param: The market exchange rate between this item receipt's currency and
1594
+ * the home currency in QuickBooks at the time of this transaction. Represented as
1595
+ * a decimal value (e.g., 1.2345 for 1 EUR = 1.2345 USD if USD is the home
1596
+ * currency).
1597
+ */
1598
+ exchangeRate?: number;
1599
+
1600
+ /**
1601
+ * Body param: The item receipt's expense lines, each representing one line in this
1602
+ * expense.
1603
+ */
1604
+ expenseLines?: Array<ItemReceiptCreateParams.ExpenseLine>;
1605
+
1606
+ /**
1607
+ * Body param: A globally unique identifier (GUID) you, the developer, can provide
1608
+ * for tracking this object in your external system. This field is immutable and
1609
+ * can only be set during object creation.
1610
+ *
1611
+ * **IMPORTANT**: This field must be formatted as a valid GUID; otherwise,
1612
+ * QuickBooks will return an error.
1613
+ */
1614
+ externalId?: string;
1615
+
1616
+ /**
1617
+ * Body param: The item receipt's item group lines, each representing a predefined
1618
+ * set of items bundled together because they are commonly purchased together or
1619
+ * grouped for faster entry.
1620
+ */
1621
+ itemLineGroups?: Array<ItemReceiptCreateParams.ItemLineGroup>;
1622
+
1623
+ /**
1624
+ * Body param: The item receipt's item lines, each representing the purchase of a
1625
+ * specific item or service.
1626
+ */
1627
+ itemLines?: Array<ItemReceiptCreateParams.ItemLine>;
1628
+
1629
+ /**
1630
+ * Body param: IDs of existing purchase orders that you wish to link to this item
1631
+ * receipt. Note that this links entire transactions, not individual transaction
1632
+ * lines. If you want to link individual lines in a transaction, instead use the
1633
+ * field `linkToTransactionLine` on this item receipt's lines, if available.
1634
+ *
1635
+ * Transactions can only be linked when creating this item receipt and cannot be
1636
+ * unlinked later.
1637
+ *
1638
+ * You can use both `linkToTransactionIds` (on this item receipt) and
1639
+ * `linkToTransactionLine` (on its transaction lines) as long as they do NOT link
1640
+ * to the same transaction (otherwise, QuickBooks will return an error). QuickBooks
1641
+ * will also return an error if you attempt to link a transaction that is empty or
1642
+ * already closed.
1643
+ *
1644
+ * **IMPORTANT**: By default, QuickBooks will not return any information about the
1645
+ * linked transactions in this endpoint's response even when this request is
1646
+ * successful. To see the transactions linked via this field, refetch the item
1647
+ * receipt and check the `linkedTransactions` response field. If fetching a list of
1648
+ * item receipts, you must also specify the parameter
1649
+ * `includeLinkedTransactions=true` to see the `linkedTransactions` response field.
1650
+ */
1651
+ linkToTransactionIds?: Array<string>;
1652
+
1653
+ /**
1654
+ * Body param: A memo or note for this item receipt.
1655
+ */
1656
+ memo?: string;
1657
+
1658
+ /**
1659
+ * Body param: The Accounts-Payable (A/P) account to which this item receipt is
1660
+ * assigned, used to track the amount owed. If not specified, QuickBooks Desktop
1661
+ * will use its default A/P account.
1662
+ *
1663
+ * **IMPORTANT**: If this item receipt is linked to other transactions, this A/P
1664
+ * account must match the `payablesAccount` used in those other transactions.
1665
+ */
1666
+ payablesAccountId?: string;
1667
+
1668
+ /**
1669
+ * Body param: The case-sensitive user-defined reference number for this item
1670
+ * receipt, which can be used to identify the transaction in QuickBooks. This value
1671
+ * is not required to be unique and can be arbitrarily changed by the QuickBooks
1672
+ * user. When left blank in this create request, this field will be left blank in
1673
+ * QuickBooks (i.e., it does _not_ auto-increment).
1674
+ */
1675
+ refNumber?: string;
1676
+
1677
+ /**
1678
+ * Body param: The sales-tax code for this item receipt, determining whether it is
1679
+ * taxable or non-taxable. If set, this overrides any sales-tax codes defined on
1680
+ * the vendor. This can be overridden on the item receipt's individual lines.
1681
+ *
1682
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1683
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1684
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1685
+ * non-taxable code to all sales.
1686
+ */
1687
+ salesTaxCodeId?: string;
1688
+ }
1689
+
1690
+ export namespace ItemReceiptCreateParams {
1691
+ export interface ExpenseLine {
1692
+ /**
1693
+ * The expense account being debited (increased) for this expense line. The
1694
+ * corresponding account being credited is usually a liability account (e.g.,
1695
+ * Accounts-Payable) or an asset account (e.g., Cash), depending on the transaction
1696
+ * type.
1697
+ */
1698
+ accountId?: string;
1699
+
1700
+ /**
1701
+ * The monetary amount of this expense line, represented as a decimal string.
1702
+ */
1703
+ amount?: string;
1704
+
1705
+ /**
1706
+ * The billing status of this expense line.
1707
+ */
1708
+ billingStatus?: 'billable' | 'has_been_billed' | 'not_billable';
1709
+
1710
+ /**
1711
+ * The expense line's class. Classes can be used to categorize objects into
1712
+ * meaningful segments, such as department, location, or type of work. In
1713
+ * QuickBooks, class tracking is off by default. If a class is specified for the
1714
+ * entire parent transaction, it is automatically applied to all expense lines
1715
+ * unless overridden here, at the transaction line level.
1716
+ */
1717
+ classId?: string;
1718
+
1719
+ /**
1720
+ * The custom fields for the expense line object, added as user-defined data
1721
+ * extensions, not included in the standard QuickBooks object.
1722
+ */
1723
+ customFields?: Array<ExpenseLine.CustomField>;
1724
+
1725
+ /**
1726
+ * A memo or note for this expense line.
1727
+ */
1728
+ memo?: string;
1729
+
1730
+ /**
1731
+ * If `account` refers to an Accounts-Payable (A/P) account, `payee` refers to the
1732
+ * expense's vendor (not the customer). If `account` refers to any other type of
1733
+ * account, `payee` refers to the expense's customer (not the vendor).
1734
+ */
1735
+ payeeId?: string;
1736
+
1737
+ /**
1738
+ * The expense line's sales representative. Sales representatives can be employees,
1739
+ * vendors, or other names in QuickBooks.
1740
+ */
1741
+ salesRepresentativeId?: string;
1742
+
1743
+ /**
1744
+ * The sales-tax code for this expense line, determining whether it is taxable or
1745
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
1746
+ * transaction or the associated item.
1747
+ *
1748
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1749
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1750
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1751
+ * non-taxable code to all sales.
1752
+ */
1753
+ salesTaxCodeId?: string;
1754
+ }
1755
+
1756
+ export namespace ExpenseLine {
1757
+ export interface CustomField {
1758
+ /**
1759
+ * The name of the custom field, unique for the specified `ownerId`. For public
1760
+ * custom fields, this name is visible as a label in the QuickBooks UI.
1761
+ */
1762
+ name: string;
1763
+
1764
+ /**
1765
+ * The identifier of the owner of the custom field, which QuickBooks internally
1766
+ * calls a "data extension". For public custom fields visible in the UI, such as
1767
+ * those added by the QuickBooks user, this is always "0". For private custom
1768
+ * fields that are only visible to the application that created them, this is a
1769
+ * valid GUID identifying the owning application. Internally, Conductor always
1770
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
1771
+ * objects.
1772
+ */
1773
+ ownerId: string;
1774
+
1775
+ /**
1776
+ * The value of this custom field. The maximum length depends on the field's data
1777
+ * type.
1778
+ */
1779
+ value: string;
1780
+ }
1781
+ }
1782
+
1783
+ export interface ItemLineGroup {
1784
+ /**
1785
+ * The item line group's item group, representing a predefined set of items bundled
1786
+ * because they are commonly purchased together or grouped for faster entry.
1787
+ */
1788
+ itemGroupId: string;
1789
+
1790
+ /**
1791
+ * The custom fields for the item line group object, added as user-defined data
1792
+ * extensions, not included in the standard QuickBooks object.
1793
+ */
1794
+ customFields?: Array<ItemLineGroup.CustomField>;
1795
+
1796
+ /**
1797
+ * The site location where inventory for the item group associated with this item
1798
+ * line group is stored.
1799
+ */
1800
+ inventorySiteId?: string;
1801
+
1802
+ /**
1803
+ * The specific location (e.g., bin or shelf) within the inventory site where the
1804
+ * item group associated with this item line group is stored.
1805
+ */
1806
+ inventorySiteLocationId?: string;
1807
+
1808
+ /**
1809
+ * The quantity of the item group associated with this item line group. This field
1810
+ * cannot be cleared.
1811
+ *
1812
+ * **NOTE**: Do not use this field if the associated item group is a discount item
1813
+ * group.
1814
+ */
1815
+ quantity?: number;
1816
+
1817
+ /**
1818
+ * The unit-of-measure used for the `quantity` in this item line group. Must be a
1819
+ * valid unit within the item's available units of measure.
1820
+ */
1821
+ unitOfMeasure?: string;
1822
+ }
1823
+
1824
+ export namespace ItemLineGroup {
1825
+ export interface CustomField {
1826
+ /**
1827
+ * The name of the custom field, unique for the specified `ownerId`. For public
1828
+ * custom fields, this name is visible as a label in the QuickBooks UI.
1829
+ */
1830
+ name: string;
1831
+
1832
+ /**
1833
+ * The identifier of the owner of the custom field, which QuickBooks internally
1834
+ * calls a "data extension". For public custom fields visible in the UI, such as
1835
+ * those added by the QuickBooks user, this is always "0". For private custom
1836
+ * fields that are only visible to the application that created them, this is a
1837
+ * valid GUID identifying the owning application. Internally, Conductor always
1838
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
1839
+ * objects.
1840
+ */
1841
+ ownerId: string;
1842
+
1843
+ /**
1844
+ * The value of this custom field. The maximum length depends on the field's data
1845
+ * type.
1846
+ */
1847
+ value: string;
1848
+ }
1849
+ }
1850
+
1851
+ export interface ItemLine {
1852
+ /**
1853
+ * The monetary amount of this item line, represented as a decimal string. If both
1854
+ * `quantity` and `cost` are specified but not `amount`, QuickBooks will use them
1855
+ * to calculate `amount`. If `amount`, `cost`, and `quantity` are all unspecified,
1856
+ * then QuickBooks will calculate `amount` based on a `quantity` of `1` and the
1857
+ * suggested `cost`. This field cannot be cleared.
1858
+ */
1859
+ amount?: string;
1860
+
1861
+ /**
1862
+ * The billing status of this item line.
1863
+ */
1864
+ billingStatus?: 'billable' | 'has_been_billed' | 'not_billable';
1865
+
1866
+ /**
1867
+ * The item line's class. Classes can be used to categorize objects into meaningful
1868
+ * segments, such as department, location, or type of work. In QuickBooks, class
1869
+ * tracking is off by default. If a class is specified for the entire parent
1870
+ * transaction, it is automatically applied to all item lines unless overridden
1871
+ * here, at the transaction line level.
1872
+ */
1873
+ classId?: string;
1874
+
1875
+ /**
1876
+ * The cost of this item line, represented as a decimal string. If both `quantity`
1877
+ * and `amount` are specified but not `cost`, QuickBooks will use them to calculate
1878
+ * `cost`.
1879
+ */
1880
+ cost?: string;
1881
+
1882
+ /**
1883
+ * The customer or customer-job associated with this item line.
1884
+ */
1885
+ customerId?: string;
1886
+
1887
+ /**
1888
+ * The custom fields for the item line object, added as user-defined data
1889
+ * extensions, not included in the standard QuickBooks object.
1890
+ */
1891
+ customFields?: Array<ItemLine.CustomField>;
1892
+
1893
+ /**
1894
+ * A description of this item line.
1895
+ */
1896
+ description?: string;
1897
+
1898
+ /**
1899
+ * The expiration date for the serial number or lot number of the item associated
1900
+ * with this item line, in ISO 8601 format (YYYY-MM-DD). This is particularly
1901
+ * relevant for perishable or time-sensitive inventory items. Note that this field
1902
+ * is only supported on QuickBooks Desktop 2023 or later.
1903
+ */
1904
+ expirationDate?: string;
1905
+
1906
+ /**
1907
+ * The site location where inventory for the item associated with this item line is
1908
+ * stored.
1909
+ */
1910
+ inventorySiteId?: string;
1911
+
1912
+ /**
1913
+ * The specific location (e.g., bin or shelf) within the inventory site where the
1914
+ * item associated with this item line is stored.
1915
+ */
1916
+ inventorySiteLocationId?: string;
1917
+
1918
+ /**
1919
+ * The item associated with this item line. This can refer to any good or service
1920
+ * that the business buys or sells, including item types such as a service item,
1921
+ * inventory item, or special calculation item like a discount item or sales-tax
1922
+ * item.
1923
+ */
1924
+ itemId?: string;
1925
+
1926
+ /**
1927
+ * An existing transaction line that you wish to link to this item line. Note that
1928
+ * this only links to a single transaction line item, not an entire transaction. If
1929
+ * you want to link an entire transaction and bring in all its lines, instead use
1930
+ * the field `linkToTransactionIds` on the parent transaction, if available. If the
1931
+ * parent transaction is a bill or an item receipt, you can only link to purchase
1932
+ * orders; QuickBooks does not support linking these transactions to other
1933
+ * transaction types.
1934
+ *
1935
+ * Transaction lines can only be linked when creating this item line and cannot be
1936
+ * unlinked later.
1937
+ *
1938
+ * **IMPORTANT**: If you use `linkToTransactionLine` on this item line, you cannot
1939
+ * use the field `item` on this line (QuickBooks will return an error) because this
1940
+ * field brings in all of the item information you need. You can, however, specify
1941
+ * whatever `quantity` or `rate` that you want, or any other transaction line
1942
+ * element other than `item`.
1943
+ *
1944
+ * If the parent transaction supports the `linkToTransactionIds` field, you can use
1945
+ * both `linkToTransactionLine` (on this item line) and `linkToTransactionIds` (on
1946
+ * its parent transaction) in the same request as long as they do NOT link to the
1947
+ * same transaction (otherwise, QuickBooks will return an error). QuickBooks will
1948
+ * also return an error if you attempt to link a transaction that is empty or
1949
+ * already closed.
1950
+ *
1951
+ * **IMPORTANT**: By default, QuickBooks will not return any information about the
1952
+ * linked transaction line in this endpoint's response even when this request is
1953
+ * successful. To see the transaction line linked via this field, refetch the
1954
+ * parent transaction and check the `linkedTransactions` response field. If
1955
+ * fetching a list of transactions, you must also specify the parameter
1956
+ * `includeLinkedTransactions=true` to see the `linkedTransactions` response field.
1957
+ */
1958
+ linkToTransactionLine?: ItemLine.LinkToTransactionLine;
1959
+
1960
+ /**
1961
+ * The lot number of the item associated with this item line. Used for tracking
1962
+ * groups of inventory items that are purchased or manufactured together.
1963
+ */
1964
+ lotNumber?: string;
1965
+
1966
+ /**
1967
+ * The account to use for this item line, overriding the default account associated
1968
+ * with the item.
1969
+ */
1970
+ overrideItemAccountId?: string;
1971
+
1972
+ /**
1973
+ * The quantity of the item associated with this item line. This field cannot be
1974
+ * cleared.
1975
+ *
1976
+ * **NOTE**: Do not use this field if the associated item is a discount item.
1977
+ */
1978
+ quantity?: number;
1979
+
1980
+ /**
1981
+ * The item line's sales representative. Sales representatives can be employees,
1982
+ * vendors, or other names in QuickBooks.
1983
+ */
1984
+ salesRepresentativeId?: string;
1985
+
1986
+ /**
1987
+ * The sales-tax code for this item line, determining whether it is taxable or
1988
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
1989
+ * transaction or the associated item.
1990
+ *
1991
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1992
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1993
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1994
+ * non-taxable code to all sales.
1995
+ */
1996
+ salesTaxCodeId?: string;
1997
+
1998
+ /**
1999
+ * The serial number of the item associated with this item line. This is used for
2000
+ * tracking individual units of serialized inventory items.
2001
+ */
2002
+ serialNumber?: string;
2003
+
2004
+ /**
2005
+ * The unit-of-measure used for the `quantity` in this item line. Must be a valid
2006
+ * unit within the item's available units of measure.
2007
+ */
2008
+ unitOfMeasure?: string;
2009
+ }
2010
+
2011
+ export namespace ItemLine {
2012
+ export interface CustomField {
2013
+ /**
2014
+ * The name of the custom field, unique for the specified `ownerId`. For public
2015
+ * custom fields, this name is visible as a label in the QuickBooks UI.
2016
+ */
2017
+ name: string;
2018
+
2019
+ /**
2020
+ * The identifier of the owner of the custom field, which QuickBooks internally
2021
+ * calls a "data extension". For public custom fields visible in the UI, such as
2022
+ * those added by the QuickBooks user, this is always "0". For private custom
2023
+ * fields that are only visible to the application that created them, this is a
2024
+ * valid GUID identifying the owning application. Internally, Conductor always
2025
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
2026
+ * objects.
2027
+ */
2028
+ ownerId: string;
2029
+
2030
+ /**
2031
+ * The value of this custom field. The maximum length depends on the field's data
2032
+ * type.
2033
+ */
2034
+ value: string;
2035
+ }
2036
+
2037
+ /**
2038
+ * An existing transaction line that you wish to link to this item line. Note that
2039
+ * this only links to a single transaction line item, not an entire transaction. If
2040
+ * you want to link an entire transaction and bring in all its lines, instead use
2041
+ * the field `linkToTransactionIds` on the parent transaction, if available. If the
2042
+ * parent transaction is a bill or an item receipt, you can only link to purchase
2043
+ * orders; QuickBooks does not support linking these transactions to other
2044
+ * transaction types.
2045
+ *
2046
+ * Transaction lines can only be linked when creating this item line and cannot be
2047
+ * unlinked later.
2048
+ *
2049
+ * **IMPORTANT**: If you use `linkToTransactionLine` on this item line, you cannot
2050
+ * use the field `item` on this line (QuickBooks will return an error) because this
2051
+ * field brings in all of the item information you need. You can, however, specify
2052
+ * whatever `quantity` or `rate` that you want, or any other transaction line
2053
+ * element other than `item`.
2054
+ *
2055
+ * If the parent transaction supports the `linkToTransactionIds` field, you can use
2056
+ * both `linkToTransactionLine` (on this item line) and `linkToTransactionIds` (on
2057
+ * its parent transaction) in the same request as long as they do NOT link to the
2058
+ * same transaction (otherwise, QuickBooks will return an error). QuickBooks will
2059
+ * also return an error if you attempt to link a transaction that is empty or
2060
+ * already closed.
2061
+ *
2062
+ * **IMPORTANT**: By default, QuickBooks will not return any information about the
2063
+ * linked transaction line in this endpoint's response even when this request is
2064
+ * successful. To see the transaction line linked via this field, refetch the
2065
+ * parent transaction and check the `linkedTransactions` response field. If
2066
+ * fetching a list of transactions, you must also specify the parameter
2067
+ * `includeLinkedTransactions=true` to see the `linkedTransactions` response field.
2068
+ */
2069
+ export interface LinkToTransactionLine {
2070
+ /**
2071
+ * The ID of the transaction to which to link this transaction.
2072
+ */
2073
+ transactionId: string;
2074
+
2075
+ /**
2076
+ * The ID of the transaction line to which to link this transaction.
2077
+ */
2078
+ transactionLineId: string;
2079
+ }
2080
+ }
2081
+ }
2082
+
2083
+ export interface ItemReceiptRetrieveParams {
2084
+ /**
2085
+ * The ID of the EndUser to receive this request (e.g.,
2086
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
2087
+ */
2088
+ conductorEndUserId: string;
2089
+ }
2090
+
2091
+ export interface ItemReceiptUpdateParams {
2092
+ /**
2093
+ * Body param: The current QuickBooks-assigned revision number of the item receipt
2094
+ * object you are updating, which you can get by fetching the object first. Provide
2095
+ * the most recent `revisionNumber` to ensure you're working with the latest data;
2096
+ * otherwise, the update will return an error.
2097
+ */
2098
+ revisionNumber: string;
2099
+
2100
+ /**
2101
+ * Header param: The ID of the EndUser to receive this request (e.g.,
2102
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
2103
+ */
2104
+ conductorEndUserId: string;
2105
+
2106
+ /**
2107
+ * Body param: When `true`, removes all existing expense lines associated with this
2108
+ * item receipt. To modify or add individual expense lines, use the field
2109
+ * `expenseLines` instead.
2110
+ */
2111
+ clearExpenseLines?: boolean;
2112
+
2113
+ /**
2114
+ * Body param: When `true`, removes all existing item lines associated with this
2115
+ * item receipt. To modify or add individual item lines, use the field `itemLines`
2116
+ * instead.
2117
+ */
2118
+ clearItemLines?: boolean;
2119
+
2120
+ /**
2121
+ * Body param: The market exchange rate between this item receipt's currency and
2122
+ * the home currency in QuickBooks at the time of this transaction. Represented as
2123
+ * a decimal value (e.g., 1.2345 for 1 EUR = 1.2345 USD if USD is the home
2124
+ * currency).
2125
+ */
2126
+ exchangeRate?: number;
2127
+
2128
+ /**
2129
+ * Body param: The item receipt's expense lines, each representing one line in this
2130
+ * expense.
2131
+ *
2132
+ * **IMPORTANT**:
2133
+ *
2134
+ * 1. Including this array in your update request will **REPLACE** all existing
2135
+ * expense lines for the item receipt with this array. To keep any existing
2136
+ * expense lines, you must include them in this array even if they have not
2137
+ * changed. **Any expense lines not included will be removed.**
2138
+ *
2139
+ * 2. To add a new expense line, include it here with the `id` field set to `-1`.
2140
+ *
2141
+ * 3. If you do not wish to modify any expense lines, omit this field entirely to
2142
+ * keep them unchanged.
2143
+ */
2144
+ expenseLines?: Array<ItemReceiptUpdateParams.ExpenseLine>;
2145
+
2146
+ /**
2147
+ * Body param: The item receipt's item group lines, each representing a predefined
2148
+ * set of items bundled together because they are commonly purchased together or
2149
+ * grouped for faster entry.
2150
+ *
2151
+ * **IMPORTANT**:
2152
+ *
2153
+ * 1. Including this array in your update request will **REPLACE** all existing
2154
+ * item group lines for the item receipt with this array. To keep any existing
2155
+ * item group lines, you must include them in this array even if they have not
2156
+ * changed. **Any item group lines not included will be removed.**
2157
+ *
2158
+ * 2. To add a new item group line, include it here with the `id` field set to
2159
+ * `-1`.
2160
+ *
2161
+ * 3. If you do not wish to modify any item group lines, omit this field entirely
2162
+ * to keep them unchanged.
2163
+ */
2164
+ itemLineGroups?: Array<ItemReceiptUpdateParams.ItemLineGroup>;
2165
+
2166
+ /**
2167
+ * Body param: The item receipt's item lines, each representing the purchase of a
2168
+ * specific item or service.
2169
+ *
2170
+ * **IMPORTANT**:
2171
+ *
2172
+ * 1. Including this array in your update request will **REPLACE** all existing
2173
+ * item lines for the item receipt with this array. To keep any existing item
2174
+ * lines, you must include them in this array even if they have not changed.
2175
+ * **Any item lines not included will be removed.**
2176
+ *
2177
+ * 2. To add a new item line, include it here with the `id` field set to `-1`.
2178
+ *
2179
+ * 3. If you do not wish to modify any item lines, omit this field entirely to keep
2180
+ * them unchanged.
2181
+ */
2182
+ itemLines?: Array<ItemReceiptUpdateParams.ItemLine>;
2183
+
2184
+ /**
2185
+ * Body param: A memo or note for this item receipt.
2186
+ */
2187
+ memo?: string;
2188
+
2189
+ /**
2190
+ * Body param: The Accounts-Payable (A/P) account to which this item receipt is
2191
+ * assigned, used to track the amount owed. If not specified, QuickBooks Desktop
2192
+ * will use its default A/P account.
2193
+ *
2194
+ * **IMPORTANT**: If this item receipt is linked to other transactions, this A/P
2195
+ * account must match the `payablesAccount` used in those other transactions.
2196
+ */
2197
+ payablesAccountId?: string;
2198
+
2199
+ /**
2200
+ * Body param: The case-sensitive user-defined reference number for this item
2201
+ * receipt, which can be used to identify the transaction in QuickBooks. This value
2202
+ * is not required to be unique and can be arbitrarily changed by the QuickBooks
2203
+ * user.
2204
+ */
2205
+ refNumber?: string;
2206
+
2207
+ /**
2208
+ * Body param: The sales-tax code for this item receipt, determining whether it is
2209
+ * taxable or non-taxable. If set, this overrides any sales-tax codes defined on
2210
+ * the vendor. This can be overridden on the item receipt's individual lines.
2211
+ *
2212
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
2213
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
2214
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
2215
+ * non-taxable code to all sales.
2216
+ */
2217
+ salesTaxCodeId?: string;
2218
+
2219
+ /**
2220
+ * Body param: The date of this item receipt, in ISO 8601 format (YYYY-MM-DD).
2221
+ */
2222
+ transactionDate?: string;
2223
+
2224
+ /**
2225
+ * Body param: The vendor who sent this item receipt for goods or services
2226
+ * purchased.
2227
+ */
2228
+ vendorId?: string;
2229
+ }
2230
+
2231
+ export namespace ItemReceiptUpdateParams {
2232
+ export interface ExpenseLine {
2233
+ /**
2234
+ * The QuickBooks-assigned unique identifier of an existing expense line you wish
2235
+ * to retain or update.
2236
+ *
2237
+ * **IMPORTANT**: Set this field to `-1` for new expense lines you wish to add.
2238
+ */
2239
+ id: string;
2240
+
2241
+ /**
2242
+ * The expense account being debited (increased) for this expense line. The
2243
+ * corresponding account being credited is usually a liability account (e.g.,
2244
+ * Accounts-Payable) or an asset account (e.g., Cash), depending on the transaction
2245
+ * type.
2246
+ */
2247
+ accountId?: string;
2248
+
2249
+ /**
2250
+ * The monetary amount of this expense line, represented as a decimal string.
2251
+ */
2252
+ amount?: string;
2253
+
2254
+ /**
2255
+ * The billing status of this expense line.
2256
+ */
2257
+ billingStatus?: 'billable' | 'has_been_billed' | 'not_billable';
2258
+
2259
+ /**
2260
+ * The expense line's class. Classes can be used to categorize objects into
2261
+ * meaningful segments, such as department, location, or type of work. In
2262
+ * QuickBooks, class tracking is off by default. If a class is specified for the
2263
+ * entire parent transaction, it is automatically applied to all expense lines
2264
+ * unless overridden here, at the transaction line level.
2265
+ */
2266
+ classId?: string;
2267
+
2268
+ /**
2269
+ * A memo or note for this expense line.
2270
+ */
2271
+ memo?: string;
2272
+
2273
+ /**
2274
+ * If `account` refers to an Accounts-Payable (A/P) account, `payee` refers to the
2275
+ * expense's vendor (not the customer). If `account` refers to any other type of
2276
+ * account, `payee` refers to the expense's customer (not the vendor).
2277
+ */
2278
+ payeeId?: string;
2279
+
2280
+ /**
2281
+ * The expense line's sales representative. Sales representatives can be employees,
2282
+ * vendors, or other names in QuickBooks.
2283
+ */
2284
+ salesRepresentativeId?: string;
2285
+
2286
+ /**
2287
+ * The sales-tax code for this expense line, determining whether it is taxable or
2288
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
2289
+ * transaction or the associated item.
2290
+ *
2291
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
2292
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
2293
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
2294
+ * non-taxable code to all sales.
2295
+ */
2296
+ salesTaxCodeId?: string;
2297
+ }
2298
+
2299
+ export interface ItemLineGroup {
2300
+ /**
2301
+ * The QuickBooks-assigned unique identifier of an existing item line group you
2302
+ * wish to retain or update.
2303
+ *
2304
+ * **IMPORTANT**: Set this field to `-1` for new item line groups you wish to add.
2305
+ */
2306
+ id: string;
2307
+
2308
+ /**
2309
+ * The item line group's item group, representing a predefined set of items bundled
2310
+ * because they are commonly purchased together or grouped for faster entry.
2311
+ */
2312
+ itemGroupId?: string;
2313
+
2314
+ /**
2315
+ * The item line group's item lines, each representing the purchase of a specific
2316
+ * item or service.
2317
+ *
2318
+ * **IMPORTANT**:
2319
+ *
2320
+ * 1. Including this array in your update request will **REPLACE** all existing
2321
+ * item lines for the item line group with this array. To keep any existing item
2322
+ * lines, you must include them in this array even if they have not changed.
2323
+ * **Any item lines not included will be removed.**
2324
+ *
2325
+ * 2. To add a new item line, include it here with the `id` field set to `-1`.
2326
+ *
2327
+ * 3. If you do not wish to modify any item lines, omit this field entirely to keep
2328
+ * them unchanged.
2329
+ */
2330
+ itemLines?: Array<ItemLineGroup.ItemLine>;
2331
+
2332
+ /**
2333
+ * Specifies an alternative unit-of-measure set when updating this item line
2334
+ * group's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to
2335
+ * select units from a different set than the item's default unit-of-measure set,
2336
+ * which remains unchanged on the item itself. The override applies only to this
2337
+ * specific line. For example, you can sell an item typically measured in volume
2338
+ * units using weight units in a specific transaction by specifying a different
2339
+ * unit-of-measure set with this field.
2340
+ */
2341
+ overrideUnitOfMeasureSetId?: string;
2342
+
2343
+ /**
2344
+ * The quantity of the item group associated with this item line group. This field
2345
+ * cannot be cleared.
2346
+ *
2347
+ * **NOTE**: Do not use this field if the associated item group is a discount item
2348
+ * group.
2349
+ */
2350
+ quantity?: number;
2351
+
2352
+ /**
2353
+ * The unit-of-measure used for the `quantity` in this item line group. Must be a
2354
+ * valid unit within the item's available units of measure.
2355
+ */
2356
+ unitOfMeasure?: string;
2357
+ }
2358
+
2359
+ export namespace ItemLineGroup {
2360
+ export interface ItemLine {
2361
+ /**
2362
+ * The QuickBooks-assigned unique identifier of an existing item line you wish to
2363
+ * retain or update.
2364
+ *
2365
+ * **IMPORTANT**: Set this field to `-1` for new item lines you wish to add.
2366
+ */
2367
+ id: string;
2368
+
2369
+ /**
2370
+ * The monetary amount of this item line, represented as a decimal string. If both
2371
+ * `quantity` and `cost` are specified but not `amount`, QuickBooks will use them
2372
+ * to calculate `amount`. If `amount`, `cost`, and `quantity` are all unspecified,
2373
+ * then QuickBooks will calculate `amount` based on a `quantity` of `1` and the
2374
+ * suggested `cost`. This field cannot be cleared.
2375
+ */
2376
+ amount?: string;
2377
+
2378
+ /**
2379
+ * The billing status of this item line.
2380
+ */
2381
+ billingStatus?: 'billable' | 'has_been_billed' | 'not_billable';
2382
+
2383
+ /**
2384
+ * The item line's class. Classes can be used to categorize objects into meaningful
2385
+ * segments, such as department, location, or type of work. In QuickBooks, class
2386
+ * tracking is off by default. If a class is specified for the entire parent
2387
+ * transaction, it is automatically applied to all item lines unless overridden
2388
+ * here, at the transaction line level.
2389
+ */
2390
+ classId?: string;
2391
+
2392
+ /**
2393
+ * The cost of this item line, represented as a decimal string. If both `quantity`
2394
+ * and `amount` are specified but not `cost`, QuickBooks will use them to calculate
2395
+ * `cost`.
2396
+ */
2397
+ cost?: string;
2398
+
2399
+ /**
2400
+ * The customer or customer-job associated with this item line.
2401
+ */
2402
+ customerId?: string;
2403
+
2404
+ /**
2405
+ * A description of this item line.
2406
+ */
2407
+ description?: string;
2408
+
2409
+ /**
2410
+ * The expiration date for the serial number or lot number of the item associated
2411
+ * with this item line, in ISO 8601 format (YYYY-MM-DD). This is particularly
2412
+ * relevant for perishable or time-sensitive inventory items. Note that this field
2413
+ * is only supported on QuickBooks Desktop 2023 or later.
2414
+ */
2415
+ expirationDate?: string;
2416
+
2417
+ /**
2418
+ * The site location where inventory for the item associated with this item line is
2419
+ * stored.
2420
+ */
2421
+ inventorySiteId?: string;
2422
+
2423
+ /**
2424
+ * The specific location (e.g., bin or shelf) within the inventory site where the
2425
+ * item associated with this item line is stored.
2426
+ */
2427
+ inventorySiteLocationId?: string;
2428
+
2429
+ /**
2430
+ * The item associated with this item line. This can refer to any good or service
2431
+ * that the business buys or sells, including item types such as a service item,
2432
+ * inventory item, or special calculation item like a discount item or sales-tax
2433
+ * item.
2434
+ */
2435
+ itemId?: string;
2436
+
2437
+ /**
2438
+ * The lot number of the item associated with this item line. Used for tracking
2439
+ * groups of inventory items that are purchased or manufactured together.
2440
+ */
2441
+ lotNumber?: string;
2442
+
2443
+ /**
2444
+ * The account to use for this item line, overriding the default account associated
2445
+ * with the item.
2446
+ */
2447
+ overrideItemAccountId?: string;
2448
+
2449
+ /**
2450
+ * Specifies an alternative unit-of-measure set when updating this item line's
2451
+ * `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to select
2452
+ * units from a different set than the item's default unit-of-measure set, which
2453
+ * remains unchanged on the item itself. The override applies only to this specific
2454
+ * line. For example, you can sell an item typically measured in volume units using
2455
+ * weight units in a specific transaction by specifying a different unit-of-measure
2456
+ * set with this field.
2457
+ */
2458
+ overrideUnitOfMeasureSetId?: string;
2459
+
2460
+ /**
2461
+ * The quantity of the item associated with this item line. This field cannot be
2462
+ * cleared.
2463
+ *
2464
+ * **NOTE**: Do not use this field if the associated item is a discount item.
2465
+ */
2466
+ quantity?: number;
2467
+
2468
+ /**
2469
+ * The item line's sales representative. Sales representatives can be employees,
2470
+ * vendors, or other names in QuickBooks.
2471
+ */
2472
+ salesRepresentativeId?: string;
2473
+
2474
+ /**
2475
+ * The sales-tax code for this item line, determining whether it is taxable or
2476
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
2477
+ * transaction or the associated item.
2478
+ *
2479
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
2480
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
2481
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
2482
+ * non-taxable code to all sales.
2483
+ */
2484
+ salesTaxCodeId?: string;
2485
+
2486
+ /**
2487
+ * The serial number of the item associated with this item line. This is used for
2488
+ * tracking individual units of serialized inventory items.
2489
+ */
2490
+ serialNumber?: string;
2491
+
2492
+ /**
2493
+ * The unit-of-measure used for the `quantity` in this item line. Must be a valid
2494
+ * unit within the item's available units of measure.
2495
+ */
2496
+ unitOfMeasure?: string;
2497
+ }
2498
+ }
2499
+
2500
+ export interface ItemLine {
2501
+ /**
2502
+ * The QuickBooks-assigned unique identifier of an existing item line you wish to
2503
+ * retain or update.
2504
+ *
2505
+ * **IMPORTANT**: Set this field to `-1` for new item lines you wish to add.
2506
+ */
2507
+ id: string;
2508
+
2509
+ /**
2510
+ * The monetary amount of this item line, represented as a decimal string. If both
2511
+ * `quantity` and `cost` are specified but not `amount`, QuickBooks will use them
2512
+ * to calculate `amount`. If `amount`, `cost`, and `quantity` are all unspecified,
2513
+ * then QuickBooks will calculate `amount` based on a `quantity` of `1` and the
2514
+ * suggested `cost`. This field cannot be cleared.
2515
+ */
2516
+ amount?: string;
2517
+
2518
+ /**
2519
+ * The billing status of this item line.
2520
+ */
2521
+ billingStatus?: 'billable' | 'has_been_billed' | 'not_billable';
2522
+
2523
+ /**
2524
+ * The item line's class. Classes can be used to categorize objects into meaningful
2525
+ * segments, such as department, location, or type of work. In QuickBooks, class
2526
+ * tracking is off by default. If a class is specified for the entire parent
2527
+ * transaction, it is automatically applied to all item lines unless overridden
2528
+ * here, at the transaction line level.
2529
+ */
2530
+ classId?: string;
2531
+
2532
+ /**
2533
+ * The cost of this item line, represented as a decimal string. If both `quantity`
2534
+ * and `amount` are specified but not `cost`, QuickBooks will use them to calculate
2535
+ * `cost`.
2536
+ */
2537
+ cost?: string;
2538
+
2539
+ /**
2540
+ * The customer or customer-job associated with this item line.
2541
+ */
2542
+ customerId?: string;
2543
+
2544
+ /**
2545
+ * A description of this item line.
2546
+ */
2547
+ description?: string;
2548
+
2549
+ /**
2550
+ * The expiration date for the serial number or lot number of the item associated
2551
+ * with this item line, in ISO 8601 format (YYYY-MM-DD). This is particularly
2552
+ * relevant for perishable or time-sensitive inventory items. Note that this field
2553
+ * is only supported on QuickBooks Desktop 2023 or later.
2554
+ */
2555
+ expirationDate?: string;
2556
+
2557
+ /**
2558
+ * The site location where inventory for the item associated with this item line is
2559
+ * stored.
2560
+ */
2561
+ inventorySiteId?: string;
2562
+
2563
+ /**
2564
+ * The specific location (e.g., bin or shelf) within the inventory site where the
2565
+ * item associated with this item line is stored.
2566
+ */
2567
+ inventorySiteLocationId?: string;
2568
+
2569
+ /**
2570
+ * The item associated with this item line. This can refer to any good or service
2571
+ * that the business buys or sells, including item types such as a service item,
2572
+ * inventory item, or special calculation item like a discount item or sales-tax
2573
+ * item.
2574
+ */
2575
+ itemId?: string;
2576
+
2577
+ /**
2578
+ * The lot number of the item associated with this item line. Used for tracking
2579
+ * groups of inventory items that are purchased or manufactured together.
2580
+ */
2581
+ lotNumber?: string;
2582
+
2583
+ /**
2584
+ * The account to use for this item line, overriding the default account associated
2585
+ * with the item.
2586
+ */
2587
+ overrideItemAccountId?: string;
2588
+
2589
+ /**
2590
+ * Specifies an alternative unit-of-measure set when updating this item line's
2591
+ * `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to select
2592
+ * units from a different set than the item's default unit-of-measure set, which
2593
+ * remains unchanged on the item itself. The override applies only to this specific
2594
+ * line. For example, you can sell an item typically measured in volume units using
2595
+ * weight units in a specific transaction by specifying a different unit-of-measure
2596
+ * set with this field.
2597
+ */
2598
+ overrideUnitOfMeasureSetId?: string;
2599
+
2600
+ /**
2601
+ * The quantity of the item associated with this item line. This field cannot be
2602
+ * cleared.
2603
+ *
2604
+ * **NOTE**: Do not use this field if the associated item is a discount item.
2605
+ */
2606
+ quantity?: number;
2607
+
2608
+ /**
2609
+ * The item line's sales representative. Sales representatives can be employees,
2610
+ * vendors, or other names in QuickBooks.
2611
+ */
2612
+ salesRepresentativeId?: string;
2613
+
2614
+ /**
2615
+ * The sales-tax code for this item line, determining whether it is taxable or
2616
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
2617
+ * transaction or the associated item.
2618
+ *
2619
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
2620
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
2621
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
2622
+ * non-taxable code to all sales.
2623
+ */
2624
+ salesTaxCodeId?: string;
2625
+
2626
+ /**
2627
+ * The serial number of the item associated with this item line. This is used for
2628
+ * tracking individual units of serialized inventory items.
2629
+ */
2630
+ serialNumber?: string;
2631
+
2632
+ /**
2633
+ * The unit-of-measure used for the `quantity` in this item line. Must be a valid
2634
+ * unit within the item's available units of measure.
2635
+ */
2636
+ unitOfMeasure?: string;
2637
+ }
2638
+ }
2639
+
2640
+ export interface ItemReceiptListParams extends CursorPageParams {
2641
+ /**
2642
+ * Header param: The ID of the EndUser to receive this request (e.g.,
2643
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
2644
+ */
2645
+ conductorEndUserId: string;
2646
+
2647
+ /**
2648
+ * Query param: Filter for item receipts associated with these accounts.
2649
+ */
2650
+ accountIds?: Array<string>;
2651
+
2652
+ /**
2653
+ * Query param: Filter for item receipts in these currencies.
2654
+ */
2655
+ currencyIds?: Array<string>;
2656
+
2657
+ /**
2658
+ * Query param: Filter for specific item receipts by their QuickBooks-assigned
2659
+ * unique identifier(s).
2660
+ *
2661
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
2662
+ * query parameters for this request.
2663
+ *
2664
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
2665
+ * request will return an error.
2666
+ */
2667
+ ids?: Array<string>;
2668
+
2669
+ /**
2670
+ * Query param: Whether to include line items in the response. Defaults to `true`.
2671
+ */
2672
+ includeLineItems?: boolean;
2673
+
2674
+ /**
2675
+ * Query param: Whether to include linked transactions in the response. Defaults to
2676
+ * `false`. For example, a payment linked to the corresponding item receipt.
2677
+ */
2678
+ includeLinkedTransactions?: boolean;
2679
+
2680
+ /**
2681
+ * Query param: Filter for item receipts whose `refNumber` contains this substring.
2682
+ * NOTE: If you use this parameter, you cannot also use `refNumberStartsWith` or
2683
+ * `refNumberEndsWith`.
2684
+ */
2685
+ refNumberContains?: string;
2686
+
2687
+ /**
2688
+ * Query param: Filter for item receipts whose `refNumber` ends with this
2689
+ * substring. NOTE: If you use this parameter, you cannot also use
2690
+ * `refNumberContains` or `refNumberStartsWith`.
2691
+ */
2692
+ refNumberEndsWith?: string;
2693
+
2694
+ /**
2695
+ * Query param: Filter for item receipts whose `refNumber` is greater than or equal
2696
+ * to this value. If omitted, the range will begin with the first number of the
2697
+ * list. Uses a numerical comparison for values that contain only digits;
2698
+ * otherwise, uses a lexicographical comparison.
2699
+ */
2700
+ refNumberFrom?: string;
2701
+
2702
+ /**
2703
+ * Query param: Filter for specific item receipts by their ref-number(s),
2704
+ * case-sensitive. In QuickBooks, ref-numbers are not required to be unique and can
2705
+ * be arbitrarily changed by the QuickBooks user.
2706
+ *
2707
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
2708
+ * query parameters for this request.
2709
+ *
2710
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
2711
+ * request will return an error.
2712
+ */
2713
+ refNumbers?: Array<string>;
2714
+
2715
+ /**
2716
+ * Query param: Filter for item receipts whose `refNumber` starts with this
2717
+ * substring. NOTE: If you use this parameter, you cannot also use
2718
+ * `refNumberContains` or `refNumberEndsWith`.
2719
+ */
2720
+ refNumberStartsWith?: string;
2721
+
2722
+ /**
2723
+ * Query param: Filter for item receipts whose `refNumber` is less than or equal to
2724
+ * this value. If omitted, the range will end with the last number of the list.
2725
+ * Uses a numerical comparison for values that contain only digits; otherwise, uses
2726
+ * a lexicographical comparison.
2727
+ */
2728
+ refNumberTo?: string;
2729
+
2730
+ /**
2731
+ * Query param: Filter for item receipts whose `date` field is on or after this
2732
+ * date, in ISO 8601 format (YYYY-MM-DD).
2733
+ */
2734
+ transactionDateFrom?: string;
2735
+
2736
+ /**
2737
+ * Query param: Filter for item receipts whose `date` field is on or before this
2738
+ * date, in ISO 8601 format (YYYY-MM-DD).
2739
+ */
2740
+ transactionDateTo?: string;
2741
+
2742
+ /**
2743
+ * Query param: Filter for item receipts updated on or after this date and time, in
2744
+ * ISO 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date (YYYY-MM-DD),
2745
+ * the time is assumed to be 00:00:00 of that day.
2746
+ */
2747
+ updatedAfter?: string;
2748
+
2749
+ /**
2750
+ * Query param: Filter for item receipts updated on or before this date and time,
2751
+ * in ISO 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date
2752
+ * (YYYY-MM-DD), the time is assumed to be 23:59:59 of that day.
2753
+ */
2754
+ updatedBefore?: string;
2755
+
2756
+ /**
2757
+ * Query param: Filter for item receipts received from these vendors.
2758
+ */
2759
+ vendorIds?: Array<string>;
2760
+ }
2761
+
2762
+ export interface ItemReceiptDeleteParams {
2763
+ /**
2764
+ * The ID of the EndUser to receive this request (e.g.,
2765
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
2766
+ */
2767
+ conductorEndUserId: string;
2768
+ }
2769
+
2770
+ ItemReceipts.ItemReceiptsCursorPage = ItemReceiptsCursorPage;
2771
+
2772
+ export declare namespace ItemReceipts {
2773
+ export {
2774
+ type ItemReceipt as ItemReceipt,
2775
+ type ItemReceiptDeleteResponse as ItemReceiptDeleteResponse,
2776
+ ItemReceiptsCursorPage as ItemReceiptsCursorPage,
2777
+ type ItemReceiptCreateParams as ItemReceiptCreateParams,
2778
+ type ItemReceiptRetrieveParams as ItemReceiptRetrieveParams,
2779
+ type ItemReceiptUpdateParams as ItemReceiptUpdateParams,
2780
+ type ItemReceiptListParams as ItemReceiptListParams,
2781
+ type ItemReceiptDeleteParams as ItemReceiptDeleteParams,
2782
+ };
2783
+ }