@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Accounting API
@base https://unify.apideck.com
@version 10.24.14
@auth ApiKey Authorization in header
@common_fields {x-apideck-consumer-id: str # ID of the consumer which you want to get or push data from, x-apideck-app-id: str # The ID of your Unify application, raw: bool=false # Include raw response. Mostly used for debugging purposes, x-apideck-service-id: str # Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.}
@endpoints 143
@hint download_for_search
@toc accounting(143)

@endpoint GET /accounting/tax-rates
@desc List Tax Rates
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # TaxRates
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/tax-rates
@desc Create Tax Rate
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # ID assigned to identify this tax rate., display_id: str # Display ID of the tax rate, name: str # Name assigned to identify this tax rate., code: str # Tax code assigned to identify this tax rate., description: str # Description of tax rate, effective_tax_rate: num # Effective tax rate, country: str # Country code according to ISO 3166-1 alpha-2., total_tax_rate: num # Not compounded sum of the components of a tax rate, tax_payable_account_id: str # Unique identifier for the account for tax collected., tax_remitted_account_id: str # Unique identifier for the account for tax remitted., components: [any], type: str # Tax type used to indicate the source of tax collected or paid, report_tax_type: str # Report Tax type to aggregate tax collected or paid for reporting purposes, original_tax_rate_id: str # ID of the original tax rate from which the new tax rate is derived. Helps to understand the relationship between corresponding tax rate entities., status: str(active/inactive/archived) # Tax rate status, custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources., subsidiaries: [any] # The subsidiaries this belongs to., custom_fields: [map{id: str, name: str, description: str, value: any}]}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # TaxRate created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/tax-rates/{id}
@desc Get Tax Rate
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str?, display_id: str?, name: str, code: str?, description: str?, effective_tax_rate: num?, country: str?, total_tax_rate: num?, tax_payable_account_id: str?, tax_remitted_account_id: str?, components: [any]?, type: str?, report_tax_type: str?, original_tax_rate_id: str?, status: str?, custom_mappings: map?, row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map], subsidiaries: [any], custom_fields: [map]}, _raw: map?} # TaxRate
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/tax-rates/{id}
@desc Update Tax Rate
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # ID assigned to identify this tax rate., display_id: str # Display ID of the tax rate, name: str # Name assigned to identify this tax rate., code: str # Tax code assigned to identify this tax rate., description: str # Description of tax rate, effective_tax_rate: num # Effective tax rate, country: str # Country code according to ISO 3166-1 alpha-2., total_tax_rate: num # Not compounded sum of the components of a tax rate, tax_payable_account_id: str # Unique identifier for the account for tax collected., tax_remitted_account_id: str # Unique identifier for the account for tax remitted., components: [any], type: str # Tax type used to indicate the source of tax collected or paid, report_tax_type: str # Report Tax type to aggregate tax collected or paid for reporting purposes, original_tax_rate_id: str # ID of the original tax rate from which the new tax rate is derived. Helps to understand the relationship between corresponding tax rate entities., status: str(active/inactive/archived) # Tax rate status, custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources., subsidiaries: [any] # The subsidiaries this belongs to., custom_fields: [map{id: str, name: str, description: str, value: any}]}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # TaxRate updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/tax-rates/{id}
@desc Delete Tax Rate
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # TaxRates deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/bills
@desc List Bills
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Bills
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/bills
@desc Create Bill
@optional {id: str # A unique identifier for an object., downstream_id: str # The third-party API ID of original entity, display_id: str # Id to be displayed., bill_number: str # Reference to supplier bill number, supplier: map{id: str, display_id: str, display_name: str, company_name: str, address: map} # The supplier this entity is linked to., company_id: str # The company ID the transaction belongs to, location_id: str # The ID of the location, department_id: str # The ID of the department, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., tax_inclusive: bool # Amounts are including tax, bill_date: str(date) # Date bill was issued - YYYY-MM-DD., due_date: str(date) # The due date is the date on which a payment is scheduled to be received - YYYY-MM-DD., paid_date: str(date) # The paid date is the date on which a payment was sent to the supplier - YYYY-MM-DD., po_number: str # A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order., reference: str # Optional reference identifier for the transaction., line_items: [map{id: str, row_id: str, code: str, line_number: int, description: str, type: str, tax_amount: num, total_amount: num, quantity: num, unit_price: num, unit_of_measure: str, discount_percentage: num, discount_amount: num, location_id: str, department_id: str, subsidiary_id: str, category_id: str, shipping_id: str, memo: str, prepaid: bool, tax_applicable_on: str, tax_recoverability: str, tax_method: str, retention_amount: num, payment_amount: num, item: map, tax_rate: map, ledger_account: map, purchase_order: map, tracking_categories: [map], customer: map, rebilling: map, row_version: str, updated_by: str, created_by: str, created_at: str(date-time), updated_at: str(date-time), worktags: [map]}], terms: str # Terms of payment., terms_id: str # The ID of the payment terms, balance: num # Balance of bill due., deposit: num # Amount of deposit made to this bill., sub_total: num # Subtotal amount, normally before tax., total_tax: num # Total tax amount applied to this transaction., total: num # Total amount of bill, including tax., tax_code: str # Applicable tax id/code override if tax is not supplied on a line item basis., notes: str, status: str(draft/submitted/authorised/partially_paid/paid/void/credit/deleted/posted) # Invoice status, ledger_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, channel: str # The channel through which the transaction is processed., language: str # language code according to ISO 639-1. For the United States - EN, accounting_by_row: bool # Indicates if accounting by row is used (true) or not (false). Accounting by row means that a separate ledger transaction is created for each row., bank_account: map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}, discount_percentage: num # Discount percentage applied to this transaction., template_id: str # Optional bill template, approved_by: str # The user who approved the bill, amortization_type: str(manual/receipt/schedule/other) # Type of amortization, tax_method: str # Method of tax calculation, document_received: bool # Whether the document has been received, source_document_url: str # URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero., tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., custom_fields: [map{id: str, name: str, description: str, value: any}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources., accounting_period: str # Accounting period, attachments: [map{name: str, mime_type: str, is_compressed: bool, encoding: str, content: str, notes: str}]}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Bill created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/bills/{id}
@desc Get Bill
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, display_id: str?, bill_number: str?, supplier: map?{id: str, display_id: str?, display_name: str?, company_name: str?, address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}}, company_id: str?, location_id: str?, department_id: str?, currency: str?, currency_rate: num?, tax_inclusive: bool?, bill_date: str(date)?, due_date: str(date)?, paid_date: str(date)?, po_number: str?, reference: str?, line_items: [map], terms: str?, terms_id: str?, balance: num?, deposit: num?, sub_total: num?, total_tax: num?, total: num?, tax_code: str?, notes: str?, status: str?, ledger_account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, payment_method: str?, channel: str?, language: str?, accounting_by_row: bool?, bank_account: map{bank_name: str?, account_number: str?, account_name: str?, account_type: str?, iban: str?, bic: str?, routing_number: str?, bsb_number: str?, branch_identifier: str?, bank_code: str?, currency: str?, country: str?}, discount_percentage: num?, template_id: str?, approved_by: str?, amortization_type: str?, tax_method: str?, document_received: bool?, source_document_url: str?, tracking_categories: [map]?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, row_version: str?, custom_fields: [map], custom_mappings: map?, pass_through: [map], accounting_period: str?, attachments: [map]}, _raw: map?} # Bill
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/bills/{id}
@desc Update Bill
@required {id: str # ID of the record you are acting upon.}
@optional {id: str # A unique identifier for an object., downstream_id: str # The third-party API ID of original entity, display_id: str # Id to be displayed., bill_number: str # Reference to supplier bill number, supplier: map{id: str, display_id: str, display_name: str, company_name: str, address: map} # The supplier this entity is linked to., company_id: str # The company ID the transaction belongs to, location_id: str # The ID of the location, department_id: str # The ID of the department, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., tax_inclusive: bool # Amounts are including tax, bill_date: str(date) # Date bill was issued - YYYY-MM-DD., due_date: str(date) # The due date is the date on which a payment is scheduled to be received - YYYY-MM-DD., paid_date: str(date) # The paid date is the date on which a payment was sent to the supplier - YYYY-MM-DD., po_number: str # A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order., reference: str # Optional reference identifier for the transaction., line_items: [map{id: str, row_id: str, code: str, line_number: int, description: str, type: str, tax_amount: num, total_amount: num, quantity: num, unit_price: num, unit_of_measure: str, discount_percentage: num, discount_amount: num, location_id: str, department_id: str, subsidiary_id: str, category_id: str, shipping_id: str, memo: str, prepaid: bool, tax_applicable_on: str, tax_recoverability: str, tax_method: str, retention_amount: num, payment_amount: num, item: map, tax_rate: map, ledger_account: map, purchase_order: map, tracking_categories: [map], customer: map, rebilling: map, row_version: str, updated_by: str, created_by: str, created_at: str(date-time), updated_at: str(date-time), worktags: [map]}], terms: str # Terms of payment., terms_id: str # The ID of the payment terms, balance: num # Balance of bill due., deposit: num # Amount of deposit made to this bill., sub_total: num # Subtotal amount, normally before tax., total_tax: num # Total tax amount applied to this transaction., total: num # Total amount of bill, including tax., tax_code: str # Applicable tax id/code override if tax is not supplied on a line item basis., notes: str, status: str(draft/submitted/authorised/partially_paid/paid/void/credit/deleted/posted) # Invoice status, ledger_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, channel: str # The channel through which the transaction is processed., language: str # language code according to ISO 639-1. For the United States - EN, accounting_by_row: bool # Indicates if accounting by row is used (true) or not (false). Accounting by row means that a separate ledger transaction is created for each row., bank_account: map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}, discount_percentage: num # Discount percentage applied to this transaction., template_id: str # Optional bill template, approved_by: str # The user who approved the bill, amortization_type: str(manual/receipt/schedule/other) # Type of amortization, tax_method: str # Method of tax calculation, document_received: bool # Whether the document has been received, source_document_url: str # URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero., tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., custom_fields: [map{id: str, name: str, description: str, value: any}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources., accounting_period: str # Accounting period, attachments: [map{name: str, mime_type: str, is_compressed: bool, encoding: str, content: str, notes: str}]}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Bill Updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/bills/{id}
@desc Delete Bill
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Bill deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/invoices
@desc List Invoices
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Invoices
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/invoices
@desc Create Invoice
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., downstream_id: str # The third-party API ID of original entity, display_id: str # Id to be displayed., type: str(standard/credit/service/product/supplier/other) # Invoice type, number: str # Invoice number., customer: map{id: str, display_id: str, display_name: str, name: str, company_name: str, email: str} # The customer this entity is linked to., company_id: str # The company ID the transaction belongs to, location_id: str # The ID of the location, department_id: str # The ID of the department, invoice_date: str(date) # Date invoice was issued - YYYY-MM-DD., due_date: str(date) # The invoice due date is the date on which a payment or invoice is scheduled to be received by the seller - YYYY-MM-DD., terms: str # Terms of payment., terms_id: str # The ID of the payment terms, po_number: str # A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order., reference: str # Optional reference identifier for the transaction., status: str(draft/submitted/authorised/partially_paid/paid/unpaid/void/credit/deleted/posted) # Invoice status, invoice_sent: bool # Invoice sent to contact/customer., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., tax_inclusive: bool # Amounts are including tax, sub_total: num # Sub-total amount, normally before tax., total_tax: num # Total tax amount applied to this invoice., tax_code: str # Applicable tax id/code override if tax is not supplied on a line item basis., discount_percentage: num # Discount percentage applied to this invoice., discount_amount: num # Discount amount applied to this invoice., total: num # Total amount of invoice, including tax., balance: num # Balance of invoice due., deposit: num # Amount of deposit made to this invoice., customer_memo: str # Customer memo, tracking_category: map{id: str, name: str}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., line_items: [map{id: str, row_id: str, code: str, line_number: int, description: str, type: str, tax_amount: num, total_amount: num, quantity: num, unit_price: num, unit_of_measure: str, discount_percentage: num, discount_amount: num, service_date: str(date), category_id: str, location_id: str, department_id: str, subsidiary_id: str, shipping_id: str, memo: str, prepaid: bool, item: map, tax_applicable_on: str, tax_recoverability: str, tax_method: str, worktags: [map], tax_rate: map, tracking_categories: [map], ledger_account: map, custom_fields: [map], row_version: str, updated_by: str, created_by: str, created_at: str(date-time), updated_at: str(date-time)}], billing_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, shipping_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, template_id: str # Optional invoice template, source_document_url: str # URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero., payment_allocations: [map{id: str, allocated_amount: num, date: str(date-time)}] # IDs of payments made on the invoice, payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, channel: str # The channel through which the transaction is processed., language: str # language code according to ISO 639-1. For the United States - EN, accounting_by_row: bool # Indicates if accounting by row is used (true) or not (false). Accounting by row means that a separate ledger transaction is created for each row., bank_account: map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}, ledger_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, custom_mappings: map # When custom mappings are configured on the resource, the result is included here., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?}, _raw: map?} # Invoice created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/invoices/{id}
@desc Get Invoice
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, display_id: str?, type: str?, number: str?, customer: map?{id: str, display_id: str?, display_name: str?, name: str, company_name: str?, email: str}, company_id: str?, location_id: str?, department_id: str?, invoice_date: str(date)?, due_date: str(date)?, terms: str?, terms_id: str?, po_number: str?, reference: str?, status: str?, invoice_sent: bool, currency: str?, currency_rate: num?, tax_inclusive: bool?, sub_total: num?, total_tax: num?, tax_code: str?, discount_percentage: num?, discount_amount: num?, total: num?, balance: num?, deposit: num?, customer_memo: str?, tracking_category: map?{id: str, name: str?}, tracking_categories: [map]?, line_items: [map], billing_address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}, shipping_address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}, template_id: str?, source_document_url: str?, payment_allocations: [map]?, payment_method: str?, channel: str?, language: str?, accounting_by_row: bool?, bank_account: map{bank_name: str?, account_number: str?, account_name: str?, account_type: str?, iban: str?, bic: str?, routing_number: str?, bsb_number: str?, branch_identifier: str?, bank_code: str?, currency: str?, country: str?}, ledger_account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, custom_mappings: map?, custom_fields: [map], row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Invoice
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/invoices/{id}
@desc Update Invoice
@required {id: str # ID of the record you are acting upon.}
@optional {id: str # A unique identifier for an object., downstream_id: str # The third-party API ID of original entity, display_id: str # Id to be displayed., type: str(standard/credit/service/product/supplier/other) # Invoice type, number: str # Invoice number., customer: map{id: str, display_id: str, display_name: str, name: str, company_name: str, email: str} # The customer this entity is linked to., company_id: str # The company ID the transaction belongs to, location_id: str # The ID of the location, department_id: str # The ID of the department, invoice_date: str(date) # Date invoice was issued - YYYY-MM-DD., due_date: str(date) # The invoice due date is the date on which a payment or invoice is scheduled to be received by the seller - YYYY-MM-DD., terms: str # Terms of payment., terms_id: str # The ID of the payment terms, po_number: str # A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order., reference: str # Optional reference identifier for the transaction., status: str(draft/submitted/authorised/partially_paid/paid/unpaid/void/credit/deleted/posted) # Invoice status, invoice_sent: bool # Invoice sent to contact/customer., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., tax_inclusive: bool # Amounts are including tax, sub_total: num # Sub-total amount, normally before tax., total_tax: num # Total tax amount applied to this invoice., tax_code: str # Applicable tax id/code override if tax is not supplied on a line item basis., discount_percentage: num # Discount percentage applied to this invoice., discount_amount: num # Discount amount applied to this invoice., total: num # Total amount of invoice, including tax., balance: num # Balance of invoice due., deposit: num # Amount of deposit made to this invoice., customer_memo: str # Customer memo, tracking_category: map{id: str, name: str}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., line_items: [map{id: str, row_id: str, code: str, line_number: int, description: str, type: str, tax_amount: num, total_amount: num, quantity: num, unit_price: num, unit_of_measure: str, discount_percentage: num, discount_amount: num, service_date: str(date), category_id: str, location_id: str, department_id: str, subsidiary_id: str, shipping_id: str, memo: str, prepaid: bool, item: map, tax_applicable_on: str, tax_recoverability: str, tax_method: str, worktags: [map], tax_rate: map, tracking_categories: [map], ledger_account: map, custom_fields: [map], row_version: str, updated_by: str, created_by: str, created_at: str(date-time), updated_at: str(date-time)}], billing_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, shipping_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, template_id: str # Optional invoice template, source_document_url: str # URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero., payment_allocations: [map{id: str, allocated_amount: num, date: str(date-time)}] # IDs of payments made on the invoice, payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, channel: str # The channel through which the transaction is processed., language: str # language code according to ISO 639-1. For the United States - EN, accounting_by_row: bool # Indicates if accounting by row is used (true) or not (false). Accounting by row means that a separate ledger transaction is created for each row., bank_account: map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}, ledger_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, custom_mappings: map # When custom mappings are configured on the resource, the result is included here., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?}, _raw: map?} # Invoice updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/invoices/{id}
@desc Delete Invoice
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?}, _raw: map?} # Invoice deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/ledger-accounts
@desc List Ledger Accounts
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # LedgerAccounts
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/ledger-accounts
@desc Create Ledger Account
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., display_id: str # The human readable display ID used when displaying the account, nominal_code: str # The nominal code of the ledger account., code: str # The code assigned to the account., classification: str(asset/equity/expense/liability/revenue/income/other_income/other_expense/costs_of_sales/other) # The classification of account., type: str(accounts_payable/accounts_receivable/balancesheet/bank/costs_of_sales/credit_card/current_asset/current_liability/equity/expense/fixed_asset/non_current_asset/non_current_liability/other_asset/other_expense/other_income/other_liability/revenue/sales/other) # The type of account., sub_type: str # The sub type of account., name: str # The name of the account., fully_qualified_name: str # The fully qualified name of the account., description: str # The description of the account., opening_balance: num # The opening balance of the account., current_balance: num # The current balance of the account., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., tax_type: str # The tax type of the account., tax_rate: map{id: str, code: str, name: str, rate: num}, level: num, active: bool # Whether the account is active or not., status: str(active/inactive/archived) # The status of the account., header: bool # Whether the account is a header or not., bank_account: map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}, categories: [map{id: str, name: str}] # The categories of the account., parent_account: map{id: str, name: str, display_id: str}, sub_account: bool # Whether the account is a sub account or not., sub_accounts: [any] # The sub accounts of the account., last_reconciliation_date: str(date) # Reconciliation Date means the last calendar day of each Reconciliation Period., subsidiaries: [any] # The subsidiaries the account belongs to., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # LedgerAccount created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/ledger-accounts/{id}
@desc Get Ledger Account
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, display_id: str, nominal_code: str?, code: str?, classification: str?, type: str, sub_type: str?, name: str?, fully_qualified_name: str?, description: str?, opening_balance: num?, current_balance: num?, currency: str?, tax_type: str?, tax_rate: map{id: str?, code: str?, name: str?, rate: num?}, level: num?, active: bool?, status: str?, header: bool?, bank_account: map{bank_name: str?, account_number: str?, account_name: str?, account_type: str?, iban: str?, bic: str?, routing_number: str?, bsb_number: str?, branch_identifier: str?, bank_code: str?, currency: str?, country: str?}, categories: [map], parent_account: map{id: str, name: str, display_id: str}, sub_account: bool?, sub_accounts: [any], last_reconciliation_date: str(date)?, subsidiaries: [any], custom_mappings: map?, custom_fields: [map], row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # LedgerAccount
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/ledger-accounts/{id}
@desc Update Ledger Account
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., display_id: str # The human readable display ID used when displaying the account, nominal_code: str # The nominal code of the ledger account., code: str # The code assigned to the account., classification: str(asset/equity/expense/liability/revenue/income/other_income/other_expense/costs_of_sales/other) # The classification of account., type: str(accounts_payable/accounts_receivable/balancesheet/bank/costs_of_sales/credit_card/current_asset/current_liability/equity/expense/fixed_asset/non_current_asset/non_current_liability/other_asset/other_expense/other_income/other_liability/revenue/sales/other) # The type of account., sub_type: str # The sub type of account., name: str # The name of the account., fully_qualified_name: str # The fully qualified name of the account., description: str # The description of the account., opening_balance: num # The opening balance of the account., current_balance: num # The current balance of the account., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., tax_type: str # The tax type of the account., tax_rate: map{id: str, code: str, name: str, rate: num}, level: num, active: bool # Whether the account is active or not., status: str(active/inactive/archived) # The status of the account., header: bool # Whether the account is a header or not., bank_account: map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}, categories: [map{id: str, name: str}] # The categories of the account., parent_account: map{id: str, name: str, display_id: str}, sub_account: bool # Whether the account is a sub account or not., sub_accounts: [any] # The sub accounts of the account., last_reconciliation_date: str(date) # Reconciliation Date means the last calendar day of each Reconciliation Period., subsidiaries: [any] # The subsidiaries the account belongs to., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # LedgerAccount updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/ledger-accounts/{id}
@desc Delete Ledger Account
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # LedgerAccount deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/invoice-items
@desc List Invoice Items
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # InvoiceItems
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/invoice-items
@desc Create Invoice Item
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # The ID of the item., name: str # Item name, description: str # A short description of the item, display_id: str # Display ID of the item, code: str # User defined item code, sold: bool # Item will be available on sales transactions, purchased: bool # Item is available for purchase transactions, tracked: bool # Item is inventoried, taxable: bool # If true, transactions for this item are taxable, inventory_date: str(date) # The date of opening balance if inventory item is tracked - YYYY-MM-DD., type: str(inventory/non_inventory/service/description/other) # Item type, sales_details: map{unit_price: num, unit_of_measure: str, tax_inclusive: bool, tax_rate: map}, purchase_details: map{unit_price: num, unit_of_measure: str, tax_inclusive: bool, tax_rate: map}, quantity: num, unit_price: num, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., asset_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, income_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, expense_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, tracking_category: map{id: str, name: str}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., active: bool, department_id: str # The ID of the department, location_id: str # The ID of the location, subsidiary_id: str # The ID of the subsidiary, category_id: str # ID of the category of the item, tax_schedule_id: str # The ID of the tax schedule, custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # InvoiceItems
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/invoice-items/{id}
@desc Get Invoice Item
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded., filter: map # Apply filters}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, name: str?, description: str?, display_id: str?, code: str?, sold: bool?, purchased: bool?, tracked: bool?, taxable: bool?, inventory_date: str(date)?, type: str?, sales_details: map{unit_price: num?, unit_of_measure: str?, tax_inclusive: bool?, tax_rate: map{id: str?, code: str?, name: str?, rate: num?}}, purchase_details: map{unit_price: num?, unit_of_measure: str?, tax_inclusive: bool?, tax_rate: map{id: str?, code: str?, name: str?, rate: num?}}, quantity: num?, unit_price: num?, currency: str?, asset_account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, income_account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, expense_account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, tracking_category: map?{id: str, name: str?}, tracking_categories: [map]?, active: bool?, department_id: str?, location_id: str?, subsidiary_id: str?, category_id: str?, tax_schedule_id: str?, custom_mappings: map?, row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # InvoiceItems
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/invoice-items/{id}
@desc Update Invoice Item
@required {id: str # ID of the record you are acting upon.}
@optional {id: str # The ID of the item., name: str # Item name, description: str # A short description of the item, display_id: str # Display ID of the item, code: str # User defined item code, sold: bool # Item will be available on sales transactions, purchased: bool # Item is available for purchase transactions, tracked: bool # Item is inventoried, taxable: bool # If true, transactions for this item are taxable, inventory_date: str(date) # The date of opening balance if inventory item is tracked - YYYY-MM-DD., type: str(inventory/non_inventory/service/description/other) # Item type, sales_details: map{unit_price: num, unit_of_measure: str, tax_inclusive: bool, tax_rate: map}, purchase_details: map{unit_price: num, unit_of_measure: str, tax_inclusive: bool, tax_rate: map}, quantity: num, unit_price: num, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., asset_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, income_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, expense_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, tracking_category: map{id: str, name: str}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., active: bool, department_id: str # The ID of the department, location_id: str # The ID of the location, subsidiary_id: str # The ID of the subsidiary, category_id: str # ID of the category of the item, tax_schedule_id: str # The ID of the tax schedule, custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # InvoiceItems
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/invoice-items/{id}
@desc Delete Invoice Item
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # InvoiceItems
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/credit-notes
@desc List Credit Notes
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Credit Notes
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/credit-notes
@desc Create Credit Note
@required {id: str # Unique identifier representing the entity, total_amount: num # Amount of transaction}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., number: str # Credit note number., customer: map{id: str, display_id: str, display_name: str, name: str, company_name: str, email: str} # The customer this entity is linked to., company_id: str # The company ID the transaction belongs to, location_id: str # The ID of the location, department_id: str # The ID of the department, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., tax_inclusive: bool # Amounts are including tax, sub_total: num # Sub-total amount, normally before tax., total_tax: num # Total tax amount applied to this invoice., tax_code: str # Applicable tax id/code override if tax is not supplied on a line item basis., balance: num # The balance reflecting any payments made against the transaction., remaining_credit: num # Indicates the total credit amount still available to apply towards the payment., status: str(draft/authorised/posted/partially_paid/paid/voided/deleted) # Status of credit notes, reference: str # Optional reference message ie: Debit remittance detail., date_issued: str(date-time) # Date credit note issued - YYYY:MM::DDThh:mm:ss.sTZD, date_paid: str(date-time) # Date credit note paid - YYYY:MM::DDThh:mm:ss.sTZD, type: str(accounts_receivable_credit/accounts_payable_credit) # Type of payment, account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, line_items: [map{id: str, row_id: str, code: str, line_number: int, description: str, type: str, tax_amount: num, total_amount: num, quantity: num, unit_price: num, unit_of_measure: str, discount_percentage: num, discount_amount: num, service_date: str(date), category_id: str, location_id: str, department_id: str, subsidiary_id: str, shipping_id: str, memo: str, prepaid: bool, item: map, tax_applicable_on: str, tax_recoverability: str, tax_method: str, worktags: [map], tax_rate: map, tracking_categories: [map], ledger_account: map, custom_fields: [map], row_version: str, updated_by: str, created_by: str, created_at: str(date-time), updated_at: str(date-time)}], allocations: [map{id: str, type: str, code: str, amount: num, allocation_id: str}], note: str # Optional note to be associated with the credit note., terms: str # Optional terms to be associated with the credit note., terms_id: str # The ID of the payment terms, billing_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, shipping_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Credit Note created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/credit-notes/{id}
@desc Get Credit Note
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, number: str?, customer: map?{id: str, display_id: str?, display_name: str?, name: str, company_name: str?, email: str}, company_id: str?, location_id: str?, department_id: str?, currency: str?, currency_rate: num?, tax_inclusive: bool?, sub_total: num?, total_amount: num, total_tax: num?, tax_code: str?, balance: num?, remaining_credit: num?, status: str, reference: str?, date_issued: str(date-time), date_paid: str(date-time)?, type: str, account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, line_items: [map], allocations: [map], note: str?, terms: str?, terms_id: str?, billing_address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}, shipping_address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}, tracking_categories: [map]?, custom_mappings: map?, custom_fields: [map], row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Credit Note
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/credit-notes/{id}
@desc Update Credit Note
@required {id: str # ID of the record you are acting upon., id: str # Unique identifier representing the entity, total_amount: num # Amount of transaction}
@optional {number: str # Credit note number., customer: map{id: str, display_id: str, display_name: str, name: str, company_name: str, email: str} # The customer this entity is linked to., company_id: str # The company ID the transaction belongs to, location_id: str # The ID of the location, department_id: str # The ID of the department, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., tax_inclusive: bool # Amounts are including tax, sub_total: num # Sub-total amount, normally before tax., total_tax: num # Total tax amount applied to this invoice., tax_code: str # Applicable tax id/code override if tax is not supplied on a line item basis., balance: num # The balance reflecting any payments made against the transaction., remaining_credit: num # Indicates the total credit amount still available to apply towards the payment., status: str(draft/authorised/posted/partially_paid/paid/voided/deleted) # Status of credit notes, reference: str # Optional reference message ie: Debit remittance detail., date_issued: str(date-time) # Date credit note issued - YYYY:MM::DDThh:mm:ss.sTZD, date_paid: str(date-time) # Date credit note paid - YYYY:MM::DDThh:mm:ss.sTZD, type: str(accounts_receivable_credit/accounts_payable_credit) # Type of payment, account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, line_items: [map{id: str, row_id: str, code: str, line_number: int, description: str, type: str, tax_amount: num, total_amount: num, quantity: num, unit_price: num, unit_of_measure: str, discount_percentage: num, discount_amount: num, service_date: str(date), category_id: str, location_id: str, department_id: str, subsidiary_id: str, shipping_id: str, memo: str, prepaid: bool, item: map, tax_applicable_on: str, tax_recoverability: str, tax_method: str, worktags: [map], tax_rate: map, tracking_categories: [map], ledger_account: map, custom_fields: [map], row_version: str, updated_by: str, created_by: str, created_at: str(date-time), updated_at: str(date-time)}], allocations: [map{id: str, type: str, code: str, amount: num, allocation_id: str}], note: str # Optional note to be associated with the credit note., terms: str # Optional terms to be associated with the credit note., terms_id: str # The ID of the payment terms, billing_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, shipping_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Credit Note updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/credit-notes/{id}
@desc Delete Credit Note
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Credit Note deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/customers
@desc List Customers
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Customers
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/customers
@desc Create Customer
@required {id: str # A unique identifier for an object.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., downstream_id: str # The third-party API ID of original entity, display_id: str # Display ID, display_name: str # Display name, company_name: str # The name of the company., company_id: str # The company ID the transaction belongs to, customer_category: str # The category/type of the customer, title: str # The job title of the person., first_name: str # The first name of the person., middle_name: str # Middle name of the person., last_name: str # The last name of the person., suffix: str, individual: bool # Is this an individual or business customer, project: bool # If true, indicates this is a Project., addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}], emails: [map{id: str, email!: str(email), type: str}], websites: [map{id: str, url!: str, type: str}], bank_accounts: [map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}], notes: str # Some notes about this customer, tax_rate: map{id: str, code: str, name: str, rate: num}, tax_number: str, taxable: bool # Whether the entity is subject to taxation, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, parent: map{id!: str, name: str} # The parent customer this entity is linked to., status: str(active/inactive/archived/gdpr-erasure-request/unknown) # Customer status, payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, terms: str # Terms of payment., terms_id: str # The ID of the payment terms, channel: str # The channel through which the transaction is processed., custom_fields: [map{id: str, name: str, description: str, value: any}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Customers
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/customers/{id}
@desc Get Customer
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, display_id: str?, display_name: str?, company_name: str?, company_id: str?, customer_category: str?, title: str?, first_name: str?, middle_name: str?, last_name: str?, suffix: str?, individual: bool?, project: bool?, addresses: [map], phone_numbers: [map], emails: [map], websites: [map], bank_accounts: [map], notes: str?, tax_rate: map{id: str?, code: str?, name: str?, rate: num?}, tax_number: str?, taxable: bool?, currency: str?, account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, parent: map?{id: str, name: str}, status: str?, payment_method: str?, terms: str?, terms_id: str?, channel: str?, custom_fields: [map], custom_mappings: map?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, row_version: str?, pass_through: [map]}, _raw: map?} # Customer
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/customers/{id}
@desc Update Customer
@required {id: str # ID of the record you are acting upon., id: str # A unique identifier for an object.}
@optional {downstream_id: str # The third-party API ID of original entity, display_id: str # Display ID, display_name: str # Display name, company_name: str # The name of the company., company_id: str # The company ID the transaction belongs to, customer_category: str # The category/type of the customer, title: str # The job title of the person., first_name: str # The first name of the person., middle_name: str # Middle name of the person., last_name: str # The last name of the person., suffix: str, individual: bool # Is this an individual or business customer, project: bool # If true, indicates this is a Project., addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}], emails: [map{id: str, email!: str(email), type: str}], websites: [map{id: str, url!: str, type: str}], bank_accounts: [map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}], notes: str # Some notes about this customer, tax_rate: map{id: str, code: str, name: str, rate: num}, tax_number: str, taxable: bool # Whether the entity is subject to taxation, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, parent: map{id!: str, name: str} # The parent customer this entity is linked to., status: str(active/inactive/archived/gdpr-erasure-request/unknown) # Customer status, payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, terms: str # Terms of payment., terms_id: str # The ID of the payment terms, channel: str # The channel through which the transaction is processed., custom_fields: [map{id: str, name: str, description: str, value: any}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Customers
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/customers/{id}
@desc Delete Customer
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Customers
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/suppliers
@desc List Suppliers
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Suppliers
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/suppliers
@desc Create Supplier
@required {id: str # A unique identifier for an object.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., downstream_id: str # The third-party API ID of original entity, display_id: str # Display ID, display_name: str # Display name, company_name: str # The name of the company., company_id: str # The company ID the transaction belongs to, supplier_category: str # The category/type of the supplier, title: str # The job title of the person., first_name: str # The first name of the person., middle_name: str # Middle name of the person., last_name: str # The last name of the person., suffix: str, individual: bool # Is this an individual or business supplier, addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}], emails: [map{id: str, email!: str(email), type: str}], websites: [map{id: str, url!: str, type: str}], bank_accounts: [map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}], notes: str # Some notes about this supplier, tax_rate: map{id: str, code: str, name: str, rate: num}, tax_number: str, taxable: bool # Whether the entity is subject to taxation, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, status: str(active/inactive/archived/gdpr-erasure-request/unknown) # Supplier status, payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, terms: str # Terms of payment., terms_id: str # The ID of the payment terms, channel: str # The channel through which the transaction is processed., issued_method: str # Method of issuance of the purchase order for the supplier, issued_email: str # Email address of the person who issued the purchase order for the supplier, custom_mappings: map # When custom mappings are configured on the resource, the result is included here., custom_fields: [map{id: str, name: str, description: str, value: any}], tax_details: [map{type: str, number: str, is_transaction_tax: bool, is_primary_tax: bool}], tax_status_details: [map{country: str, transaction_tax_status: str}], updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources., subsidiary_id: str # The subsidiary the supplier belongs to., integration_system_id: str # The integration system the supplier belongs to.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Supplier created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/suppliers/{id}
@desc Get Supplier
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, display_id: str?, display_name: str?, company_name: str?, company_id: str?, supplier_category: str?, title: str?, first_name: str?, middle_name: str?, last_name: str?, suffix: str?, individual: bool?, addresses: [map], phone_numbers: [map], emails: [map], websites: [map], bank_accounts: [map], notes: str?, tax_rate: map{id: str?, code: str?, name: str?, rate: num?}, tax_number: str?, taxable: bool?, currency: str?, account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, status: str?, payment_method: str?, terms: str?, terms_id: str?, channel: str?, issued_method: str?, issued_email: str?, custom_mappings: map?, custom_fields: [map], tax_details: [map], tax_status_details: [map], updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, row_version: str?, pass_through: [map], subsidiary_id: str, integration_system_id: str}, _raw: map?} # Supplier
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/suppliers/{id}
@desc Update Supplier
@required {id: str # ID of the record you are acting upon., id: str # A unique identifier for an object.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., downstream_id: str # The third-party API ID of original entity, display_id: str # Display ID, display_name: str # Display name, company_name: str # The name of the company., company_id: str # The company ID the transaction belongs to, supplier_category: str # The category/type of the supplier, title: str # The job title of the person., first_name: str # The first name of the person., middle_name: str # Middle name of the person., last_name: str # The last name of the person., suffix: str, individual: bool # Is this an individual or business supplier, addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}], emails: [map{id: str, email!: str(email), type: str}], websites: [map{id: str, url!: str, type: str}], bank_accounts: [map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}], notes: str # Some notes about this supplier, tax_rate: map{id: str, code: str, name: str, rate: num}, tax_number: str, taxable: bool # Whether the entity is subject to taxation, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, status: str(active/inactive/archived/gdpr-erasure-request/unknown) # Supplier status, payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, terms: str # Terms of payment., terms_id: str # The ID of the payment terms, channel: str # The channel through which the transaction is processed., issued_method: str # Method of issuance of the purchase order for the supplier, issued_email: str # Email address of the person who issued the purchase order for the supplier, custom_mappings: map # When custom mappings are configured on the resource, the result is included here., custom_fields: [map{id: str, name: str, description: str, value: any}], tax_details: [map{type: str, number: str, is_transaction_tax: bool, is_primary_tax: bool}], tax_status_details: [map{country: str, transaction_tax_status: str}], updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources., subsidiary_id: str # The subsidiary the supplier belongs to., integration_system_id: str # The integration system the supplier belongs to.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Supplier updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/suppliers/{id}
@desc Delete Supplier
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Supplier deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/payments
@desc List Payments
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Payments
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/payments
@desc Create Payment
@required {id: str # A unique identifier for an object., total_amount: num # The total amount of the transaction or record, transaction_date: str(date-time) # The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., downstream_id: str # The third-party API ID of original entity, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., reference: str # Optional transaction reference message ie: Debit remittance detail., payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, payment_method_reference: str # Optional reference message returned by payment method on processing, payment_method_id: str # A unique identifier for an object., accounts_receivable_account_type: str # Type of accounts receivable account., accounts_receivable_account_id: str # Unique identifier for the account to allocate payment to., account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, customer: map{id: str, display_id: str, display_name: str, name: str, company_name: str, email: str} # The customer this entity is linked to., supplier: map{id: str, display_id: str, display_name: str, company_name: str, address: map} # The supplier this entity is linked to., company_id: str # The company ID the transaction belongs to, reconciled: bool # Indicates if the transaction has been reconciled., status: str(draft/authorised/rejected/paid/voided/deleted) # Status of payment, type: str(accounts_receivable/accounts_payable/accounts_receivable_credit/accounts_payable_credit/accounts_receivable_overpayment/accounts_payable_overpayment/accounts_receivable_prepayment/accounts_payable_prepayment) # Type of payment, allocations: [map{id: str, type: str, code: str, amount: num, allocation_id: str}], note: str # Note associated with the transaction, number: str # Number associated with the transaction, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., display_id: str # Id to be displayed., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., created_at: str(date-time) # The date and time when the object was created., updated_at: str(date-time) # The date and time when the object was last updated., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Payment created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/payments/{id}
@desc Get Payment
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, currency: str?, currency_rate: num?, total_amount: num?, reference: str?, payment_method: str?, payment_method_reference: str?, payment_method_id: str?, accounts_receivable_account_type: str?, accounts_receivable_account_id: str?, account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, transaction_date: str(date-time)?, customer: map?{id: str, display_id: str?, display_name: str?, name: str, company_name: str?, email: str}, supplier: map?{id: str, display_id: str?, display_name: str?, company_name: str?, address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}}, company_id: str?, reconciled: bool?, status: str, type: str, allocations: [map], note: str?, number: str?, tracking_categories: [map]?, custom_fields: [map], row_version: str?, display_id: str?, custom_mappings: map?, updated_by: str?, created_by: str?, created_at: str(date-time)?, updated_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Payment
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/payments/{id}
@desc Update Payment
@required {id: str # ID of the record you are acting upon., id: str # A unique identifier for an object., total_amount: num # The total amount of the transaction or record, transaction_date: str(date-time) # The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., downstream_id: str # The third-party API ID of original entity, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., reference: str # Optional transaction reference message ie: Debit remittance detail., payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, payment_method_reference: str # Optional reference message returned by payment method on processing, payment_method_id: str # A unique identifier for an object., accounts_receivable_account_type: str # Type of accounts receivable account., accounts_receivable_account_id: str # Unique identifier for the account to allocate payment to., account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, customer: map{id: str, display_id: str, display_name: str, name: str, company_name: str, email: str} # The customer this entity is linked to., supplier: map{id: str, display_id: str, display_name: str, company_name: str, address: map} # The supplier this entity is linked to., company_id: str # The company ID the transaction belongs to, reconciled: bool # Indicates if the transaction has been reconciled., status: str(draft/authorised/rejected/paid/voided/deleted) # Status of payment, type: str(accounts_receivable/accounts_payable/accounts_receivable_credit/accounts_payable_credit/accounts_receivable_overpayment/accounts_payable_overpayment/accounts_receivable_prepayment/accounts_payable_prepayment) # Type of payment, allocations: [map{id: str, type: str, code: str, amount: num, allocation_id: str}], note: str # Note associated with the transaction, number: str # Number associated with the transaction, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., display_id: str # Id to be displayed., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., created_at: str(date-time) # The date and time when the object was created., updated_at: str(date-time) # The date and time when the object was last updated., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Payment Updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/payments/{id}
@desc Delete Payment
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Payment deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/refunds
@desc List Refunds
@optional {cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Refunds
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/refunds
@desc Create Refund
@required {id: str # Unique identifier representing the refund, total_amount: num # The total amount of the transaction or record}
@optional {number: str # Reference number for the refund., customer: map{id: str, display_id: str, display_name: str, name: str, company_name: str, email: str} # The customer this entity is linked to., company_id: str # The company ID the transaction belongs to, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., tax_inclusive: bool # Amounts are including tax, sub_total: num # Subtotal amount, normally before tax., total_tax: num # Total tax amount applied to this transaction., refund_date: str(date-time) # The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD, status: str(draft/authorised/posted/paid/voided/deleted) # Status of refund. Maps to: QBO (limited status), NetSuite CashRefund status, Sage Intacct state (draft/posted/voided), Zoho Books vis_state., type: str(refund_receipt/cash_refund/credit_note_refund) # Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or allocations (Sage Intacct). `credit_note_refund` for refunds applied against a credit note (Zoho Books)., payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, payment_method_reference: str # Optional reference message returned by payment method on processing, payment_method_id: str # A unique identifier for an object., account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, line_items: [map{id: str, row_id: str, code: str, line_number: int, description: str, type: str, tax_amount: num, total_amount: num, quantity: num, unit_price: num, unit_of_measure: str, discount_percentage: num, discount_amount: num, service_date: str(date), category_id: str, location_id: str, department_id: str, subsidiary_id: str, shipping_id: str, memo: str, prepaid: bool, item: map, tax_applicable_on: str, tax_recoverability: str, tax_method: str, worktags: [map], tax_rate: map, tracking_categories: [map], ledger_account: map, custom_fields: [map], row_version: str, updated_by: str, created_by: str, created_at: str(date-time), updated_at: str(date-time)}] # Line items for itemized refunds (type: refund_receipt). Used when the refund includes product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite CashRefund., allocations: [map{id: str, type: str, code: str, amount: num, allocation_id: str}] # Allocations linking refund to existing documents (invoices, credit notes, overpayments). Used for credit_note_refund and cash_refund types where the refund is applied against prior transactions. Supported by Sage Intacct and Zoho Books., tax_code: str # Applicable tax id/code override if tax is not supplied on a line item basis., discount_percentage: num # Discount percentage applied to this refund., discount_amount: num # Discount amount applied to this refund., note: str # Optional note to be associated with the refund., customer_memo: str # Customer memo, reference: str # Optional reference message for the refund., billing_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, shipping_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, department: map{id: str, display_id: str, name: str, downstream_id: str}, location: map{id: str, display_id: str, name: str, downstream_id: str}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Refund created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/refunds/{id}
@desc Get Refund
@required {id: str # ID of the record you are acting upon.}
@optional {fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, number: str?, customer: map?{id: str, display_id: str?, display_name: str?, name: str, company_name: str?, email: str}, company_id: str?, currency: str?, currency_rate: num?, tax_inclusive: bool?, sub_total: num?, total_amount: num?, total_tax: num?, refund_date: str(date-time)?, status: str, type: str, payment_method: str?, payment_method_reference: str?, payment_method_id: str?, account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, line_items: [map], allocations: [map], tax_code: str?, discount_percentage: num?, discount_amount: num?, note: str?, customer_memo: str?, reference: str?, billing_address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}, shipping_address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}, department: map?{id: str, display_id: str?, name: str?, downstream_id: str?}, location: map?{id: str, display_id: str?, name: str?, downstream_id: str?}, tracking_categories: [map]?, custom_mappings: map?, custom_fields: [map], row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Refund
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/refunds/{id}
@desc Update Refund
@required {id: str # ID of the record you are acting upon., id: str # Unique identifier representing the refund, total_amount: num # The total amount of the transaction or record}
@optional {number: str # Reference number for the refund., customer: map{id: str, display_id: str, display_name: str, name: str, company_name: str, email: str} # The customer this entity is linked to., company_id: str # The company ID the transaction belongs to, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., tax_inclusive: bool # Amounts are including tax, sub_total: num # Subtotal amount, normally before tax., total_tax: num # Total tax amount applied to this transaction., refund_date: str(date-time) # The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD, status: str(draft/authorised/posted/paid/voided/deleted) # Status of refund. Maps to: QBO (limited status), NetSuite CashRefund status, Sage Intacct state (draft/posted/voided), Zoho Books vis_state., type: str(refund_receipt/cash_refund/credit_note_refund) # Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or allocations (Sage Intacct). `credit_note_refund` for refunds applied against a credit note (Zoho Books)., payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, payment_method_reference: str # Optional reference message returned by payment method on processing, payment_method_id: str # A unique identifier for an object., account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, line_items: [map{id: str, row_id: str, code: str, line_number: int, description: str, type: str, tax_amount: num, total_amount: num, quantity: num, unit_price: num, unit_of_measure: str, discount_percentage: num, discount_amount: num, service_date: str(date), category_id: str, location_id: str, department_id: str, subsidiary_id: str, shipping_id: str, memo: str, prepaid: bool, item: map, tax_applicable_on: str, tax_recoverability: str, tax_method: str, worktags: [map], tax_rate: map, tracking_categories: [map], ledger_account: map, custom_fields: [map], row_version: str, updated_by: str, created_by: str, created_at: str(date-time), updated_at: str(date-time)}] # Line items for itemized refunds (type: refund_receipt). Used when the refund includes product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite CashRefund., allocations: [map{id: str, type: str, code: str, amount: num, allocation_id: str}] # Allocations linking refund to existing documents (invoices, credit notes, overpayments). Used for credit_note_refund and cash_refund types where the refund is applied against prior transactions. Supported by Sage Intacct and Zoho Books., tax_code: str # Applicable tax id/code override if tax is not supplied on a line item basis., discount_percentage: num # Discount percentage applied to this refund., discount_amount: num # Discount amount applied to this refund., note: str # Optional note to be associated with the refund., customer_memo: str # Customer memo, reference: str # Optional reference message for the refund., billing_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, shipping_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, department: map{id: str, display_id: str, name: str, downstream_id: str}, location: map{id: str, display_id: str, name: str, downstream_id: str}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Refund updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/refunds/{id}
@desc Delete Refund
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Refund deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/company-info
@desc Get company info
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, company_name: str?, status: str, legal_name: str, country: str?, sales_tax_number: str?, automated_sales_tax: bool, sales_tax_enabled: bool, default_sales_tax: map{id: str?, display_id: str?, name: str, code: str?, description: str?, effective_tax_rate: num?, country: str?, total_tax_rate: num?, tax_payable_account_id: str?, tax_remitted_account_id: str?, components: [any]?, type: str?, report_tax_type: str?, original_tax_rate_id: str?, status: str?, custom_mappings: map?, row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map], subsidiaries: [any], custom_fields: [map]}, currency: str?, language: str?, fiscal_year_start_month: str, company_start_date: str(date), addresses: [map], phone_numbers: [map], emails: [map], custom_mappings: map?, tracking_categories_enabled: bool, tracking_categories_mode: str, row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?}, _raw: map?} # CompanyInfo
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/companies
@desc List companies
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}} # Companies
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/balance-sheet
@desc Get BalanceSheet
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, filter: map # Apply filters}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{reports: [map]}, _raw: map?} # BalanceSheet
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/profit-and-loss
@desc Get Profit and Loss
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., filter: map # Apply filters, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, report_name: str, start_date: str, end_date: str, currency: str?, income: map{id: str, code: str, title: str, type: str?, total: num?, records: [any]?}, cost_of_goods_sold: map{id: str, code: str, title: str, type: str?, total: num?, records: [any]?}, expenses: map{id: str, code: str, title: str, type: str?, total: num?, records: [any]?}, other_income: map{id: str, code: str, title: str, type: str?, total: num?, records: [any]?}, other_expenses: map{id: str, code: str, title: str, type: str?, total: num?, records: [any]?}, uncategorized_accounts: map{id: str, code: str, title: str, type: str?, total: num?, records: [any]?}, gross_profit: map{total: num?}, net_operating_income: map{total: num?}, net_income: map{total: num?}, custom_mappings: map?, customer: str}, _raw: map?} # Profit & Loss Report
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/journal-entries
@desc List Journal Entries
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # JournalEntry
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/journal-entries
@desc Create Journal Entry
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., downstream_id: str # The third-party API ID of original entity, display_id: str # Display ID of the journal entry, title: str # Journal entry title, currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., company_id: str # The company ID the transaction belongs to, line_items: [map{id: str, description: str, tax_amount: num, sub_total: num, total_amount: num, type!: str, tax_rate: map, tax_type: str, tracking_category: map, tracking_categories: [map], ledger_account!: map, customer: map, supplier: map, employee: map, department_id: str, location_id: str, line_number: int, worktags: [map]}] # Requires a minimum of 2 line items that sum to 0, status: str(draft/pending_approval/approved/posted/voided/rejected/deleted/other) # Journal entry status, memo: str # Reference for the journal entry., posted_at: str(date-time) # This is the date on which the journal entry was added. This can be different from the creation date and can also be backdated., journal_symbol: str # Journal symbol of the entry. For example IND for indirect costs, tax_type: str # Deprecated — use line_items[].tax_type for per-line tax applicability. Kept as fallback: applies to all lines that do not set their own tax_type., tax_code: str # Applicable tax id/code override if tax is not supplied on a line item basis., number: str # Journal entry number., tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., accounting_period: str # Accounting period, tax_inclusive: bool # Amounts are including tax, source_type: str # The source type of the journal entry, source_id: str # A unique identifier for the source of the journal entry, custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., custom_fields: [map{id: str, name: str, description: str, value: any}], pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # JournalEntries
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/journal-entries/{id}
@desc Get Journal Entry
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, display_id: str?, title: str?, currency_rate: num?, currency: str?, company_id: str?, line_items: [map], status: str?, memo: str?, posted_at: str(date-time), journal_symbol: str?, tax_type: str?, tax_code: str?, number: str?, tracking_categories: [map]?, accounting_period: str?, tax_inclusive: bool?, source_type: str?, source_id: str?, custom_mappings: map?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, row_version: str?, custom_fields: [map], pass_through: [map]}, _raw: map?} # JournalEntries
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/journal-entries/{id}
@desc Update Journal Entry
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., downstream_id: str # The third-party API ID of original entity, display_id: str # Display ID of the journal entry, title: str # Journal entry title, currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., company_id: str # The company ID the transaction belongs to, line_items: [map{id: str, description: str, tax_amount: num, sub_total: num, total_amount: num, type!: str, tax_rate: map, tax_type: str, tracking_category: map, tracking_categories: [map], ledger_account!: map, customer: map, supplier: map, employee: map, department_id: str, location_id: str, line_number: int, worktags: [map]}] # Requires a minimum of 2 line items that sum to 0, status: str(draft/pending_approval/approved/posted/voided/rejected/deleted/other) # Journal entry status, memo: str # Reference for the journal entry., posted_at: str(date-time) # This is the date on which the journal entry was added. This can be different from the creation date and can also be backdated., journal_symbol: str # Journal symbol of the entry. For example IND for indirect costs, tax_type: str # Deprecated — use line_items[].tax_type for per-line tax applicability. Kept as fallback: applies to all lines that do not set their own tax_type., tax_code: str # Applicable tax id/code override if tax is not supplied on a line item basis., number: str # Journal entry number., tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., accounting_period: str # Accounting period, tax_inclusive: bool # Amounts are including tax, source_type: str # The source type of the journal entry, source_id: str # A unique identifier for the source of the journal entry, custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., custom_fields: [map{id: str, name: str, description: str, value: any}], pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # JournalEntries
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/journal-entries/{id}
@desc Delete Journal Entry
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # JournalEntries
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/purchase-orders
@desc List Purchase Orders
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # PurchaseOrders
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/purchase-orders
@desc Create Purchase Order
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., downstream_id: str # The third-party API ID of original entity, display_id: str # Display ID of the purchase order, po_number: str # A PO Number uniquely identifies a purchase order and is generally defined by the buyer., reference: str # Optional purchase order reference., supplier: map{id: str, display_id: str, display_name: str, company_name: str, address: map} # The supplier this entity is linked to., subsidiary_id: str # The ID of the subsidiary, company_id: str # The company ID the transaction belongs to, location_id: str # The ID of the location, department_id: str # The ID of the department, status: str(draft/open/closed/deleted/billed/other), issued_date: str(date) # Date purchase order was issued - YYYY-MM-DD., delivery_date: str(date) # The date on which the purchase order is to be delivered - YYYY-MM-DD., expected_arrival_date: str(date) # The date on which the order is expected to arrive - YYYY-MM-DD., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., sub_total: num # Sub-total amount, normally before tax., total_tax: num # Total tax amount applied to this invoice., total: num # Total amount of invoice, including tax., tax_inclusive: bool # Amounts are including tax, line_items: [map{id: str, row_id: str, code: str, line_number: int, description: str, type: str, tax_amount: num, total_amount: num, quantity: num, unit_price: num, unit_of_measure: str, discount_percentage: num, discount_amount: num, service_date: str(date), category_id: str, location_id: str, department_id: str, subsidiary_id: str, shipping_id: str, memo: str, prepaid: bool, item: map, tax_applicable_on: str, tax_recoverability: str, tax_method: str, worktags: [map], tax_rate: map, tracking_categories: [map], ledger_account: map, custom_fields: [map], row_version: str, updated_by: str, created_by: str, created_at: str(date-time), updated_at: str(date-time)}], billing_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, shipping_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, ledger_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, template_id: str # Optional purchase order template, discount_percentage: num # Discount percentage applied to this transaction., bank_account: map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}, accounting_by_row: bool # Indicates if accounting by row is used (true) or not (false). Accounting by row means that a separate ledger transaction is created for each row., due_date: str(date) # The due date is the date on which a payment is scheduled to be received - YYYY-MM-DD., payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, terms: str # Terms of payment., terms_id: str # The ID of the payment terms, amortization_type: str(manual/receipt/schedule/other) # Type of amortization, tax_code: str # Applicable tax id/code override if tax is not supplied on a line item basis., tax_method: str # Method of tax calculation, issued_method: str # Method of issuance of the purchase order, issued_email: str # Email address of the person who issued the purchase order, channel: str # The channel through which the transaction is processed., memo: str # Message for the supplier. This text appears on the Purchase Order., notes: str # Internal notes for the purchase order., tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # PurchaseOrders
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/purchase-orders/{id}
@desc Get Purchase Order
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, display_id: str?, po_number: str?, reference: str?, supplier: map?{id: str, display_id: str?, display_name: str?, company_name: str?, address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}}, subsidiary_id: str?, company_id: str?, location_id: str?, department_id: str?, status: str?, issued_date: str(date)?, delivery_date: str(date)?, expected_arrival_date: str(date)?, currency: str?, currency_rate: num?, sub_total: num?, total_tax: num?, total: num?, tax_inclusive: bool?, line_items: [map], billing_address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}, shipping_address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}, ledger_account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, template_id: str?, discount_percentage: num?, bank_account: map{bank_name: str?, account_number: str?, account_name: str?, account_type: str?, iban: str?, bic: str?, routing_number: str?, bsb_number: str?, branch_identifier: str?, bank_code: str?, currency: str?, country: str?}, accounting_by_row: bool?, due_date: str(date)?, payment_method: str?, terms: str?, terms_id: str?, amortization_type: str?, tax_code: str?, tax_method: str?, issued_method: str?, issued_email: str?, channel: str?, memo: str?, notes: str?, tracking_categories: [map]?, custom_mappings: map?, custom_fields: [map], row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # PurchaseOrders
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/purchase-orders/{id}
@desc Update Purchase Order
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., downstream_id: str # The third-party API ID of original entity, display_id: str # Display ID of the purchase order, po_number: str # A PO Number uniquely identifies a purchase order and is generally defined by the buyer., reference: str # Optional purchase order reference., supplier: map{id: str, display_id: str, display_name: str, company_name: str, address: map} # The supplier this entity is linked to., subsidiary_id: str # The ID of the subsidiary, company_id: str # The company ID the transaction belongs to, location_id: str # The ID of the location, department_id: str # The ID of the department, status: str(draft/open/closed/deleted/billed/other), issued_date: str(date) # Date purchase order was issued - YYYY-MM-DD., delivery_date: str(date) # The date on which the purchase order is to be delivered - YYYY-MM-DD., expected_arrival_date: str(date) # The date on which the order is expected to arrive - YYYY-MM-DD., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., sub_total: num # Sub-total amount, normally before tax., total_tax: num # Total tax amount applied to this invoice., total: num # Total amount of invoice, including tax., tax_inclusive: bool # Amounts are including tax, line_items: [map{id: str, row_id: str, code: str, line_number: int, description: str, type: str, tax_amount: num, total_amount: num, quantity: num, unit_price: num, unit_of_measure: str, discount_percentage: num, discount_amount: num, service_date: str(date), category_id: str, location_id: str, department_id: str, subsidiary_id: str, shipping_id: str, memo: str, prepaid: bool, item: map, tax_applicable_on: str, tax_recoverability: str, tax_method: str, worktags: [map], tax_rate: map, tracking_categories: [map], ledger_account: map, custom_fields: [map], row_version: str, updated_by: str, created_by: str, created_at: str(date-time), updated_at: str(date-time)}], billing_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, shipping_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, ledger_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, template_id: str # Optional purchase order template, discount_percentage: num # Discount percentage applied to this transaction., bank_account: map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}, accounting_by_row: bool # Indicates if accounting by row is used (true) or not (false). Accounting by row means that a separate ledger transaction is created for each row., due_date: str(date) # The due date is the date on which a payment is scheduled to be received - YYYY-MM-DD., payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, terms: str # Terms of payment., terms_id: str # The ID of the payment terms, amortization_type: str(manual/receipt/schedule/other) # Type of amortization, tax_code: str # Applicable tax id/code override if tax is not supplied on a line item basis., tax_method: str # Method of tax calculation, issued_method: str # Method of issuance of the purchase order, issued_email: str # Email address of the person who issued the purchase order, channel: str # The channel through which the transaction is processed., memo: str # Message for the supplier. This text appears on the Purchase Order., notes: str # Internal notes for the purchase order., tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # PurchaseOrders
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/purchase-orders/{id}
@desc Delete Purchase Order
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # PurchaseOrders
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/subsidiaries
@desc List Subsidiaries
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Subsidiaries
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/subsidiaries
@desc Create Subsidiary
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., parent_id: str # A unique identifier for an object., name: str # The name of the company., display_id: str # Display ID of the subsidiary, downstream_id: str # The third-party API ID of original entity, status: str(active/inactive) # Based on the status some functionality is enabled or disabled., address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, currencies: [str] # List of currencies supported by this subsidiary, custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Subsidiaries
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/subsidiaries/{id}
@desc Get Subsidiary
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, parent_id: str?, name: str?, display_id: str?, downstream_id: str?, status: str, address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}, currencies: [str]?, custom_mappings: map?, row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Subsidiary
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/subsidiaries/{id}
@desc Update Subsidiary
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., parent_id: str # A unique identifier for an object., name: str # The name of the company., display_id: str # Display ID of the subsidiary, downstream_id: str # The third-party API ID of original entity, status: str(active/inactive) # Based on the status some functionality is enabled or disabled., address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, currencies: [str] # List of currencies supported by this subsidiary, custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Subsidiaries
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/subsidiaries/{id}
@desc Delete Subsidiary
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Subsidiarys
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/locations
@desc List Locations
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded., filter: map # Apply filters}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Locations
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/locations
@desc Create Location
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., parent_id: str # A unique identifier for an object., display_id: str # Id to be displayed., downstream_id: str # The third-party API ID of original entity, company_name: str # The name of the company., display_name: str # The display name of the location., status: str(active/inactive) # Based on the status some functionality is enabled or disabled., addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], subsidiaries: [map{id: str, name: str}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Location
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/locations/{id}
@desc Get Location
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, parent_id: str?, display_id: str?, downstream_id: str?, company_name: str?, display_name: str?, status: str, addresses: [map], subsidiaries: [map], custom_mappings: map?, row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Location
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/locations/{id}
@desc Update Location
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., parent_id: str # A unique identifier for an object., display_id: str # Id to be displayed., downstream_id: str # The third-party API ID of original entity, company_name: str # The name of the company., display_name: str # The display name of the location., status: str(active/inactive) # Based on the status some functionality is enabled or disabled., addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], subsidiaries: [map{id: str, name: str}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Location
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/locations/{id}
@desc Delete Location
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Location deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/departments
@desc List Departments
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded., filter: map # Apply filters}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Departments
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/departments
@desc Create Department
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., parent_id: str # A unique identifier for an object., display_id: str # Id to be displayed., name: str # The name of the department., status: str(active/inactive) # Based on the status some functionality is enabled or disabled., subsidiaries: [map{id: str, name: str}], code: str # The code of the department., downstream_id: str # The third-party API ID of original entity, custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Department
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/departments/{id}
@desc Get Department
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, parent_id: str?, display_id: str?, name: str?, status: str, subsidiaries: [map], code: str, downstream_id: str?, custom_mappings: map?, row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Location
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/departments/{id}
@desc Update Department
@required {id: str # ID of the record you are acting upon.}
@optional {id: str # A unique identifier for an object., parent_id: str # A unique identifier for an object., display_id: str # Id to be displayed., name: str # The name of the department., status: str(active/inactive) # Based on the status some functionality is enabled or disabled., subsidiaries: [map{id: str, name: str}], code: str # The code of the department., downstream_id: str # The third-party API ID of original entity, custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Department
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/departments/{id}
@desc Delete Department
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Department deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/attachments/{reference_type}/{reference_id}
@desc List Attachments
@required {reference_type: str # The reference type of the document., reference_id: str # The reference id of the object to retrieve.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Attachments
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/attachments/{reference_type}/{reference_id}
@desc Upload attachment
@required {reference_type: str # The reference type of the document., reference_id: str # The reference id of the object to retrieve., x-apideck-metadata: str(json) # Metadata to attach to the attachment file (JSON string), content-type: str # The content-type of the file being uploaded}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Attachments
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/attachments/{reference_type}/{reference_id}/{id}
@desc Get Attachment
@required {reference_type: str # The reference type of the document., reference_id: str # The reference id of the object to retrieve., id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, display_id: str?, name: str?, mime_type: str?, size: int?, reference: map{type: str, id: str}, description: str?, parent_folder_id: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Attachments
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/attachments/{reference_type}/{reference_id}/{id}
@desc Delete Attachment
@required {reference_type: str # The reference type of the document., reference_id: str # The reference id of the object to retrieve., id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Attachments
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/attachments/{reference_type}/{reference_id}/{id}/download
@desc Download Attachment
@required {reference_type: str # The reference type of the document., reference_id: str # The reference id of the object to retrieve., id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) Attachment Download
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/bank-accounts
@desc List Bank Accounts
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}} # Bank Accounts
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/bank-accounts
@desc Create Bank Account
@required {id: str # A unique identifier for an object.}
@optional {downstream_id: str # The third-party API ID of original entity, display_id: str # Display ID for the bank account, name: str # The name of the bank account, account_number: str # The bank account number, account_type: str(checking/savings/credit_card/money_market/line_of_credit/other/cash) # The type of bank account, ledger_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, bank_name: str # The name of the bank or financial institution, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., balance: num # The current balance of the bank account, available_balance: num # The available balance (considering pending transactions and overdraft), overdraft_limit: num # The overdraft limit for the account, routing_number: str # Bank routing number (US), iban: str # International Bank Account Number, bic: str # Bank Identifier Code / SWIFT Code, bsb_number: str # Bank State Branch number (Australia/New Zealand), branch_identifier: str # Bank branch identifier, bank_code: str # Bank code assigned by central bank, country: str # Country code according to ISO 3166-1 alpha-2., status: str(active/inactive/closed) # The status of the bank account, description: str # Description or notes about the bank account, custom_fields: [map{id: str, name: str, description: str, value: any}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., created_at: str(date-time) # The date and time when the object was created., updated_at: str(date-time) # The date and time when the object was last updated., created_by: str # The user who created the object., updated_by: str # The user who last updated the object.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}} # Bank Account created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/bank-accounts/{id}
@desc Get Bank Account
@required {id: str # ID of the record you are acting upon.}
@optional {filter: map # Apply filters, x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, display_id: str?, name: str?, account_number: str?, account_type: str, ledger_account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, bank_name: str?, currency: str?, balance: num?, available_balance: num?, overdraft_limit: num?, routing_number: str?, iban: str?, bic: str?, bsb_number: str?, branch_identifier: str?, bank_code: str?, country: str?, status: str?, description: str?, custom_fields: [map], custom_mappings: map?, created_at: str(date-time)?, updated_at: str(date-time)?, created_by: str?, updated_by: str?}} # Bank Account
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/bank-accounts/{id}
@desc Update Bank Account
@required {id: str # ID of the record you are acting upon., id: str # A unique identifier for an object.}
@optional {downstream_id: str # The third-party API ID of original entity, display_id: str # Display ID for the bank account, name: str # The name of the bank account, account_number: str # The bank account number, account_type: str(checking/savings/credit_card/money_market/line_of_credit/other/cash) # The type of bank account, ledger_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, bank_name: str # The name of the bank or financial institution, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., balance: num # The current balance of the bank account, available_balance: num # The available balance (considering pending transactions and overdraft), overdraft_limit: num # The overdraft limit for the account, routing_number: str # Bank routing number (US), iban: str # International Bank Account Number, bic: str # Bank Identifier Code / SWIFT Code, bsb_number: str # Bank State Branch number (Australia/New Zealand), branch_identifier: str # Bank branch identifier, bank_code: str # Bank code assigned by central bank, country: str # Country code according to ISO 3166-1 alpha-2., status: str(active/inactive/closed) # The status of the bank account, description: str # Description or notes about the bank account, custom_fields: [map{id: str, name: str, description: str, value: any}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., created_at: str(date-time) # The date and time when the object was created., updated_at: str(date-time) # The date and time when the object was last updated., created_by: str # The user who created the object., updated_by: str # The user who last updated the object.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}} # Bank Account updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/bank-accounts/{id}
@desc Delete Bank Account
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}} # Bank Account deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/tracking-categories
@desc List Tracking Categories
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Tracking categories
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/tracking-categories
@desc Create Tracking Category
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., parent_id: str # A unique identifier for an object., parent_name: str # The name of the parent tracking category., name: str # The name of the tracking category., code: str # The code of the tracking category., status: str(active/inactive) # Based on the status some functionality is enabled or disabled., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources., subsidiaries: [any] # The subsidiaries the account belongs to.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Tracking category created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/tracking-categories/{id}
@desc Get Tracking Category
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, parent_id: str?, parent_name: str?, name: str, code: str?, status: str, custom_mappings: map?, row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map], subsidiaries: [any]}, _raw: map?} # Tracking category
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/tracking-categories/{id}
@desc Update Tracking Category
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., parent_id: str # A unique identifier for an object., parent_name: str # The name of the parent tracking category., name: str # The name of the tracking category., code: str # The code of the tracking category., status: str(active/inactive) # Based on the status some functionality is enabled or disabled., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources., subsidiaries: [any] # The subsidiaries the account belongs to.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Tracking category updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/tracking-categories/{id}
@desc Delete Tracking Category
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Tracking category deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/bill-payments
@desc List Bill Payments
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Bill Payments
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/bill-payments
@desc Create Bill Payment
@required {id: str # A unique identifier for an object., total_amount: num # The total amount of the transaction or record, transaction_date: str(date-time) # The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., downstream_id: str # The third-party API ID of original entity, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., reference: str # Optional transaction reference message ie: Debit remittance detail., payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, payment_method_reference: str # Optional reference message returned by payment method on processing, payment_method_id: str # A unique identifier for an object., account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, supplier: map{id: str, display_id: str, display_name: str, company_name: str, address: map} # The supplier this entity is linked to., company_id: str # The company ID the transaction belongs to, reconciled: bool # Indicates if the transaction has been reconciled., status: str(draft/authorised/rejected/paid/voided/deleted) # Status of payment, type: str(accounts_payable_credit/accounts_payable_overpayment/accounts_payable_prepayment/accounts_payable) # Type of payment, allocations: [map{id: str, type: str, code: str, amount: num, allocation_id: str}], note: str # Note associated with the transaction, number: str # Number associated with the transaction, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., display_id: str # Id to be displayed., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., created_at: str(date-time) # The date and time when the object was created., updated_at: str(date-time) # The date and time when the object was last updated., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Bill Payment created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/bill-payments/{id}
@desc Get Bill Payment
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, currency: str?, currency_rate: num?, total_amount: num?, reference: str?, payment_method: str?, payment_method_reference: str?, payment_method_id: str?, account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, transaction_date: str(date-time)?, supplier: map?{id: str, display_id: str?, display_name: str?, company_name: str?, address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}}, company_id: str?, reconciled: bool?, status: str, type: str, allocations: [map], note: str?, number: str?, tracking_categories: [map]?, custom_fields: [map], row_version: str?, display_id: str?, custom_mappings: map?, updated_by: str?, created_by: str?, created_at: str(date-time)?, updated_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Bill Payment
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/bill-payments/{id}
@desc Update Bill Payment
@required {id: str # ID of the record you are acting upon., id: str # A unique identifier for an object., total_amount: num # The total amount of the transaction or record, transaction_date: str(date-time) # The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD}
@optional {downstream_id: str # The third-party API ID of original entity, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., reference: str # Optional transaction reference message ie: Debit remittance detail., payment_method: str # Payment method used for the transaction, such as cash, credit card, bank transfer, or check, payment_method_reference: str # Optional reference message returned by payment method on processing, payment_method_id: str # A unique identifier for an object., account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, supplier: map{id: str, display_id: str, display_name: str, company_name: str, address: map} # The supplier this entity is linked to., company_id: str # The company ID the transaction belongs to, reconciled: bool # Indicates if the transaction has been reconciled., status: str(draft/authorised/rejected/paid/voided/deleted) # Status of payment, type: str(accounts_payable_credit/accounts_payable_overpayment/accounts_payable_prepayment/accounts_payable) # Type of payment, allocations: [map{id: str, type: str, code: str, amount: num, allocation_id: str}], note: str # Note associated with the transaction, number: str # Number associated with the transaction, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., display_id: str # Id to be displayed., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., created_at: str(date-time) # The date and time when the object was created., updated_at: str(date-time) # The date and time when the object was last updated., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Bill Payment updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/bill-payments/{id}
@desc Delete Bill Payment
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Bill Payment deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/expenses
@desc List Expenses
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Expenses
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/expenses
@desc Create Expense
@required {transaction_date: str(date-time) # The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD, line_items: [map{id: str, tracking_categories: [map], account_id: str, account: map, customer_id: str, customer: map, department_id: str, department: map, location_id: str, location: map, tax_rate: map, description: str, type: str, total_amount!: num, tax_amount: num, quantity: num, unit_price: num, item: map, line_number: int, rebilling: map}] # Expense line items linked to this expense.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., display_id: str # Id to be displayed., number: str # Number., account_id: str # The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead., account: map{id: str, type: str, code: str, display_id: str, account_number: str, name: str, downstream_id: str} # A flexible account reference that can represent a ledger account (GL account), a bank account, or an employee payable account, depending on the connector's requirements., supplier_id: str # The ID of the supplier this entity is linked to. Deprecated, use supplier instead., supplier: map{id: str, display_id: str, display_name: str, company_name: str, address: map} # The supplier this entity is linked to., company_id: str # The company ID the transaction belongs to, location: map{id: str, display_id: str, name: str, downstream_id: str}, department_id: str # The ID of the department, department: map{id: str, display_id: str, name: str, downstream_id: str}, payment_type: str(cash/check/credit_card/other) # The type of payment for the expense., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., type: str(expense/refund) # The type of expense., memo: str # The memo of the expense., tax_rate: map{id: str, code: str, name: str, rate: num}, tax_inclusive: bool # Amounts are including tax, sub_total: num # Subtotal amount, normally before tax., total_tax: num # Total tax amount applied to this transaction., total_amount: num # The total amount of the expense line item., tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., reference: str # Optional reference identifier for the transaction., source_document_url: str # URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero., custom_fields: [map{id: str, name: str, description: str, value: any}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., status: str(draft/posted/voided) # Expense status, updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Expenses
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/expenses/{id}
@desc Get Expense
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, display_id: str?, number: str?, transaction_date: str(date-time)?, account_id: str, account: map?{id: str, type: str?, code: str, display_id: str?, account_number: str?, name: str, downstream_id: str?}, supplier_id: str, supplier: map?{id: str, display_id: str?, display_name: str?, company_name: str?, address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}}, company_id: str?, location: map?{id: str, display_id: str?, name: str?, downstream_id: str?}, department_id: str?, department: map?{id: str, display_id: str?, name: str?, downstream_id: str?}, payment_type: str?, currency: str?, currency_rate: num?, type: str?, memo: str?, tax_rate: map{id: str?, code: str?, name: str?, rate: num?}, tax_inclusive: bool?, sub_total: num?, total_tax: num?, total_amount: num?, tracking_categories: [map]?, line_items: [map], reference: str?, source_document_url: str?, custom_fields: [map], custom_mappings: map?, status: str?, updated_at: str(date-time)?, created_at: str(date-time)?, row_version: str?, updated_by: str?, created_by: str?, pass_through: [map]}, _raw: map?} # Expenses
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/expenses/{id}
@desc Update Expense
@required {id: str # ID of the record you are acting upon., transaction_date: str(date-time) # The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD, line_items: [map{id: str, tracking_categories: [map], account_id: str, account: map, customer_id: str, customer: map, department_id: str, department: map, location_id: str, location: map, tax_rate: map, description: str, type: str, total_amount!: num, tax_amount: num, quantity: num, unit_price: num, item: map, line_number: int, rebilling: map}] # Expense line items linked to this expense.}
@optional {id: str # A unique identifier for an object., display_id: str # Id to be displayed., number: str # Number., account_id: str # The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead., account: map{id: str, type: str, code: str, display_id: str, account_number: str, name: str, downstream_id: str} # A flexible account reference that can represent a ledger account (GL account), a bank account, or an employee payable account, depending on the connector's requirements., supplier_id: str # The ID of the supplier this entity is linked to. Deprecated, use supplier instead., supplier: map{id: str, display_id: str, display_name: str, company_name: str, address: map} # The supplier this entity is linked to., company_id: str # The company ID the transaction belongs to, location: map{id: str, display_id: str, name: str, downstream_id: str}, department_id: str # The ID of the department, department: map{id: str, display_id: str, name: str, downstream_id: str}, payment_type: str(cash/check/credit_card/other) # The type of payment for the expense., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., type: str(expense/refund) # The type of expense., memo: str # The memo of the expense., tax_rate: map{id: str, code: str, name: str, rate: num}, tax_inclusive: bool # Amounts are including tax, sub_total: num # Subtotal amount, normally before tax., total_tax: num # Total tax amount applied to this transaction., total_amount: num # The total amount of the expense line item., tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., reference: str # Optional reference identifier for the transaction., source_document_url: str # URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero., custom_fields: [map{id: str, name: str, description: str, value: any}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., status: str(draft/posted/voided) # Expense status, updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Expenses
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/expenses/{id}
@desc Delete Expense
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Expenses
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/aged-creditors
@desc Get Aged Creditors
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., filter: map # Apply filters, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{report_generated_at: str(date-time), report_as_of_date: str(date), period_count: int, period_length: int, outstanding_balances: [map]}, _raw: map?} # Aged Creditors
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/aged-debtors
@desc Get Aged Debtors
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., filter: map # Apply filters, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{report_generated_at: str(date-time), report_as_of_date: str(date), period_count: int, period_length: int, outstanding_balances: [map]}, _raw: map?} # Aged Debtors
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/bank-feed-accounts
@desc List Bank Feed Accounts
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Bank Feed Accounts
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/bank-feed-accounts
@desc Create Bank Feed Account
@required {id: str # A unique identifier for an object.}
@optional {bank_account_type: str(bank/credit_card) # Type of the bank account., source_account_id: str # The source account's unique identifier., target_account_id: str # The target account's unique identifier in the accounting connector., target_account_name: str # Name associated with the target account., target_account_number: str # Account number of the destination bank account., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., feed_status: str(pending/rejected) # Current status of the bank feed., country: str # Country code according to ISO 3166-1 alpha-2., custom_fields: [map{id: str, name: str, description: str, value: any}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., created_at: str(date-time) # The date and time when the object was created., updated_at: str(date-time) # The date and time when the object was last updated., updated_by: str # The user who last updated the object., created_by: str # The user who created the object.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Bank Feed Accounts
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/bank-feed-accounts/{id}
@desc Get Bank Feed Account
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, bank_account_type: str, source_account_id: str, target_account_id: str, target_account_name: str, target_account_number: str, currency: str?, feed_status: str, country: str?, custom_fields: [map], custom_mappings: map?, created_at: str(date-time)?, updated_at: str(date-time)?, updated_by: str?, created_by: str?}, _raw: map?} # Bank Feed Accounts
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/bank-feed-accounts/{id}
@desc Update Bank Feed Account
@required {id: str # ID of the record you are acting upon., id: str # A unique identifier for an object.}
@optional {bank_account_type: str(bank/credit_card) # Type of the bank account., source_account_id: str # The source account's unique identifier., target_account_id: str # The target account's unique identifier in the accounting connector., target_account_name: str # Name associated with the target account., target_account_number: str # Account number of the destination bank account., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., feed_status: str(pending/rejected) # Current status of the bank feed., country: str # Country code according to ISO 3166-1 alpha-2., custom_fields: [map{id: str, name: str, description: str, value: any}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., created_at: str(date-time) # The date and time when the object was created., updated_at: str(date-time) # The date and time when the object was last updated., updated_by: str # The user who last updated the object., created_by: str # The user who created the object.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Bank Feed Accounts
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/bank-feed-accounts/{id}
@desc Delete Bank Feed Account
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Bank Feed Accounts
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/bank-feed-statements
@desc List Bank Feed Statements
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Bank Feed Statements
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/bank-feed-statements
@desc Create Bank Feed Statement
@required {id: str # A unique identifier for an object.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., bank_feed_account_id: str # The ID of the bank feed account this statement belongs to., status: str(pending/rejected/success) # The current status of the bank feed statement., start_date: str(date-time) # Start date of the bank feed statement., end_date: str(date-time) # End date of the bank feed statement., start_balance: num # Balance amount at the start of the period., start_balance_credit_or_debit: str(credit/debit) # Whether the amount is a credit or debit., end_balance: num # Balance amount at the end of the period., end_balance_credit_or_debit: str(credit/debit) # Whether the amount is a credit or debit., transactions: [map{posted_date!: str(date-time), description: str, amount!: num, credit_or_debit!: str, source_transaction_id!: str, counterparty: str, reference: str, transaction_type: str}] # List of transactions in the bank feed statement., created_at: str(date-time) # The date and time when the object was created., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., updated_by: str # The user who last updated the object.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Bank Feed Statements
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/bank-feed-statements/{id}
@desc Get Bank Feed Statement
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, bank_feed_account_id: str, status: str, start_date: str(date-time), end_date: str(date-time), start_balance: num, start_balance_credit_or_debit: str, end_balance: num, end_balance_credit_or_debit: str, transactions: [map], created_at: str(date-time)?, created_by: str?, updated_at: str(date-time)?, updated_by: str?}, _raw: map?} # Bank Feed Statements
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/bank-feed-statements/{id}
@desc Update Bank Feed Statement
@required {id: str # ID of the record you are acting upon., id: str # A unique identifier for an object.}
@optional {bank_feed_account_id: str # The ID of the bank feed account this statement belongs to., status: str(pending/rejected/success) # The current status of the bank feed statement., start_date: str(date-time) # Start date of the bank feed statement., end_date: str(date-time) # End date of the bank feed statement., start_balance: num # Balance amount at the start of the period., start_balance_credit_or_debit: str(credit/debit) # Whether the amount is a credit or debit., end_balance: num # Balance amount at the end of the period., end_balance_credit_or_debit: str(credit/debit) # Whether the amount is a credit or debit., transactions: [map{posted_date!: str(date-time), description: str, amount!: num, credit_or_debit!: str, source_transaction_id!: str, counterparty: str, reference: str, transaction_type: str}] # List of transactions in the bank feed statement., created_at: str(date-time) # The date and time when the object was created., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., updated_by: str # The user who last updated the object.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Bank Feed Statements
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/bank-feed-statements/{id}
@desc Delete Bank Feed Statement
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Bank Feed Statements
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/categories
@desc List Categories
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded., filter: map # Apply filters}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Categories
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/categories/{id}
@desc Get Category
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded., filter: map # Apply filters}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, name: str, display_id: str?, type: str, status: str, custom_mappings: map?, row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Category
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/quotes
@desc List Quotes
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}} # Quotes
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/quotes
@desc Create Quote
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., downstream_id: str # The third-party API ID of original entity, number: str # Quote number., customer: map{id: str, display_id: str, display_name: str, name: str, company_name: str, email: str} # The customer this entity is linked to., invoice_id: str # The unique identifier for the invoice., sales_order_id: str # The unique identifier for the sales order., company_id: str # The company ID the transaction belongs to, department_id: str # The ID of the department, project_id: str # The unique identifier for the linked project., quote_date: str(date) # Date quote was issued - YYYY-MM-DD., expiry_date: str(date) # The date until which the quote is valid - YYYY-MM-DD., terms: str # Terms of the quote., terms_id: str # The ID of the payment terms, reference: str # Optional reference identifier for the transaction., status: str(draft/sent/accepted/rejected/expired/converted/void/deleted) # Quote status, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., tax_inclusive: bool # Amounts are including tax, sub_total: num # Sub-total amount, normally before tax., total_tax: num # Total tax amount applied to this quote., tax_code: str # Applicable tax id/code override if tax is not supplied on a line item basis., discount_percentage: num # Discount percentage applied to this quote., discount_amount: num # Discount amount applied to this quote., total: num # Total amount of quote, including tax., customer_memo: str # Customer memo, line_items: [map{id: str, row_id: str, code: str, line_number: int, description: str, type: str, tax_amount: num, total_amount: num, quantity: num, unit_price: num, unit_of_measure: str, discount_percentage: num, discount_amount: num, service_date: str(date), category_id: str, location_id: str, department_id: str, item: map, tax_rate: map, tracking_categories: [map], ledger_account: map, custom_fields: [map], row_version: str, updated_by: str, created_by: str, created_at: str(date-time), updated_at: str(date-time)}], billing_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, shipping_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., template_id: str # Optional quote template, source_document_url: str # URL link to a source document - shown as 'Go to [appName]' in the downstream app., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}} # Quotes
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/quotes/{id}
@desc Get Quote
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, number: str?, customer: map?{id: str, display_id: str?, display_name: str?, name: str, company_name: str?, email: str}, invoice_id: str, sales_order_id: str?, company_id: str?, department_id: str?, project_id: str, quote_date: str(date)?, expiry_date: str(date)?, terms: str?, terms_id: str?, reference: str?, status: str?, currency: str?, currency_rate: num?, tax_inclusive: bool?, sub_total: num?, total_tax: num?, tax_code: str?, discount_percentage: num?, discount_amount: num?, total: num?, customer_memo: str?, line_items: [map], billing_address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}, shipping_address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}, tracking_categories: [map]?, template_id: str?, source_document_url: str?, custom_fields: [map], row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}} # Quotes
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/quotes/{id}
@desc Update Quote
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., downstream_id: str # The third-party API ID of original entity, number: str # Quote number., customer: map{id: str, display_id: str, display_name: str, name: str, company_name: str, email: str} # The customer this entity is linked to., invoice_id: str # The unique identifier for the invoice., sales_order_id: str # The unique identifier for the sales order., company_id: str # The company ID the transaction belongs to, department_id: str # The ID of the department, project_id: str # The unique identifier for the linked project., quote_date: str(date) # Date quote was issued - YYYY-MM-DD., expiry_date: str(date) # The date until which the quote is valid - YYYY-MM-DD., terms: str # Terms of the quote., terms_id: str # The ID of the payment terms, reference: str # Optional reference identifier for the transaction., status: str(draft/sent/accepted/rejected/expired/converted/void/deleted) # Quote status, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., tax_inclusive: bool # Amounts are including tax, sub_total: num # Sub-total amount, normally before tax., total_tax: num # Total tax amount applied to this quote., tax_code: str # Applicable tax id/code override if tax is not supplied on a line item basis., discount_percentage: num # Discount percentage applied to this quote., discount_amount: num # Discount amount applied to this quote., total: num # Total amount of quote, including tax., customer_memo: str # Customer memo, line_items: [map{id: str, row_id: str, code: str, line_number: int, description: str, type: str, tax_amount: num, total_amount: num, quantity: num, unit_price: num, unit_of_measure: str, discount_percentage: num, discount_amount: num, service_date: str(date), category_id: str, location_id: str, department_id: str, item: map, tax_rate: map, tracking_categories: [map], ledger_account: map, custom_fields: [map], row_version: str, updated_by: str, created_by: str, created_at: str(date-time), updated_at: str(date-time)}], billing_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, shipping_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., template_id: str # Optional quote template, source_document_url: str # URL link to a source document - shown as 'Go to [appName]' in the downstream app., custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}} # Quotes
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/quotes/{id}
@desc Delete Quote
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}} # Quotes
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/projects
@desc List projects
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}} # Projects
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/projects
@desc Create project
@required {name: str # Name of the project}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., downstream_id: str # The third-party API ID of original entity, display_id: str # User-friendly project identifier, reference_id: str # External reference identifier for the project, description: str # Detailed description of the project, status: str(active/completed/on_hold/cancelled/draft/in_progress/approved/other) # Current status of the project, active: bool # Indicates whether the project is currently active or inactive, project_type: str(client_project/internal_project/maintenance/research_development/training/other) # Type or category of the project, priority: str(low/medium/high/critical) # Priority level of the project, completion_percentage: num # Percentage of project completion (0-100), start_date: str(date) # Start date of the project, end_date: str(date) # Expected or planned end date of the project, completion_date: str(date) # Actual end date of the project, customer: map{id: str, display_id: str, display_name: str, name: str, company_name: str, email: str} # The customer this entity is linked to., department: map{id: str, name: str} # Department or organizational unit associated with the project, company_id: str # The company ID the transaction belongs to, owner_id: str # ID of the user who owns/manages this project, parent_project: map{id: str, name: str} # Parent project if this is a subproject, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., budget_amount: num # Total budgeted amount for the project, approved_amount: num # Approved budget amount for the project, actual_amount: num # Total actual amount spent on the project, budget_hours: num # Total budgeted hours for the project, actual_hours: num # Total actual hours worked on the project, hourly_rate: num # Default hourly rate for project work, billing_method: str(fixed_price/time_and_materials/milestone_based/retainer/non_billable) # Method used for billing this project, is_billable: bool=true # Indicates if the project is billable to the customer, phase: str(initiation/planning/execution/monitoring/closure/other) # Current phase of the project lifecycle, tax_rate: map{id: str, code: str, name: str, rate: num}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., tags: [str] # Tags associated with the project, notes: str # Additional notes about the project, contract_number: str # Contract or agreement number associated with the project, profit_margin: num # Expected profit margin percentage for the project, schedule_status: str(ahead_of_schedule/on_schedule/behind_schedule/critical_delay) # Current status of project schedule compared to plan, addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}] # An array of addresses associated with the project (billing, job site, etc.), team_size: int # Number of team members assigned to the project, custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., created_at: str(date-time) # The date and time when the object was created., updated_at: str(date-time) # The date and time when the object was last updated.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}} # Projects
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/projects/{id}
@desc Get project
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, name: str, display_id: str?, reference_id: str?, description: str?, status: str?, active: bool?, project_type: str?, priority: str?, completion_percentage: num?, start_date: str(date)?, end_date: str(date)?, completion_date: str(date)?, customer: map?{id: str, display_id: str?, display_name: str?, name: str, company_name: str?, email: str}, department: map?{id: str, name: str}, company_id: str?, owner_id: str?, parent_project: map?{id: str, name: str}, currency: str?, budget_amount: num?, approved_amount: num?, actual_amount: num?, budget_hours: num?, actual_hours: num?, hourly_rate: num?, billing_method: str?, is_billable: bool?, phase: str?, tax_rate: map{id: str?, code: str?, name: str?, rate: num?}, tracking_categories: [map]?, tags: [str], notes: str?, contract_number: str?, profit_margin: num?, schedule_status: str?, addresses: [map], team_size: int?, custom_fields: [map], row_version: str?, updated_by: str?, created_by: str?, created_at: str(date-time)?, updated_at: str(date-time)?}} # Projects
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/projects/{id}
@desc Update project
@required {id: str # ID of the record you are acting upon., name: str # Name of the project}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings., id: str # A unique identifier for an object., downstream_id: str # The third-party API ID of original entity, display_id: str # User-friendly project identifier, reference_id: str # External reference identifier for the project, description: str # Detailed description of the project, status: str(active/completed/on_hold/cancelled/draft/in_progress/approved/other) # Current status of the project, active: bool # Indicates whether the project is currently active or inactive, project_type: str(client_project/internal_project/maintenance/research_development/training/other) # Type or category of the project, priority: str(low/medium/high/critical) # Priority level of the project, completion_percentage: num # Percentage of project completion (0-100), start_date: str(date) # Start date of the project, end_date: str(date) # Expected or planned end date of the project, completion_date: str(date) # Actual end date of the project, customer: map{id: str, display_id: str, display_name: str, name: str, company_name: str, email: str} # The customer this entity is linked to., department: map{id: str, name: str} # Department or organizational unit associated with the project, company_id: str # The company ID the transaction belongs to, owner_id: str # ID of the user who owns/manages this project, parent_project: map{id: str, name: str} # Parent project if this is a subproject, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., budget_amount: num # Total budgeted amount for the project, approved_amount: num # Approved budget amount for the project, actual_amount: num # Total actual amount spent on the project, budget_hours: num # Total budgeted hours for the project, actual_hours: num # Total actual hours worked on the project, hourly_rate: num # Default hourly rate for project work, billing_method: str(fixed_price/time_and_materials/milestone_based/retainer/non_billable) # Method used for billing this project, is_billable: bool=true # Indicates if the project is billable to the customer, phase: str(initiation/planning/execution/monitoring/closure/other) # Current phase of the project lifecycle, tax_rate: map{id: str, code: str, name: str, rate: num}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., tags: [str] # Tags associated with the project, notes: str # Additional notes about the project, contract_number: str # Contract or agreement number associated with the project, profit_margin: num # Expected profit margin percentage for the project, schedule_status: str(ahead_of_schedule/on_schedule/behind_schedule/critical_delay) # Current status of project schedule compared to plan, addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}] # An array of addresses associated with the project (billing, job site, etc.), team_size: int # Number of team members assigned to the project, custom_fields: [map{id: str, name: str, description: str, value: any}], row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., created_at: str(date-time) # The date and time when the object was created., updated_at: str(date-time) # The date and time when the object was last updated.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}} # Projects
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/projects/{id}
@desc Delete project
@required {id: str # ID of the record you are acting upon.}
@optional {x-apideck-company-id: str # The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}} # Projects
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/employees
@desc List Employees
@optional {cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded., filter: map # Apply filters}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Employees
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/employees
@desc Create Employee
@optional {id: str # A unique identifier for an object., downstream_id: str # The third-party API ID of original entity, display_id: str # Id to be displayed., first_name: str # The first name of the employee., last_name: str # The last name of the employee., display_name: str # The display name of the employee., emails: [map{id: str, email!: str(email), type: str}] # Email addresses of the employee., employee_number: str # The employee number or identifier., job_title: str # The job title of the employee., status: str(active/inactive/terminated) # The status of the employee., is_contractor: bool # Whether the employee is a contractor., department: map{id: str, display_id: str, name: str, downstream_id: str}, location: map{id: str, display_id: str, name: str, downstream_id: str}, manager: map{id: str, name: str} # The manager of the employee., hire_date: str(date) # The date the employee was hired., termination_date: str(date) # The date the employee was terminated., gender: str(male/female/unisex/other/not_specified) # The gender represents the gender identity of a person., birth_date: str(date) # The date of birth of the employee., subsidiary: map{id: str, display_id: str, name: str}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., notes: str # Notes about the employee., addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}] # Addresses of the employee., phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}] # Phone numbers of the employee., bank_account: map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}, custom_fields: [map{id: str, name: str, description: str, value: any}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Employees
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/employees/{id}
@desc Get Employee
@required {id: str # ID of the record you are acting upon.}
@optional {fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, display_id: str?, first_name: str?, last_name: str?, display_name: str?, emails: [map], employee_number: str?, job_title: str?, status: str?, is_contractor: bool?, department: map?{id: str, display_id: str?, name: str?, downstream_id: str?}, location: map?{id: str, display_id: str?, name: str?, downstream_id: str?}, manager: map{id: str, name: str?}, hire_date: str(date)?, termination_date: str(date)?, gender: str?, birth_date: str(date)?, subsidiary: map?{id: str, display_id: str?, name: str?}, tracking_categories: [map]?, currency: str?, notes: str?, addresses: [map], phone_numbers: [map], bank_account: map{bank_name: str?, account_number: str?, account_name: str?, account_type: str?, iban: str?, bic: str?, routing_number: str?, bsb_number: str?, branch_identifier: str?, bank_code: str?, currency: str?, country: str?}, custom_fields: [map], custom_mappings: map?, row_version: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Employees
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/employees/{id}
@desc Update Employee
@required {id: str # ID of the record you are acting upon.}
@optional {id: str # A unique identifier for an object., downstream_id: str # The third-party API ID of original entity, display_id: str # Id to be displayed., first_name: str # The first name of the employee., last_name: str # The last name of the employee., display_name: str # The display name of the employee., emails: [map{id: str, email!: str(email), type: str}] # Email addresses of the employee., employee_number: str # The employee number or identifier., job_title: str # The job title of the employee., status: str(active/inactive/terminated) # The status of the employee., is_contractor: bool # Whether the employee is a contractor., department: map{id: str, display_id: str, name: str, downstream_id: str}, location: map{id: str, display_id: str, name: str, downstream_id: str}, manager: map{id: str, name: str} # The manager of the employee., hire_date: str(date) # The date the employee was hired., termination_date: str(date) # The date the employee was terminated., gender: str(male/female/unisex/other/not_specified) # The gender represents the gender identity of a person., birth_date: str(date) # The date of birth of the employee., subsidiary: map{id: str, display_id: str, name: str}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., notes: str # Notes about the employee., addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}] # Addresses of the employee., phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}] # Phone numbers of the employee., bank_account: map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}, custom_fields: [map{id: str, name: str, description: str, value: any}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Employees
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/employees/{id}
@desc Delete Employee
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Employees
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/expense-categories
@desc List Expense Categories
@optional {cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded., filter: map # Apply filters}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Expense Categories
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/expense-categories
@desc Create Expense Category
@required {name: str # The name of the expense category.}
@optional {id: str # A unique identifier for an object., display_id: str # Id to be displayed., code: str # The code or external identifier of the expense category., description: str # The description of the expense category., status: str(active/inactive) # The status of the expense category., account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, offset_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, tax_rate: map{id: str, code: str, name: str, rate: num}, rate_required: bool # Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile)., default_rate: num # Default rate when rate_required is true (e.g. 0.67 for mileage)., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., downstream_id: str # The third-party API ID of original entity, row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Expense Categories
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/expense-categories/{id}
@desc Get Expense Category
@required {id: str # ID of the record you are acting upon.}
@optional {fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, display_id: str?, name: str, code: str?, description: str?, status: str?, account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, offset_account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, tax_rate: map{id: str?, code: str?, name: str?, rate: num?}, rate_required: bool?, default_rate: num?, custom_mappings: map?, downstream_id: str?, row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Expense Categories
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/expense-categories/{id}
@desc Update Expense Category
@required {id: str # ID of the record you are acting upon., name: str # The name of the expense category.}
@optional {id: str # A unique identifier for an object., display_id: str # Id to be displayed., code: str # The code or external identifier of the expense category., description: str # The description of the expense category., status: str(active/inactive) # The status of the expense category., account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, offset_account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, tax_rate: map{id: str, code: str, name: str, rate: num}, rate_required: bool # Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile)., default_rate: num # Default rate when rate_required is true (e.g. 0.67 for mileage)., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., downstream_id: str # The third-party API ID of original entity, row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Expense Categories
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/expense-categories/{id}
@desc Delete Expense Category
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Expense Categories
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/expense-reports
@desc List Expense Reports
@optional {cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded., filter: map # Apply filters}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Expense Reports
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /accounting/expense-reports
@desc Create Expense Report
@required {employee: map{id: str, display_name: str} # The employee who submitted the expense report., transaction_date: str(date-time) # The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD, line_items: [map{id: str, line_number: int, expense_category: map, account: map, description: str, quantity: num, unit_price: num, amount!: num, tax_rate: map, tax_amount: num, total_amount: num, transaction_date: str(date), billable: bool, reimbursable: bool, customer: map, department: map, location: map, tracking_categories: [map], receipt_url: str, currency: str, updated_by: str, created_by: str, updated_at: str(date-time), created_at: str(date-time)}] # Expense line items linked to this expense report.}
@optional {id: str # A unique identifier for an object., display_id: str # Id to be displayed., number: str # The expense report number., title: str # Title or purpose of the expense report., status: str(draft/submitted/approved/reimbursed/rejected/reversed/voided) # The status of the expense report., posting_date: str(date) # The date the expense report was posted to the general ledger., due_date: str(date) # Date when reimbursement is due., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., sub_total: num # Subtotal amount, normally before tax., total_tax: num # Total tax amount applied to this transaction., total_amount: num # Total amount of all expense lines including tax., reimbursable_amount: num # Total reimbursable amount (may differ from total if some expenses are non-reimbursable)., memo: str # The memo of the expense report., department: map{id: str, display_id: str, name: str, downstream_id: str}, location: map{id: str, display_id: str, name: str, downstream_id: str}, account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, accounting_period: map{id: str, name: str} # The accounting period the expense report is posted to., subsidiary: map{id: str, display_id: str, name: str}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., tax_inclusive: bool # Amounts are including tax, approved_by: map{id: str, display_name: str} # The person who approved the expense report., custom_fields: [map{id: str, name: str, description: str, value: any}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Expense Reports
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /accounting/expense-reports/{id}
@desc Get Expense Report
@required {id: str # ID of the record you are acting upon.}
@optional {fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, display_id: str?, number: str?, title: str?, employee: map{id: str, display_name: str?}, status: str?, transaction_date: str(date-time)?, posting_date: str(date)?, due_date: str(date)?, currency: str?, currency_rate: num?, sub_total: num?, total_tax: num?, total_amount: num?, reimbursable_amount: num?, memo: str?, department: map?{id: str, display_id: str?, name: str?, downstream_id: str?}, location: map?{id: str, display_id: str?, name: str?, downstream_id: str?}, account: map?{id: str, name: str?, nominal_code: str?, code: str?, parent_id: str?, display_id: str?}, accounting_period: map?{id: str, name: str?}, line_items: [map], subsidiary: map?{id: str, display_id: str?, name: str?}, tracking_categories: [map]?, tax_inclusive: bool?, approved_by: map?{id: str, display_name: str?}, custom_fields: [map], custom_mappings: map?, row_version: str?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Expense Reports
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /accounting/expense-reports/{id}
@desc Update Expense Report
@required {id: str # ID of the record you are acting upon., employee: map{id: str, display_name: str} # The employee who submitted the expense report., transaction_date: str(date-time) # The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD, line_items: [map{id: str, line_number: int, expense_category: map, account: map, description: str, quantity: num, unit_price: num, amount!: num, tax_rate: map, tax_amount: num, total_amount: num, transaction_date: str(date), billable: bool, reimbursable: bool, customer: map, department: map, location: map, tracking_categories: [map], receipt_url: str, currency: str, updated_by: str, created_by: str, updated_at: str(date-time), created_at: str(date-time)}] # Expense line items linked to this expense report.}
@optional {id: str # A unique identifier for an object., display_id: str # Id to be displayed., number: str # The expense report number., title: str # Title or purpose of the expense report., status: str(draft/submitted/approved/reimbursed/rejected/reversed/voided) # The status of the expense report., posting_date: str(date) # The date the expense report was posted to the general ledger., due_date: str(date) # Date when reimbursement is due., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., currency_rate: num # Currency Exchange Rate at the time entity was recorded/generated., sub_total: num # Subtotal amount, normally before tax., total_tax: num # Total tax amount applied to this transaction., total_amount: num # Total amount of all expense lines including tax., reimbursable_amount: num # Total reimbursable amount (may differ from total if some expenses are non-reimbursable)., memo: str # The memo of the expense report., department: map{id: str, display_id: str, name: str, downstream_id: str}, location: map{id: str, display_id: str, name: str, downstream_id: str}, account: map{id: str, name: str, nominal_code: str, code: str, parent_id: str, display_id: str}, accounting_period: map{id: str, name: str} # The accounting period the expense report is posted to., subsidiary: map{id: str, display_id: str, name: str}, tracking_categories: [map{id: str, code: str, name: str, parent_id: str, parent_name: str}] # A list of linked tracking categories., tax_inclusive: bool # Amounts are including tax, approved_by: map{id: str, display_name: str} # The person who approved the expense report., custom_fields: [map{id: str, name: str, description: str, value: any}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., row_version: str # A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object., updated_by: str # The user who last updated the object., created_by: str # The user who created the object., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Expense Reports
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /accounting/expense-reports/{id}
@desc Delete Expense Report
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Expense Reports
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@end
