### Example Organization Accounting Setup Response Source: https://developer.sage.com/sageactive/resources/organizationaccountingsetup This JSON object represents a successful response when retrieving organization accounting setup details. It includes various account identifiers and configuration parameters. ```json { "data": { "organizationAccountingSetupByOrgId": { "defaultCustomersAccountId": "e770b78c-0135-4f63-b875-b8bace1b4c8f", "defaultSuppliersAccountId": "e770b78b-ffaa-4f63-b875-b8bace1b4c8f", "subAccountingLength": 6, "taxRegime": "GENERAL", "annualAccountsModel": "UNDEFINED", "defaultBankAccountId": "136a9510-94cb-4d49-b205-39718346cba8", "defaultBankJournalTypeId": "136a9510-7cba-4d49-b205-39718346cba8", "defaultCashAccountId": "136a9510-9231-4d49-b205-39718346c8f", "defaultCashJournalTypeId": "136a9510-7cbf-4d49-b205-39718346c8f", "defaultInputVATAccountId": "136a9510-9333-4d49-b205-39718346c8f", "defaultOutputVATAccountId": "136a9510-91ff-4d49-b205-39718346c8f", "defaultSaleProductsAccountId": "136a9510-93d6-4d49-b205-39718346c8f", "defaultSuppliersAccountId": "136a9510-92c6-4d49-b205-39718346c8f", "defaultProfitAccountCFId": "e770b78c-1337-4f63-b875-b8bace1b4c8f", "defaultLossAccountCFId": "e770b78c-7337-4f63-b875-b8bace1b4c8f", "defaultOpeningAccountCFId": "e770b78c-3337-4f63-b875-b8bace1b4c8f", "defaultOpeningJournalCFId": "e770b78c-9337-4f63-b875-b8bace1b4c8f", "defaultResultAccountCFId": "e770b78c-5337-4f63-b875-b8bace1b4c8f", "defaultCreditorsAccountCFId": "a1234567-89ab-cdef-0123-456789abcdef", "defaultDebtorsAccountCFId": "b9876543-21fe-dcba-0987-654321fedcba", "intracommunityAccountId": "e770b78c-5337-4f63-b875-b8bace1b4c8f", "foreignAccountId": "e770b78c-6337-4f63-b875-b8bace1b4c8f", "defaultPayrollJournalTypeId": "5e1ae58d-287f-4d84-bfd2-6244bfadc00c", "openItemsAutomaticAllocation": true, "defaultBankingAdjustmentsId": "9c71b78c-0135-4f63-b875-b8bace1b4c8f", "defaultBankingTransactionsId": "8b62a123-ffaa-4f63-b875-b8bace1b4c8f", "defaultPayrollSessionId": "8b62a123-0135-4f63-b875-b8bace1b4c8f" } } } ``` -------------------------------- ### Example Response for Organization Sales Setup Source: https://developer.sage.com/sageactive/resources/organizationsalessetup This is a sample response demonstrating the structure and data types returned by the organizationSalesSetupByOrgId operation. ```json { "data": { "organizationSalesSetupByOrgId": { "salesInvoiceDefaultPresetTextId": "01234567-89ab-cdef-0123-456789abcdef", "salesCreditNoteDefaultPresetTextId": "41234567-89ab-cdef-0123-456789abcdef", "salesDeliveryNoteDefaultPresetTextId": "52234567-89ab-cdef-0123-456789abcdef", "salesOrderDefaultPresetTextId": "63234567-89ab-cdef-0123-456789abcdef", "useSalesTracking": true, "useVATRatesForDOM": false, "allowPostingSalesInvoice": true, "defaultSalesPostingInvoiceJournalTypeId": "81234567-89ab-cdef-0123-456789abcdef", "defaultSalesPostingInvoiceSessionId": "71234567-89ab-cdef-0123-456789abcdef", "allowPostingPurchaseInvoice": false, "defaultPurchasePostingInvoiceJournalTypeId": "a1234567-89ab-cdef-0123-456789abcdef", "defaultPurchasePostingInvoiceSessionId": "882f7366-8927-49c3-aa01-2162ea3d2439", "askGenerateNonIdentifiedSalesInvoicesByDefault": true, "nonIdentifiedSalesInvoiceMaxAmount": 400 } } } ``` -------------------------------- ### Example File Response Source: https://developer.sage.com/sageactive/resources/filemanagement_ap_automation This is an example of a successful response when querying for files. By default, only files with status 'Done' are returned. ```json { "data": { "files": { "edges": [ { "node": { "fileName": "invoice-q1", "status": "Done" } } ] } } } ``` -------------------------------- ### SalesKpis Response Example Source: https://developer.sage.com/sageactive/resources/saleskpis Example response structure for a single MONEY_IN KPI. ```json { "data": { "salesKpis": [ { "type": "MONEY_IN", "value": 79566.8, "currency": "EUR" } ] } } ``` -------------------------------- ### Example GraphQL Response for Product Price Source: https://developer.sage.com/sageactive/resources/productprices This is an example of a successful response from the productPriceById query, showing computed price, discount, and tax details. ```json { "data": { "productPriceById": { "price": { "code": "UNKNOWN", "name": "UNKNOWN", "source": "UNKNOWN", "value": 100 }, "firstDiscount": { "code": "UNKNOWN", "name": "UNKNOWN", "source": "UNKNOWN", "value": 0 }, "taxGroupId": "285afa97-bdf1-45c2-b258-924fd7410082", "taxId": "808f93b0-b7a2-472d-a0e6-686a4b892778", "equivalenceSurchargePercentage": 0, "taxPercentage": 20, "taxTreatmentId": "7a58c924-c7b1-4027-9685-e7935e107a85" } } } ``` -------------------------------- ### GraphQL Query Example (filtering by file ID) Source: https://developer.sage.com/sageactive/resources/filemanagement_uploadfiletoentity This example demonstrates how to query for files using their ID. ```APIDOC ## GraphQL Query Example (filtering by file ID) ### Description This example demonstrates how to query for files using their ID. ### Query ```graphql query { files( where: { id: { eq: "98f7adc7dd104cd984f9c113ef9a8e54.pdf" } } ) { edges { node { fileName status } } } } ``` ``` -------------------------------- ### Example Response for PostPurchaseInvoice Source: https://developer.sage.com/sageactive/resources/postpurchaseinvoice This is an example response from the PostPurchaseInvoice service, confirming the successful posting and returning the identifiers for the created accounting entry. ```json { "data": { "postPurchaseInvoice": { "accountingEntryId": "0e1987c3-fc14-4906-8b26-42e4a4c36079", "accountingEntryNumber": 819 } } } ``` -------------------------------- ### Example Response for Create Sales Invoice Source: https://developer.sage.com/sageactive/resources/salesinvoices This is an example of a successful response after creating a sales invoice. It includes the ID of the newly created invoice. ```json { "data": { "createSalesInvoice": { "id": "e451aff7-074f-4e72-a6fb-4ea25e9d9c64" } } } ``` -------------------------------- ### Get top N results with ordering and limiting Source: https://developer.sage.com/sageactive/concepts/aggregations Combine `orderFields` with `first` to retrieve the top N results. This example gets the top 3 customers by `totalNet` in descending order, making API responses more efficient. ```graphql salesQuotes( first: 3 ...){ ... aggregate( aggregateFields: ["totalNet", "totalLiquid"], groupFields: ["customerId", "documentDate|Quarter"], orderFields: ["totalNet|DESC"] ) { groupValues { value } aggregates { value } } } ``` -------------------------------- ### Global Count Aggregation Source: https://developer.sage.com/sageactive/guides/hotchocolate/aggregation To get a total count without grouping, include 'id' in the node and use '__count' in aggregateFields. This example shows the total number of customers. ```graphql query { customers { edges { node { id } } aggregate( aggregateFields: ["__count"] ) { aggregates { value } } } } ``` -------------------------------- ### Query Files Source: https://developer.sage.com/sageactive/resources/filemanagement_files This example demonstrates how to query files attached to an accounting entry, with specific filters for entity type, ID, business date range, and file name. It also shows how to order the results by business date in descending order and paginate the results. ```APIDOC ## Query Files ### Description This operation allows you to retrieve files based on various criteria such as entity type, entity ID, date ranges, and file name. You can also specify ordering and pagination for the results. ### Method GET (or equivalent GraphQL query) ### Endpoint `/files` (or GraphQL endpoint) ### Parameters #### Query Parameters (or GraphQL `where` argument) - `entityType` (string) - Optional - Filter by entity type (e.g., `ACCOUNTING_ENTRY`). Supports `eq` and `in` operators. - `entityId` (string) - Optional - Filter by entity ID. Supports `eq` and `in` operators. - `businessDate` (string) - Optional - Filter by business date. Supports `gte`, `gt`, `lte` operators for date range filtering. - `fileName` (string) - Optional - Filter by file name. Supports `contains` operator for case-insensitive partial matching. - `type` (string) - Optional - Filter by file type. Supports `eq` and `in` operators. - `id` (string) - Optional - Filter by file ID. - `status` (string) - Optional - Filter by file status. - `filesExport` (boolean) - Optional - Filter for files generated by `filesExport`. #### Ordering - `order` (object) - Optional - Specifies the ordering of results. Supported fields include `businessDate` with `ASC` or `DESC` directions. #### Pagination - `first` (integer) - Optional - Specifies the number of items to return, with a maximum of 500. Default is 20. ### Request Example (GraphQL) ```graphql query { files( order: { businessDate: DESC }, where: { entityType: { eq: ACCOUNTING_ENTRY } entityId: { eq: "8b21a143-4d9c-41ea-b1dc-1cf9d91a72f1" } businessDate: { gte: "2024-01-01" } businessDate: { lte: "2025-04-30" } fileName: { contains: "invoice" } type: { eq: "pdf" } }, first: 10 ) { edges { node { id fileName type mimeType size businessDate comment uploadDate entityType entityId downloadPath previewPath } } } } ``` ### Response #### Success Response (200) Returns a list of file objects matching the query criteria, including details like ID, file name, type, size, dates, and paths. #### Response Example (GraphQL) ```json { "data": { "files": { "edges": [ { "node": { "id": "98f7adc7dd104cd984f9c113ef9a8e54.pdf", "fileName": "invoice-q1.pdf", "type": "pdf", "mimeType": "application/pdf", "size": 2497741, "businessDate": "2025-04-04T00:00:00Z", "comment": "Invoice for Q1", "uploadDate": "2025-04-04T08:12:43Z", "entityType": "ACCOUNTING_ENTRY", "entityId": "8b21a143-4d9c-41ea-b1dc-1cf9d91a72f1", "downloadPath": "/files/LqTJRFny", "previewPath": "/files/pR4mGwVe" } } ] } } } ``` ``` -------------------------------- ### List UnitOfMeasurementSalesSetups Source: https://developer.sage.com/sageactive/resources/unitofmeasurementsalessetup Retrieves a list of unit of measurement sales setups. This endpoint can be used to fetch all configurations. ```APIDOC ## POST /unitOfMeasurementSalesSetups ### Description Retrieves a list of unit of measurement sales setups. ### Method POST ### Endpoint /unitOfMeasurementSalesSetups ### Request Body This endpoint accepts a query object to filter the results. For example, to retrieve all configurations: ```json { "query": {} } ``` ### Request Example ```json { "query": {} } ``` ### Response #### Success Response (200) Returns a list of unit of measurement sales setup objects. ### Response Example ```json { "items": [ { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "active": true, "category": "PRODUCT", "unitOfMeasurement": { "id": "unit-123", "name": "Piece", "abbreviation": "pc" }, "unitOfMeasurementId": "unit-123" } ], "total": 1 } ``` ``` -------------------------------- ### Verify Node.js Installation Source: https://developer.sage.com/sageactive/guides/samplequotes/samplequotes-testlocally After installing Node.js, use this command in the Command Prompt to verify the installation by checking the Node.js version. ```bash node -v ``` -------------------------------- ### Response for Multiple KPIs Query Source: https://developer.sage.com/sageactive/resources/saleskpis Example response after querying for multiple KPIs. ```json { "data": { "salesKpis": [ { "type": "MONEY_IN", "value": 79566.8, "currency": "EUR" }, { "type": "MONEY_OUT", "value": 23415.25, "currency": "EUR" } ] } } ``` -------------------------------- ### Accounting KPIs Response Example Source: https://developer.sage.com/sageactive/resources/accountingkpis This is an example response structure for a single KPI retrieval. ```json { "data": { "accountingKpis": [ { "type": "RESULT", "value": 7591496.65, "currency": "EUR" } ] } } ``` -------------------------------- ### Example Response for Files Query Source: https://developer.sage.com/sageactive/resources/filemanagement_filesexport This is an example JSON response from the files query, showing details for an `index.csv` file and a ZIP archive. It includes metadata like file name, type, size, and download path. ```json { "data": { "files": { "edges": [ { "node": { "id": "d2c33b7f-4c89-4e21-9f6e-1a75a1f4f8aa.csv", "fileName": "index", "type": "csv", "mimeType": "text/csv", "size": 1842, "uploadDate": "2025-09-15T10:05:23Z", "downloadPath": "/files/LqTJRFny", "previewPath": "/files/aZ3kTyPq", "filesExport": true } }, { "node": { "id": "7a5b91d2-8e72-4d3a-92ac-3dbcf76f3214.zip", "fileName": "archives", "type": "zip", "mimeType": "application/zip", "size": 6543210, "uploadDate": "2025-09-15T10:05:24Z", "downloadPath": "/files/M8rNfVxJ", "previewPath": "/files/pR4mGwVe", "filesExport": true } } ] } } } ``` -------------------------------- ### Example GraphQL Upload Response Source: https://developer.sage.com/sageactive/resources/filemanagement_ap_automation This is an example of a successful response after uploading a file via GraphQL. ```json { "data": { "uploadFileToEntity": { "id": "f3a28b79dce24f129e7e4a4a98b4b13f.pdf" } } } ``` -------------------------------- ### Example Response from User Access Policy Check Source: https://developer.sage.com/sageactive/resources/useraccesspolicycheck This is an example of the response structure you can expect from the userAccessPolicyCheck service. It indicates whether each requested action is allowed for the current user. ```json { "data": { "userAccessPolicyCheck": [ { "action": "createCustomer", "isAllowed": true }, { "action": "deleteSalesQuote", "isAllowed": false }, { "action": "accountingAccounts", "isAllowed": true } ] } } ``` -------------------------------- ### Removed JavaScript Example (ById) Source: https://developer.sage.com/sageactive/concepts/filteredbyid Example of how to access data from the removed 'accountingAccountById' query response. ```javascript let accountId = response.data.accountingAccountById.id; ``` -------------------------------- ### organizationSalesSetupByOrgId Source: https://developer.sage.com/sageactive/resources/organizationsalessetup Fetches detailed sales setup information for a specific organization, including posting permissions, discount configurations, and inventory settings. ```APIDOC ## POST organizationSalesSetupByOrgId ### Description The organizationSalesSetupByOrgId operation allows developers to fetch detailed sales setup information for a specific organization. This setup includes key parameters necessary for managing sales, purchase invoices, inventory, and discount configurations effectively. ### Method POST ### Endpoint organizationSalesSetupByOrgId ### Parameters #### Query Parameters - **id** (ID!) - Required - The unique identifier of the organization. #### Headers - **Authorization** (string) - Required - Bearer Current access Token - **X-OrganizationId** (string) - Required - Current organization Id - **x-api-key** (string) - Required - Primary or secondary subscription key of your app ### Request Example ```graphql query ($id: ID!) { organizationSalesSetupByOrgId(id: $id) { salesInvoiceDefaultPresetTextId salesCreditNoteDefaultPresetTextId salesDeliveryNoteDefaultPresetTextId salesOrderDefaultPresetTextId useSalesTracking useVATRatesForDOM allowPostingSalesInvoice defaultSalesPostingInvoiceJournalTypeId defaultSalesPostingInvoiceSessionId allowPostingPurchaseInvoice defaultPurchasePostingInvoiceJournalTypeId defaultPurchasePostingInvoiceSessionId askGenerateNonIdentifiedSalesInvoicesByDefault nonIdentifiedSalesInvoiceMaxAmount } } ``` ### Request Variables Example ```json { "id":"{{X-OrganizationId}}" } ``` ### Response #### Success Response (200) - **salesInvoiceDefaultPresetTextId** (string) - The ID for the default sales invoice preset text. - **salesCreditNoteDefaultPresetTextId** (string) - The ID for the default sales credit note preset text. - **salesDeliveryNoteDefaultPresetTextId** (string) - The ID for the default sales delivery note preset text. - **salesOrderDefaultPresetTextId** (string) - The ID for the default sales order preset text. - **useSalesTracking** (boolean) - Indicates if sales tracking is enabled. - **useVATRatesForDOM** (boolean) - Indicates if VAT rates for DOM are used. - **allowPostingSalesInvoice** (boolean) - Indicates if posting sales invoices is allowed. - **defaultSalesPostingInvoiceJournalTypeId** (string) - The ID of the default journal type for posting sales invoices. - **defaultSalesPostingInvoiceSessionId** (string) - The ID of the default session for posting sales invoices. - **allowPostingPurchaseInvoice** (boolean) - Indicates if posting purchase invoices is allowed. - **defaultPurchasePostingInvoiceJournalTypeId** (string) - The ID of the default journal type for posting purchase invoices. - **defaultPurchasePostingInvoiceSessionId** (string) - The ID of the default session for posting purchase invoices. - **askGenerateNonIdentifiedSalesInvoicesByDefault** (boolean) - Indicates if non-identified sales invoices should be generated by default. - **nonIdentifiedSalesInvoiceMaxAmount** (number) - The maximum amount for non-identified sales invoices. #### Response Example ```json { "data": { "organizationSalesSetupByOrgId": { "salesInvoiceDefaultPresetTextId": "01234567-89ab-cdef-0123-456789abcdef", "salesCreditNoteDefaultPresetTextId": "41234567-89ab-cdef-0123-456789abcdef", "salesDeliveryNoteDefaultPresetTextId": "52234567-89ab-cdef-0123-456789abcdef", "salesOrderDefaultPresetTextId": "63234567-89ab-cdef-0123-456789abcdef", "useSalesTracking": true, "useVATRatesForDOM": false, "allowPostingSalesInvoice": true, "defaultSalesPostingInvoiceJournalTypeId": "81234567-89ab-cdef-0123-456789abcdef", "defaultSalesPostingInvoiceSessionId": "71234567-89ab-cdef-0123-456789abcdef", "allowPostingPurchaseInvoice": false, "defaultPurchasePostingInvoiceJournalTypeId": "a1234567-89ab-cdef-0123-456789abcdef", "defaultPurchasePostingInvoiceSessionId": "882f7366-8927-49c3-aa01-2162ea3d2439", "askGenerateNonIdentifiedSalesInvoicesByDefault": true, "nonIdentifiedSalesInvoiceMaxAmount": 400 } } } ``` ``` -------------------------------- ### Get Accounting Report Positions Source: https://developer.sage.com/sageactive/resources/accountingreportpositions Retrieves accounting report positions. You can specify an account ID to get positions for a specific account, or omit it to get positions for all accounts. The `isDetail` parameter controls whether to include detailed information for each position. ```APIDOC ## Get Accounting Report Positions ### Description Retrieves accounting report positions. You can specify an account ID to get positions for a specific account, or omit it to get positions for all accounts. The `isDetail` parameter controls whether to include detailed information for each position. ### Method POST ### Endpoint /graphql ### Parameters #### Query Parameters - **query** (String) - Required - The GraphQL query string. - **variables** (Object) - Optional - The variables for the GraphQL query. ### Request Body Example ```json { "query": "query($input: AccountingReportPositionGLDtoInput!) { accountingReportPositions(input: $input) { id code description accountType accountLevel subAccountType taxTreatmentId deactivated collectiveAccount datevAutomaticAccount datevAccountNumber applyVat reportPositions { balanceGuideLineId balanceGuideLineCode balanceGuideLineDescription isDetail isMain alternativePositionIfNegative } } }", "variables": { "input": { "accountId": "57dc1e99-652e-48ca-b1ef-2e5b233e988d", "isDetail": true } } } ``` ### Response #### Success Response (200) - **data** (Object) - Contains the result of the query. - **accountingReportPositions** (Array) - List of accounting report positions. - **id** (UUID) - Account ID. - **code** (String) - Account code. - **description** (String) - Account description. - **accountType** (String) - Account type (e.g., BALANCE_SHEET, INCOME_STATEMENT). - **accountLevel** (String) - Account hierarchy level (e.g., ACCOUNT, SUB_ACCOUNT). - **subAccountType** (String) - Subcategory of the account. - **taxTreatmentId** (UUID) - ID of the applicable tax treatment. - **deactivated** (Boolean) - Whether the account is deactivated. - **collectiveAccount** (Boolean) - Whether the account is collective. - **datevAutomaticAccount** (Boolean) - Whether the account is automatically managed in DATEV. - **datevAccountNumber** (String) - The account number used in the DATEV system. - **applyVat** (Boolean) - Whether VAT should be applied to the account. - **reportPositions** (Array) - List of positions where the account appears. - **balanceGuideLineId** (UUID) - ID of the balance guideline. - **balanceGuideLineCode** (String) - Code of the balance guideline. - **balanceGuideLineDescription** (String) - Description of the balance guideline. - **isDetail** (Boolean) - Indicates if detailed position information is included. - **isMain** (Boolean) - Indicates if this is the main position. - **alternativePositionIfNegative** (Boolean) - Indicates if an alternative position is used when negative. ### Response Example ```json { "data": { "accountingReportPositions": [ { "id": "3cff68b5-e785-4b2b-95a6-1fae95af9f2c", "code": "612200", "description": "612200 - Redevance crédit-bail mobilier", "accountType": "BALANCE_SHEET", "accountLevel": "SUB_ACCOUNT", "subAccountType": "CHARGE", "taxTreatmentId": "40904303-5c02-4784-a505-9c0325b7a40f", "deactivated": false, "collectiveAccount": false, "datevAutomaticAccount": false, "datevAccountNumber": null, "applyVat": false, "reportPositions": [ { "balanceGuideLineId": "e3e4fc20-bcb4-419c-bb09-b4ee39e61dac", "balanceGuideLineCode": "C00203", "balanceGuideLineDescription": "Autres achats et charges externes (1)", "isDetail": false, "isMain": false, "alternativePositionIfNegative": false }, { "balanceGuideLineId": "ae51dc12-f108-41a6-9583-6b45b6979c40", "balanceGuideLineCode": "C0020301", "balanceGuideLineDescription": "Redevances de crédit-bail mobilier", "isDetail": true, "isMain": false, "alternativePositionIfNegative": false } ] } ] } } ``` ``` -------------------------------- ### Sales Document Variables Example Source: https://developer.sage.com/sageactive/resources/salesdocumenttransformation Example JSON structure for sales document transformation, showing how to reference customer, product, and origin document details using placeholders. ```json { "values": { "customerId": "{{customerId}}", "lines": [ { "productId": "{{productId_1}}", "totalQuantity": 5, "unitPrice": 20, "originType": "DELIVERY_NOTE", "originId": "{{deliveryNoteId}}", "originLineId": "{{deliveryNoteLineId}}" } ] } } ``` -------------------------------- ### Example Response for ReconcileBankMovement Source: https://developer.sage.com/sageactive/resources/reconcilebankmovement This is an example of a successful response from the `reconcileBankMovement` mutation, indicating the ID of the reconciled bank transaction. ```json { "data": { "reconcileBankMovement": { "id": "11111111-1111-1111-1111-111111111111" } } } ``` -------------------------------- ### Query Files with Filters Source: https://developer.sage.com/sageactive/resources/filemanagement_files?highlight=status This example demonstrates how to query files associated with a specific accounting entry, applying filters for entity type, entity ID, business date range, and file name. It also shows how to order the results by business date in descending order and limit the number of results. ```APIDOC ## GET /files ### Description Retrieves a list of files based on specified criteria, including filtering, ordering, and pagination. ### Method GET ### Endpoint /files ### Parameters #### Query Parameters - **entityType** (string) - Optional - Filters files by their entity type (e.g., ACCOUNTING_ENTRY). - **entityId** (string) - Optional - Filters files by their associated entity ID. - **businessDate** (string) - Optional - Filters files by business date. Supports range queries (gte, lte). - **fileName** (string) - Optional - Filters files by name, supporting partial, case-insensitive matches (contains). - **type** (string) - Optional - Filters files by their type (e.g., pdf). - **filesExport** (boolean) - Optional - Filters files generated by filesExport. - **order** (object) - Optional - Specifies the ordering of results. Supported fields include `businessDate` with `ASC` or `DESC` directions. - **first** (integer) - Optional - Specifies the number of results to return, with a maximum of 500. Supports cursor-based pagination. ### Request Example ```graphql query { files( order: { businessDate: DESC }, where: { entityType: { eq: ACCOUNTING_ENTRY } entityId: { eq: "8b21a143-4d9c-41ea-b1dc-1cf9d91a72f1" } businessDate: { gte: "2024-01-01" } businessDate: { lte: "2025-04-30" } fileName: { contains: "invoice" } type: { eq: "pdf" } }, first: 10 ) { edges { node { id fileName type mimeType size businessDate comment uploadDate entityType entityId downloadPath previewPath } } } } ``` ### Response #### Success Response (200) - **data** (object) - Contains the query results. - **files** (object) - **edges** (array) - A list of file objects. - **node** (object) - Represents a single file with its properties (id, fileName, type, mimeType, size, businessDate, comment, uploadDate, entityType, entityId, downloadPath, previewPath). #### Response Example ```json { "data": { "files": { "edges": [ { "node": { "id": "98f7adc7dd104cd984f9c113ef9a8e54.pdf", "fileName": "invoice-q1.pdf", "type": "pdf", "mimeType": "application/pdf", "size": 2497741, "businessDate": "2025-04-04T00:00:00Z", "comment": "Invoice for Q1", "uploadDate": "2025-04-04T08:12:43Z", "entityType": "ACCOUNTING_ENTRY", "entityId": "8b21a143-4d9c-41ea-b1dc-1cf9d91a72f1", "downloadPath": "/files/LqTJRFny", "previewPath": "/files/pR4mGwVe" } } ] } } } ``` ``` -------------------------------- ### Example Response from DocumentPdfEmail Source: https://developer.sage.com/sageactive/resources/pdfemail This is an example of a successful response from the DocumentPdfEmail service, confirming the type and ID of the processed document. ```json { "data": { "documentPdfEmail": { "type": "SALES_INVOICE", "id": "0e1987c3-1f23-4906-8b26-42e4a4c36079" } } } ```